mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 18:54:06 +00:00
Add env var to enable kubelet rotation in kube-up.sh.
This commit is contained in:
parent
3c8fb4b90f
commit
0ac34781c8
@ -755,6 +755,11 @@ EOF
|
||||
if [ -n "${FEATURE_GATES:-}" ]; then
|
||||
cat >>$file <<EOF
|
||||
FEATURE_GATES: $(yaml-quote ${FEATURE_GATES})
|
||||
EOF
|
||||
fi
|
||||
if [ -n "${ROTATE_CERTIFICATES:-}" ]; then
|
||||
cat >>$file <<EOF
|
||||
ROTATE_CERTIFICATES: $(yaml-quote ${ROTATE_CERTIFICATES})
|
||||
EOF
|
||||
fi
|
||||
if [[ "${master}" == "true" && "${MASTER_OS_DISTRIBUTION}" == "gci" ]] ||
|
||||
|
@ -319,3 +319,6 @@ ENABLE_POD_PRIORITY="${ENABLE_POD_PRIORITY:-}"
|
||||
if [[ "${ENABLE_POD_PRIORITY}" == "true" ]]; then
|
||||
FEATURE_GATES="${FEATURE_GATES},PodPriority=true"
|
||||
fi
|
||||
|
||||
# Optional: enable certificate rotation of the kubelet certificates.
|
||||
ROTATE_CERTIFICATES="${ROTATE_CERTIFICATES:-}"
|
||||
|
@ -193,7 +193,7 @@ KUBEPROXY_TEST_ARGS="${KUBEPROXY_TEST_ARGS:-} ${TEST_CLUSTER_API_CONTENT_TYPE}"
|
||||
# TODO(piosz): remove this in 1.8
|
||||
NODE_LABELS="${KUBE_NODE_LABELS:-beta.kubernetes.io/fluentd-ds-ready=true}"
|
||||
|
||||
# To avoid running Calico on a node that is not configured appropriately,
|
||||
# To avoid running Calico on a node that is not configured appropriately,
|
||||
# label each Node so that the DaemonSet can run the Pods only on ready Nodes.
|
||||
if [[ ${NETWORK_POLICY_PROVIDER:-} == "calico" ]]; then
|
||||
NODE_LABELS="$NODE_LABELS,projectcalico.org/ds-ready=true"
|
||||
@ -376,3 +376,6 @@ ENABLE_POD_PRIORITY="${ENABLE_POD_PRIORITY:-}"
|
||||
if [[ "${ENABLE_POD_PRIORITY}" == "true" ]]; then
|
||||
FEATURE_GATES="${FEATURE_GATES},PodPriority=true"
|
||||
fi
|
||||
|
||||
# Optional: enable certificate rotation of the kubelet certificates.
|
||||
ROTATE_CERTIFICATES="${ROTATE_CERTIFICATES:-}"
|
||||
|
@ -961,6 +961,9 @@ function start-kubelet {
|
||||
if [[ -n "${FEATURE_GATES:-}" ]]; then
|
||||
flags+=" --feature-gates=${FEATURE_GATES}"
|
||||
fi
|
||||
if [[ -n "${ROTATE_CERTIFICATES:-}" ]]; then
|
||||
flags+=" --rotate-certificates=true"
|
||||
fi
|
||||
|
||||
local -r kubelet_env_file="/etc/default/kubelet"
|
||||
echo "KUBELET_OPTS=\"${flags}\"" > "${kubelet_env_file}"
|
||||
|
Loading…
Reference in New Issue
Block a user