1 # yamllint disable rule:hyphens rule:commas rule:indentation
2 # service to expose the ovnkube-db pod
7 namespace: ovn-kubernetes
24 # ovndb-raft PodDisruptBudget to prevent majority of ovnkube raft cluster
25 # nodes from disruption
26 apiVersion: policy/v1beta1
27 kind: PodDisruptionBudget
30 namespace: ovn-kubernetes
39 # ovnkube-db raft statefulset
41 # starts ovn NB/SB ovsdb daemons, each in a separate container
47 namespace: ovn-kubernetes
49 kubernetes.io/description: |
50 This statefulset launches the OVN Northbound/Southbound Database raft clusters.
52 serviceName: ovnkube-db
53 podManagementPolicy: "Parallel"
55 revisionHistoryLimit: 10
65 kubernetes.io/os: "linux"
67 scheduler.alpha.kubernetes.io/critical-pod: ''
69 terminationGracePeriodSeconds: 30
71 - name: registry-credentials
72 serviceAccountName: ovn
75 # required to be scheduled on node with k8s.ovn.org/ovnkube-db=true label but can
76 # only have one instance per node
79 requiredDuringSchedulingIgnoredDuringExecution:
82 - key: k8s.ovn.org/ovnkube-db
87 requiredDuringSchedulingIgnoredDuringExecution:
94 topologyKey: kubernetes.io/hostname
99 image: "iecedge/ovn-daemonset-ubuntu:2020-04-16"
100 imagePullPolicy: "IfNotPresent"
101 command: ["/root/ovnkube.sh", "nb-ovsdb-raft"]
105 command: ["/usr/bin/ovn-kube-util", "readiness-probe", "-t", "ovnnb-db-raft"]
106 initialDelaySeconds: 30
115 terminationMessagePolicy: FallbackToLogsOnError
117 # ovn db is stored in the pod in /etc/openvswitch
118 # (or in /etc/ovn if OVN from new repository is used)
119 # and on the host in /var/lib/openvswitch/
120 - mountPath: /etc/openvswitch/
121 name: host-var-lib-ovs
122 - mountPath: /etc/ovn/
123 name: host-var-lib-ovs
124 - mountPath: /var/log/openvswitch/
125 name: host-var-log-ovs
126 - mountPath: /var/log/ovn/
127 name: host-var-log-ovs
128 - mountPath: /var/run/openvswitch/
129 name: host-var-run-ovs
130 - mountPath: /var/run/ovn/
131 name: host-var-run-ovs
132 - mountPath: /ovn-cert
141 - name: OVN_DAEMONSET_VERSION
143 - name: OVN_LOGLEVEL_NB
144 value: "-vconsole:info -vfile:info"
145 - name: K8S_APISERVER
150 - name: OVN_KUBERNETES_NAMESPACE
153 fieldPath: metadata.namespace
157 fieldPath: metadata.name
161 fieldPath: status.hostIP
162 - name: OVN_SSL_ENABLE
168 image: "iecedge/ovn-daemonset-ubuntu:2020-04-16"
169 imagePullPolicy: "IfNotPresent"
170 command: ["/root/ovnkube.sh", "sb-ovsdb-raft"]
174 command: ["/usr/bin/ovn-kube-util", "readiness-probe", "-t", "ovnsb-db-raft"]
175 initialDelaySeconds: 30
184 terminationMessagePolicy: FallbackToLogsOnError
186 # ovn db is stored in the pod in /etc/openvswitch
187 # (or in /etc/ovn if OVN from new repository is used)
188 # and on the host in /var/lib/openvswitch/
189 - mountPath: /etc/openvswitch/
190 name: host-var-lib-ovs
191 - mountPath: /etc/ovn/
192 name: host-var-lib-ovs
193 - mountPath: /var/log/openvswitch/
194 name: host-var-log-ovs
195 - mountPath: /var/log/ovn/
196 name: host-var-log-ovs
197 - mountPath: /var/run/openvswitch/
198 name: host-var-run-ovs
199 - mountPath: /var/run/ovn/
200 name: host-var-run-ovs
201 - mountPath: /ovn-cert
210 - name: OVN_DAEMONSET_VERSION
212 - name: OVN_LOGLEVEL_SB
213 value: "-vconsole:info -vfile:info"
214 - name: K8S_APISERVER
219 - name: OVN_KUBERNETES_NAMESPACE
222 fieldPath: metadata.namespace
226 fieldPath: metadata.name
230 fieldPath: status.hostIP
231 - name: OVN_SSL_ENABLE
235 # db-metrics-exporter - v3
236 - name: db-metrics-exporter
237 image: "iecedge/ovn-daemonset-ubuntu:2020-04-16"
238 imagePullPolicy: "IfNotPresent"
239 command: ["/root/ovnkube.sh", "db-raft-metrics"]
246 terminationMessagePolicy: FallbackToLogsOnError
248 # ovn db is stored in the pod in /etc/openvswitch
249 # (or in /etc/ovn if OVN from new repository is used)
250 # and on the host in /var/lib/openvswitch/
251 - mountPath: /etc/openvswitch/
252 name: host-var-lib-ovs
253 - mountPath: /etc/ovn/
254 name: host-var-lib-ovs
255 - mountPath: /var/run/openvswitch/
256 name: host-var-run-ovs
257 - mountPath: /var/run/ovn/
258 name: host-var-run-ovs
259 - mountPath: /ovn-cert
268 - name: OVN_DAEMONSET_VERSION
270 - name: K8S_APISERVER
275 - name: OVN_KUBERNETES_NAMESPACE
278 fieldPath: metadata.namespace
279 - name: OVN_SSL_ENABLE
284 - name: host-var-log-ovs
286 path: /var/log/openvswitch
287 - name: host-var-lib-ovs
289 path: /var/lib/openvswitch
290 - name: host-var-run-ovs
292 path: /var/run/openvswitch
293 - name: host-ovn-cert
296 type: DirectoryOrCreate