-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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 cleanup: master -> control-plane #73987
kubeadm cleanup: master -> control-plane #73987
Conversation
Hi @vanduc95. 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. |
/assign @neolit123 |
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 @vanduc95, it would be nice if you grep the codebase and change all occurrence.
/ok-to-test
/priority important-longterm
/lgtm
@yagonobre you mean replace all occurrences including comments in codebase. In this PR, I've just replaced the locations where users can see the output. |
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 @vanduc95
added a couple of comments.
please remember to squash your commits into one.
cmd/kubeadm/app/cmd/join.go
Outdated
@@ -64,7 +64,7 @@ var ( | |||
|
|||
* Certificate signing request was sent to apiserver and approval was received. | |||
* The Kubelet was informed of the new secure connection details. | |||
* Master label and taint were applied to the new node. | |||
* Control Plane label and taint were applied to the new node. |
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.
lets write this one like so:
* Control plane (master) label...
this is because the underlying label is "master" and it's not easy to change that at this point.
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 think that it is reasonable.
cmd/kubeadm/app/cmd/options/token.go
Outdated
@@ -46,7 +46,7 @@ type BootstrapTokenOptions struct { | |||
func (bto *BootstrapTokenOptions) AddTokenFlag(fs *pflag.FlagSet) { | |||
fs.StringVar( | |||
&bto.TokenStr, TokenStr, "", | |||
"The token to use for establishing bidirectional trust between nodes and masters. The format is [a-z0-9]{6}\\.[a-z0-9]{16} - e.g. abcdef.0123456789abcdef", | |||
"The token to use for establishing bidirectional trust between nodes and control-plane. The format is [a-z0-9]{6}\\.[a-z0-9]{16} - e.g. abcdef.0123456789abcdef", |
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.
...and control-plane nodes.
@@ -109,16 +109,16 @@ func masterNodesReady(client clientset.Interface) error { | |||
LabelSelector: selector.String(), | |||
}) | |||
if err != nil { | |||
return errors.Wrap(err, "couldn't list masters in cluster") | |||
return errors.Wrap(err, "couldn't list control-plane in cluster") |
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.
plural:
control-planes
[1]
} | ||
|
||
if len(masters.Items) == 0 { | ||
return errors.New("failed to find any nodes with master role") | ||
return errors.New("failed to find any nodes with control-plane role") |
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.
lets add a
here:
...nodes with a control-plane role
} | ||
|
||
notReadyMasters := getNotReadyNodes(masters.Items) | ||
if len(notReadyMasters) != 0 { | ||
return errors.Errorf("there are NotReady masters in the cluster: %v", notReadyMasters) | ||
return errors.Errorf("there are NotReady control-plane in the cluster: %v", notReadyMasters) |
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.
[1]
02e083e
to
d4e500e
Compare
@@ -93,7 +93,7 @@ func RetrieveValidatedConfigInfo(cfg *kubeadmapi.JoinConfiguration) (*clientcmda | |||
} | |||
detachedJWSToken, ok := insecureClusterInfo.Data[bootstrapapi.JWSSignatureKeyPrefix+token.ID] | |||
if !ok || len(detachedJWSToken) == 0 { | |||
return nil, errors.Errorf("token id %q is invalid for this cluster or it has expired. Use \"kubeadm token create\" on the master node to creating a new valid token", token.ID) | |||
return nil, errors.Errorf("token id %q is invalid for this cluster or it has expired. Use \"kubeadm token create\" on the control-plane node to creating a new valid token", token.ID) |
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.
looks like we have a typo here:
on the control-plane node to creating a new valid token
should be:
on the control-plane node to create a new valid token
can you please fix that, and sorry for not catching it earlier?
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.
Ok @neolit123
d4e500e
to
0e8941f
Compare
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
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: neolit123, vanduc95 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 |
/retest |
@neolit123 , I see in kubeadm package have a lot of 'master' is used in comments of codebase. |
yes, so we are looking at replacing them all eventually. |
@neolit123 ! |
thank you for the great help @vanduc95
ok, thanks again. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
cleanup: master -> control-plane
Which issue(s) this PR fixes:
Refs kubernetes/kubeadm#1376
Special notes for your reviewer:
Does this PR introduce a user-facing change?: