Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions bindata/network/ovn-kubernetes/ovnkube-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ spec:

exec ovn-northd \
--no-chdir "-vconsole:${OVN_LOG_LEVEL}" -vfile:off \
--pidfile=/var/run/openvswitch/ovn-northd.pid \
--ovnnb-db "{{.OVN_NB_DB_LIST}}" \
--ovnsb-db "{{.OVN_SB_DB_LIST}}" \
-p /ovn-cert/tls.key \
Expand All @@ -70,6 +69,8 @@ spec:
name: var-lib-openvswitch
- mountPath: /run/openvswitch/
name: run-openvswitch
- mountPath: /run/ovn/
name: run-ovn
- mountPath: /env
name: env-overrides
- mountPath: /ovn-cert # not needed, but useful when exec'ing in to pod.
Expand Down Expand Up @@ -155,6 +156,8 @@ spec:
name: var-lib-openvswitch
- mountPath: /run/openvswitch/
name: run-openvswitch
- mountPath: /run/ovn/
name: run-ovn
- mountPath: /env
name: env-overrides
- mountPath: /ovn-cert
Expand Down Expand Up @@ -246,6 +249,8 @@ spec:
name: var-lib-openvswitch
- mountPath: /run/openvswitch/
name: run-openvswitch
- mountPath: /run/ovn/
name: run-ovn
- mountPath: /env
name: env-overrides
- mountPath: /ovn-cert
Expand Down Expand Up @@ -281,7 +286,7 @@ spec:
fi

# start nbctl daemon for caching
export OVN_NB_DAEMON=$(ovn-nbctl --pidfile=/run/openvswitch/ovnk-nbctl.pid \
export OVN_NB_DAEMON=$(ovn-nbctl --pidfile=/tmp/ovnk-nbctl.pid \
--detach \
-p /ovn-cert/tls.key -c /ovn-cert/tls.crt -C /ovn-ca/ca-bundle.crt \
--db "{{.OVN_NB_DB_LIST}}")
Expand All @@ -305,14 +310,16 @@ spec:
lifecycle:
preStop:
exec:
command: ["/bin/bash", "-c", "kill $(cat /run/openvswitch/ovnk-nbctl.pid)"]
command: ["/bin/bash", "-c", "kill $(cat /tmp/ovnk-nbctl.pid) && unset OVN_NB_DAEMON"]
volumeMounts:
- mountPath: /etc/openvswitch/
name: etc-openvswitch
- mountPath: /var/lib/openvswitch/
name: var-lib-openvswitch
- mountPath: /run/openvswitch/
name: run-openvswitch
- mountPath: /run/ovn/
name: run-ovn
- mountPath: /env
name: env-overrides
- mountPath: /ovn-cert
Expand Down Expand Up @@ -356,6 +363,9 @@ spec:
path: /var/lib/ovn/data
- name: run-openvswitch
emptyDir: {}
- name: run-ovn
hostPath:
path: /var/run/ovn
- name: env-overrides
configMap:
name: env-overrides
Expand Down
23 changes: 19 additions & 4 deletions bindata/network/ovn-kubernetes/ovnkube-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,16 @@ spec:
source "/env/${K8S_NODE}"
set +o allexport
fi
# Determine the ovn rundir.
if [[ -f /usr/bin/ovn-appctl ]] ; then
# ovn-appctl is present. Use new ovn run dir path.
OVNCTL_DIR=ovn
else
# ovn-appctl is not present. Use openvswitch run dir path.
OVNCTL_DIR=openvswitch
fi
exec ovn-controller unix:/var/run/openvswitch/db.sock -vfile:off \
--no-chdir --pidfile=/var/run/openvswitch/ovn-controller.pid \
--no-chdir --pidfile=/var/run/${OVNCTL_DIR}/ovn-controller.pid \
-p /ovn-cert/tls.key -c /ovn-cert/tls.crt -C /ovn-ca/ca-bundle.crt \
-vconsole:"${OVN_LOG_LEVEL}"
securityContext:
Expand All @@ -144,6 +152,8 @@ spec:
volumeMounts:
- mountPath: /run/openvswitch
name: run-openvswitch
- mountPath: /run/ovn/
name: run-ovn
- mountPath: /etc/openvswitch
name: etc-openvswitch
- mountPath: /var/lib/openvswitch
Expand Down Expand Up @@ -213,7 +223,6 @@ spec:
--sb-client-cacert /ovn-ca/ca-bundle.crt \
--nodeport --gateway-mode local \
${hybrid_overlay_flags} \
--pidfile /var/run/openvswitch/ovnkube-node.pid \
--loglevel "${OVN_KUBE_LOG_LEVEL}" --logfile /dev/stdout \
--metrics-bind-address "0.0.0.0:9101"
env:
Expand Down Expand Up @@ -266,6 +275,8 @@ spec:
name: host-var-lib-cni-networks-ovn-kubernetes
- mountPath: /run/openvswitch
name: run-openvswitch
- mountPath: /run/ovn/
name: run-ovn
- mountPath: /etc/openvswitch
name: etc-openvswitch
- mountPath: /var/lib/openvswitch
Expand Down Expand Up @@ -308,11 +319,15 @@ spec:
- name: etc-openvswitch
hostPath:
path: /var/lib/openvswitch/etc
- name: run-openvswitch
emptyDir: {}
# commit 0ac2cd changed the location of the ovs database, mount and check if a database already exists
- name: old-openvswitch-database
path: /etc/origin/openvswitch
- name: run-openvswitch
hostPath:
path: /var/run/openvswitch
- name: run-ovn
hostPath:
path: /var/run/ovn
# For CNI server
- name: host-run-ovn-kubernetes
hostPath:
Expand Down