Skip to content

Commit 719247e

Browse files
authored
feat: support for SELinux mount (#756)
Mount options specified in the NodePublishVolumeRequest are already forwarded to /bin/mount (`-o context=<SELinux_Label>`). The /bin/mount binary included in our container image can detect whether the kernel supports SELinux. The user still has to enable the feature gates `SELinuxMount` and `SELinuxMountReadWriteOncePod` in Kubernetes version `1.30`. Further Reference: - [KEP 1710](https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/1710-selinux-relabeling/README.md#volume-mounting) - [What fields does the CSIDriver object have](https://kubernetes-csi.github.io/docs/csi-driver-object.html?highlight=SELinux#what-fields-does-the-csidriver-object-have) - [Feature Gates](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/#feature-gates-for-alpha-or-beta-features) Closes #582
1 parent 4b9aa4e commit 719247e

5 files changed

Lines changed: 5 additions & 0 deletions

File tree

chart/.snapshots/default.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,5 +360,6 @@ spec:
360360
attachRequired: true
361361
fsGroupPolicy: File
362362
podInfoOnMount: true
363+
seLinuxMount: true
363364
volumeLifecycleModes:
364365
- Persistent

chart/.snapshots/example-prod.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,5 +485,6 @@ spec:
485485
attachRequired: true
486486
fsGroupPolicy: File
487487
podInfoOnMount: true
488+
seLinuxMount: true
488489
volumeLifecycleModes:
489490
- Persistent

chart/.snapshots/full.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ spec:
649649
attachRequired: true
650650
fsGroupPolicy: File
651651
podInfoOnMount: true
652+
seLinuxMount: true
652653
volumeLifecycleModes:
653654
- Persistent
654655
---

chart/templates/core/csidriver.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ spec:
66
attachRequired: true
77
fsGroupPolicy: File
88
podInfoOnMount: true
9+
seLinuxMount: true
910
volumeLifecycleModes:
1011
- Persistent

deploy/kubernetes/hcloud-csi.yml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)