Fix openvswitch DaemonSet ServiceAccount patch

During the openstack-helm-infra upversion [1] it was noticed that the
updated version of openvswitch chart (1.1.15) was missing the custom
ServiceAccount definition for its DaemonSet template.
This fix was proposed upstream [2] and currently implemented to
stx-openstack via an OSH-I patch [3]. The patch though, was missing the
serviceAccountNamedefinition in the daemonset template.

This change fixes the stx-openstack patch, including the
serviceAccountNamedefinition to openvswitch daemonset template.

[1] https://review.opendev.org/c/starlingx/openstack-armada-app/+/887637
[2] https://review.opendev.org/c/openstack/openstack-helm-infra/+/888504
[3] https://review.opendev.org/c/starlingx/openstack-armada-app/+/887637/16/openstack-helm-infra/debian/deb_folder/patches/0016-Add-ServiceAccount-to-openvswitch-pod.patch

TEST PLAN:
PASS - build-pkgs -c -p openstack-helm-infra,openstack-helm
PASS - build-pkgs -c -p stx-openstack-helm-fluxcd
PASS - Upload stx-openstack application
PASS - Apply stx-openstack application

Closes-Bug: 2030749

Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Change-Id: Ia0c42466cada50cb3af9490f5ff1b36e839a5915
This commit is contained in:
Thales Elero Cervi 2023-08-08 09:27:10 -03:00
parent eae2b1066a
commit 58ec7994b1

View File

@ -19,11 +19,11 @@ daemonset [1] and the template inclusion was dropped during this merge
Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Change-Id: I59ef955529a34020d4bba0da0b48d1f47e2e1039
---
openvswitch/templates/daemonset.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
openvswitch/templates/daemonset.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/openvswitch/templates/daemonset.yaml b/openvswitch/templates/daemonset.yaml
index 244ffb8e..bd37de14 100644
index 244ffb8e..79840238 100644
--- a/openvswitch/templates/daemonset.yaml
+++ b/openvswitch/templates/daemonset.yaml
@@ -56,6 +56,9 @@ exec:
@ -36,13 +36,14 @@ index 244ffb8e..bd37de14 100644
---
apiVersion: apps/v1
kind: DaemonSet
@@ -257,4 +260,4 @@ It should be handled through lcore and pmd core masks. */}}
hostPath:
path: /sys/fs/cgroup
{{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}
@@ -80,6 +83,7 @@ spec:
{{ dict "envAll" $envAll "podName" "openvswitch" "containerNames" (list "openvswitch-db" "openvswitch-db-perms" "openvswitch-vswitchd" "openvswitch-vswitchd-modules" "init") | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
spec:
shareProcessNamespace: true
+ serviceAccountName: {{ $serviceAccountName }}
{{ dict "envAll" $envAll "application" "ovs" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
nodeSelector:
{{ .Values.labels.ovs.node_selector_key }}: {{ .Values.labels.ovs.node_selector_value }}
--
2.25.1