-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding health check for backup gateway (#8297)
* Adding health check for backup gateway Signed-off-by: Arvinth C <[email protected]> * Health check log Signed-off-by: Arvinth C <[email protected]> * Addinf root ca in seperate file for backup gateway Signed-off-by: Arvinth C <[email protected]> * Addinf root ca in seperate file for backup gateway Signed-off-by: Arvinth C <[email protected]> * trigger build Signed-off-by: Arvinth C <[email protected]> * Pipeline fix Signed-off-by: Arvinth C <[email protected]> --------- Signed-off-by: Arvinth C <[email protected]>
- Loading branch information
1 parent
dd55cc4
commit 87558ff
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{cfg.tls.root_cert_contents}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!{{pkgPathFor "core/bash"}}/bin/bash | ||
|
||
exec 2>&1 | ||
|
||
curlOpts="-sS --fail --max-time 2 -o /dev/null -s -w %{http_code}" | ||
curlOpts="$curlOpts --cert {{pkg.svc_config_path}}/public.crt" | ||
curlOpts="$curlOpts --key {{pkg.svc_config_path}}/private.key" | ||
curlOpts="$curlOpts --cacert {{pkg.svc_config_path}}/root-ca.crt" | ||
curlOpts="$curlOpts --resolve backup-gateway:{{cfg.service.port}}:127.0.0.1" | ||
curlOpts="$curlOpts --noproxy backup-gateway" | ||
|
||
# shellcheck disable=SC2086 | ||
output=$(curl $curlOpts https://backup-gateway:{{cfg.service.port}}/minio/health/ready 2>&1) | ||
res=$? | ||
echo "health check status code: $output" | ||
if [[ "$res" != "0" ]]; then | ||
echo "health check curl command returned exit code $res:" | ||
echo "$output" | ||
exit 2 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ pkg_deps=( | |
chef/automate-platform-tools | ||
) | ||
|
||
|
||
pkg_exports=( | ||
[port]=service.port | ||
) | ||
|