Merge pull request #116385 from kinvolk/rata/local-up-chown

hack/local-up-cluster.sh: Always sudo chown the certs dir
This commit is contained in:
Kubernetes Prow Robot 2023-04-13 00:20:36 -07:00 committed by GitHub
commit aab9a7c262
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -502,6 +502,13 @@ function start_apiserver {
fi
if [[ "${REUSE_CERTS}" != true ]]; then
# Clean previous dynamic certs
# This file is owned by root, so we can't always overwrite it (depends if
# we run the script as root or not). Let's remove it, that is something we
# can always do: either we have write permissions as a user in CERT_DIR or
# we run the rm with sudo.
${CONTROLPLANE_SUDO} rm -f "${CERT_DIR}"/kubelet-rotated.kubeconfig
# Create Certs
generate_certs
fi