4 # starts node daemons for ovs and ovn, each in a separate container
5 # it is run on all nodes
10 # namespace set up by install
11 namespace: ovn-kubernetes
13 kubernetes.io/description: |
14 This DaemonSet launches the ovn-kubernetes networking components for worker nodes.
28 kubernetes.io/os: "linux"
30 scheduler.alpha.kubernetes.io/critical-pod: ''
32 # Requires fairly broad permissions - ability to read all services and network functions as well
34 serviceAccountName: ovn
39 # ovsdb-server and ovs-switchd daemons
41 image: "{{ ovn_image | default('docker.io/ovnkube/ovn-daemonset:latest') }}"
42 imagePullPolicy: "{{ ovn_image_pull_policy | default('IfNotPresent') }}"
44 command: ["/root/ovnkube.sh", "ovs-server"]
49 - /usr/share/openvswitch/scripts/ovs-ctl
51 initialDelaySeconds: 30
56 command: ["/usr/bin/ovn-kube-util", "readiness-probe", "-t", "ovs-daemons"]
57 initialDelaySeconds: 30
63 # Permission could be reduced by selecting an appropriate SELinux policy
66 terminationMessagePolicy: FallbackToLogsOnError
68 - mountPath: /lib/modules
71 - mountPath: /run/openvswitch
73 - mountPath: /var/run/openvswitch
74 name: host-var-run-ovs
78 - mountPath: /etc/openvswitch
79 name: host-config-openvswitch
88 - name: OVN_DAEMONSET_VERSION
98 command: ["/root/ovnkube.sh", "cleanup-ovs-server"]
100 - name: ovn-controller
101 image: "{{ ovn_image | default('docker.io/ovnkube/ovn-daemonset:latest') }}"
102 imagePullPolicy: "{{ ovn_image_pull_policy | default('IfNotPresent') }}"
104 command: ["/root/ovnkube.sh", "ovn-controller"]
111 terminationMessagePolicy: FallbackToLogsOnError
113 - mountPath: /var/run/dbus/
114 name: host-var-run-dbus
116 - mountPath: /var/log/openvswitch/
117 name: host-var-log-ovs
118 - mountPath: /var/log/ovn/
119 name: host-var-log-ovs
120 - mountPath: /var/run/openvswitch/
121 name: host-var-run-ovs
122 - mountPath: /var/run/ovn/
123 name: host-var-run-ovs
124 - mountPath: /ovn-cert
133 - name: OVN_DAEMONSET_VERSION
135 - name: OVN_LOG_CONTROLLER
136 value: "{{ ovn_loglevel_controller }}"
137 - name: K8S_APISERVER
142 - name: OVN_KUBERNETES_NAMESPACE
145 fieldPath: metadata.namespace
146 - name: OVN_SSL_ENABLE
147 value: "{{ ovn_ssl_en }}"
151 command: ["/usr/bin/ovn-kube-util", "readiness-probe", "-t", "ovn-controller"]
152 initialDelaySeconds: 30
157 image: "{{ ovn_image | default('docker.io/ovnkube/ovn-daemonset:latest') }}"
158 imagePullPolicy: "{{ ovn_image_pull_policy | default('IfNotPresent') }}"
160 command: ["/root/ovnkube.sh", "ovn-node"]
165 add: ["NET_ADMIN", "SYS_ADMIN", "SYS_PTRACE"]
166 {% if kind is defined and kind -%}
170 terminationMessagePolicy: FallbackToLogsOnError
172 # for the iptables wrapper
176 - mountPath: /var/run/dbus/
177 name: host-var-run-dbus
179 - mountPath: /var/log/ovn-kubernetes/
180 name: host-var-log-ovnkube
181 - mountPath: /var/run/openvswitch/
182 name: host-var-run-ovs
183 - mountPath: /var/run/ovn/
184 name: host-var-run-ovs
185 # We mount our socket here
186 - mountPath: /var/run/ovn-kubernetes
187 name: host-var-run-ovn-kubernetes
188 # CNI related mounts which we take over
189 - mountPath: /opt/cni/bin
190 name: host-opt-cni-bin
191 - mountPath: /etc/cni/net.d
192 name: host-etc-cni-netd
193 - mountPath: /ovn-cert
196 {% if kind is defined and kind -%}
197 - mountPath: /var/run/netns
199 mountPropagation: Bidirectional
207 - name: OVN_DAEMONSET_VERSION
209 - name: OVNKUBE_LOGLEVEL
210 value: "{{ ovnkube_node_loglevel }}"
221 - name: K8S_APISERVER
234 fieldPath: spec.nodeName
235 - name: OVN_GATEWAY_MODE
236 value: "{{ ovn_gateway_mode }}"
237 - name: OVN_GATEWAY_OPTS
238 value: "{{ ovn_gateway_opts }}"
239 - name: OVN_HYBRID_OVERLAY_ENABLE
240 value: "{{ ovn_hybrid_overlay_enable }}"
241 - name: OVN_HYBRID_OVERLAY_NET_CIDR
242 value: "{{ ovn_hybrid_overlay_net_cidr }}"
243 - name: OVN_SSL_ENABLE
244 value: "{{ ovn_ssl_en }}"
249 command: ["/root/ovnkube.sh", "cleanup-ovn-node"]
252 command: ["/usr/bin/ovn-kube-util", "readiness-probe", "-t", "ovnkube-node"]
253 initialDelaySeconds: 30
258 kubernetes.io/os: "linux"
264 - name: host-var-run-dbus
267 - name: host-var-log-ovs
269 path: /var/log/openvswitch
270 - name: host-var-log-ovnkube
272 path: /var/log/ovn-kubernetes
275 path: /run/openvswitch
276 - name: host-var-run-ovs
278 path: /var/run/openvswitch
279 - name: host-var-run-ovn-kubernetes
281 path: /var/run/ovn-kubernetes
285 - name: host-opt-cni-bin
288 - name: host-etc-cni-netd
291 - name: host-ovn-cert
294 type: DirectoryOrCreate
298 - name: host-config-openvswitch
300 path: /etc/origin/openvswitch
301 {% if kind is defined and kind -%}