From 0caa1fcef33413ca115f3b271cf8f5391d521b0b Mon Sep 17 00:00:00 2001
From: intlabs <pete@port.direct>
Date: Mon, 30 Oct 2017 15:26:22 -0500
Subject: [PATCH] Ceph: mount mon state directory on host.

This change allows single node deployments of ceph to reboot/restart
sucessfully.

Change-Id: I9e8b7c5fa6c769483294071b9ed17db6e51eda1f
---
 ceph/templates/daemonset-mon.yaml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/ceph/templates/daemonset-mon.yaml b/ceph/templates/daemonset-mon.yaml
index aca490f5f4..8a8b7df835 100644
--- a/ceph/templates/daemonset-mon.yaml
+++ b/ceph/templates/daemonset-mon.yaml
@@ -53,6 +53,9 @@ spec:
             - name: pod-var-lib-ceph
               mountPath: /var/lib/ceph
               readOnly: false
+            - name: mon-directory
+              mountPath: /var/lib/ceph/mon
+              readOnly: false
             - name: pod-run
               mountPath: /run
               readOnly: false
@@ -143,6 +146,9 @@ spec:
             - name: pod-var-lib-ceph
               mountPath: /var/lib/ceph
               readOnly: false
+            - name: mon-directory
+              mountPath: /var/lib/ceph/mon
+              readOnly: false
             - name: pod-run
               mountPath: /run
               readOnly: false
@@ -160,6 +166,9 @@ spec:
         - name: pod-run
           emptyDir:
             medium: "Memory"
+        - name: mon-directory
+          hostPath:
+            path: {{ .Values.ceph.storage.mon_directory }}
         - name: ceph-client-admin-keyring
           secret:
             secretName: {{ .Values.secrets.keyrings.admin }}