Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Support kubelet environment file #142

Merged
merged 2 commits into from
May 2, 2019

Conversation

craigtracey
Copy link
Contributor

With 1.11 the kubelet packages now support an external kubelet
environment file. Update the placement of this configuration from the
kubelet.d directory to the /etc/{default|sysconfig}/kubelet file.

Will cherry pick this change into the future branches as well.

Signed-off-by: Craig Tracey craigtracey@gmail.com

With 1.11 the kubelet packages now support an external kubelet
environment file. Update the placement of this configuration from the
kubelet.d directory to the /etc/{default|sysconfig}/kubelet file.

Signed-off-by: Craig Tracey <craigtracey@gmail.com>
@craigtracey
Copy link
Contributor Author

cc: @erictcgs

@alexbrand
Copy link
Contributor

Overall this LGTM.

In the future, should we move to kubeadm's InitConfiguration.NodeRegistration.KubeletExtraArgs and JoinConfiguration.NodeRegistration.KubeletExtraArgs to provide these args?

Ref:

Copy link
Contributor

@scottslowe scottslowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes needed right now, but I do echo @alexbrand's question about moving these to the appropriate sections of a kubeadm configuration file.

@craigtracey
Copy link
Contributor Author

craigtracey commented Apr 29, 2019

We will also need to support other items that may/may not be included in KUBELET_EXTRA_ARGS.

#143
...is an example of adding environment variables for the kubelet process. Not sure that is explicitly covered by kubeadm's NodeRegistration.

Edit: Indeed, it looks like this use case is not covered by kubeadm: https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/apis/kubeadm/v1beta2/types.go#L195-L214

@alexbrand
Copy link
Contributor

Got it. The env file gives us the ability to not only set KUBELET_EXTRA_ARGS, but also set other env vars on the kubelet process.

Add the capability to add environment vars to the kubelet's systemd
environment file. This will let folks add arbitrary env vars for things
like $HOME, etc.

Signed-off-by: Craig Tracey <craigtracey@gmail.com>
@craigtracey
Copy link
Contributor Author

@scottslowe @alexbrand sorry about the false start here. Mind checking the latest commit to add the request from @erictcgs in #143. Adding this as a single PR will make it a bit easier to update tags / backport.

Copy link
Contributor

@alexbrand alexbrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@craigtracey craigtracey merged commit c409d0d into vmware-archive:v1.11.x May 2, 2019
craigtracey added a commit that referenced this pull request May 2, 2019
* Support kubelet environment file

With 1.11 the kubelet packages now support an external kubelet
environment file. Update the placement of this configuration from the
kubelet.d directory to the /etc/{default|sysconfig}/kubelet file.

Signed-off-by: Craig Tracey <craigtracey@gmail.com>

* Support env vars in kubelet environment file

Add the capability to add environment vars to the kubelet's systemd
environment file. This will let folks add arbitrary env vars for things
like $HOME, etc.

Signed-off-by: Craig Tracey <craigtracey@gmail.com>
craigtracey added a commit that referenced this pull request May 2, 2019
* Support kubelet environment file

With 1.11 the kubelet packages now support an external kubelet
environment file. Update the placement of this configuration from the
kubelet.d directory to the /etc/{default|sysconfig}/kubelet file.

Signed-off-by: Craig Tracey <craigtracey@gmail.com>

* Support env vars in kubelet environment file

Add the capability to add environment vars to the kubelet's systemd
environment file. This will let folks add arbitrary env vars for things
like $HOME, etc.

Signed-off-by: Craig Tracey <craigtracey@gmail.com>
craigtracey added a commit that referenced this pull request May 2, 2019
* Support kubelet environment file

With 1.11 the kubelet packages now support an external kubelet
environment file. Update the placement of this configuration from the
kubelet.d directory to the /etc/{default|sysconfig}/kubelet file.

Signed-off-by: Craig Tracey <craigtracey@gmail.com>

* Support env vars in kubelet environment file

Add the capability to add environment vars to the kubelet's systemd
environment file. This will let folks add arbitrary env vars for things
like $HOME, etc.

Signed-off-by: Craig Tracey <craigtracey@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants