From 51864717d7b709964d4bb68a4412dcd4347d3c7f Mon Sep 17 00:00:00 2001 From: Cyril Jouve Date: Sun, 8 Jan 2023 23:05:14 +0100 Subject: [PATCH] helm: storageclass parameters secrets namespace make the parameters secrets namespace the same as the chart release namespace Closes: https://github.com/rook/rook/issues/11516 Signed-off-by: Cyril Jouve (cherry picked from commit 668bd172e3a5a489a5c71c5777551e21a5b389b2) --- .../rook-ceph-cluster/templates/cephblockpool.yaml | 2 +- .../rook-ceph-cluster/templates/cephfilesystem.yaml | 2 +- deploy/charts/rook-ceph-cluster/values.yaml | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deploy/charts/rook-ceph-cluster/templates/cephblockpool.yaml b/deploy/charts/rook-ceph-cluster/templates/cephblockpool.yaml index 70cefd007..730bf60e7 100644 --- a/deploy/charts/rook-ceph-cluster/templates/cephblockpool.yaml +++ b/deploy/charts/rook-ceph-cluster/templates/cephblockpool.yaml @@ -20,7 +20,7 @@ parameters: pool: {{ $blockpool.name }} clusterID: {{ $root.Release.Namespace }} {{ with $blockpool.storageClass.parameters }} -{{ toYaml . | indent 2 }} +{{ tpl (toYaml .) $ | indent 2 }} {{ end }} reclaimPolicy: {{ default "Delete" $blockpool.storageClass.reclaimPolicy }} allowVolumeExpansion: {{ default "true" $blockpool.storageClass.allowVolumeExpansion }} diff --git a/deploy/charts/rook-ceph-cluster/templates/cephfilesystem.yaml b/deploy/charts/rook-ceph-cluster/templates/cephfilesystem.yaml index bd94da158..97c57566b 100644 --- a/deploy/charts/rook-ceph-cluster/templates/cephfilesystem.yaml +++ b/deploy/charts/rook-ceph-cluster/templates/cephfilesystem.yaml @@ -21,7 +21,7 @@ parameters: pool: {{ $filesystem.name }}-{{ default "data0" $filesystem.storageClass.pool }} clusterID: {{ $root.Release.Namespace }} {{ with $filesystem.storageClass.parameters }} -{{ toYaml . | indent 2 }} +{{ tpl (toYaml .) $ | indent 2 }} {{ end }} reclaimPolicy: {{ default "Delete" $filesystem.storageClass.reclaimPolicy }} allowVolumeExpansion: {{ default "true" $filesystem.storageClass.allowVolumeExpansion }} diff --git a/deploy/charts/rook-ceph-cluster/values.yaml b/deploy/charts/rook-ceph-cluster/values.yaml index 0c5b34cb0..3a2a061dd 100644 --- a/deploy/charts/rook-ceph-cluster/values.yaml +++ b/deploy/charts/rook-ceph-cluster/values.yaml @@ -456,11 +456,11 @@ cephBlockPools: # These secrets contain Ceph admin credentials. csi.storage.k8s.io/provisioner-secret-name: rook-csi-rbd-provisioner - csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph + csi.storage.k8s.io/provisioner-secret-namespace: "{{ .Release.Namespace }}" csi.storage.k8s.io/controller-expand-secret-name: rook-csi-rbd-provisioner - csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph + csi.storage.k8s.io/controller-expand-secret-namespace: "{{ .Release.Namespace }}" csi.storage.k8s.io/node-stage-secret-name: rook-csi-rbd-node - csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph + csi.storage.k8s.io/node-stage-secret-namespace: "{{ .Release.Namespace }}" # Specify the filesystem type of the volume. If not specified, csi-provisioner # will set default as `ext4`. Note that `xfs` is not recommended due to potential deadlock # in hyperconverged settings where the volume is mounted on the same node as the osds. @@ -505,11 +505,11 @@ cephFileSystems: parameters: # The secrets contain Ceph admin credentials. csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner - csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph + csi.storage.k8s.io/provisioner-secret-namespace: "{{ .Release.Namespace }}" csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner - csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph + csi.storage.k8s.io/controller-expand-secret-namespace: "{{ .Release.Namespace }}" csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node - csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph + csi.storage.k8s.io/node-stage-secret-namespace: "{{ .Release.Namespace }}" # Specify the filesystem type of the volume. If not specified, csi-provisioner # will set default as `ext4`. Note that `xfs` is not recommended due to potential deadlock # in hyperconverged settings where the volume is mounted on the same node as the osds.