Skip to content

Commit

Permalink
Merge pull request #143 from kinarashah/aws
Browse files Browse the repository at this point in the history
set hostname for kube-proxy if cloud provider is aws
  • Loading branch information
kinarashah authored Jan 19, 2022
2 parents ba7983f + 3eab4f0 commit 5fda490
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ if echo ${@} | grep -q "cloud-provider=azure"; then
fi
fi

if [ "$1" = "kube-proxy" ]; then
if echo ${@} | grep -v "hostname-override"; then
hostname=$(curl "http://169.254.169.254/latest/meta-data/hostname")
set ${@} --hostname-override=$hostname
fi
fi

if [ "$1" = "kubelet" ]; then
DOCKER_ROOT=$(DOCKER_API_VERSION=1.24 /opt/rke-tools/bin/docker info 2>&1 | grep -i 'docker root dir' | cut -f2 -d:)
DOCKER_DIRS=$(find -O1 $DOCKER_ROOT -maxdepth 1) # used to exclude mounts that are subdirectories of $DOCKER_ROOT to ensure we don't unmount mounted filesystems on sub directories
Expand Down

0 comments on commit 5fda490

Please sign in to comment.