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

FailSwapOn kubelet option is not exposed by Kops #4123

Closed
bitfusion-brian opened this issue Dec 20, 2017 · 2 comments
Closed

FailSwapOn kubelet option is not exposed by Kops #4123

bitfusion-brian opened this issue Dec 20, 2017 · 2 comments

Comments

@bitfusion-brian
Copy link

bitfusion-brian commented Dec 20, 2017

Kubelet config is defined in pkg/apis/kops/componentconfig.go and many other files. FailSwapOn is not part of any of these files. In K8s >= 1.8.0, this options defaults to 'true', and there is no way to set it to 'false'.

-- edit below with additional info --

Kops is missing the --fail-swap-on config option for Kubelet. In kubernetes/kubelet version <1.8.0, kubelet uses the flag --experimental-fail-swap-on which defaults to false. In kubernetes/kops >=1.8.0, kubelet uses the flag --fail-swap-on, and it defaults to true.

If --fail-swap-on is set to true, kubelet will error out and never start if the system has swap enabled. If try to use latest kops with kubernetes >= 1.8.0, a system that has swap enabled will never join the cluster because kubelet will never start, and there is no way to change the --fail-swap-on option to false.

Kops allows you to specify multiple configuration options for Kubelet. These configuration options can be found here, among a couple other places. If the config option you are trying to affect is not in this model, then it will not get passed to kubelet.

Like I said, there are many places that the kubelet model shows up: here, here, and here. There also appears to be some generated code that affects the kubelet options as well, for instance these files: here and here.

@chrislovecnm
Copy link
Contributor

@bitfusion-brian more details please?

@wannabesrevenge
Copy link
Contributor

just to clarify, this is my main account. @bitfusion-brian is me.

Kops is missing the --fail-swap-on config option for Kubelet. In kubernetes/kubelet version <1.8.0, kubelet uses the flag --experimental-fail-swap-on which defaults to false. In kubernetes/kops >=1.8.0, kubelet uses the flag --fail-swap-on, and it defaults to true.

If --fail-swap-on is set to true, kubelet will error out and never start if the system has swap enabled. If try to use latest kops with kubernetes >= 1.8.0, a system that has swap enabled will never join the cluster because kubelet will never start, and there is no way to change the --fail-swap-on option to false.

Kops allows you to specify multiple configuration options for Kubelet. These configuration options can be found here, among a couple other places. If the config option you are trying to affect is not in this model, then it will not get passed to kubelet.

Like I said, there are many places that the kubelet model shows up: here, here, and here. There also appears to be some generated code that affects the kubelet options as well, for instance these files: here and here.

Couple questions:

  1. As of now, I have some changes en route where I manually added --fail-swap-on to both the models and the generated files. Are there Makefile commands that I can use to automatically parse the model and add this option into the generated files?

  2. Is there an example of how we handle the same flag with different names in different versions of kubernetes? This case being --experimental-fail-swap-on vs --fail-swap-on

@chrislovecnm I was intending on getting a PR out before holiday, but other things got in the way.

Adding this description to the ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants