mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 07:03:31 +00:00
Refactor GCE kube-env for both OSes.
This commit is contained in:
@@ -41,16 +41,21 @@ ENABLE_CLUSTER_DNS: $(yaml-quote ${ENABLE_CLUSTER_DNS:-false})
|
||||
DNS_REPLICAS: $(yaml-quote ${DNS_REPLICAS:-})
|
||||
DNS_SERVER_IP: $(yaml-quote ${DNS_SERVER_IP:-})
|
||||
DNS_DOMAIN: $(yaml-quote ${DNS_DOMAIN:-})
|
||||
KUBE_USER: $(yaml-quote ${KUBE_USER})
|
||||
KUBE_PASSWORD: $(yaml-quote ${KUBE_PASSWORD})
|
||||
KUBE_BEARER_TOKEN: $(yaml-quote ${KUBE_BEARER_TOKEN})
|
||||
KUBELET_TOKEN: $(yaml-quote ${KUBELET_TOKEN:-})
|
||||
KUBE_PROXY_TOKEN: $(yaml-quote ${KUBE_PROXY_TOKEN:-})
|
||||
ADMISSION_CONTROL: $(yaml-quote ${ADMISSION_CONTROL:-})
|
||||
MASTER_IP_RANGE: $(yaml-quote ${MASTER_IP_RANGE})
|
||||
EOF
|
||||
|
||||
if [[ "${master}" != "true" ]]; then
|
||||
if [[ "${master}" == "true" ]]; then
|
||||
# Master-only env vars.
|
||||
cat >>$file <<EOF
|
||||
KUBE_USER: $(yaml-quote ${KUBE_USER})
|
||||
KUBE_PASSWORD: $(yaml-quote ${KUBE_PASSWORD})
|
||||
KUBE_BEARER_TOKEN: $(yaml-quote ${KUBE_BEARER_TOKEN})
|
||||
EOF
|
||||
else
|
||||
# Node-only env vars.
|
||||
cat >>$file <<EOF
|
||||
KUBERNETES_MASTER_NAME: $(yaml-quote ${MASTER_NAME})
|
||||
ZONE: $(yaml-quote ${ZONE})
|
||||
|
Reference in New Issue
Block a user