Restrict volume mountpoint to /var/lib/kubelet/pods#2957
Restrict volume mountpoint to /var/lib/kubelet/pods#2957srranjan-sri wants to merge 2 commits intokubernetes-sigs:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: srranjan-sri The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @srranjan-sri! |
|
Hi @srranjan-sri. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
andyzhangx
left a comment
There was a problem hiding this comment.
this csi driver mount different folders under /var/lib/kubelet/, e.g. plugins, kerberos, kubernetes/csi, and azfilesauth may create different folders under this dir, if we restrict all dirs in this csi driver, that would make this csi driver difficult to functional well and difficult to maintain
What type of PR is this?
What this PR does / why we need it:
Restrict Azure File CSI driver mountpoint-dir to /var/lib/kubelet/pods
This change restricts the mountpoint-dir volume mount to /var/lib/kubelet/pods instead of the entire /var/lib/kubelet/ directory. This reduces the driver's access scope, improving security by limiting the host filesystem paths that the CSI driver can access.
Which issue(s) this PR fixes:
Fixes #
Updated mountpoint-dir hostPath and mountPath from /var/lib/kubelet/ to /var/lib/kubelet/pods
Uses single kubelet variable with /pods suffix appended directly in templates
Requirements:
Special notes for your reviewer:
Release note: