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
This commit is contained in:
Ritchie, Frank (fr801x) 2023-09-08 11:04:03 -04:00
parent 56d980b3bd
commit 21171ec581
4 changed files with 8 additions and 1 deletions

View File

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

View File

@ -147,6 +147,11 @@ function poststart () {
sleep 1 sleep 1
done done
chown {{ .Values.pod.user.nova.uid }}.{{ .Values.pod.user.nova.uid }} ${OVS_CTL} 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 $COMMAND

View File

@ -211,6 +211,7 @@ conf:
poststart: poststart:
timeout: 5 timeout: 5
rootUser: "root" rootUser: "root"
extraCommand: null
openvswitch_db_server: openvswitch_db_server:
ptcp_port: null ptcp_port: null
ovs_other_config: ovs_other_config:

View File

@ -18,4 +18,5 @@ openvswitch:
- 0.1.15 Add buffer before accesses ovs controller pid socket - 0.1.15 Add buffer before accesses ovs controller pid socket
- 0.1.16 Restore ServiceAccount to openvswitch pod - 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.17 Add buffer to wait for potential new CTL file before running chown
- 0.1.18 Add value for extra poststart command
... ...