-
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
Conversation
Co-authored-by: Wei Chen<[email protected]>
Co-authored-by: Wei Chen<[email protected]>
Co-authored-by: Wei Chen<[email protected]>
5023413
to
2864425
Compare
Pull Request Test Coverage Report for Build 8318498735Details
💛 - Coveralls |
As per mentioned in #4147, the feature gate is by default enabled in all k8s versions we currently support. |
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.
approved pending agentbaker e2es
// Default: "0s" | ||
// +featureGate=GracefulNodeShutdown | ||
// +optional | ||
ShutdownGracePeriodCriticalPods Duration `json:"shutdownGracePeriodCriticalPods,omitempty"` |
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 than ShutdownGracePeriod
?
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
and ImageGcLowThreshold
.
@@ -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 comment
The 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 IsKubernetesVersionGe(xxx)
in this method? @UtheMan
I'm putting this on hold now as there might be some investigations I need to do before this can be merged. |
@weichch closing for now due to inactivity, feel free to reopen when needed |
What type of PR is this?
/kind feature
/kind api-change
What this PR does / why we need it:
This PR adds node graceful shutdown Kubelet config items and exposes those for client use, so that we can allow customers to enable this feature on their nodes.
This PR is recreated from the previous PR (#4147) from fork as per comment.
Which issue(s) this PR fixes:
Fixes #
Requirements:
Special notes for your reviewer:
Release note: