Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
feat: add pod disruption budgets (#218)
Browse files Browse the repository at this point in the history
This allows the cluster-autoscaler to evict the pods of the concerned deployments.

Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
  • Loading branch information
sylr authored and mboersma committed Jan 4, 2019
1 parent dc6c486 commit 8030f70
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
11 changes: 11 additions & 0 deletions parts/k8s/addons/coredns.yaml
Expand Up @@ -159,6 +159,17 @@ spec:
- key: Corefile
path: Corefile
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: coredns
namespace: kube-system
spec:
minAvailable: 50%
selector:
matchLabels:
k8s-app: kube-dns
---
apiVersion: v1
kind: Service
metadata:
Expand Down
26 changes: 26 additions & 0 deletions parts/k8s/addons/kubernetesmasteraddons-calico-daemonset.yaml
Expand Up @@ -252,6 +252,19 @@ spec:

---

apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: calico-typha
namespace: kube-system
spec:
minAvailable: 0%
selector:
matchLabels:
k8s-app: calico-typha

---

# Typha Horizontal Autoscaler Cluster Role
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down Expand Up @@ -356,6 +369,19 @@ spec:

---

apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: calico-typha-horizontal-autoscaler
namespace: kube-system
spec:
minAvailable: 0%
selector:
matchLabels:
k8s-app: calico-typha-autoscaler

---

# Typha Horizontal Autoscaler Role
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down
Expand Up @@ -127,3 +127,14 @@ spec:
serviceAccountName: kubernetes-dashboard
nodeSelector:
beta.kubernetes.io/os: linux
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: kubernetes-dashboard
namespace: kube-system
spec:
minAvailable: 0%
selector:
matchLabels:
k8s-app: kubernetes-dashboard
Expand Up @@ -94,3 +94,15 @@ spec:
memory: {{ContainerMemLimits "tiller"}}
nodeSelector:
beta.kubernetes.io/os: linux
---
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: tiller
namespace: kube-system
spec:
minAvailable: 0%
selector:
matchLabels:
app: helm
name: tiller

0 comments on commit 8030f70

Please sign in to comment.