Merge pull request #96550 from knight42/chore/set-auth-flags

chore(gce): pass auth flags to KCM and KS
This commit is contained in:
Kubernetes Prow Robot 2021-01-06 07:47:52 -08:00 committed by GitHub
commit 9e05ef5ba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1990,9 +1990,10 @@ function start-kube-controller-manager {
prepare-log-file /var/log/kube-controller-manager.log
# Calculate variables and assemble the command line.
local params=("${CONTROLLER_MANAGER_TEST_LOG_LEVEL:-"--v=2"}" "${CONTROLLER_MANAGER_TEST_ARGS:-}" "${CLOUD_CONFIG_OPT}")
local config_path='/etc/srv/kubernetes/kube-controller-manager/kubeconfig'
params+=("--use-service-account-credentials")
params+=("--cloud-provider=gce")
params+=("--kubeconfig=/etc/srv/kubernetes/kube-controller-manager/kubeconfig")
params+=("--kubeconfig=${config_path}" "--authentication-kubeconfig=${config_path}" "--authorization-kubeconfig=${config_path}")
params+=("--root-ca-file=${CA_CERT_BUNDLE_PATH}")
params+=("--service-account-private-key-file=${SERVICEACCOUNT_KEY_PATH}")
if [[ -n "${ENABLE_GARBAGE_COLLECTOR:-}" ]]; then
@ -2124,6 +2125,10 @@ function start-kube-scheduler {
fi
fi
local config_path
config_path='/etc/srv/kubernetes/kube-scheduler/kubeconfig'
params+=("--authentication-kubeconfig=${config_path}" "--authorization-kubeconfig=${config_path}")
local paramstring
paramstring="$(convert-manifest-params "${params[*]}")"
local -r kube_scheduler_docker_tag=$(cat "${KUBE_HOME}/kube-docker-files/kube-scheduler.docker_tag")