cloudfoundry-incubator / kubo-release

Kubernetes BOSH release
https://www.cloudfoundry.org/container-runtime/
Apache License 2.0
161 stars 76 forks source link

Enable flagging a kubelet as a master node for tainting. #333

Open svrc opened 5 years ago

svrc commented 5 years ago

What this PR does / why we need it: This enables labeling and tainting on master nodes that wish to deploy a Kubelet. This is the foundation to enable pluggable CNI support in CFCR.

How can this PR be verified? Deploy CFCR with a kubelet on the master node. The node should be labeled node-role.kubernetes.io/master= and tainted node-role.kubernetes.io/master=:NoSchedule

Is there any change in kubo-deployment? Yes (forthcoming), an ops file that will deploy CFCR with kubelets on the master.

Is there any change in kubo-ci? Yes (forthcoming), to test this variant of CFCR deployment.

Does this affect upgrade, or is there any migration required? No, though future capabilities that build on this may (e.g. pluggable CNIs).

Which issue(s) this PR fixes: N/A

Release note:

cfdreddbot commented 5 years ago

:white_check_mark: Hey svrc-pivotal! The commit authors and yourself have already signed the CLA.

svrc commented 5 years ago

I’ve tried that, but I don’t believe kubelets can self-register themselves as a master with the —node-labels option, there’s only a small set of labels allowed: https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/well_known_labels.go

This is why Kubeadm for example does the labeling and tainting on its own and not via kubelet CLI option.

—register-with-taints does work, but since we need to label these nodes via K8s CLI/API anyway, rather than splitting the labeling and tainting, I figured it was clearer to put them together in one place. Happy to remove that line here however if it is preferred.

linux-foundation-easycla[bot] commented 5 years ago

CLA Check
One or more committers are not authorized under a signed CLA as indicated below. Please click here to be authorized. For further assistance with EasyCLA, please submit a support request ticket.