Files
app-openbao/helm-charts/upstream/openbao-helm/debian/deb_folder/patches/0002-update-includeConfigAnnotation-to-match-README-value.patch
Tae Park dbbf5c7ec4 Initial Package Upload for Openbao
Containing the initial package for Openbao application. Contains a
working package of openbao-helm, openbao-manager-helm,
python3-k8sapp-openbao, and stx-openbao-helm.

Test Plan:
PASS    Packages are successfully built, and the application tarball is
        created.
PASS    Application is uploaded and applied with no errors
PASS    Application is configured for sanity testing
PASS    Application passes aware/unaware test for sanity
PASS    Application functions when network access is restricted to
        internal registry

Story: 2011244
Task: 51378

Change-Id: I10910b3cc00c3e45ebce0df20bbee53af3d8543b
Signed-off-by: Tae Park <tae.park@windriver.com>
2025-01-14 09:37:28 -05:00

75 lines
3.2 KiB
Diff

From 51bbb43dd02b0be89b05549ebae6107fb5ab4e29 Mon Sep 17 00:00:00 2001
From: Michel Thebeau <michel.thebeau@windriver.com>
Date: Mon, 13 Jan 2025 16:01:08 -0500
Subject: [PATCH] update includeConfigAnnotation to match README/values
The value of server.includeConfigAnnotation is presented in the
README.md and values.yaml as server.configAnnotation.
Update the server configmap, _helpers.tpl and unit tests to align with
the documentation.
Signed-off-by: Michel Thebeau <michel.thebeau@windriver.com>
---
charts/openbao/templates/_helpers.tpl | 2 +-
charts/openbao/templates/server-config-configmap.yaml | 2 +-
test/unit/server-configmap.bats | 2 +-
test/unit/server-statefulset.bats | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/charts/openbao/templates/_helpers.tpl b/charts/openbao/templates/_helpers.tpl
index 2650db5..08c71ee 100644
--- a/charts/openbao/templates/_helpers.tpl
+++ b/charts/openbao/templates/_helpers.tpl
@@ -448,7 +448,7 @@ Sets extra pod annotations
*/}}
{{- define "openbao.annotations" }}
annotations:
- {{- if .Values.server.includeConfigAnnotation }}
+ {{- if .Values.server.configAnnotation }}
openbao.hashicorp.com/config-checksum: {{ include "openbao.config" . | sha256sum }}
{{- end }}
{{- if .Values.server.annotations }}
diff --git a/charts/openbao/templates/server-config-configmap.yaml b/charts/openbao/templates/server-config-configmap.yaml
index 585ae7a..57c4b0e 100644
--- a/charts/openbao/templates/server-config-configmap.yaml
+++ b/charts/openbao/templates/server-config-configmap.yaml
@@ -18,7 +18,7 @@ metadata:
app.kubernetes.io/name: {{ include "openbao.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
-{{- if .Values.server.includeConfigAnnotation }}
+{{- if .Values.server.configAnnotation }}
annotations:
vault.hashicorp.com/config-checksum: {{ include "openbao.config" . | sha256sum }}
{{- end }}
diff --git a/test/unit/server-configmap.bats b/test/unit/server-configmap.bats
index 55d67e9..aa34edc 100755
--- a/test/unit/server-configmap.bats
+++ b/test/unit/server-configmap.bats
@@ -153,7 +153,7 @@ load _helpers
cd `chart_dir`
local actual=$(helm template \
--show-only templates/server-config-configmap.yaml \
- --set 'server.includeConfigAnnotation=true' \
+ --set 'server.configAnnotation=true' \
. | tee /dev/stderr |
yq '.metadata.annotations["vault.hashicorp.com/config-checksum"] == null' | tee /dev/stderr)
[ "${actual}" = "false" ]
diff --git a/test/unit/server-statefulset.bats b/test/unit/server-statefulset.bats
index 9a4bf3e..f089252 100755
--- a/test/unit/server-statefulset.bats
+++ b/test/unit/server-statefulset.bats
@@ -1636,7 +1636,7 @@ load _helpers
cd `chart_dir`
local actual=$(helm template \
--show-only templates/server-statefulset.yaml \
- --set 'server.includeConfigAnnotation=true' \
+ --set 'server.configAnnotation=true' \
. | tee /dev/stderr |
yq '.spec.template.metadata.annotations["openbao.hashicorp.com/config-checksum"] == null' | tee /dev/stderr)
[ "${actual}" = "false" ]
--
2.34.1