Add an alternative TokenSource to the GCE CloudProvider.

This commit is contained in:
CJ Cullen
2015-03-31 09:41:27 -07:00
parent ce72839153
commit 5e6e67ba59
5 changed files with 124 additions and 16 deletions

View File

@@ -300,6 +300,16 @@ grains:
cbr-cidr: ${MASTER_IP_RANGE}
cloud: gce
EOF
if ! [[ -z "${PROJECT_ID:-}" ]] && ! [[ -z "${TOKEN_URL:-}" ]]; then
cat <<EOF >/etc/gce.conf
[global]
token-url = ${TOKEN_URL}
project-id = ${PROJECT_ID}
EOF
cat <<EOF >>/etc/salt/minion.d/grains.conf
cloud_config: /etc/gce.conf
EOF
fi
}
function salt-node-role() {