-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Allow to configure delay before controller exits #8143
Allow to configure delay before controller exits #8143
Conversation
Signed-off-by: Aditya Kamath <theunrealgeek@gmail.com>
@theunrealgeek: This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Welcome @theunrealgeek! |
Hi @theunrealgeek. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
cmd/nginx/main.go
Outdated
klog.Infof( | ||
"Handled quit, delaying controller exit for %d seconds", | ||
delay, | ||
) |
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.
klog.Infof( | |
"Handled quit, delaying controller exit for %d seconds", | |
delay, | |
) | |
klog.Infof("Handled quit, delaying controller exit for %d seconds", delay) |
Signed-off-by: Aditya Kamath <theunrealgeek@gmail.com>
/approve Just fix the recommended commit, and once that's fixed and the test passes lgtm! Thanks! |
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.
/lgtm
I had a small nit that this change of handleSigterm
is not required as the var postShutdownGradePEriod is from the same package but I'm fine with this as well. Maybe as a followup cleanup
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rikatz, theunrealgeek The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I actually tried to do it that way, but since flags were parsed into this Now within
|
* Allow to configure delay before controller exits Signed-off-by: Aditya Kamath <theunrealgeek@gmail.com> * Address comments Signed-off-by: Aditya Kamath <theunrealgeek@gmail.com>
What this PR does / why we need it:
Today there is a hardcoded 10 second delay after nginx has quit before the controller exits when the pod is to be terminated:
ingress-nginx/cmd/nginx/main.go
Line 178 in 5f7656f
This was raised as an issue since it adds unnecessary delay to pod termination. This PR makes it configurable while keeping the current behavior as default.
Types of changes
Which issue/s this PR fixes
#8095
How Has This Been Tested?
Tested in local dev environment by adding
--post-shutdown-grace-period
with various values and terminating the pod to see the new log message and the delay.Checklist: