-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add node graceful shutdown kubelet config #4149
Changes from all commits
23e1964
50e45e5
2864425
e0d0e87
6c10649
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -497,6 +497,12 @@ func setCustomKubeletConfig(customKc *datamodel.CustomKubeletConfig, | |
if customKc.PodMaxPids != nil { | ||
kubeletConfig.PodPidsLimit = to.Int64Ptr(int64(*customKc.PodMaxPids)) | ||
} | ||
if customKc.ShutdownGracePeriod != nil { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also wanted to add some defaulting logic based on Kubernetes version. What do you think if we add |
||
kubeletConfig.ShutdownGracePeriod = datamodel.Duration(fmt.Sprintf("%ds", *customKc.ShutdownGracePeriod)) | ||
} | ||
if customKc.ShutdownGracePeriodCriticalPods != nil { | ||
kubeletConfig.ShutdownGracePeriodCriticalPods = datamodel.Duration(fmt.Sprintf("%ds", *customKc.ShutdownGracePeriodCriticalPods)) | ||
} | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we validate whether
ShutdownGracePeriodCriticalPods
is lower thanShutdownGracePeriod
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Validation is going to be in RP, similar to
ImageGcHighThreshold
andImageGcLowThreshold
.