Skip to content
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

Merged
merged 1 commit into from
Feb 14, 2019

Conversation

vanduc95
Copy link
Contributor

@vanduc95 vanduc95 commented Feb 13, 2019

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?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Feb 13, 2019
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 13, 2019
@vanduc95
Copy link
Contributor Author

/assign @neolit123

Copy link
Member

@yagonobre yagonobre left a 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

@k8s-ci-robot k8s-ci-robot added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Feb 13, 2019
@vanduc95
Copy link
Contributor Author

@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.

Copy link
Member

@neolit123 neolit123 left a 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.

@@ -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.
Copy link
Member

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.

Copy link
Contributor

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.

@@ -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",
Copy link
Member

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")
Copy link
Member

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")
Copy link
Member

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[1]

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 14, 2019
@@ -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)
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 14, 2019
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 14, 2019
@neolit123
Copy link
Member

/retest

@vanduc95
Copy link
Contributor Author

vanduc95 commented Feb 14, 2019

@neolit123 , I see in kubeadm package have a lot of 'master' is used in comments of codebase.
Can I create PRs to replace them?

@neolit123
Copy link
Member

@neolit123 , I see in kubeadm package have a lot of 'master' is used in commnents of codebase.
Can I create PRs to replace them?

yes, so we are looking at replacing them all eventually.
also possibly refactor function names - e.g. doSomethingIWithMaster -> doSomethingWithControlPlane.

@vanduc95
Copy link
Contributor Author

@neolit123 !
So far, I think the task is OK, except keeping LabelNodeRoleMaster constant. If you find out somewhere need to replace, please tell me.
Thanks for your review .

@neolit123
Copy link
Member

thank you for the great help @vanduc95
yes, we only kept LabelNodeRoleMaster.

If you find out somewhere need to replace, please tell me.

ok, thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants