kubeadm join does not merge flags and configs

Created on 9 Jun 2018  ·  3Comments  ·  Source: kubernetes/kubeadm

I noticed that when mixing --config= and --discovery-token-ca-cert-hash kubeadm will not realize that the discovery token ca cert hash was passed into the command lines. I had to manually add it to my config file.

Similarly, these two checks happen before the config file is even loaded so they will always print unless (maybe) you do everything with command line flags https://github.com/kubernetes/kubernetes/blob/a9d2b5eeae1d8a9dbfab4f875fed201bac0204e5/cmd/kubeadm/app/cmd/join.go

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

kubeadm version (use kubeadm version): A fairly recent version of master, "v1.12.0-alpha.0.957+1235adac3802fd-dirty" (nothing I changed would have affected this behavior though)

What you expected to happen?

I expected the flags and config to merge or error and tell me not to mix flags and config.

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

run the output of kubeadm init (kubadm join with a few flags) and pass it a config file as well.

kinbug lifecyclactive prioritimportant-soon

All 3 comments

Ah we don't error out here? We do that for init. However, we should make it possible to specify both, @mtaufen explains how here: https://docs.google.com/document/d/1FdaEJUEh091qf5B98HM6_8MS764iXrxxigNIdwHYW9c/edit
(can also look at the kubelet code that does this)

@rosti is gonna work on this :tada:

I'm going to close this one in favor of the unification on handling issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jbrandes picture jbrandes  ·  4Comments

kvaps picture kvaps  ·  3Comments

andersla picture andersla  ·  4Comments

ep4eg picture ep4eg  ·  3Comments

ggaaooppeenngg picture ggaaooppeenngg  ·  4Comments