summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLingxian Kong <anlin.kong@gmail.com>2018-11-02 18:38:07 +1300
committerLingxian Kong <anlin.kong@gmail.com>2018-11-03 12:34:51 +0000
commit5d1eab9d9f896f6adf5a31a17c43995377a93f78 (patch)
tree6f378888545b74b702d6caeb6782d4778d4488d2
parent83fa9d1b4e4ec764896e13d95587dbe3094e92ab (diff)
[K8S] Pass cluster name to controller-manager
The cluster name is useful to identify resources created in different k8s clusters, especially in the cloud environment, the cluster name is always injected into the name of the cloud resources(e.g. the load balancer, volume, etc.), which is helpful for the cluster resource clean up. The magnum cluster UUID is used as the value of '--cluster-name' option. Story: 2004242 Task: 27766 Change-Id: I245a8869948a0b8bfa8d5cc32e7fb9277477026a
Notes
Notes (review): Code-Review+2: Spyros Trigazis <strigazi@gmail.com> Workflow+1: Spyros Trigazis <strigazi@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 06 Nov 2018 09:42:36 +0000 Reviewed-on: https://review.openstack.org/614996 Project: openstack/magnum Branch: refs/heads/master
-rw-r--r--magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-master.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-master.sh b/magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-master.sh
index 232c21a..fc5ca4a 100644
--- a/magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-master.sh
+++ b/magnum/drivers/common/templates/kubernetes/fragments/configure-kubernetes-master.sh
@@ -90,6 +90,7 @@ sed -i '
90 90
91# Add controller manager args 91# Add controller manager args
92KUBE_CONTROLLER_MANAGER_ARGS="--leader-elect=true" 92KUBE_CONTROLLER_MANAGER_ARGS="--leader-elect=true"
93KUBE_CONTROLLER_MANAGER_ARGS="$KUBE_CONTROLLER_MANAGER_ARGS --cluster-name=${CLUSTER_UUID}"
93KUBE_CONTROLLER_MANAGER_ARGS="$KUBE_CONTROLLER_MANAGER_ARGS $KUBECONTROLLER_OPTIONS" 94KUBE_CONTROLLER_MANAGER_ARGS="$KUBE_CONTROLLER_MANAGER_ARGS $KUBECONTROLLER_OPTIONS"
94if [ -n "${ADMISSION_CONTROL_LIST}" ] && [ "${TLS_DISABLED}" == "False" ]; then 95if [ -n "${ADMISSION_CONTROL_LIST}" ] && [ "${TLS_DISABLED}" == "False" ]; then
95 KUBE_CONTROLLER_MANAGER_ARGS="$KUBE_CONTROLLER_MANAGER_ARGS --service-account-private-key-file=$CERT_DIR/service_account_private.key --root-ca-file=$CERT_DIR/ca.crt" 96 KUBE_CONTROLLER_MANAGER_ARGS="$KUBE_CONTROLLER_MANAGER_ARGS --service-account-private-key-file=$CERT_DIR/service_account_private.key --root-ca-file=$CERT_DIR/ca.crt"