-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathk8s-deploy.yaml
97 lines (97 loc) · 1.85 KB
/
k8s-deploy.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
apiVersion: scheduling.k8s.io/v1
description: Used for system critical kubefw pods
kind: PriorityClass
metadata:
name: kubefw-node-critical
value: 10000
globalDefault: false
---
apiVersion: v1
kind: Namespace
metadata:
name: kubefw
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kubefw
namespace: kubefw
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: kubefw
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kubefw
subjects:
- kind: ServiceAccount
name: kubefw
namespace: kubefw
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: kubefw
rules:
- apiGroups:
- ""
resources:
- configmaps
- endpoints
- nodes
- pods
- networkpolicies
- namespaces
- services
verbs:
- get
- list
- watch
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: kubefw
namespace: kubefw
labels:
k8s-app: kubefw
spec:
selector:
matchLabels:
k8s-app: kubefw
template:
metadata:
labels:
k8s-app: kubefw
spec:
priorityClassName: kubefw-node-critical
containers:
- name: kubefw
image: docker.io/jpmondet/kubefw:0.2.0
args: ["/kubefw"]
securityContext:
privileged: true
imagePullPolicy: IfNotPresent
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
livenessProbe:
httpGet:
path: /healthz
port: 20244
initialDelaySeconds: 10
periodSeconds: 3
hostNetwork: true
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- effect: NoSchedule
key: node.kubernetes.io/not-ready
operator: Exists
- effect: NoSchedule
key: node.kubernetes.io/unschedulable
operator: Exists