Skip to content

Commit

Permalink
update includeConfigAnnotation to match README/values (#34)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
michel-thebeau-WR authored Jan 16, 2025
1 parent ee06574 commit 993e542
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/openbao/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/openbao/templates/server-config-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion test/unit/server-configmap.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down
2 changes: 1 addition & 1 deletion test/unit/server-statefulset.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down

0 comments on commit 993e542

Please sign in to comment.