Produce mount volume only if OVS_HOST_PATH is defined
In case of empty $OVS_HOST_PATH
tools/generate_k8s_resource_definitions generates incorrect
cni_ds.yaml.
openvswitch mount volume is necessary for ovn use case
and maybe for vhostuser use case.
So it's better to omit it when $OVS_HOST_PATH is empty.
Closes-Bug: #1791266
Change-Id: Ieed08a998f1b7e348428ab16e53d9072ca7b9e73
Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
(cherry picked from commit 027a17f1ed
)
This commit is contained in:
parent
8f0f956086
commit
254aa3440d
|
@ -643,9 +643,13 @@ spec:
|
|||
subPath: kuryr-cni.conf
|
||||
- name: proc
|
||||
mountPath: /host_proc
|
||||
EOF
|
||||
if [[ -n "$OVS_HOST_PATH" ]]; then
|
||||
cat >> "${output_dir}/cni_ds.yml" << EOF
|
||||
- name: openvswitch
|
||||
mountPath: /var/run/openvswitch
|
||||
EOF
|
||||
fi
|
||||
if [ "$cni_daemon" == "True" ]; then
|
||||
cat >> "${output_dir}/cni_ds.yml" << EOF
|
||||
readinessProbe:
|
||||
|
@ -676,10 +680,14 @@ EOF
|
|||
- name: proc
|
||||
hostPath:
|
||||
path: /proc
|
||||
EOF
|
||||
if [[ -n "$OVS_HOST_PATH" ]]; then
|
||||
cat >> "${output_dir}/cni_ds.yml" << EOF
|
||||
- name: openvswitch
|
||||
hostPath:
|
||||
path: ${OVS_HOST_PATH}
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
# install_openshift_binary
|
||||
|
|
Loading…
Reference in New Issue