From 21171ec58184696fbc974c489bc35b47d5dd0fab Mon Sep 17 00:00:00 2001 From: "Ritchie, Frank (fr801x)" Date: Fri, 8 Sep 2023 11:04:03 -0400 Subject: [PATCH] Add optional value for extra poststart command Add option to define an extra command (or commands via multiline yaml value) that will run at the end of the poststart script. Specific deployments can benefit from extra cleanup/checks. Change-Id: I7c26292dc65dc0bfd4374b1f5577696fca89140f --- openvswitch/Chart.yaml | 2 +- openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl | 5 +++++ openvswitch/values.yaml | 1 + releasenotes/notes/openvswitch.yaml | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/openvswitch/Chart.yaml b/openvswitch/Chart.yaml index d7733a43b5..9b85ed7e41 100644 --- a/openvswitch/Chart.yaml +++ b/openvswitch/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm OpenVSwitch name: openvswitch -version: 0.1.17 +version: 0.1.18 home: http://openvswitch.org icon: https://www.openstack.org/themes/openstack/images/project-mascots/Neutron/OpenStack_Project_Neutron_vertical.png sources: diff --git a/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl b/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl index bd539f39d3..f3776b4aba 100644 --- a/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl +++ b/openvswitch/templates/bin/_openvswitch-vswitchd.sh.tpl @@ -147,6 +147,11 @@ function poststart () { sleep 1 done chown {{ .Values.pod.user.nova.uid }}.{{ .Values.pod.user.nova.uid }} ${OVS_CTL} + +{{- if .Values.conf.poststart.extraCommand }} +{{ .Values.conf.poststart.extraCommand | indent 2 }} +{{- end }} + } $COMMAND diff --git a/openvswitch/values.yaml b/openvswitch/values.yaml index 68e9b42a8f..f967c753eb 100644 --- a/openvswitch/values.yaml +++ b/openvswitch/values.yaml @@ -211,6 +211,7 @@ conf: poststart: timeout: 5 rootUser: "root" + extraCommand: null openvswitch_db_server: ptcp_port: null ovs_other_config: diff --git a/releasenotes/notes/openvswitch.yaml b/releasenotes/notes/openvswitch.yaml index c9c2bf0970..93a7113f41 100644 --- a/releasenotes/notes/openvswitch.yaml +++ b/releasenotes/notes/openvswitch.yaml @@ -18,4 +18,5 @@ openvswitch: - 0.1.15 Add buffer before accesses ovs controller pid socket - 0.1.16 Restore ServiceAccount to openvswitch pod - 0.1.17 Add buffer to wait for potential new CTL file before running chown + - 0.1.18 Add value for extra poststart command ...