/
sample_single_namespace.yaml
75 lines (68 loc) · 1.43 KB
/
sample_single_namespace.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kube-pod-terminator
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: kube-pod-terminator
namespace: default
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: kube-pod-terminator-rolebinding
namespace: default
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: kube-pod-terminator
subjects:
- kind: ServiceAccount
name: kube-pod-terminator
namespace: default
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: kube-pod-terminator
name: kube-pod-terminator
namespace: default
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: kube-pod-terminator
deployment: kube-pod-terminator
template:
metadata:
labels:
app: kube-pod-terminator
deployment: kube-pod-terminator
spec:
serviceAccountName: kube-pod-terminator
containers:
- image: 'docker.io/bilalcaliskan/kube-pod-terminator:latest'
command: ["./main"]
args: [
"--namespace", "default",
"--tickerIntervalMin", "10",
"--inCluster=true",
"--oneShot=false"
]
imagePullPolicy: Always
name: kube-pod-terminator