mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
Add support for HA kubemark
This commit is contained in:
parent
9138514fab
commit
bf5424bbbf
@ -35,6 +35,10 @@ function create-kubemark-master {
|
|||||||
# We intentionally override env vars in subshell to preserve original values.
|
# We intentionally override env vars in subshell to preserve original values.
|
||||||
# shellcheck disable=SC2030,SC2031
|
# shellcheck disable=SC2030,SC2031
|
||||||
(
|
(
|
||||||
|
# All calls to e2e-grow-cluster must share temp dir with initial e2e-up.sh.
|
||||||
|
kube::util::ensure-temp-dir
|
||||||
|
export KUBE_TEMP="${KUBE_TEMP}"
|
||||||
|
|
||||||
export KUBECONFIG="${RESOURCE_DIRECTORY}/kubeconfig.kubemark"
|
export KUBECONFIG="${RESOURCE_DIRECTORY}/kubeconfig.kubemark"
|
||||||
export CLUSTER_NAME="${CLUSTER_NAME}-kubemark"
|
export CLUSTER_NAME="${CLUSTER_NAME}-kubemark"
|
||||||
export KUBE_CREATE_NODES=false
|
export KUBE_CREATE_NODES=false
|
||||||
@ -72,6 +76,13 @@ function create-kubemark-master {
|
|||||||
done
|
done
|
||||||
|
|
||||||
"${KUBE_ROOT}/hack/e2e-internal/e2e-up.sh"
|
"${KUBE_ROOT}/hack/e2e-internal/e2e-up.sh"
|
||||||
|
|
||||||
|
if [[ "${KUBEMARK_HA_MASTER:-}" == "true" && -n "${KUBEMARK_MASTER_ADDITIONAL_ZONES:-}" ]]; then
|
||||||
|
for KUBE_GCE_ZONE in ${KUBEMARK_MASTER_ADDITIONAL_ZONES}; do
|
||||||
|
KUBE_GCE_ZONE="${KUBE_GCE_ZONE}" KUBE_REPLICATE_EXISTING_MASTER=true \
|
||||||
|
"${KUBE_ROOT}/hack/e2e-internal/e2e-grow-cluster.sh"
|
||||||
|
done
|
||||||
|
fi
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,6 +96,14 @@ function delete-kubemark-master {
|
|||||||
export KUBE_DELETE_NETWORK=false
|
export KUBE_DELETE_NETWORK=false
|
||||||
# Even if the "real cluster" is private, we shouldn't manage cloud nat.
|
# Even if the "real cluster" is private, we shouldn't manage cloud nat.
|
||||||
export KUBE_GCE_PRIVATE_CLUSTER=false
|
export KUBE_GCE_PRIVATE_CLUSTER=false
|
||||||
|
|
||||||
|
if [[ "${KUBEMARK_HA_MASTER:-}" == "true" && -n "${KUBEMARK_MASTER_ADDITIONAL_ZONES:-}" ]]; then
|
||||||
|
for KUBE_GCE_ZONE in ${KUBEMARK_MASTER_ADDITIONAL_ZONES}; do
|
||||||
|
KUBE_GCE_ZONE="${KUBE_GCE_ZONE}" KUBE_REPLICATE_EXISTING_MASTER=true \
|
||||||
|
"${KUBE_ROOT}/hack/e2e-internal/e2e-shrink-cluster.sh"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
"${KUBE_ROOT}/hack/e2e-internal/e2e-down.sh"
|
"${KUBE_ROOT}/hack/e2e-internal/e2e-down.sh"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user