Commit 0ac34781 authored by Jacob Simpson's avatar Jacob Simpson

Add env var to enable kubelet rotation in kube-up.sh.

parent 3c8fb4b9
...@@ -757,6 +757,11 @@ EOF ...@@ -757,6 +757,11 @@ EOF
FEATURE_GATES: $(yaml-quote ${FEATURE_GATES}) FEATURE_GATES: $(yaml-quote ${FEATURE_GATES})
EOF EOF
fi fi
if [ -n "${ROTATE_CERTIFICATES:-}" ]; then
cat >>$file <<EOF
ROTATE_CERTIFICATES: $(yaml-quote ${ROTATE_CERTIFICATES})
EOF
fi
if [[ "${master}" == "true" && "${MASTER_OS_DISTRIBUTION}" == "gci" ]] || if [[ "${master}" == "true" && "${MASTER_OS_DISTRIBUTION}" == "gci" ]] ||
[[ "${master}" == "false" && "${NODE_OS_DISTRIBUTION}" == "gci" ]]; then [[ "${master}" == "false" && "${NODE_OS_DISTRIBUTION}" == "gci" ]]; then
cat >>$file <<EOF cat >>$file <<EOF
......
...@@ -319,3 +319,6 @@ ENABLE_POD_PRIORITY="${ENABLE_POD_PRIORITY:-}" ...@@ -319,3 +319,6 @@ ENABLE_POD_PRIORITY="${ENABLE_POD_PRIORITY:-}"
if [[ "${ENABLE_POD_PRIORITY}" == "true" ]]; then if [[ "${ENABLE_POD_PRIORITY}" == "true" ]]; then
FEATURE_GATES="${FEATURE_GATES},PodPriority=true" FEATURE_GATES="${FEATURE_GATES},PodPriority=true"
fi fi
# Optional: enable certificate rotation of the kubelet certificates.
ROTATE_CERTIFICATES="${ROTATE_CERTIFICATES:-}"
...@@ -376,3 +376,6 @@ ENABLE_POD_PRIORITY="${ENABLE_POD_PRIORITY:-}" ...@@ -376,3 +376,6 @@ ENABLE_POD_PRIORITY="${ENABLE_POD_PRIORITY:-}"
if [[ "${ENABLE_POD_PRIORITY}" == "true" ]]; then if [[ "${ENABLE_POD_PRIORITY}" == "true" ]]; then
FEATURE_GATES="${FEATURE_GATES},PodPriority=true" FEATURE_GATES="${FEATURE_GATES},PodPriority=true"
fi fi
# Optional: enable certificate rotation of the kubelet certificates.
ROTATE_CERTIFICATES="${ROTATE_CERTIFICATES:-}"
...@@ -961,6 +961,9 @@ function start-kubelet { ...@@ -961,6 +961,9 @@ function start-kubelet {
if [[ -n "${FEATURE_GATES:-}" ]]; then if [[ -n "${FEATURE_GATES:-}" ]]; then
flags+=" --feature-gates=${FEATURE_GATES}" flags+=" --feature-gates=${FEATURE_GATES}"
fi fi
if [[ -n "${ROTATE_CERTIFICATES:-}" ]]; then
flags+=" --rotate-certificates=true"
fi
local -r kubelet_env_file="/etc/default/kubelet" local -r kubelet_env_file="/etc/default/kubelet"
echo "KUBELET_OPTS=\"${flags}\"" > "${kubelet_env_file}" echo "KUBELET_OPTS=\"${flags}\"" > "${kubelet_env_file}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment