From 8cb1d475fdebef06657d476d2d3c7b3e6bd0fac7 Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Mon, 9 Feb 2026 13:50:42 +0100 Subject: [PATCH] helm: allow annotations and labels for CephCluster The helm chart will allow setting annotations and labels in the CephCluster CR via the helm settings in values.yaml named cephClusterMetadata. Signed-off-by: Mathieu Parent (cherry picked from commit 1e4e31fa791c2d3a12b0924f3ddc45247f1795c1) --- Documentation/Helm-Charts/ceph-cluster-chart.md | 2 ++ .../charts/rook-ceph-cluster/templates/cephcluster.yaml | 8 ++++++++ deploy/charts/rook-ceph-cluster/values.yaml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/Documentation/Helm-Charts/ceph-cluster-chart.md b/Documentation/Helm-Charts/ceph-cluster-chart.md index f1237fd35..684e14a2e 100644 --- a/Documentation/Helm-Charts/ceph-cluster-chart.md +++ b/Documentation/Helm-Charts/ceph-cluster-chart.md @@ -63,6 +63,8 @@ The following table lists the configurable parameters of the rook-operator chart |-----------|-------------|---------| | `cephBlockPools` | A list of CephBlockPool configurations to deploy | See [below](#ceph-block-pools) | | `cephBlockPoolsVolumeSnapshotClass` | Settings for the block pool snapshot class | See [RBD Snapshots](../Storage-Configuration/Ceph-CSI/ceph-csi-snapshot.md#rbd-snapshots) | +| `cephClusterMetadata.annotations` | | `{}` | +| `cephClusterMetadata.labels` | | `{}` | | `cephClusterSpec` | Cluster configuration. | See [below](#ceph-cluster-spec) | | `cephFileSystemVolumeSnapshotClass` | Settings for the filesystem snapshot class | See [CephFS Snapshots](../Storage-Configuration/Ceph-CSI/ceph-csi-snapshot.md#cephfs-snapshots) | | `cephFileSystems` | A list of CephFileSystem configurations to deploy | See [below](#ceph-file-systems) | diff --git a/deploy/charts/rook-ceph-cluster/templates/cephcluster.yaml b/deploy/charts/rook-ceph-cluster/templates/cephcluster.yaml index 41075e9df..5827aa6d4 100644 --- a/deploy/charts/rook-ceph-cluster/templates/cephcluster.yaml +++ b/deploy/charts/rook-ceph-cluster/templates/cephcluster.yaml @@ -4,6 +4,14 @@ kind: CephCluster metadata: name: {{ .Values.clusterName | default .Release.Namespace | quote }} namespace: {{ .Release.Namespace | quote }} # namespace:cluster + {{- with .Values.cephClusterMetadata.labels }} + labels: + {{- . | toYaml | nindent 4 }} + {{- end }} + {{- with .Values.cephClusterMetadata.annotations }} + annotations: + {{- . | toYaml | nindent 4 }} + {{- end }} spec: {{- with .Values.monitoring }} monitoring: diff --git a/deploy/charts/rook-ceph-cluster/values.yaml b/deploy/charts/rook-ceph-cluster/values.yaml index e85c33473..08bad1516 100644 --- a/deploy/charts/rook-ceph-cluster/values.yaml +++ b/deploy/charts/rook-ceph-cluster/values.yaml @@ -85,6 +85,11 @@ monitoring: # imagePullSecrets: # - name: my-registry-secret +# Labels and annotations to add to the CephCluster CR +cephClusterMetadata: + annotations: {} + labels: {} + # Specify these values to override the Ceph image in the cephClusterSpec below. # If specifying these values, do not include the cephVersion section in the cephClusterSpec. cephImage: