From e6758afeecfc0b584e9895e2f6b2af3ef93e7b48 Mon Sep 17 00:00:00 2001 From: portdirect Date: Fri, 30 Mar 2018 01:40:50 -0400 Subject: [PATCH] Ceph: Move all config to be directly values driven. This PS moves all the keyring templates to be directly values driven, both simplifying over-ride and allowing configs to be targeted to pods in future work. Change-Id: I7752cbfdeef85f71a1a084437556de062cbb5680 --- ceph/templates/configmap-templates.yaml | 20 ++++++------ ceph/templates/templates/_admin.keyring.tpl | 7 ----- .../templates/_bootstrap.keyring.mds.tpl | 3 -- .../templates/_bootstrap.keyring.mgr.tpl | 3 -- .../templates/_bootstrap.keyring.osd.tpl | 3 -- .../templates/_bootstrap.keyring.rgw.tpl | 3 -- ceph/templates/templates/_mon.keyring.tpl | 3 -- ceph/values.yaml | 31 +++++++++++++++++++ 8 files changed, 41 insertions(+), 32 deletions(-) delete mode 100644 ceph/templates/templates/_admin.keyring.tpl delete mode 100644 ceph/templates/templates/_bootstrap.keyring.mds.tpl delete mode 100644 ceph/templates/templates/_bootstrap.keyring.mgr.tpl delete mode 100644 ceph/templates/templates/_bootstrap.keyring.osd.tpl delete mode 100644 ceph/templates/templates/_bootstrap.keyring.rgw.tpl delete mode 100644 ceph/templates/templates/_mon.keyring.tpl diff --git a/ceph/templates/configmap-templates.yaml b/ceph/templates/configmap-templates.yaml index c4bc509fee..aa96d8002d 100644 --- a/ceph/templates/configmap-templates.yaml +++ b/ceph/templates/configmap-templates.yaml @@ -23,15 +23,15 @@ metadata: name: ceph-templates data: admin.keyring: | -{{ tuple "templates/_admin.keyring.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} - bootstrap.keyring.mds: | -{{ tuple "templates/_bootstrap.keyring.mds.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} - bootstrap.keyring.mgr: | -{{ tuple "templates/_bootstrap.keyring.mgr.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} - bootstrap.keyring.osd: | -{{ tuple "templates/_bootstrap.keyring.osd.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} - bootstrap.keyring.rgw: | -{{ tuple "templates/_bootstrap.keyring.rgw.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} +{{ .Values.conf.templates.keyring.admin | indent 4 }} mon.keyring: | -{{ tuple "templates/_mon.keyring.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} +{{ .Values.conf.templates.keyring.mon | indent 4 }} + bootstrap.keyring.mds: | +{{ .Values.conf.templates.keyring.bootstrap.mds | indent 4 }} + bootstrap.keyring.mgr: | +{{ .Values.conf.templates.keyring.bootstrap.mgr | indent 4 }} + bootstrap.keyring.osd: | +{{ .Values.conf.templates.keyring.bootstrap.osd | indent 4 }} + bootstrap.keyring.rgw: | +{{ .Values.conf.templates.keyring.bootstrap.rgw | indent 4 }} {{- end }} diff --git a/ceph/templates/templates/_admin.keyring.tpl b/ceph/templates/templates/_admin.keyring.tpl deleted file mode 100644 index e012ebe858..0000000000 --- a/ceph/templates/templates/_admin.keyring.tpl +++ /dev/null @@ -1,7 +0,0 @@ -[client.admin] - key = {{"{{"}} key {{"}}"}} - auid = 0 - caps mds = "allow" - caps mon = "allow *" - caps osd = "allow *" - caps mgr = "allow *" diff --git a/ceph/templates/templates/_bootstrap.keyring.mds.tpl b/ceph/templates/templates/_bootstrap.keyring.mds.tpl deleted file mode 100644 index c52fd6397a..0000000000 --- a/ceph/templates/templates/_bootstrap.keyring.mds.tpl +++ /dev/null @@ -1,3 +0,0 @@ -[client.bootstrap-mds] - key = {{"{{"}} key {{"}}"}} - caps mon = "allow profile bootstrap-mds" diff --git a/ceph/templates/templates/_bootstrap.keyring.mgr.tpl b/ceph/templates/templates/_bootstrap.keyring.mgr.tpl deleted file mode 100644 index b48ffcc462..0000000000 --- a/ceph/templates/templates/_bootstrap.keyring.mgr.tpl +++ /dev/null @@ -1,3 +0,0 @@ -[client.bootstrap-mgr] - key = {{"{{"}} key {{"}}"}} - caps mgr = "allow profile bootstrap-mgr" diff --git a/ceph/templates/templates/_bootstrap.keyring.osd.tpl b/ceph/templates/templates/_bootstrap.keyring.osd.tpl deleted file mode 100644 index c5fe618d99..0000000000 --- a/ceph/templates/templates/_bootstrap.keyring.osd.tpl +++ /dev/null @@ -1,3 +0,0 @@ -[client.bootstrap-osd] - key = {{"{{"}} key {{"}}"}} - caps mon = "allow profile bootstrap-osd" diff --git a/ceph/templates/templates/_bootstrap.keyring.rgw.tpl b/ceph/templates/templates/_bootstrap.keyring.rgw.tpl deleted file mode 100644 index 1f2a58d6ab..0000000000 --- a/ceph/templates/templates/_bootstrap.keyring.rgw.tpl +++ /dev/null @@ -1,3 +0,0 @@ -[client.bootstrap-rgw] - key = {{"{{"}} key {{"}}"}} - caps mon = "allow profile bootstrap-rgw" diff --git a/ceph/templates/templates/_mon.keyring.tpl b/ceph/templates/templates/_mon.keyring.tpl deleted file mode 100644 index f9681f2d90..0000000000 --- a/ceph/templates/templates/_mon.keyring.tpl +++ /dev/null @@ -1,3 +0,0 @@ -[mon.] - key = {{"{{"}} key {{"}}"}} - caps mon = "allow *" diff --git a/ceph/values.yaml b/ceph/values.yaml index 611a5f50a6..22177813af 100644 --- a/ceph/values.yaml +++ b/ceph/values.yaml @@ -193,6 +193,37 @@ network: mgr: 7000 conf: + templates: + keyring: + admin: | + [client.admin] + key = {{ key }} + auid = 0 + caps mds = "allow" + caps mon = "allow *" + caps osd = "allow *" + caps mgr = "allow *" + mon: | + [mon.] + key = {{ key }} + caps mon = "allow *" + bootstrap: + mds: | + [client.bootstrap-mds] + key = {{ key }} + caps mon = "allow profile bootstrap-mds" + mgr: | + [client.bootstrap-mgr] + key = {{ key }} + caps mgr = "allow profile bootstrap-mgr" + osd: | + [client.bootstrap-osd] + key = {{ key }} + caps mon = "allow profile bootstrap-osd" + rgw: | + [client.bootstrap-rgw] + key = {{ key }} + caps mon = "allow profile bootstrap-rgw" features: mds: true rgw: true