-
Notifications
You must be signed in to change notification settings - Fork 187
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
Agent drain: implement agent side. (Remaining: server) #584
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jkh52 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 |
- make gen-proto - go mod vendor
fa6e769
to
ed021e1
Compare
66b0215
to
62a94a0
Compare
- Agent sends drain signal to Server. - Server only logs it.
s := <-signalCh | ||
klog.V(2).InfoS("Received first signal", "signal", s) | ||
close(drainCh) | ||
s = <-signalCh |
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.
Once we begin draining, do we want to timeout and stop if no second signal is sent?
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 think the most cautious (and simple) decision is no, keep an agent in this state fully functioning.
To be clear this is doing nothing to actually "drain"? Its just a prep step for that later PR? |
Right, this PR should be a functional no-op for the agent, except for sending the draining hint to the server (for later PR: agent selection). |
/assign @cheftako |
/lgtm |
Agent drain: first half of #566
Note that if a new agent binary sends the DRAIN message to an old server binary, it is harmless and will be ignored:
apiserver-network-proxy/pkg/server/server.go
Line 994 in 3026615