Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS: Set hostname_override for minions, back to fully-qualified name #7182

Merged
merged 1 commit into from
Apr 22, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions cluster/aws/templates/salt-minion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ grains:
cloud: aws
EOF

# We set the hostname_override to the full EC2 private dns name
# we'd like to use EC2 instance-id, but currently the kubelet health-check assumes the name
# is resolvable, although that check should be going away entirely (#7092)
if [[ -z "${HOSTNAME_OVERRIDE}" ]]; then
HOSTNAME_OVERRIDE=`curl --silent curl http://169.254.169.254/2007-01-19/meta-data/local-hostname`
fi

if [[ -n "${HOSTNAME_OVERRIDE}" ]]; then
cat <<EOF >>/etc/salt/minion.d/grains.conf
hostname_override: "${HOSTNAME_OVERRIDE}"
EOF
fi

if [[ -n "${DOCKER_OPTS}" ]]; then
cat <<EOF >>/etc/salt/minion.d/grains.conf
Expand Down