Update versions of addons
[icn.git] / deploy / nodus / base / ovn-daemonset.yaml
1 ---
2 kind: Service
3 apiVersion: v1
4 metadata:
5   name: ovn-nb-tcp
6   namespace: kube-system
7 spec:
8   ports:
9     - name: ovn-nb-tcp
10       protocol: TCP
11       port: 6641
12       targetPort: 6641
13   type: ClusterIP
14   selector:
15     app: ovn-control-plane
16   sessionAffinity: None
17
18 ---
19 kind: Service
20 apiVersion: v1
21 metadata:
22   name: ovn-sb-tcp
23   namespace: kube-system
24 spec:
25   ports:
26     - name: ovn-sb-tcp
27       protocol: TCP
28       port: 6642
29       targetPort: 6642
30   type: ClusterIP
31   selector:
32     app: ovn-control-plane
33   sessionAffinity: None
34
35 ---
36 kind: Deployment
37 apiVersion: apps/v1
38 metadata:
39   name: ovn-control-plane
40   namespace: kube-system
41   annotations:
42     kubernetes.io/description: |
43       OVN control plane deployment using tcp: ovn-northd-tcp, ovn-nb-tcp and ovn-sb-tcp.
44 spec:
45   replicas: 1
46   strategy:
47     rollingUpdate:
48       maxSurge: 0%
49       maxUnavailable: 100%
50     type: RollingUpdate
51   selector:
52     matchLabels:
53       app: ovn-control-plane
54   template:
55     metadata:
56       labels:
57         app: ovn-control-plane
58     spec:
59       tolerations:
60       - operator: Exists
61         effect: NoSchedule
62       affinity:
63         podAntiAffinity:
64           requiredDuringSchedulingIgnoredDuringExecution:
65             - labelSelector:
66                 matchLabels:
67                   app: ovn-control-plane
68               topologyKey: kubernetes.io/hostname
69       priorityClassName: system-cluster-critical
70       hostNetwork: true
71       containers:
72         - name: ovn-control-plane
73           image: docker.io/integratedcloudnative/ovn-images:v2.2.0
74           imagePullPolicy: IfNotPresent
75           command: ["ovn4nfv-k8s", "start_ovn_control_plane"]
76           securityContext:
77             capabilities:
78               add: ["SYS_NICE"]
79           env:
80             - name: POD_IP
81               valueFrom:
82                 fieldRef:
83                   fieldPath: status.podIP
84             - name: POD_NAME
85               valueFrom:
86                 fieldRef:
87                   fieldPath: metadata.name
88             - name: POD_NAMESPACE
89               valueFrom:
90                 fieldRef:
91                   fieldPath: metadata.namespace
92           resources:
93             requests:
94               cpu: 500m
95               memory: 300Mi
96           volumeMounts:
97             - mountPath: /var/run/openvswitch
98               name: host-run-ovs
99             - mountPath: /var/run/ovn
100               name: host-run-ovn
101             - mountPath: /sys
102               name: host-sys
103               readOnly: true
104             - mountPath: /etc/openvswitch
105               name: host-config-openvswitch
106             - mountPath: /var/log/openvswitch
107               name: host-log-ovs
108             - mountPath: /var/log/ovn
109               name: host-log-ovn
110           readinessProbe:
111             exec:
112               command: ["ovn4nfv-k8s", "check_ovn_control_plane"]
113             periodSeconds: 3
114           livenessProbe:
115             exec: 
116               command: ["ovn4nfv-k8s", "check_ovn_control_plane"]
117             initialDelaySeconds: 30
118             periodSeconds: 7
119             failureThreshold: 5
120       nodeSelector:
121         kubernetes.io/os: "linux"
122         ovn4nfv-k8s-plugin: ovn-control-plane
123       volumes:
124         - name: host-run-ovs
125           hostPath:
126             path: /run/openvswitch
127         - name: host-run-ovn
128           hostPath:
129             path: /run/ovn
130         - name: host-sys
131           hostPath:
132             path: /sys
133         - name: host-config-openvswitch
134           hostPath:
135             path: /etc/origin/openvswitch
136         - name: host-log-ovs
137           hostPath:
138             path: /var/log/openvswitch
139         - name: host-log-ovn
140           hostPath:
141             path: /var/log/ovn
142
143 ---
144 kind: DaemonSet
145 apiVersion: apps/v1
146 metadata:
147   name: ovn-controller
148   namespace: kube-system
149   annotations:
150     kubernetes.io/description: |
151       OVN controller: Start ovsdb-server & ovs-vswitchd components, and ovn controller
152 spec:
153   selector:
154     matchLabels:
155       app: ovn-controller
156   updateStrategy:
157     type: OnDelete
158   template:
159     metadata:
160       labels:
161         app: ovn-controller
162     spec:
163       tolerations:
164       - operator: Exists
165         effect: NoSchedule
166       priorityClassName: system-cluster-critical
167       hostNetwork: true
168       hostPID: true
169       containers:
170         - name: ovn-controller
171           image: docker.io/integratedcloudnative/ovn-images:v2.2.0
172           imagePullPolicy: IfNotPresent
173           command: ["ovn4nfv-k8s", "start_ovn_controller"]
174           securityContext:
175             runAsUser: 0
176             privileged: true
177           env:
178             - name: POD_IP
179               valueFrom:
180                 fieldRef:
181                   fieldPath: status.podIP
182           volumeMounts:
183             - mountPath: /lib/modules
184               name: host-modules
185               readOnly: true
186             - mountPath: /var/run/openvswitch
187               name: host-run-ovs
188             - mountPath: /var/run/ovn
189               name: host-run-ovn
190             - mountPath: /sys
191               name: host-sys
192               readOnly: true
193             - mountPath: /etc/openvswitch
194               name: host-config-openvswitch
195             - mountPath: /var/log/openvswitch
196               name: host-log-ovs
197             - mountPath: /var/log/ovn
198               name: host-log-ovn
199           readinessProbe:
200             exec:
201               command: ["ovn4nfv-k8s", "check_ovn_controller"]
202             periodSeconds: 5
203           livenessProbe:
204             exec:
205               command: ["ovn4nfv-k8s", "check_ovn_controller"]
206             initialDelaySeconds: 10
207             periodSeconds: 5
208             failureThreshold: 5
209           resources:
210             requests:
211               cpu: 200m
212               memory: 300Mi
213             limits:
214               cpu: 1000m
215               memory: 800Mi
216       nodeSelector:
217         kubernetes.io/os: "linux"
218       volumes:
219         - name: host-modules
220           hostPath:
221             path: /lib/modules
222         - name: host-run-ovs
223           hostPath:
224             path: /run/openvswitch
225         - name: host-run-ovn
226           hostPath:
227             path: /run/ovn
228         - name: host-sys
229           hostPath:
230             path: /sys
231         - name: host-config-openvswitch
232           hostPath:
233             path: /etc/origin/openvswitch
234         - name: host-log-ovs
235           hostPath:
236             path: /var/log/openvswitch
237         - name: host-log-ovn
238           hostPath:
239             path: /var/log/ovn