From 81179cb2e349d1547e51a7139534c66e1edfc507 Mon Sep 17 00:00:00 2001 From: "Sigunov, Vladimir (vs422h)" Date: Wed, 16 Mar 2022 13:27:53 -0400 Subject: [PATCH] [ceph-mgr] Prevents repeated creation of ceph-mgr service account Under some circumstances, armada job attempts to recreate an existing Service Account for ceph-mgr. This patchset aims to remediate the issue. Change-Id: I69bb9045c0e2f24dc2fa9e94ab6a09a58221e1f5 --- ceph-mon/Chart.yaml | 2 +- ceph-mon/templates/deployment-mgr.yaml | 5 +++++ ceph-mon/values.yaml | 1 + releasenotes/notes/ceph-mon.yaml | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ceph-mon/Chart.yaml b/ceph-mon/Chart.yaml index b8309765a..f648967b3 100644 --- a/ceph-mon/Chart.yaml +++ b/ceph-mon/Chart.yaml @@ -15,6 +15,6 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Ceph Mon name: ceph-mon -version: 0.1.23 +version: 0.1.24 home: https://github.com/ceph/ceph ... diff --git a/ceph-mon/templates/deployment-mgr.yaml b/ceph-mon/templates/deployment-mgr.yaml index 63d5a0cd5..b544276f7 100644 --- a/ceph-mon/templates/deployment-mgr.yaml +++ b/ceph-mon/templates/deployment-mgr.yaml @@ -16,7 +16,12 @@ limitations under the License. {{- $envAll := . }} {{- $serviceAccountName := "ceph-mgr" }} +# This protective IF prevents an attempt of repeated creation +# of ceph-mgr service account. +# To be considered: the separation of SA and Deployment manifests. +{{- if .Values.manifests.deployment_mgr_sa }} {{ tuple $envAll "mgr" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} +{{- end }} --- kind: Deployment apiVersion: apps/v1 diff --git a/ceph-mon/values.yaml b/ceph-mon/values.yaml index e99bff93a..e79653998 100644 --- a/ceph-mon/values.yaml +++ b/ceph-mon/values.yaml @@ -458,6 +458,7 @@ manifests: configmap_templates: true daemonset_mon: true deployment_mgr: true + deployment_mgr_sa: true deployment_moncheck: true job_image_repo_sync: true job_bootstrap: true diff --git a/releasenotes/notes/ceph-mon.yaml b/releasenotes/notes/ceph-mon.yaml index 8a593c1ff..7df7f5855 100644 --- a/releasenotes/notes/ceph-mon.yaml +++ b/releasenotes/notes/ceph-mon.yaml @@ -24,4 +24,5 @@ ceph-mon: - 0.1.21 Change configmap names to be based on release name - 0.1.22 Correct configmap names for all resources - 0.1.23 Release-specific ceph-template configmap name + - 0.1.24 Prevents mgr SA from repeated creation ...