From 33a888f9ec36aa7aa02e7058648e49bc60d28e25 Mon Sep 17 00:00:00 2001 From: Praveen M Date: Thu, 28 Mar 2024 17:03:41 +0530 Subject: [PATCH 1/3] helm: fix seLinuxMount option for csi driver This commit fixes the typo from `.Values.seLinuxMount` to `.Values.CSIDriver.seLinuxMount` used in helm charts. Signed-off-by: Praveen M --- charts/ceph-csi-cephfs/templates/csidriver-crd.yaml | 2 +- charts/ceph-csi-rbd/templates/csidriver-crd.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml b/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml index 5aacbe271ab..821bd19251e 100644 --- a/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml +++ b/charts/ceph-csi-cephfs/templates/csidriver-crd.yaml @@ -12,6 +12,6 @@ spec: attachRequired: false podInfoOnMount: false fsGroupPolicy: {{ .Values.CSIDriver.fsGroupPolicy }} -{{- if and (semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version) .Values.seLinuxMount }} +{{- if and (semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version) .Values.CSIDriver.seLinuxMount }} seLinuxMount: true {{- end }} diff --git a/charts/ceph-csi-rbd/templates/csidriver-crd.yaml b/charts/ceph-csi-rbd/templates/csidriver-crd.yaml index d1524527e0f..f3f1b2e0872 100644 --- a/charts/ceph-csi-rbd/templates/csidriver-crd.yaml +++ b/charts/ceph-csi-rbd/templates/csidriver-crd.yaml @@ -12,6 +12,6 @@ spec: attachRequired: true podInfoOnMount: false fsGroupPolicy: {{ .Values.CSIDriver.fsGroupPolicy }} -{{- if and (semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version) .Values.seLinuxMount }} +{{- if and (semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version) .Values.CSIDriver.seLinuxMount }} seLinuxMount: true {{- end }} From 8e57efad987e5749ff81bf62ad09aea0578b9d5d Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 29 Mar 2024 10:04:42 +0100 Subject: [PATCH 2/3] cleanup: use standard Golang "slices" instead of k8s package The "slices" package has been introduced in Go 1.21 and can be used instead of the Kubernetes package that will be replaced by the standard package at one point too. Signed-off-by: Niels de Vos --- internal/cephfs/groupcontrollerserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cephfs/groupcontrollerserver.go b/internal/cephfs/groupcontrollerserver.go index 42ab7aec11d..2e2a5b7d676 100644 --- a/internal/cephfs/groupcontrollerserver.go +++ b/internal/cephfs/groupcontrollerserver.go @@ -20,6 +20,7 @@ import ( "context" "errors" "fmt" + "slices" "sort" "time" @@ -36,7 +37,6 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/timestamppb" - "k8s.io/utils/strings/slices" ) // validateCreateVolumeGroupSnapshotRequest validates the request for creating From 3c8ea475ec48336436d596744e7b4c3966000a25 Mon Sep 17 00:00:00 2001 From: Praveen M Date: Mon, 1 Apr 2024 08:53:36 +0530 Subject: [PATCH 3/3] doc: csi driver object options Signed-off-by: Praveen M --- charts/ceph-csi-cephfs/README.md | 2 ++ charts/ceph-csi-rbd/README.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/charts/ceph-csi-cephfs/README.md b/charts/ceph-csi-cephfs/README.md index 3de32168778..5ee44bde0fb 100644 --- a/charts/ceph-csi-cephfs/README.md +++ b/charts/ceph-csi-cephfs/README.md @@ -196,6 +196,8 @@ charts and their default values. | `secret.adminID` | Specifies the admin ID of the cephFS secret | `` | | `secret.adminKey` | Specifies the key that corresponds to the adminID | `<Ceph auth key corresponding to ID above>` | | `selinuxMount` | Mount the host /etc/selinux inside pods to support selinux-enabled filesystems | `true` | +| `CSIDriver.fsGroupPolicy` | Specifies the fsGroupPolicy for the CSI driver object | `File` | +| `CSIDriver.seLinuxMount` | Specify for efficient SELinux volume relabeling | `true` | ### Command Line diff --git a/charts/ceph-csi-rbd/README.md b/charts/ceph-csi-rbd/README.md index 6ab8b7a36c2..def55d6f4f4 100644 --- a/charts/ceph-csi-rbd/README.md +++ b/charts/ceph-csi-rbd/README.md @@ -225,6 +225,8 @@ charts and their default values. | `secret.userKey` | Specifies the key that corresponds to the userID | `<Ceph auth key corresponding to ID above>` | | `secret.encryptionPassphrase` | Specifies the encryption passphrase of the secret | `test_passphrase` | | `selinuxMount` | Mount the host /etc/selinux inside pods to support selinux-enabled filesystems | `true` | +| `CSIDriver.fsGroupPolicy` | Specifies the fsGroupPolicy for the CSI driver object | `File` | +| `CSIDriver.seLinuxMount` | Specify for efficient SELinux volume relabeling | `true` | ### Command Line