diff --git a/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml b/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml index 50b2e5fef2d2..330b8e4c9c01 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-0" .Capabilities.KubeVersion.GitVersion }} seLinuxMount: true +{{- end }} diff --git a/charts/ceph-csi-rbd/templates/csidriver-crd.yaml b/charts/ceph-csi-rbd/templates/csidriver-crd.yaml index 09b4ce0d5b56..99026f628aad 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 }}