Skip to content
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

Make it possible to configure the kubelet via the v1alpha2 Config file #847

Closed
luxas opened this issue May 22, 2018 · 0 comments · Fixed by kubernetes/kubernetes#64210
Closed
Assignees
Labels
area/UX lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@luxas
Copy link
Member

luxas commented May 22, 2018

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.

@luxas luxas added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label May 22, 2018
@luxas luxas added this to the v1.11 milestone May 22, 2018
@luxas luxas self-assigned this May 23, 2018
@luxas luxas added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label May 23, 2018
krzyzacy pushed a commit to krzyzacy/kubernetes that referenced this issue May 30, 2018
Automatic merge from submit-queue (batch tested with PRs 64322, 64210, 64458, 64232, 64370). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm: Move .NodeName and .CRISocket to a common sub-struct

**What this PR does / why we need it**:
Regroups some common fields for `kubeadm init` and `kubeadm join` only used for the initial node registration.
Lets the user specify ExtraArgs to the kubelet.
Now also runs the dynamic env file creation for `kubeadm join`.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes kubernetes/kubeadm#847
Follows-up kubernetes#63887
Related to kubernetes/kubeadm#822

**Special notes for your reviewer**: WIP, but please review so we can finalize the direction of the PR

**Release note**:

```release-note
[action required] `.NodeName` and `.CRISocket` in the `MasterConfiguration` and `NodeConfiguration` v1alpha1 API objects are now `.NodeRegistration.Name` and `.NodeRegistration.CRISocket` respectively in the v1alpha2 API. The `.NoTaintMaster` field has been removed in the v1alpha2 API.
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @liztio
k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this issue Jun 6, 2018
Automatic merge from submit-queue (batch tested with PRs 64009, 64780, 64354, 64727, 63650). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm: Update the dropin for the kubelet in v1.11

**What this PR does / why we need it**:
One of the final pieces of kubernetes/kubeadm#851, kubernetes/kubeadm#847 and kubernetes/kubeadm#822

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
(partially)
Fixes kubernetes/kubeadm#822

**Special notes for your reviewer**: Please check whether this release note makes sense to you.

**Release note**:

```release-note
[action required] The structure of the kubelet dropin in the kubeadm deb package has changed significantly.
Instead of hard-coding the parameters for the kubelet in the dropin, a structured configuration file
for the kubelet is used, and is expected to be present in `/var/lib/kubelet/config.yaml`.
For runtime-detected, instance-specific configuration values, a environment file with
dynamically-generated flags at `kubeadm init` or `kubeadm join` run time is used.
Finally, if the user wants to override something specific for the kubelet that can't be done via
the kubeadm Configuration file (which is preferred), they might add flags to the 
`KUBELET_EXTRA_ARGS` environment variable in either `/etc/default/kubelet`
or `/etc/sysconfig/kubelet`, depending on the system you're running on.
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/UX lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant