Skip to content

Replace kubelet volume mount with subdirectories#2259

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:masterfrom
hajiler:kubelet-directory-mount
Jan 12, 2026
Merged

Replace kubelet volume mount with subdirectories#2259
k8s-ci-robot merged 1 commit intokubernetes-sigs:masterfrom
hajiler:kubelet-directory-mount

Conversation

@hajiler
Copy link
Copy Markdown
Contributor

@hajiler hajiler commented Jan 7, 2026

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind bug

What this PR does / why we need it:

The driver was previously mounting the entire /var/lib/kubelet host directory. This broad access violates the principle of least privilege by exposing sensitive subdirectories—such as /var/lib/kubelet/pki/ (node certificates) and /var/lib/kubelet/pods/ (all pod volumes and tokens)—to the CSI container.

This change replaces the single broad root mount with restricted hostPath mounts.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 7, 2026
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 7, 2026
@hajiler hajiler force-pushed the kubelet-directory-mount branch from 6dce6d7 to 1a7a817 Compare January 8, 2026 21:54
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 8, 2026
@mattcary
Copy link
Copy Markdown
Contributor

mattcary commented Jan 8, 2026

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 8, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hajiler, mattcary

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 8, 2026
@hajiler hajiler force-pushed the kubelet-directory-mount branch from 1a7a817 to 9db63ea Compare January 8, 2026 22:14
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 8, 2026
@hajiler hajiler force-pushed the kubelet-directory-mount branch from 9db63ea to 200a34c Compare January 9, 2026 19:56
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 9, 2026
@hajiler
Copy link
Copy Markdown
Contributor Author

hajiler commented Jan 9, 2026

/test pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2022
/test pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2022

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@hajiler: you cannot LGTM your own PR.

Details

In response to this:

/lgtm

Instructions 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.

@sunnylovestiramisu
Copy link
Copy Markdown
Contributor

/retest

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@hajiler: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2022 200a34c link false /test pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2022
pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2019 200a34c link false /test pull-gcp-compute-persistent-disk-csi-driver-e2e-windows-2019

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions 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. I understand the commands that are listed here.

@sunnylovestiramisu
Copy link
Copy Markdown
Contributor

Failed tests related to VolumeSnapshot.
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 12, 2026
@k8s-ci-robot k8s-ci-robot merged commit b221c21 into kubernetes-sigs:master Jan 12, 2026
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants