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

Custom volume plugin dir #495

Merged
merged 2 commits into from
Dec 16, 2020
Merged

Custom volume plugin dir #495

merged 2 commits into from
Dec 16, 2020

Conversation

llndqvst
Copy link
Contributor

@llndqvst llndqvst commented Dec 5, 2020


name: Pull Request
about: Create a Pull Request
title: 'Custom volume plugin dir'
labels: ''
assignees: ''


Issue
Fixes #494

What this PR Includes
This PR includes new configuration options to allow the user setting a custom volumePluginDir. Sample configs are also included for getting k0s to work on Fedora CoreOS.

@llndqvst llndqvst requested a review from a team as a code owner December 5, 2020 13:37
@llndqvst llndqvst requested review from mikhail-sakhnov and jnummelin and removed request for a team December 5, 2020 13:37
Copy link
Member

@jnummelin jnummelin left a comment

Choose a reason for hiding this comment

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

The changing path to kubelet volume plugin dir needs IMO some attention

@@ -89,6 +89,7 @@ spec:
vxlanVNI: 4096
mtu: 1450
wireguard: false
flexVolumeDriverPath: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds
Copy link
Member

Choose a reason for hiding this comment

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

I think we should have a explanatory title/item below for this too.

pkg/component/worker/kubelet.go Show resolved Hide resolved
Kubelet already has defaults for this, so this should not be needed.

Signed-off-by: Lukas Lindqvist <lukas.lndqvst@gmail.com>
@llndqvst
Copy link
Contributor Author

I have applied the requested changes. Now the default location should be properly set inside the default kubelet configuration for workers.

However, I want to note that this change includes a slight regression from main. Currently k0s checks if the path supplied to --volume-plugin-dir is writeable on the worker nodes and exits if it's not. With my changes that is not possible, and instead k0s will fail silently. Only noticeable to the user as Calico getting stuck on init.

I see two possible fixes for this:

  • Change the configuration file to include a specific field for cluster-wide kubelet configuration with manually mapped values. This could look something like this:
kubelet:
  volumePluginDir: /var/libexec...
  • Parse the applied kubeletConfiguration for values that need to be tested by k0s before starting the kubelet.

Signed-off-by: Lukas Lindqvist <lukas.lndqvst@gmail.com>
@jnummelin
Copy link
Member

I think the regression from main is acceptable given that customizing the plugin dir should not be needed in most cases.

@jnummelin jnummelin added this to the 0.9.0 milestone Dec 16, 2020
@trawler trawler merged commit c395b49 into k0sproject:main Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

k0s does not work on Fedora CoreOS
3 participants