From d7416cac6d7074b71a7d6b8199ad4b312da7d3a3 Mon Sep 17 00:00:00 2001
From: portdirect <pete@port.direct>
Date: Thu, 21 Dec 2017 11:26:04 -0500
Subject: [PATCH] Ceph: Add mgr caps to the admin keyring

This PS adds mgr caps to the admin keyring and also adds the mgr
bootstrap keyring.

Change-Id: Ic88dfcb0aa00d8d017a8c28d3c64169b2d8f0022
---
 ceph/templates/configmap-templates.yaml             | 2 ++
 ceph/templates/templates/_bootstrap.keyring.mgr.tpl | 3 +++
 2 files changed, 5 insertions(+)
 create mode 100644 ceph/templates/templates/_bootstrap.keyring.mgr.tpl

diff --git a/ceph/templates/configmap-templates.yaml b/ceph/templates/configmap-templates.yaml
index e9331ce812..8bcf25bc1d 100644
--- a/ceph/templates/configmap-templates.yaml
+++ b/ceph/templates/configmap-templates.yaml
@@ -27,6 +27,8 @@ data:
 {{ 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: |+
diff --git a/ceph/templates/templates/_bootstrap.keyring.mgr.tpl b/ceph/templates/templates/_bootstrap.keyring.mgr.tpl
new file mode 100644
index 0000000000..b48ffcc462
--- /dev/null
+++ b/ceph/templates/templates/_bootstrap.keyring.mgr.tpl
@@ -0,0 +1,3 @@
+[client.bootstrap-mgr]
+  key = {{"{{"}} key {{"}}"}}
+  caps mgr = "allow profile bootstrap-mgr"