Commit 708553f0 authored by Zach Loafman's avatar Zach Loafman

GCE node salt: Use the master FQDN, not the master IP

This will allow us to upgrade the master by full re-provision, without even bothering to reserve the IP.
parent 8a7a1273
...@@ -324,15 +324,15 @@ EOF ...@@ -324,15 +324,15 @@ EOF
} }
function salt-set-apiserver() { function salt-set-apiserver() {
local kube_master_ip local kube_master_fqdn
until kube_master_ip=$(getent hosts ${KUBERNETES_MASTER_NAME} | cut -f1 -d\ ); do until kube_master_fqdn=$(getent hosts ${KUBERNETES_MASTER_NAME} | awk '{ print $2 }'); do
echo 'Waiting for DNS resolution of ${KUBERNETES_MASTER_NAME}...' echo 'Waiting for DNS resolution of ${KUBERNETES_MASTER_NAME}...'
sleep 3 sleep 3
done done
cat <<EOF >>/etc/salt/minion.d/grains.conf cat <<EOF >>/etc/salt/minion.d/grains.conf
api_servers: '${kube_master_ip}' api_servers: '${kube_master_fqdn}'
apiservers: '${kube_master_ip}' apiservers: '${kube_master_fqdn}'
EOF EOF
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment