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

add compat symlink for kubelet volume plugins #1417

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

bcressey
Copy link
Contributor

@bcressey bcressey commented Mar 24, 2021

Issue number:
Fixes #1354

Description of changes:
This allows existing manifests that try to install a flexvol plugin to the default /usr/libexec/kubernetes path to work, rather than failing because the root filesystem is read-only.

Testing done:
Followed the steps to "Install EKS with Calico networking":
https://docs.projectcalico.org/getting-started/kubernetes/managed-public-cloud/eks

The symlink worked as expected from both the /usr path and the target prefix:

# ls -latr /usr/libexec/kubernetes/kubelet-plugins
lrwxrwxrwx. 1 root root 38 Mar 24 23:19 /usr/libexec/kubernetes/kubelet-plugins -> ../../../../../var/lib/kubelet/plugins

# ls -latr /usr/libexec/kubernetes/kubelet-plugins/
drwxr-xr-x. 3 root root 4096 Mar 24 23:55 volume
drwxr-xr-x. 2 root root 4096 Mar 24 23:56 ebs.csi.aws.com
drwxr-xr-x. 2 root root 4096 Mar 24 23:56 efs.csi.aws.com

# ls -latr /x86_64-bottlerocket-linux-gnu/sys-root/usr/libexec/kubernetes/kubelet-plugins
lrwxrwxrwx. 1 root root 38 Mar 24 23:19 /x86_64-bottlerocket-linux-gnu/sys-root/usr/libexec/kubernetes/kubelet-plugins -> ../../../../../var/lib/kubelet/plugins

# ls -latr /x86_64-bottlerocket-linux-gnu/sys-root/usr/libexec/kubernetes/kubelet-plugins/
drwxr-xr-x. 3 root root 4096 Mar 24 23:55 volume
drwxr-xr-x. 2 root root 4096 Mar 24 23:56 ebs.csi.aws.com
drwxr-xr-x. 2 root root 4096 Mar 24 23:56 efs.csi.aws.com

The node agent plugin showed up in the expected location:

# find /var/lib/kubelet/plugins -type s -o -type f
/var/lib/kubelet/plugins/efs.csi.aws.com/csi.sock
/var/lib/kubelet/plugins/volume/exec/nodeagent~uds/uds
/var/lib/kubelet/plugins/ebs.csi.aws.com/csi.sock

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

packages/kubernetes-1.15/kubernetes-1.15.spec Outdated Show resolved Hide resolved
This allows existing manifests that try to install a flexvol plugin
to the default `/usr/libexec/kubernetes` path to work, rather than
failing because the root filesystem is read-only.

Signed-off-by: Ben Cressey <bcressey@amazon.com>
@bcressey
Copy link
Contributor Author

Fixed excessive use of ../.

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

Successfully merging this pull request may close these issues.

Way to install kubelet plugins?
4 participants