From 2d81d1a0b468981954efc4d2d294e37eed4e0218 Mon Sep 17 00:00:00 2001 From: Dat Tang Date: Mon, 17 Aug 2020 14:58:32 +0200 Subject: [PATCH] Fix serviceAccount for APM server Why ---- - In the current Helm chart for `apm-server`, serviceAccount for the Deployment is only set when `serviceAccount` is set in `values.yaml`. However, it is wrong. `serviceAccount` should always be set because even when no `serviceAccount` is set in `values.yaml`, a managed one is still created. What ---- - Always set `serviceAccount` for apm-server Deployment to the template apm.serviceAccount defined in `_helpers.tpl` --- apm-server/templates/deployment.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apm-server/templates/deployment.yaml b/apm-server/templates/deployment.yaml index 8ffd5ee39..0cf3b50d9 100644 --- a/apm-server/templates/deployment.yaml +++ b/apm-server/templates/deployment.yaml @@ -33,9 +33,7 @@ spec: {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} - {{- if .Values.serviceAccount }} - serviceAccountName: {{ .Values.serviceAccount }} - {{- end }} + serviceAccountName: {{ template "apm.serviceAccount" . }} volumes: {{- range .Values.secretMounts }} - name: {{ .name }}