Skip to content

Commit a365edd

Browse files
committed
Conditionally add graceful shutdown Kubelet config
Signed-off-by: torredil <[email protected]>
1 parent 6e8e1f5 commit a365edd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cluster/gce/util.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,18 @@ authentication:
10291029
x509:
10301030
clientCAFile: /etc/srv/kubernetes/pki/ca-certificates.crt
10311031
EOF
1032+
1033+
if [[ -n "${SHUTDOWN_GRACE_PERIOD:-}" ]]; then
1034+
cat <<EOF
1035+
shutdownGracePeriod: ${SHUTDOWN_GRACE_PERIOD}
1036+
EOF
1037+
fi
1038+
1039+
if [[ -n "${SHUTDOWN_GRACE_PERIOD_CRITICAL_PODS:-}" ]]; then
1040+
cat <<EOF
1041+
shutdownGracePeriodCriticalPods: ${SHUTDOWN_GRACE_PERIOD_CRITICAL_PODS}
1042+
EOF
1043+
fi
10321044
}
10331045

10341046
# cat the Kubelet config yaml for windows nodes

0 commit comments

Comments
 (0)