From dfc9fc994a665686cf00e6561e6b3fb74d4fc798 Mon Sep 17 00:00:00 2001 From: chinasubbareddy mallavarapu Date: Tue, 20 Aug 2019 21:09:42 +0000 Subject: [PATCH] [ceph-osd] get configmap and daemonset names from values This is to fix name conflict for configmap name "ceph-osd-default" when we try to create multiple osd releases as every relase try to create configmap with same name. we could add relase name here but that will be a problem for sites deployed with current logic as upgrade will delete old daemonsets and creates new ds ,so all osd pods gets recreated at a time, by getting this from values can give us flexibility to install multiple osd releases with out effecting currently deployed sites. Here is the error if we try multiple osd releases with current logic: 2019-08-27 13:54:16.690 41 ERROR armada.handlers.tiller [-] [chart=ceph-osd-sde]: Error while installing release ceph-osd-sde: grpc._channel._Rendezvous: \ <_Rendezvous of RPC that terminated with: status = StatusCode.UNKNOWN details = "release ceph-osd-sde failed: configmaps "ceph-osd-default" already exists" Change-Id: Ibe84582b9ba04c6cbf611e943ecd0a7149c5ab2f --- ceph-osd/templates/daemonset-osd.yaml | 2 +- ceph-osd/values.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ceph-osd/templates/daemonset-osd.yaml b/ceph-osd/templates/daemonset-osd.yaml index bda766c70..46489c0a0 100644 --- a/ceph-osd/templates/daemonset-osd.yaml +++ b/ceph-osd/templates/daemonset-osd.yaml @@ -379,7 +379,7 @@ spec: {{- end }} {{- if .Values.manifests.daemonset_osd }} -{{- $daemonset := "osd" }} +{{- $daemonset := .Values.daemonset.prefix_name }} {{- $configMapName := (printf "%s-%s" .Release.Name "etc") }} {{- $serviceAccountName := (printf "%s" .Release.Name) }} {{ tuple . "osd" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} diff --git a/ceph-osd/values.yaml b/ceph-osd/values.yaml index 9c6eae839..ead77824b 100644 --- a/ceph-osd/values.yaml +++ b/ceph-osd/values.yaml @@ -241,6 +241,9 @@ conf: # type: directory # location: /var/lib/openstack-helm/ceph/osd/journal-three +daemonset: + prefix_name: "osd" + dependencies: dynamic: common: