-
Notifications
You must be signed in to change notification settings - Fork 39.3k
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
kubeadm: fixed cleanup upgrade from no-TLS etcd to TLS etcd #71828
kubeadm: fixed cleanup upgrade from no-TLS etcd to TLS etcd #71828
Conversation
Hi @yuexiao-wang. 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 |
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.
@yuexiao-wang thanks for this quick fix!
Only one nit from my side
/approve
@luxas could you kindly give a final pass on this change?
// Upgrading the Etcd protocol takes down the apiserver, so we can't verify component restarts if we restart Etcd independently. | ||
// Skip waiting for Etcd to restart and immediately move on to updating the apiserver. | ||
if component == constants.Etcd { | ||
waitForComponentRestart = false |
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.
If this piece of code goes away I think that the waitForComponentRestart
var could go away too and the if statement below in the same func could be simplified throwing away the else branch
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini, yuexiao-wang 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-e2e-kops-aws |
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.
Thanks @yuexiao-wang ! Looking good so far!
@@ -366,7 +346,7 @@ func performEtcdStaticPodUpgrade(client clientset.Interface, waiter apiclient.Wa | |||
|
|||
// Checking health state of etcd after the upgrade | |||
fmt.Println("[upgrade/etcd] Waiting for etcd to become available") | |||
if _, err = newEtcdClient.WaitForClusterAvailable(podRestartDelay, retries, retryInterval); err != nil { | |||
if _, err = newEtcdClient.WaitForClusterAvailable(noDelay, retries, retryInterval); err != 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.
We can also cleanup the delay parameter of WaitForClusterAvailable
. It's only used for this case and is not meaningful otherwise, so we can safely reduce the clutter there too.
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.
Yes,I agree
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.
Updated and thanks for reviewing
/test pull-kubernetes-e2e-kops-aws |
4ba8e0c
to
39f7124
Compare
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
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
/assign @luxas @fabriziopandini
Thanks!
Signed-off-by: yuexiao-wang wang.yuexiao@zte.com.cn
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
According to the comments (#71740 (review)), remove the code which should go away for upgrading TLS etcd
Which issue(s) this PR fixes*:
Fixes # kubernetes/kubeadm#1298
Special notes for your reviewer:
Does this PR introduce a user-facing change?: