Kubeadm: "[bootstraptoken]" and "[bootstrap-token]" at kubeadm init

Created on 23 Jan 2019  ·  4Comments  ·  Source: kubernetes/kubeadm

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

kubeadm version (use kubeadm version):v1.13.2

Environment:

  • Kubernetes version (use kubectl version):v1.13.2
  • Cloud provider or hardware configuration:N/A
  • OS (e.g. from /etc/os-release):18.04.1 LTS (Bionic Beaver)
  • Kernel (e.g. uname -a):4.15.0-43-generic
  • Others:N/A

What happened?

When run kubeadm init, I got following output. (Command finished successfully.)

...
[mark-control-plane] Marking the node ubuntu-master01 as control-plane by adding the taints [node-role.kubernetes.io/master:NoSchedule]
[bootstrap-token] Using token: tucvyo.5kmgswqycqewn09k
[bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles
[bootstraptoken] configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
[bootstraptoken] configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
[bootstraptoken] configured RBAC rules to allow certificate rotation for all node client certificates in the cluster
[bootstraptoken] creating the "cluster-info" ConfigMap in the "kube-public" namespace
[addons] Applied essential addon: CoreDNS
...

In this output, there are two strings for meaning of bootstrap token which are "bootstraptoken" and "bootstrap-token".

What you expected to happen?

It should be unified with same word.
There are 2 options to fix it.

  1. Change "[bootstrap-token]" to "[bootstraptoken]"
  2. Change "[bootstraptoken]" to "[bootstrap-token]"

At commit kubernetes/kubernetes@e743f0e4759510cf70dbb55929c2439a85d41f68, "bootstrap-token" is introduced. And there are "bootstraptoken" at other code.
IMHO, we should select option 1.

How to reproduce it (as minimally and precisely as possible)?

Just run kubeadm init.

Anything else we need to know?

If my opinion is ok( option 1 above ), I'll fix it.

areUX kinbug lifecyclactive prioritbacklog

Most helpful comment

@atoato88 thanks for the report.
we should go with option 2 because we have other phases like [mark-control-plane] that use - to separate words.

let me know if you can send a PR?

All 4 comments

@atoato88 thanks for the report.
we should go with option 2 because we have other phases like [mark-control-plane] that use - to separate words.

let me know if you can send a PR?

thx @atoato88 for this catch :rocket:

@neolit123 OK, I’ll fix it with option 2.

thanks!
/lifecycle active

Was this page helpful?
0 / 5 - 0 ratings