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>
This commit is contained in:
parent
17c2bf4e9e
commit
027a17f1ed
|
@ -649,9 +649,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:
|
||||
|
@ -682,10 +686,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