mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 23:19:26 +00:00
Merge pull request #8894 from cjcullen/kmaster2
Add an explicit variable to indicate whether an instance is master or not
This commit is contained in:
@@ -51,6 +51,7 @@ EOF
|
||||
if [[ "${master}" == "true" ]]; then
|
||||
# Master-only env vars.
|
||||
cat >>$file <<EOF
|
||||
KUBERNETES_MASTER: "true"
|
||||
KUBE_USER: $(yaml-quote ${KUBE_USER})
|
||||
KUBE_PASSWORD: $(yaml-quote ${KUBE_PASSWORD})
|
||||
KUBE_BEARER_TOKEN: $(yaml-quote ${KUBE_BEARER_TOKEN})
|
||||
@@ -62,6 +63,7 @@ EOF
|
||||
else
|
||||
# Node-only env vars.
|
||||
cat >>$file <<EOF
|
||||
KUBERNETES_MASTER: "false"
|
||||
KUBERNETES_MASTER_NAME: $(yaml-quote ${MASTER_NAME})
|
||||
ZONE: $(yaml-quote ${ZONE})
|
||||
EXTRA_DOCKER_OPTS: $(yaml-quote ${EXTRA_DOCKER_OPTS})
|
||||
|
Reference in New Issue
Block a user