-
Notifications
You must be signed in to change notification settings - Fork 737
Make it possible to configure the kubelet via the v1alpha2 Config file #847
Description
When kubernetes/kubernetes#63887 merges, we are able to set various flags for the kubelet's CLI. These flags should really be kept to a minimum, but for some things like hostname-override, taints, labels, node-ip etc. this is the only option. The same for very host/OS-specific configuration like --cgroup-driver and --resolv-conf.
The proposal here is to allow the user to specify these extraargs via the Config file:
Labels []string `json:"labels,omitempty"`
Taints []v1.Taint `json:"taints,omitempty"`
KubeletExtraArgs map[string]string `json:"kubeletExtraArgs,omitempty"`(these would not be top-level, but nested inside some struct under the MasterConfiguration initially.)
The KubeletExtraArgs string-string map would work as any other control plane extraargs map we have.
if Taints == nil at default time, the default master taint is gonna be applied. If taints: {} in the YAML file, no taints are gonna be added, which equals the behavior of NoTaintMaster which we can then remove.
if Labels == nil at default time, the default master label is gonna be applied. If labels: {} in the YAML file, no labels are gonna be added.
This also works for kubeadm join, apart from the master taint/label logic.
This will fix numerous issues like #209 #202 #203 + more.