-
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 command output #79267
Conversation
/priority backlog |
/test pull-kubernetes-e2e-gce-device-plugin-gpu |
/test pull-kubernetes-bazel-build |
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.
Should remove ExperimentalUploadCerts
and ExperimentalControlPlane
as well.
@@ -68,7 +68,7 @@ var ( | |||
This command will print out a secure randomly-generated certificate key that can be used with | |||
the "init" command. | |||
|
|||
You can also use "kubeadm init --experimental-upload-certs" without specifying a certificate key and it will | |||
You can also use "kubeadm init --upload-certs" without specifying a certificate key and it will |
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.
Wait... This is not the only place for changes.
Since 1.15 is out, ExperimentalUploadCerts
can be safely removed in next release and using UploadCerts
instead.
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 @dixudx
I'll clean it up later.
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.
this line should have been fixed for 1.15, but we shouldn't backport non critical fixes, and --experimental-upload-certs
still works there.
for 1.16 (master) this is OK.
@@ -32,7 +32,7 @@ import ( | |||
var joinCommandTemplate = template.Must(template.New("join").Parse(`` + | |||
`kubeadm join {{.ControlPlaneHostPort}} --token {{.Token}} \ | |||
{{range $h := .CAPubKeyPins}}--discovery-token-ca-cert-hash {{$h}} {{end}}{{if .ControlPlane}}\ | |||
--experimental-control-plane {{if .CertificateKey}}--certificate-key {{.CertificateKey}}{{end}}{{end}}`, | |||
--control-plane {{if .CertificateKey}}--certificate-key {{.CertificateKey}}{{end}}{{end}}`, |
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.
The same.
Remove ExperimentalControlPlane
as well and use UploadCerts
instead.
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.
@dixudx
I looked at the code again and found this
// NewCmdUpgradeControlPlane returns the cobra.Command for upgrading the controlplane instance on this node
// TODO: to remove when 1.16 is released
func NewCmdUpgradeControlPlane() *cobra.Command {
nodeOptions := newNodeOptions()
nodeRunner := workflow.NewRunner()
cmd := &cobra.Command{
Use: "experimental-control-plane",
Short: "Upgrade the control plane instance deployed on this node. IMPORTANT. This command should be executed after executing `kubeadm upgrade apply` on another control plane instance",
Deprecated: "this command is deprecated. Use \"kubeadm upgrade node\" instead",
Run: func(cmd *cobra.Command, args []string) {
err := nodeRunner.Run(args)
kubeadmutil.CheckErr(err)
},
}
...
Is it safe to remove this code now ?
Do we need to wait until 1.16 is released ?
/cc @neolit123 @rosti
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.
again we missed changing this line in 1.15, but --experimental-control-plane
still works there so it's fine.
I looked at the code again and found this
i would leave command changes to a separate PR, as this one is for STDOUT changes.
in a separate PR we can remove all commands/flags that have experimental
and should be removed for 1.16 (master).
e.g.
init phase upload-certs --experimental-upload-certs
upgrade experimental-control-plane
join experimental-control-plane
...
just grep for experimental under cmd/kubeadm
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.
yep, it is safe to remove in 1.16.
/test pull-kubernetes-kubemark-e2e-gce-big |
@@ -262,7 +262,7 @@ func getSecret(client clientset.Interface) (*v1.Secret, error) { | |||
secret, err := client.CoreV1().Secrets(metav1.NamespaceSystem).Get(kubeadmconstants.KubeadmCertsSecret, metav1.GetOptions{}) | |||
if err != nil { | |||
if apierrors.IsNotFound(err) { | |||
return nil, errors.Errorf("Secret %q was not found in the %q Namespace. This Secret might have expired. Please, run `kubeadm init phase upload-certs --experimental-upload-certs` on a control plane to generate a new one", kubeadmconstants.KubeadmCertsSecret, metav1.NamespaceSystem) | |||
return nil, errors.Errorf("Secret %q was not found in the %q Namespace. This Secret might have expired. Please, run `kubeadm init phase upload-certs --upload-certs` on a control plane to generate a new one", kubeadmconstants.KubeadmCertsSecret, metav1.NamespaceSystem) |
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.
👍
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: neolit123, SataQiu 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 |
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.
this is only change for stdout.
command flags will be updated in another PR.
/lgtm
/retest Review the full test history for this PR. Silence the bot with an |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
kubeadm: cleanup command output (remove experimental)
Which issue(s) this PR fixes:
Fixes kubernetes/kubeadm#1627
Special notes for your reviewer:
Does this PR introduce a user-facing change?: