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
make Kubelet bootstrap certificate signal aware #92786
make Kubelet bootstrap certificate signal aware #92786
Conversation
Hi @answer1991. 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. |
0f2b51d
to
042c379
Compare
/sig node |
@answer1991: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
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. |
@answer1991 you have to be an org member to apply an "ok-to-test" label |
042c379
to
05bf028
Compare
@alejandrox1 thanks |
/retest |
1 similar comment
/retest |
05bf028
to
db71941
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: answer1991, liggitt 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 |
/test pull-kubernetes-conformance-kind-ga-only-parallel |
Thank you Jordan for taking a look! |
What type of PR is this?
/kind bug
What this PR does / why we need it:
When I work on #92727, I found Kubelet is not signal aware when bootstrapping certificate. Which means we can only use twice signal to kill Kubelet(through os.Exit(1)) when the certificate bootstrap is in progress. However, when kube-controller-manager or connection to kube-apiserver has some problem, the progress of certificate bootstrap may take a little long time.
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
Add a new function
SetupSignalContext
which is similar toSetupSignalHandler
, but returned iscontext.Context
.context.Context
is more standard than stop chan(<-chan struct{}
) as a parameter to call an async or long-term function, and I found same new function receivecontext.Context
rather than<-chan struct{}
. It's easy to get<-chan struct{}
fromcontext.Context
(useContext.Done()
), but it's not easy to buildcontext.Context
from<-chan struct{}
(may cost an new goroutine).Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: