Skip to content

Commit dca10e9

Browse files
authored
daemonset: Critical pod, toleration, and standardization improvements (#56)
* Standardize k8s-app=kube-router label * Add tolerations to run on master/critical-only nodes * Add critical pod annotation
1 parent 37d4192 commit dca10e9

File tree

4 files changed

+45
-13
lines changed

4 files changed

+45
-13
lines changed

daemonset/kube-router-all-service-daemonset-advertise-routes.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ metadata:
44
name: kube-router
55
namespace: kube-system
66
labels:
7-
app: kube-router
7+
k8s-app: kube-router
88
spec:
99
template:
1010
metadata:
1111
labels:
12-
name: kube-router
12+
k8s-app: kube-router
13+
annotations:
14+
scheduler.alpha.kubernetes.io/critical-pod: ''
1315
spec:
14-
hostNetwork: true
1516
containers:
1617
- name: kube-router
1718
image: cloudnativelabs/kube-router
18-
args:
19+
args:
1920
- "--run-router=true"
2021
- "--run-firewall=true"
2122
- "--run-service-proxy=true"
@@ -39,6 +40,13 @@ spec:
3940
name: cni-conf-dir
4041
- mountPath: /var/lib/kube-router/kubeconfig
4142
name: kubeconfig
43+
hostNetwork: true
44+
tolerations:
45+
- key: CriticalAddonsOnly
46+
operator: Exists
47+
- effect: NoSchedule
48+
key: node-role.kubernetes.io/master
49+
operator: Exists
4250
volumes:
4351
- name: lib-modules
4452
hostPath:

daemonset/kube-router-all-service-daemonset.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ metadata:
44
name: kube-router
55
namespace: kube-system
66
labels:
7-
app: kube-router
7+
k8s-app: kube-router
88
spec:
99
template:
1010
metadata:
1111
labels:
12-
name: kube-router
12+
k8s-app: kube-router
13+
annotations:
14+
scheduler.alpha.kubernetes.io/critical-pod: ''
1315
spec:
14-
hostNetwork: true
1516
containers:
1617
- name: kube-router
1718
image: cloudnativelabs/kube-router
@@ -32,6 +33,13 @@ spec:
3233
name: cni-conf-dir
3334
- mountPath: /var/lib/kube-router/kubeconfig
3435
name: kubeconfig
36+
hostNetwork: true
37+
tolerations:
38+
- key: CriticalAddonsOnly
39+
operator: Exists
40+
- effect: NoSchedule
41+
key: node-role.kubernetes.io/master
42+
operator: Exists
3543
volumes:
3644
- name: lib-modules
3745
hostPath:

daemonset/kube-router-firewall-daemonset.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ metadata:
44
name: kube-router
55
namespace: kube-system
66
labels:
7-
app: kube-router
7+
k8s-app: kube-router
88
spec:
99
template:
1010
metadata:
1111
labels:
12-
name: kube-router
12+
k8s-app: kube-router
13+
annotations:
14+
scheduler.alpha.kubernetes.io/critical-pod: ''
1315
spec:
14-
hostNetwork: true
1516
containers:
1617
- name: kube-router
1718
image: cloudnativelabs/kube-router
@@ -32,6 +33,13 @@ spec:
3233
name: cni-conf-dir
3334
- mountPath: /var/lib/kube-router/kubeconfig
3435
name: kubeconfig
36+
hostNetwork: true
37+
tolerations:
38+
- key: CriticalAddonsOnly
39+
operator: Exists
40+
- effect: NoSchedule
41+
key: node-role.kubernetes.io/master
42+
operator: Exists
3543
volumes:
3644
- name: lib-modules
3745
hostPath:

daemonset/kube-router-proxy--daemonset.yaml renamed to daemonset/kube-router-proxy-daemonset.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ metadata:
44
name: kube-router
55
namespace: kube-system
66
labels:
7-
app: kube-router
7+
k8s-app: kube-router
88
spec:
99
template:
1010
metadata:
1111
labels:
12-
name: kube-router
12+
k8s-app: kube-router
13+
annotations:
14+
scheduler.alpha.kubernetes.io/critical-pod: ''
1315
spec:
14-
hostNetwork: true
1516
containers:
1617
- name: kube-router
1718
image: cloudnativelabs/kube-router
@@ -32,6 +33,13 @@ spec:
3233
name: cni-conf-dir
3334
- mountPath: /var/lib/kube-router/kubeconfig
3435
name: kubeconfig
36+
hostNetwork: true
37+
tolerations:
38+
- key: CriticalAddonsOnly
39+
operator: Exists
40+
- effect: NoSchedule
41+
key: node-role.kubernetes.io/master
42+
operator: Exists
3543
volumes:
3644
- name: lib-modules
3745
hostPath:

0 commit comments

Comments
 (0)