From b2714cb11111f3c838eeb204115653324f53e60e Mon Sep 17 00:00:00 2001 From: Chinasubbareddy M Date: Thu, 30 Aug 2018 11:36:32 -0500 Subject: [PATCH] Ceph-storage-init : make configmap and secret names to be driven via chart values This is make ceph configmap and admin keyring secret names using in storage init scripts to be read from chart values as we may have two ceph clusters gets activated in one namespace and each ceph clsuter will have its own configmap and admin secret names. Change-Id: I84d94f3ac21e602c50619e456ff327ae1da53622 --- cinder/templates/deployment-backup.yaml | 2 +- cinder/templates/deployment-volume.yaml | 2 +- cinder/templates/job-backup-storage-init.yaml | 4 ++-- cinder/templates/job-storage-init.yaml | 4 ++-- cinder/values.yaml | 4 ++++ glance/templates/deployment-api.yaml | 2 +- glance/templates/job-storage-init.yaml | 4 ++-- glance/values.yaml | 4 ++++ gnocchi/templates/daemonset-metricd.yaml | 2 +- gnocchi/templates/daemonset-statsd.yaml | 2 +- gnocchi/templates/deployment-api.yaml | 2 +- gnocchi/templates/job-db-sync.yaml | 2 +- gnocchi/templates/job-storage-init.yaml | 4 ++-- gnocchi/values.yaml | 4 ++++ libvirt/templates/daemonset-libvirt.yaml | 4 ++-- libvirt/values.yaml | 4 ++++ nova/templates/daemonset-compute.yaml | 4 ++-- nova/values.yaml | 4 ++++ 18 files changed, 39 insertions(+), 19 deletions(-) diff --git a/cinder/templates/deployment-backup.yaml b/cinder/templates/deployment-backup.yaml index 434ad400d5..89412125d5 100644 --- a/cinder/templates/deployment-backup.yaml +++ b/cinder/templates/deployment-backup.yaml @@ -207,7 +207,7 @@ spec: emptyDir: {} - name: ceph-etc configMap: - name: ceph-etc + name: {{ .Values.ceph_client.configmap }} defaultMode: 0444 {{ end }} {{- if eq .Values.conf.cinder.DEFAULT.backup_driver "cinder.backup.drivers.ceph" }} diff --git a/cinder/templates/deployment-volume.yaml b/cinder/templates/deployment-volume.yaml index 37d054a4b3..119b568a74 100644 --- a/cinder/templates/deployment-volume.yaml +++ b/cinder/templates/deployment-volume.yaml @@ -167,7 +167,7 @@ spec: emptyDir: {} - name: ceph-etc configMap: - name: ceph-etc + name: {{ .Values.ceph_client.configmap }} defaultMode: 0444 - name: ceph-keyring secret: diff --git a/cinder/templates/job-backup-storage-init.yaml b/cinder/templates/job-backup-storage-init.yaml index 5705a16409..10c390b967 100644 --- a/cinder/templates/job-backup-storage-init.yaml +++ b/cinder/templates/job-backup-storage-init.yaml @@ -155,7 +155,7 @@ spec: emptyDir: {} - name: ceph-etc configMap: - name: ceph-etc + name: {{ .Values.ceph_client.configmap }} defaultMode: 0444 {{- if .Values.backup.external_ceph_rbd.enabled }} - name: cinder-etc @@ -166,7 +166,7 @@ spec: {{- if empty .Values.conf.ceph.admin_keyring }} - name: ceph-keyring secret: - secretName: pvc-ceph-client-key + secretName: {{ .Values.ceph_client.user_secret_name }} {{ end }} {{ end }} {{- end }} diff --git a/cinder/templates/job-storage-init.yaml b/cinder/templates/job-storage-init.yaml index beb4c78608..7ea9a4c190 100644 --- a/cinder/templates/job-storage-init.yaml +++ b/cinder/templates/job-storage-init.yaml @@ -141,12 +141,12 @@ spec: emptyDir: {} - name: ceph-etc configMap: - name: ceph-etc + name: {{ .Values.ceph_client.configmap }} defaultMode: 0444 {{- if empty .Values.conf.ceph.admin_keyring }} - name: ceph-keyring secret: - secretName: pvc-ceph-client-key + secretName: {{ .Values.ceph_client.user_secret_name }} {{- end }} {{- end }} {{- end }} diff --git a/cinder/values.yaml b/cinder/values.yaml index 13f92456d8..36eead0806 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -270,6 +270,10 @@ network: enabled: false port: 30877 +ceph_client: + configmap: ceph-etc + user_secret_name: pvc-ceph-client-key + conf: paste: composite:osapi_volume: diff --git a/glance/templates/deployment-api.yaml b/glance/templates/deployment-api.yaml index 81c4bca495..9a5836374e 100644 --- a/glance/templates/deployment-api.yaml +++ b/glance/templates/deployment-api.yaml @@ -173,7 +173,7 @@ spec: emptyDir: {} - name: ceph-etc configMap: - name: ceph-etc + name: {{ .Values.ceph_client.configmap }} defaultMode: 0444 - name: ceph-keyring secret: diff --git a/glance/templates/job-storage-init.yaml b/glance/templates/job-storage-init.yaml index 3442c204f9..0eb69ec2b0 100644 --- a/glance/templates/job-storage-init.yaml +++ b/glance/templates/job-storage-init.yaml @@ -156,12 +156,12 @@ spec: emptyDir: {} - name: ceph-etc configMap: - name: ceph-etc + name: {{ .Values.ceph_client.configmap }} defaultMode: 0444 {{- if empty .Values.conf.ceph.admin_keyring }} - name: ceph-keyring secret: - secretName: pvc-ceph-client-key + secretName: {{ .Values.ceph_client.user_secret_name }} {{ end }} {{ end }} {{- if eq .Values.storage "pvc" }} diff --git a/glance/values.yaml b/glance/values.yaml index fc6fd09ea8..18c6b55010 100644 --- a/glance/values.yaml +++ b/glance/values.yaml @@ -79,6 +79,10 @@ bootstrap: hypervisor_type: "qemu" os_distro: "cirros" +ceph_client: + configmap: ceph-etc + user_secret_name: pvc-ceph-client-key + conf: rally_tests: run_tempest: false diff --git a/gnocchi/templates/daemonset-metricd.yaml b/gnocchi/templates/daemonset-metricd.yaml index 03ee56f709..ccd6b0f1dd 100644 --- a/gnocchi/templates/daemonset-metricd.yaml +++ b/gnocchi/templates/daemonset-metricd.yaml @@ -109,7 +109,7 @@ spec: emptyDir: {} - name: ceph-etc configMap: - name: ceph-etc + name: {{ .Values.ceph_client.configmap }} - name: ceph-keyring secret: secretName: {{ .Values.secrets.rbd | quote }} diff --git a/gnocchi/templates/daemonset-statsd.yaml b/gnocchi/templates/daemonset-statsd.yaml index 2331cec476..343073ea42 100644 --- a/gnocchi/templates/daemonset-statsd.yaml +++ b/gnocchi/templates/daemonset-statsd.yaml @@ -115,7 +115,7 @@ spec: emptyDir: {} - name: ceph-etc configMap: - name: ceph-etc + name: {{ .Values.ceph_client.configmap }} - name: ceph-keyring secret: secretName: {{ .Values.secrets.rbd | quote }} diff --git a/gnocchi/templates/deployment-api.yaml b/gnocchi/templates/deployment-api.yaml index 66081a8689..6425d46971 100644 --- a/gnocchi/templates/deployment-api.yaml +++ b/gnocchi/templates/deployment-api.yaml @@ -134,7 +134,7 @@ spec: emptyDir: {} - name: ceph-etc configMap: - name: ceph-etc + name: {{ .Values.ceph_client.configmap }} - name: ceph-keyring secret: secretName: {{ .Values.secrets.rbd | quote }} diff --git a/gnocchi/templates/job-db-sync.yaml b/gnocchi/templates/job-db-sync.yaml index b0f62f0d64..bdb0f95b67 100644 --- a/gnocchi/templates/job-db-sync.yaml +++ b/gnocchi/templates/job-db-sync.yaml @@ -87,7 +87,7 @@ spec: emptyDir: {} - name: ceph-etc configMap: - name: ceph-etc + name: {{ .Values.ceph_client.configmap }} - name: ceph-keyring secret: secretName: {{ .Values.secrets.rbd | quote }} diff --git a/gnocchi/templates/job-storage-init.yaml b/gnocchi/templates/job-storage-init.yaml index 60bc1dfaa0..ae5046b2fa 100644 --- a/gnocchi/templates/job-storage-init.yaml +++ b/gnocchi/templates/job-storage-init.yaml @@ -124,9 +124,9 @@ spec: emptyDir: {} - name: ceph-etc configMap: - name: ceph-etc + name: {{ .Values.ceph_client.configmap }} defaultMode: 0444 - name: ceph-keyring secret: - secretName: pvc-ceph-client-key + secretName: {{ .Values.ceph_client.user_secret_name }} {{- end }} diff --git a/gnocchi/values.yaml b/gnocchi/values.yaml index 4fb03867e5..e32693a700 100644 --- a/gnocchi/values.yaml +++ b/gnocchi/values.yaml @@ -422,6 +422,10 @@ conf: auth_version: v3 memcache_security_strategy: ENCRYPT +ceph_client: + configmap: ceph-etc + user_secret_name: pvc-ceph-client-key + secrets: identity: admin: gnocchi-keystone-admin diff --git a/libvirt/templates/daemonset-libvirt.yaml b/libvirt/templates/daemonset-libvirt.yaml index 051f3ac55b..5bfdd5329f 100644 --- a/libvirt/templates/daemonset-libvirt.yaml +++ b/libvirt/templates/daemonset-libvirt.yaml @@ -195,12 +195,12 @@ spec: emptyDir: {} - name: ceph-etc configMap: - name: ceph-etc + name: {{ .Values.ceph_client.configmap }} defaultMode: 0444 {{- if empty .Values.conf.ceph.cinder.keyring }} - name: ceph-keyring secret: - secretName: pvc-ceph-client-key + secretName: {{ .Values.ceph_client.user_secret_name }} {{ end }} {{ end }} - name: libmodules diff --git a/libvirt/values.yaml b/libvirt/values.yaml index 1ae06fe93a..6ab6b7282f 100644 --- a/libvirt/values.yaml +++ b/libvirt/values.yaml @@ -58,6 +58,10 @@ endpoints: registry: node: 5000 +ceph_client: + configmap: ceph-etc + user_secret_name: pvc-ceph-client-key + conf: ceph: enabled: true diff --git a/nova/templates/daemonset-compute.yaml b/nova/templates/daemonset-compute.yaml index 4cf4b930ec..d6c0e618e9 100644 --- a/nova/templates/daemonset-compute.yaml +++ b/nova/templates/daemonset-compute.yaml @@ -298,12 +298,12 @@ spec: emptyDir: {} - name: ceph-etc configMap: - name: ceph-etc + name: {{ .Values.ceph_client.configmap }} defaultMode: 0444 {{- if empty .Values.conf.ceph.cinder.keyring }} - name: ceph-keyring secret: - secretName: pvc-ceph-client-key + secretName: {{ .Values.ceph_client.user_secret_name }} {{ end }} {{ end }} - name: libmodules diff --git a/nova/values.yaml b/nova/values.yaml index a920a687bd..025fcf14c1 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -443,6 +443,10 @@ ssh: - ecdsa - ed25519 +ceph_client: + configmap: ceph-etc + user_secret_name: pvc-ceph-client-key + conf: ceph: enabled: true