Add extraLabels for Vault server serviceAccount (#806)
This commit is contained in:
parent
46e6fb5ad1
commit
ab5b471c27
4 changed files with 19 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* server: Add `extraLabels` for Vault server serviceAccount [GH-806](https://github.com/hashicorp/vault-helm/pull/806)
|
||||||
|
|
||||||
## 0.22.1 (October 26th, 2022)
|
## 0.22.1 (October 26th, 2022)
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
|
@ -10,5 +10,8 @@ metadata:
|
||||||
app.kubernetes.io/name: {{ include "vault.name" . }}
|
app.kubernetes.io/name: {{ include "vault.name" . }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- if .Values.server.serviceAccount.extraLabels -}}
|
||||||
|
{{- toYaml .Values.server.serviceAccount.extraLabels | nindent 4 -}}
|
||||||
|
{{- end -}}
|
||||||
{{ template "vault.serviceAccount.annotations" . }}
|
{{ template "vault.serviceAccount.annotations" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -117,3 +117,13 @@ load _helpers
|
||||||
yq 'length > 0' | tee /dev/stderr)
|
yq 'length > 0' | tee /dev/stderr)
|
||||||
[ "${actual}" = "false" ]
|
[ "${actual}" = "false" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "server/serviceAccount: specify server.serviceAccount.extraLabels" {
|
||||||
|
cd `chart_dir`
|
||||||
|
local actual=$(helm template \
|
||||||
|
--show-only templates/server-serviceaccount.yaml \
|
||||||
|
--set 'server.serviceAccount.extraLabels.foo=bar' \
|
||||||
|
. | tee /dev/stderr |
|
||||||
|
yq -r '.metadata.labels.foo' | tee /dev/stderr)
|
||||||
|
[ "${actual}" = "bar" ]
|
||||||
|
}
|
|
@ -851,6 +851,9 @@ server:
|
||||||
# YAML or a YAML-formatted multi-line templated string map of the
|
# YAML or a YAML-formatted multi-line templated string map of the
|
||||||
# annotations to apply to the serviceAccount.
|
# annotations to apply to the serviceAccount.
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
# Extra labels to attach to the serviceAccount
|
||||||
|
# This should be a YAML map of the labels to apply to the serviceAccount
|
||||||
|
extraLabels: {}
|
||||||
|
|
||||||
# Settings for the statefulSet used to run Vault.
|
# Settings for the statefulSet used to run Vault.
|
||||||
statefulSet:
|
statefulSet:
|
||||||
|
|
Loading…
Reference in a new issue