From e324059a0d519d37a992a164406e8a31fa9b4f90 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Fri, 11 Feb 2022 12:28:36 +0530 Subject: [PATCH] csi: default to ReadWriteOnceWithFSType for cephfs ``` ReadWriteOnceWithFSType: Indicates that volumes will be examined to determine if volume ownership and permissions should be modified to match the pod's security policy. Changes will only occur if the fsType is defined and the persistent volume's accessModes contains ReadWriteOnce. ``` In between considering we are giving 0777 permission on nodestage of cephfs shares, we defaulted to NONE. However giving worldwide permission to the volume is not the right thing and it has been fixed in cephfs via https://github.com/ceph/ceph-csi/pull/2847 This commit brings it back to the value which is also in parity with RBD driver. Signed-off-by: Humble Chirammal (cherry picked from commit 6561bdaf53800e1b19146b3e951ec2924abbc1d0) --- Documentation/helm-operator.md | 2 +- deploy/charts/rook-ceph/values.yaml | 2 +- deploy/examples/operator-openshift.yaml | 2 +- deploy/examples/operator.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/helm-operator.md b/Documentation/helm-operator.md index 37e53e198..51a14f0d2 100644 --- a/Documentation/helm-operator.md +++ b/Documentation/helm-operator.md @@ -105,7 +105,7 @@ The following tables lists the configurable parameters of the rook-operator char | `csi.provisionerPriorityClassName` | PriorityClassName to be set on csi driver provisioner pods. | | | `csi.enableOMAPGenerator` | EnableOMAP generator deploys omap sidecar in CSI provisioner pod, to enable it set it to true | `false` | | `csi.rbdFSGroupPolicy` | Policy for modifying a volume's ownership or permissions when the RBD PVC is being mounted | ReadWriteOnceWithFSType | -| `csi.cephFSFSGroupPolicy` | Policy for modifying a volume's ownership or permissions when the CephFS PVC is being mounted | `None` | +| `csi.cephFSFSGroupPolicy` | Policy for modifying a volume's ownership or permissions when the CephFS PVC is being mounted | ReadWriteOnceWithFSType | | `csi.logLevel` | Set logging level for csi containers. Supported values from 0 to 5. 0 for general useful logs, 5 for trace level verbosity. | `0` | | `csi.provisionerReplicas` | Set replicas for csi provisioner deployment. | `2` | | `csi.enableGrpcMetrics` | Enable Ceph CSI GRPC Metrics. | `false` | diff --git a/deploy/charts/rook-ceph/values.yaml b/deploy/charts/rook-ceph/values.yaml index 9dd1fa742..90d1eedbb 100644 --- a/deploy/charts/rook-ceph/values.yaml +++ b/deploy/charts/rook-ceph/values.yaml @@ -83,7 +83,7 @@ csi: # (Optional) policy for modifying a volume's ownership or permissions when the CephFS PVC is being mounted. # supported values are documented at https://kubernetes-csi.github.io/docs/support-fsgroup.html - cephFSFSGroupPolicy: "None" + cephFSFSGroupPolicy: "ReadWriteOnceWithFSType" # OMAP generator generates the omap mapping between the PV name and the RBD image # which helps CSI to identify the rbd images for CSI operations. diff --git a/deploy/examples/operator-openshift.yaml b/deploy/examples/operator-openshift.yaml index 37ece908e..fb4f8a04a 100644 --- a/deploy/examples/operator-openshift.yaml +++ b/deploy/examples/operator-openshift.yaml @@ -150,7 +150,7 @@ data: # (Optional) policy for modifying a volume's ownership or permissions when the CephFS PVC is being mounted. # supported values are documented at https://kubernetes-csi.github.io/docs/support-fsgroup.html - CSI_CEPHFS_FSGROUPPOLICY: "None" + CSI_CEPHFS_FSGROUPPOLICY: "ReadWriteOnceWithFSType" # (Optional) Allow starting unsupported ceph-csi image ROOK_CSI_ALLOW_UNSUPPORTED_VERSION: "false" diff --git a/deploy/examples/operator.yaml b/deploy/examples/operator.yaml index 94434292f..9e678ee77 100644 --- a/deploy/examples/operator.yaml +++ b/deploy/examples/operator.yaml @@ -68,7 +68,7 @@ data: # (Optional) policy for modifying a volume's ownership or permissions when the CephFS PVC is being mounted. # supported values are documented at https://kubernetes-csi.github.io/docs/support-fsgroup.html - CSI_CEPHFS_FSGROUPPOLICY: "None" + CSI_CEPHFS_FSGROUPPOLICY: "ReadWriteOnceWithFSType" # (Optional) Allow starting unsupported ceph-csi image ROOK_CSI_ALLOW_UNSUPPORTED_VERSION: "false"