Skip to content

Commit

Permalink
Add comment to check_gke about HTTP response codes
Browse files Browse the repository at this point in the history
  • Loading branch information
jamonation authored and ctalledo committed Sep 15, 2023
1 parent 2440b18 commit fed0ad3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions k8s/scripts/sysbox-deploy-k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,8 @@ function do_distro_adjustments() {

# determines if running on a GKE cluster by checking metadata endpoint
function check_gke() {
# GKE nodes will respond with an HTTP 200 for this URL and Metadata-Flavor header.
# Other clouds, URLs, etc. will throw a 404 error. If curl cannot connect the code will be 000.
is_cluster=$(curl -s -o /dev/null \
-w "%{http_code}" \
--connect-timeout 1 \
Expand Down

0 comments on commit fed0ad3

Please sign in to comment.