From 3b9aa44ac560db12236f4f9cdf9402404062f239 Mon Sep 17 00:00:00 2001 From: Stephen Taylor Date: Thu, 10 Mar 2022 07:21:54 -0700 Subject: [PATCH] [ceph-client] More robust naming of clusterrole-checkdns Currently if multiple instances of the ceph-client chart are deployed in the same Kubernetes cluster, the releases will conflict because the clusterrole-checkdns ClusterRole is a global resources and has a hard-coded name. This change scopes the ClusterRole name by release name to address this. Change-Id: I17d04720ca301f643f6fb9cf5a9b2eec965ef537 --- ceph-client/Chart.yaml | 2 +- ceph-client/templates/deployment-checkdns.yaml | 4 ++-- releasenotes/notes/ceph-client.yaml | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ceph-client/Chart.yaml b/ceph-client/Chart.yaml index f7686f2420..38d13949bc 100644 --- a/ceph-client/Chart.yaml +++ b/ceph-client/Chart.yaml @@ -15,6 +15,6 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Ceph Client name: ceph-client -version: 0.1.32 +version: 0.1.33 home: https://github.com/ceph/ceph-client ... diff --git a/ceph-client/templates/deployment-checkdns.yaml b/ceph-client/templates/deployment-checkdns.yaml index 075f3b8d4e..1adee45229 100644 --- a/ceph-client/templates/deployment-checkdns.yaml +++ b/ceph-client/templates/deployment-checkdns.yaml @@ -28,7 +28,7 @@ and its reference can not be changed. apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: clusterrole-checkdns + name: {{ printf "%s-%s" $envAll.Release.Name "clusterrole-checkdns" | quote }} rules: - apiGroups: - "" @@ -52,7 +52,7 @@ metadata: roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: clusterrole-checkdns + name: {{ printf "%s-%s" $envAll.Release.Name "clusterrole-checkdns" | quote }} subjects: - kind: ServiceAccount name: {{ $serviceAccountName }} diff --git a/releasenotes/notes/ceph-client.yaml b/releasenotes/notes/ceph-client.yaml index 5f9f6f0a66..4c2c96a1e3 100644 --- a/releasenotes/notes/ceph-client.yaml +++ b/releasenotes/notes/ceph-client.yaml @@ -33,4 +33,5 @@ ceph-client: - 0.1.30 Move ceph-mgr deployment to the ceph-mon chart - 0.1.31 Consolidate mon_endpoints discovery - 0.1.32 Simplify test rules for ceph-mgr deployment + - 0.1.33 More robust naming of clusterrole-checkdns ...