mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 21:21:14 +00:00
HA master: fixed removal of master replica w/no suffix (GCE).
HA master (GCE): fixed removal of master replica w/no suffix; fixed api-server flag of kubelets to point to external cluster's IP.
This commit is contained in:
@@ -540,14 +540,21 @@ EOF
|
||||
function write-master-env {
|
||||
# If the user requested that the master be part of the cluster, set the
|
||||
# environment variable to program the master kubelet to register itself.
|
||||
if [[ "${REGISTER_MASTER_KUBELET:-}" == "true" ]]; then
|
||||
if [[ "${REGISTER_MASTER_KUBELET:-}" == "true" && -z "${KUBELET_APISERVER:-}" ]]; then
|
||||
KUBELET_APISERVER="${MASTER_NAME}"
|
||||
fi
|
||||
if [[ -z "${KUBERNETES_MASTER_NAME:-}" ]]; then
|
||||
KUBERNETES_MASTER_NAME="${MASTER_NAME}"
|
||||
fi
|
||||
|
||||
build-kube-env true "${KUBE_TEMP}/master-kube-env.yaml"
|
||||
}
|
||||
|
||||
function write-node-env {
|
||||
if [[ -z "${KUBERNETES_MASTER_NAME:-}" ]]; then
|
||||
KUBERNETES_MASTER_NAME="${MASTER_NAME}"
|
||||
fi
|
||||
|
||||
build-kube-env false "${KUBE_TEMP}/node-kube-env.yaml"
|
||||
}
|
||||
|
||||
@@ -582,7 +589,7 @@ SERVER_BINARY_TAR_HASH: $(yaml-quote ${SERVER_BINARY_TAR_HASH})
|
||||
SALT_TAR_URL: $(yaml-quote ${salt_tar_url})
|
||||
SALT_TAR_HASH: $(yaml-quote ${SALT_TAR_HASH})
|
||||
SERVICE_CLUSTER_IP_RANGE: $(yaml-quote ${SERVICE_CLUSTER_IP_RANGE})
|
||||
KUBERNETES_MASTER_NAME: $(yaml-quote ${MASTER_NAME})
|
||||
KUBERNETES_MASTER_NAME: $(yaml-quote ${KUBERNETES_MASTER_NAME})
|
||||
ALLOCATE_NODE_CIDRS: $(yaml-quote ${ALLOCATE_NODE_CIDRS:-false})
|
||||
ENABLE_CLUSTER_MONITORING: $(yaml-quote ${ENABLE_CLUSTER_MONITORING:-none})
|
||||
DOCKER_REGISTRY_MIRROR_URL: $(yaml-quote ${DOCKER_REGISTRY_MIRROR_URL:-})
|
||||
|
Reference in New Issue
Block a user