helm: CSIDriver add labels and seLinuxMount disabling method

Signed-off-by: Ruslan Khizhnyak <rkhizhnyak@ptsecurity.com>
This commit is contained in:
Ruslan Khizhnyak
2024-03-21 01:58:05 +03:00
committed by mergify[bot]
parent cd18490451
commit d56c9abbce
4 changed files with 35 additions and 4 deletions

View File

@ -2,10 +2,16 @@ apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: {{ .Values.driverName }}
labels:
app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
spec:
attachRequired: false
podInfoOnMount: false
fsGroupPolicy: {{ default "File" .Values.CSIDriver.fsGroupPolicy }}
{{- if semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version }}
fsGroupPolicy: {{ .Values.CSIDriver.fsGroupPolicy }}
{{- if and (semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version) .Values.seLinuxMount }}
seLinuxMount: true
{{- end }}

View File

@ -57,6 +57,7 @@ sidecarLogLevel: 1
# accessModes contains ReadWriteOnce.
CSIDriver:
fsGroupPolicy: "File"
seLinuxMount: true
nodeplugin:
name: nodeplugin