forked from Nordix/xcluster-cni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xcluster-cni.yaml
102 lines (101 loc) · 2.35 KB
/
xcluster-cni.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
98
99
100
101
apiVersion: v1
kind: ServiceAccount
metadata:
name: xcluster-cni
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: xcluster-cni
rules:
- apiGroups:
- ""
resources:
- nodes
verbs:
- list
- get
- watch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: xcluster-cni
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: xcluster-cni
subjects:
- kind: ServiceAccount
name: xcluster-cni
namespace: kube-system
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: xcluster-cni
namespace: kube-system
spec:
selector:
matchLabels:
app: xcluster-cni
template:
metadata:
namespace: kube-system
labels:
app: xcluster-cni
spec:
nodeSelector:
kubernetes.io/os: linux
tolerations:
- effect: NoSchedule
operator: Exists
- key: CriticalAddonsOnly
operator: Exists
- effect: NoExecute
operator: Exists
serviceAccountName: xcluster-cni
serviceAccount: xcluster-cni
hostNetwork: true
priorityClassName: system-node-critical
initContainers:
- name: install
image: registry.nordix.org/cloud-native/xcluster-cni:latest
imagePullPolicy: IfNotPresent
command: ["/xcluster-cni.sh", "install"]
securityContext:
privileged: true
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- mountPath: /cni/bin
name: cni-bin-dir
readOnly: false
- mountPath: /cni/net.d
name: cni-net-dir
readOnly: false
containers:
- name: xcluster-cni
image: registry.nordix.org/cloud-native/xcluster-cni:latest
imagePullPolicy: IfNotPresent
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: LOG_LEVEL
value: "debug"
securityContext:
capabilities:
add: ["NET_ADMIN"]
volumes:
- name: cni-bin-dir
hostPath:
path: /opt/cni/bin
- name: cni-net-dir
hostPath:
path: /etc/cni/net.d