From 772cfa5b8097297f0d70ae4b0a5083fe8a726166 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Fri, 14 Jan 2022 15:52:20 +0100
Subject: [PATCH] feat(kube-system): Deploy PodDisruptionBudget for etcd

---
 .../coredns/poddisruptionbudget.yaml          | 10 --------
 .../kustomization.yaml                        |  0
 .../kube-system/poddisruptionbudget.yaml      | 23 +++++++++++++++++++
 3 files changed, 23 insertions(+), 10 deletions(-)
 delete mode 100644 infrastructure/coredns/poddisruptionbudget.yaml
 rename infrastructure/{coredns => kube-system}/kustomization.yaml (100%)
 create mode 100644 infrastructure/kube-system/poddisruptionbudget.yaml

diff --git a/infrastructure/coredns/poddisruptionbudget.yaml b/infrastructure/coredns/poddisruptionbudget.yaml
deleted file mode 100644
index ee1521c93..000000000
--- a/infrastructure/coredns/poddisruptionbudget.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-apiVersion: policy/v1
-kind: PodDisruptionBudget
-metadata:
-  name: coredns
-  namespace: kube-system
-spec:
-  minAvailable: 1
-  selector:
-    matchLabels:
-      k8s-app: kube-dns
diff --git a/infrastructure/coredns/kustomization.yaml b/infrastructure/kube-system/kustomization.yaml
similarity index 100%
rename from infrastructure/coredns/kustomization.yaml
rename to infrastructure/kube-system/kustomization.yaml
diff --git a/infrastructure/kube-system/poddisruptionbudget.yaml b/infrastructure/kube-system/poddisruptionbudget.yaml
new file mode 100644
index 000000000..d394efaa2
--- /dev/null
+++ b/infrastructure/kube-system/poddisruptionbudget.yaml
@@ -0,0 +1,23 @@
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: coredns
+  namespace: kube-system
+spec:
+  minAvailable: 1
+  selector:
+    matchLabels:
+      k8s-app: kube-dns
+---
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: etcd
+  namespace: kube-system
+spec:
+  maxUnavailable: 1
+  selector:
+    matchLabels:
+      component: etcd
+      tier: control-plane
+
-- 
GitLab