Skip to content

Commit

Permalink
Update startup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
brentley authored Apr 9, 2019
1 parent cddbb1a commit a2fc6dd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -x

IP=$(ip route show |grep -o src.* |cut -f2 -d" ")
# kubernetes sets routes differently -- so we will discover our IP differently
if [[ ${IP} == "" ]]; then
IP=$(hostname -i)
fi
Expand Down Expand Up @@ -71,11 +72,6 @@ if [[ ${orchestrator} == 'unknown' ]]; then
zone=$(curl -m2 -s https://169.254.169.254/latest/dynamic/instance-identity/document | jq -r '.availabilityZone' | grep -o .$)
fi

# kubernetes sets routes differently -- so we will discover our IP differently
if [[ ${IP} == "" ]]; then
IP=$(hostname -i)
fi

# Am I on ec2 instances?
if [[ ${zone} == "unknown" ]]; then
zone=$(curl -m2 -s https://169.254.169.254/latest/dynamic/instance-identity/document | jq -r '.availabilityZone' | grep -o .$)
Expand Down

0 comments on commit a2fc6dd

Please sign in to comment.