From 96e827e6b73add417c49de6851ffafb41bfe80ab Mon Sep 17 00:00:00 2001
From: Larry Rensing <lr699s@att.com>
Date: Thu, 18 May 2017 14:35:01 +0000
Subject: [PATCH] Add pod disruption budget for ceph

This adds default pod disruption budgets for ceph mons

Change-Id: I4a85140aea2a532bc073d97c7b985c7f61205a6d
---
 ceph/templates/pdb-mon.yaml | 10 ++++++++++
 ceph/values.yaml            |  4 ++++
 2 files changed, 14 insertions(+)
 create mode 100644 ceph/templates/pdb-mon.yaml

diff --git a/ceph/templates/pdb-mon.yaml b/ceph/templates/pdb-mon.yaml
new file mode 100644
index 0000000000..9852700e95
--- /dev/null
+++ b/ceph/templates/pdb-mon.yaml
@@ -0,0 +1,10 @@
+apiVersion: policy/v1beta1
+kind: PodDisruptionBudget
+metadata:
+  name: ceph-mon
+spec:
+  minAvailable: {{ .Values.pod_disruption_budget.mon.min_available }}
+  selector:
+    matchLabels:
+      app: ceph
+      daemon: mon
\ No newline at end of file
diff --git a/ceph/values.yaml b/ceph/values.yaml
index 8c709dd486..dd5946cdad 100644
--- a/ceph/values.yaml
+++ b/ceph/values.yaml
@@ -29,6 +29,10 @@ labels:
   node_selector_key: ceph-storage
   node_selector_value: enabled
 
+pod_disruption_budget:
+  mon:
+    min_available: 0
+
 network:
   public: "10.25.0.0/16"
   port: