diff options
Diffstat (limited to 'catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/ready-probe.sh.erb')
-rw-r--r-- | catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/ready-probe.sh.erb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/ready-probe.sh.erb b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/ready-probe.sh.erb new file mode 100644 index 0000000000..9f6646d63d --- /dev/null +++ b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/ready-probe.sh.erb @@ -0,0 +1,9 @@ +#!/bin/bash +health_check_http_code=$(curl -k --max-time 5 -o /dev/null -w '%{http_code}' <%= @protocol %>://127.0.0.1:<%= @port %>/sdc2/rest/healthCheck) + +if [[ "$health_check_http_code" -eq 200 ]]; then + exit 0 +else + echo "Health check http status: $health_check_http_code" + exit 1 +fi |