diff --git a/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml b/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml index 50b2e5fef..f6fe14a3e 100644 --- a/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml +++ b/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml @@ -6,4 +6,6 @@ spec: attachRequired: false podInfoOnMount: false fsGroupPolicy: {{ default "File" .Values.CSIDriver.fsGroupPolicy }} +{{- if semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version }} seLinuxMount: true +{{- end }} diff --git a/charts/ceph-csi-rbd/templates/csidriver-crd.yaml b/charts/ceph-csi-rbd/templates/csidriver-crd.yaml index 09b4ce0d5..99026f628 100644 --- a/charts/ceph-csi-rbd/templates/csidriver-crd.yaml +++ b/charts/ceph-csi-rbd/templates/csidriver-crd.yaml @@ -6,4 +6,6 @@ spec: attachRequired: true podInfoOnMount: false fsGroupPolicy: File +{{- if semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version }} seLinuxMount: true +{{- end }}