[ceph-osd] resolve name conflicts by appending release name

This is to resolve name conflicts of reources in case of multiple
releases required for single deployment of ceph cluster

Change-Id: Ibee5550db788ea57879837b010e22a24240237bf
This commit is contained in:
Chinasubbareddy Mallavarapu 2019-03-04 15:27:52 -06:00
parent 2eb745d53a
commit 47d429059c
6 changed files with 12 additions and 12 deletions

View File

@ -20,7 +20,7 @@ limitations under the License.
apiVersion: v1
kind: ConfigMap
metadata:
name: ceph-osd-bin
name: {{ printf "%s-%s" $envAll.Release.Name "bin" | quote }}
data:
{{- if .Values.images.local_registry.active }}
image-repo-sync.sh: |

View File

@ -53,5 +53,5 @@ data:
{{- end }}
{{- end }}
{{- if .Values.manifests.configmap_etc }}
{{- list "ceph-osd-etc" . | include "ceph.osd.configmap.etc" }}
{{- list (printf "%s-%s" .Release.Name "etc") . | include "ceph.osd.configmap.etc" }}
{{- end }}

View File

@ -96,10 +96,10 @@ spec:
volumes:
- name: ceph-osd-bin
configMap:
name: ceph-osd-bin
name: {{ printf "%s-%s" $envAll.Release.Name "bin" | quote }}
defaultMode: 0555
- name: ceph-osd-etc
configMap:
name: ceph-osd-etc
name: {{ printf "%s-%s" $envAll.Release.Name "etc" | quote }}
defaultMode: 0444
{{- end }}

View File

@ -330,7 +330,7 @@ spec:
medium: "Memory"
- name: ceph-osd-bin
configMap:
name: ceph-osd-bin
name: {{ printf "%s-%s" $envAll.Release.Name "bin" | quote }}
defaultMode: 0555
- name: ceph-osd-etc
configMap:
@ -352,9 +352,9 @@ spec:
{{- end }}
{{- if .Values.manifests.daemonset_osd }}
{{- $daemonset := "osd" }}
{{- $configMapName := "ceph-osd-etc" }}
{{- $serviceAccountName := "ceph-osd" }}
{{- $daemonset := (printf "%s" .Release.Name) }}
{{- $configMapName := (printf "%s-%s" .Release.Name "etc") }}
{{- $serviceAccountName := (printf "%s" .Release.Name) }}
{{ tuple . "osd" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
{{- $daemonset_yaml := list $daemonset $configMapName $serviceAccountName . | include "ceph.osd.daemonset" | toString | fromYaml }}
{{- $configmap_yaml := "ceph.osd.configmap.etc" }}

View File

@ -60,11 +60,11 @@ spec:
volumes:
- name: ceph-osd-bin
configMap:
name: ceph-osd-bin
name: {{ printf "%s-%s" $envAll.Release.Name "bin" | quote }}
defaultMode: 0555
- name: ceph-osd-etc
configMap:
name: ceph-osd-etc
name: {{ printf "%s-%s" $envAll.Release.Name "etc" | quote }}
defaultMode: 0444
- name: ceph-osd-admin-keyring
secret:

View File

@ -58,13 +58,13 @@ spec:
volumes:
- name: ceph-osd-bin
configMap:
name: ceph-osd-bin
name: {{ printf "%s-%s" $envAll.Release.Name "bin" | quote }}
defaultMode: 0555
- name: ceph-client-admin-keyring
secret:
secretName: {{ .Values.secrets.keyrings.admin }}
- name: ceph-osd-etc
configMap:
name: ceph-osd-etc
name: {{ printf "%s-%s" $envAll.Release.Name "etc" | quote }}
defaultMode: 0444
{{- end }}