fix: common.serviceAccountName should accepts $serviceAccount

This commit is contained in:
Chi-En Wu
2020-04-23 16:35:21 +08:00
parent b5cae82278
commit 9bd8494e4f
6 changed files with 21 additions and 14 deletions

View File

@ -3,6 +3,7 @@
{{- define "common.pod.template.tpl" -}}
{{- $top := first . -}}
{{- $pod := index . 1 -}}
{{- $serviceAccount := index . 2 -}}
metadata:
labels:
{{- include "common.selectorLabels" $top | nindent 4 }}
@ -11,11 +12,11 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 4 }}
{{- end }}
serviceAccountName: {{ include "common.serviceAccountName" $top }}
serviceAccountName: {{ include "common.serviceAccountName" (list $top $serviceAccount) }}
securityContext:
{{- toYaml $pod.podSecurityContext | nindent 4 }}
containers:
- {{- include "common.container" . | nindent 6 }}
- {{- include "common.container" (list $top $pod) | nindent 6 }}
{{- with $pod.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 4 }}