diff --git a/charts/openbao/templates/_helpers.tpl b/charts/openbao/templates/_helpers.tpl index 0d88f5e2..9561909a 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 585ae7a9..57c4b0e6 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 55d67e93..aa34edc0 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 9a4bf3ef..f089252b 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" ]