Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit b21b766

Browse files
authored
Add PDB for 'jack' pods (#59)
1 parent ad2d98d commit b21b766

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ deploy: manifests kustomize## Deploy controller to the K8s cluster specified in
121121

122122
.PHONY: addrole
123123
addrole: ## add relevant role
124-
kubectl create clusterrole deployerCrd --verb=get,list,watch,create,delete,patch,update --resource=deployments.apps && kubectl create clusterrolebinding deployer-srvacct-default-binding --clusterrole=deployerCrd --serviceaccount=tnf:new-pro-controller-manager
124+
kubectl create -f pdb.yml
125+
kubectl create clusterrole deployerCrd --verb=get,list,watch,create,delete,patch,update --resource=deployments.apps && kubectl create clusterrolebinding deployer-srvacct-default-binding --clusterrole=deployerCrd --serviceaccount=tnf:new-pro-controller-manager
125126

126127
.PHONY: undeploy
127128
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.

pdb.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: policy/v1
2+
kind: PodDisruptionBudget
3+
metadata:
4+
name: jack-pdb-min
5+
namespace: tnf
6+
spec:
7+
minAvailable: 1
8+
selector:
9+
matchLabels:
10+
app: jack
11+
---
12+
apiVersion: policy/v1
13+
kind: PodDisruptionBudget
14+
metadata:
15+
name: jack-pdb-max
16+
namespace: tnf
17+
spec:
18+
maxUnavailable: 1
19+
selector:
20+
matchLabels:
21+
app: jack

0 commit comments

Comments
 (0)