Merge pull request #125413 from torredil/update-kubelet-config

Conditionally add the graceful shutdown Kubelet parameters
This commit is contained in:
Kubernetes Prow Robot 2024-06-19 21:18:15 -07:00 committed by GitHub
commit 78377c4d10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1029,6 +1029,18 @@ authentication:
x509:
clientCAFile: /etc/srv/kubernetes/pki/ca-certificates.crt
EOF
if [[ -n "${SHUTDOWN_GRACE_PERIOD:-}" ]]; then
cat <<EOF
shutdownGracePeriod: ${SHUTDOWN_GRACE_PERIOD}
EOF
fi
if [[ -n "${SHUTDOWN_GRACE_PERIOD_CRITICAL_PODS:-}" ]]; then
cat <<EOF
shutdownGracePeriodCriticalPods: ${SHUTDOWN_GRACE_PERIOD_CRITICAL_PODS}
EOF
fi
}
# cat the Kubelet config yaml for windows nodes