Merge "Support override of ovs probes"

This commit is contained in:
Zuul 2021-04-23 15:50:32 +00:00 committed by Gerrit Code Review
commit 33b2f3043f
4 changed files with 21 additions and 4 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm OpenVSwitch
name: openvswitch
version: 0.1.3
version: 0.1.4
home: http://openvswitch.org
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png
sources:

View File

@ -15,19 +15,24 @@ limitations under the License.
{{- define "ovsvswitchlivenessProbeTemplate" }}
exec:
command:
{{- if .Values.pod.probes.ovs_vswitch.ovs_vswitch.liveness.exec }}
{{ .Values.pod.probes.ovs_vswitch.ovs_vswitch.liveness.exec | toYaml | indent 4 }}
{{- else }}
- /usr/bin/ovs-appctl
- bond/list
{{- end }}
{{- end }}
{{- define "ovsvswitchreadinessProbeTemplate" }}
{{- if not .Values.conf.ovs_dpdk.enabled }}
exec:
command:
{{- if .Values.pod.probes.ovs_vswitch.ovs_vswitch.readiness.exec }}
{{ .Values.pod.probes.ovs_vswitch.ovs_vswitch.readiness.exec | toYaml | indent 4 }}
{{- else if not .Values.conf.ovs_dpdk.enabled }}
- /bin/bash
- -c
- '/usr/bin/ovs-vsctl show'
{{- else }}
exec:
command:
- /bin/bash
- -c
- '/usr/bin/ovs-vsctl show && ! /usr/bin/ovs-vsctl list Open_vSwitch | grep -q dpdk_initialized.*false'

View File

@ -0,0 +1,11 @@
---
pod:
probes:
ovs_vswitch:
ovs_vswitch:
liveness:
exec:
- /bin/bash
- -c
- '/usr/bin/ovs-appctl bond/list; C1=$?; ovs-vsctl --column statistics list interface dpdk_b0s0 | grep -q -E "rx_|tx_"; C2=$?; ovs-vsctl --column statistics list interface dpdk_b0s1 | grep -q -E "rx_|tx_"; C3=$?; exit $(($C1+$C2+$C3))'
...

View File

@ -4,4 +4,5 @@ openvswitch:
- 0.1.1 Change helm-toolkit dependency version to ">= 0.1.0"
- 0.1.2 Unpin images built with osh-images
- 0.1.3 Use HostToContainer mountPropagation
- 0.1.4 Support override of vswitchd liveness and readiness probe
...