forked from Nordix/xcluster-cni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xcluster-cni-static.yaml
70 lines (69 loc) · 1.74 KB
/
xcluster-cni-static.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
apiVersion: v1
kind: Pod
metadata:
namespace: kube-system
name: xcluster-cni
labels:
app: xcluster-cni
spec:
nodeSelector:
kubernetes.io/os: linux
tolerations:
- effect: NoSchedule
operator: Exists
- key: CriticalAddonsOnly
operator: Exists
- effect: NoExecute
operator: Exists
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
- name: KUBERNETES_SERVICE_HOST
value: "192.168.1.1"
- name: KUBERNETES_SERVICE_PORT
value: "6443"
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"
- name: KUBECONFIG
value: "/cni/net.d/xcluster-cni.kubeconfig"
securityContext:
capabilities:
add: ["NET_ADMIN"]
volumeMounts:
- mountPath: /cni/net.d
name: cni-net-dir
readOnly: true
volumes:
- name: cni-bin-dir
hostPath:
path: /opt/cni/bin
- name: cni-net-dir
hostPath:
path: /etc/cni/net.d