added possibility to add extraLabels for server pod (#59)
This commit is contained in:
parent
d696408fae
commit
c6adb89d4b
3 changed files with 21 additions and 0 deletions
|
@ -30,6 +30,9 @@ spec:
|
||||||
app.kubernetes.io/name: {{ template "vault.name" . }}
|
app.kubernetes.io/name: {{ template "vault.name" . }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
component: server
|
component: server
|
||||||
|
{{- if .Values.server.extraLabels -}}
|
||||||
|
{{- toYaml .Values.server.extraLabels | nindent 8 -}}
|
||||||
|
{{- end -}}
|
||||||
{{ template "vault.annotations" . }}
|
{{ template "vault.annotations" . }}
|
||||||
spec:
|
spec:
|
||||||
{{ template "vault.affinity" . }}
|
{{ template "vault.affinity" . }}
|
||||||
|
|
|
@ -510,3 +510,16 @@ load _helpers
|
||||||
yq -r '.spec.template.spec.nodeSelector' | tee /dev/stderr)
|
yq -r '.spec.template.spec.nodeSelector' | tee /dev/stderr)
|
||||||
[ "${actual}" = "testing" ]
|
[ "${actual}" = "testing" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# extra labels
|
||||||
|
|
||||||
|
@test "server/standalone-StatefulSet: specify extraLabels" {
|
||||||
|
cd `chart_dir`
|
||||||
|
local actual=$(helm template \
|
||||||
|
-x templates/server-statefulset.yaml \
|
||||||
|
--set 'server.extraLabels.foo=bar' \
|
||||||
|
. | tee /dev/stderr |
|
||||||
|
yq -r '.spec.template.metadata.labels.foo' | tee /dev/stderr)
|
||||||
|
[ "${actual}" = "bar" ]
|
||||||
|
}
|
||||||
|
|
|
@ -95,6 +95,11 @@ server:
|
||||||
# beta.kubernetes.io/arch: amd64
|
# beta.kubernetes.io/arch: amd64
|
||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
|
|
||||||
|
# Extra labels to attach to the server pods
|
||||||
|
# This should be a multi-line string mapping directly to the a map of
|
||||||
|
# the labels to apply to the server pods
|
||||||
|
extraLabels: {}
|
||||||
|
|
||||||
# Extra annotations to attach to the server pods
|
# Extra annotations to attach to the server pods
|
||||||
# This should be a multi-line string mapping directly to the a map of
|
# This should be a multi-line string mapping directly to the a map of
|
||||||
# the annotations to apply to the server pods
|
# the annotations to apply to the server pods
|
||||||
|
|
Loading…
Reference in a new issue