From 6c9ab10872df6b7c9c8991dce7bb4b2bfbb27b16 Mon Sep 17 00:00:00 2001 From: Jian Zeng Date: Wed, 12 May 2021 22:47:53 +0800 Subject: [PATCH] feat: set some auth flags for KCM and KS Set `--authentication-kubeconfig` and `--authorization-kubeconfig` to enable metrics to be grabbed from the secure port. Signed-off-by: Jian Zeng --- hack/local-up-cluster.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 69b723f7cd2..d716e7b4fcf 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -654,6 +654,8 @@ function start_controller_manager { --pvclaimbinder-sync-period="${CLAIM_BINDER_SYNC_PERIOD}" \ --feature-gates="${FEATURE_GATES}" \ "${cloud_config_arg[@]}" \ + --authentication-kubeconfig "${CERT_DIR}"/controller.kubeconfig \ + --authorization-kubeconfig "${CERT_DIR}"/controller.kubeconfig \ --kubeconfig "${CERT_DIR}"/controller.kubeconfig \ --use-service-account-credentials \ --controllers="${KUBE_CONTROLLERS}" \ @@ -917,6 +919,8 @@ EOF --v="${LOG_LEVEL}" \ --config=/tmp/kube-scheduler.yaml \ --feature-gates="${FEATURE_GATES}" \ + --authentication-kubeconfig "${CERT_DIR}"/scheduler.kubeconfig \ + --authorization-kubeconfig "${CERT_DIR}"/scheduler.kubeconfig \ --master="https://${API_HOST}:${API_SECURE_PORT}" >"${SCHEDULER_LOG}" 2>&1 & SCHEDULER_PID=$! }