Skip to content

Commit

Permalink
Selinux mount option
Browse files Browse the repository at this point in the history
Signed-off-by: Connor Catlett <[email protected]>
  • Loading branch information
ConnorJC3 committed Dec 19, 2024
1 parent 39822b5 commit 2eefc58
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions charts/aws-ebs-csi-driver/templates/_node.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ spec:
mountPath: /csi
- name: device-dir
mountPath: /dev
{{- if .Values.node.selinux }}
- name: selinux-sysfs
mountPath: /sys/fs/selinux
- name: selinux-config
mountPath: /etc/selinux/config
{{- end }}
{{- with .Values.node.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down Expand Up @@ -244,6 +250,18 @@ spec:
hostPath:
path: /dev
type: Directory
{{- if .Values.node.selinux }}
- name: selinux-sysfs
hostPath:
path: /sys/fs/selinux
type: Directory
readOnly: true
- name: selinux-config
hostPath:
path: /etc/selinux/config
type: File
readOnly: true
{{- end }}
- name: probe-dir
{{- if .Values.node.probeDirVolume }}
{{- toYaml .Values.node.probeDirVolume | nindent 10 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/aws-ebs-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ controller:
# Enable dnsConfig for the controller and node pods
dnsConfig: {}
node:
# Enable SELinux-only optimizations on the EBS CSI Driver node pods
# Must only be set true if all linux nodes in the DaemonSet have SELinux enabled
selinux: false
env: []
envFrom: []
kubeletPath: /var/lib/kubelet
Expand Down

0 comments on commit 2eefc58

Please sign in to comment.