[stable/2023.2] Start using Tini for Open vSwitch (#1468)

This is an automated cherry-pick of #1456
/assign mnaser
diff --git a/.charts.yml b/.charts.yml
index 3e86af7..c26935c 100644
--- a/.charts.yml
+++ b/.charts.yml
@@ -160,7 +160,7 @@
         review.opendev.org:
           - 899918
   - name: openvswitch
-    version: 0.1.19
+    version: 0.1.24
     repository: *openstack_helm_infra_repository
     dependencies: *openstack_helm_dependencies
   - name: ovn
diff --git a/charts/openvswitch/Chart.yaml b/charts/openvswitch/Chart.yaml
index 3d58163..191e81c 100644
--- a/charts/openvswitch/Chart.yaml
+++ b/charts/openvswitch/Chart.yaml
@@ -9,4 +9,4 @@
 sources:
 - https://github.com/openvswitch/ovs
 - https://opendev.org/openstack/openstack-helm
-version: 0.1.19
+version: 0.1.24
diff --git a/charts/openvswitch/templates/daemonset.yaml b/charts/openvswitch/templates/daemonset.yaml
index 7984023..3a66fa5 100644
--- a/charts/openvswitch/templates/daemonset.yaml
+++ b/charts/openvswitch/templates/daemonset.yaml
@@ -58,7 +58,7 @@
 {{- $envAll := . }}
 
 {{- $serviceAccountName := "openvswitch-server" }}
-{{ tuple $envAll "vswitchd" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
+{{ tuple $envAll "ovs" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
 ---
 apiVersion: apps/v1
 kind: DaemonSet
@@ -168,9 +168,19 @@
           # successfully before its marked as ready
 {{ dict "envAll" $envAll "component" "ovs" "container" "ovs_vswitch" "type" "liveness" "probeTemplate" (include "ovsvswitchlivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
 {{ dict "envAll" $envAll "component" "ovs" "container" "ovs_vswitch" "type" "readiness" "probeTemplate" (include "ovsvswitchreadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
+{{- if .Values.pod.tini.enabled }}
+          command:
+            - /tini
+            - -s
+            - --
+          args:
+            - /tmp/openvswitch-vswitchd.sh
+            - start
+{{- else }}
           command:
             - /tmp/openvswitch-vswitchd.sh
             - start
+{{- end }}
           lifecycle:
             postStart:
               exec:
diff --git a/charts/openvswitch/values.yaml b/charts/openvswitch/values.yaml
index f967c75..01aa93d 100644
--- a/charts/openvswitch/values.yaml
+++ b/charts/openvswitch/values.yaml
@@ -37,6 +37,8 @@
     node_selector_value: enabled
 
 pod:
+  tini:
+    enabled: true
   tolerations:
     openvswitch:
       enabled: false
diff --git a/images/openvswitch/Dockerfile b/images/openvswitch/Dockerfile
index 83ebaf3..7023f84 100644
--- a/images/openvswitch/Dockerfile
+++ b/images/openvswitch/Dockerfile
@@ -2,6 +2,7 @@
 # Atmosphere-Rebuild-Time: 2024-06-25T13:53:44Z
 
 FROM quay.io/centos/centos:stream9
+ADD --chmod=755 https://github.com/krallin/tini/releases/download/v0.19.0/tini /tini
 ARG OVS_SERIES=3.2
 ARG OVS_VERSION=${OVS_SERIES}.0-80
 RUN <<EOF sh -xe