diff --git a/helm/litellm/templates/backend/deployment.yaml b/helm/litellm/templates/backend/deployment.yaml index 4ac56da1be1..3b59c58c8bf 100644 --- a/helm/litellm/templates/backend/deployment.yaml +++ b/helm/litellm/templates/backend/deployment.yaml @@ -20,6 +20,7 @@ spec: {{- include "litellm.backend.selectorLabels" . | nindent 8 }} spec: serviceAccountName: {{ include "litellm.backend.serviceAccountName" . }} + automountServiceAccountToken: {{ .Values.serviceAccounts.backend.automount }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/helm/litellm/templates/gateway/deployment.yaml b/helm/litellm/templates/gateway/deployment.yaml index 08700f2174b..05ea4052159 100644 --- a/helm/litellm/templates/gateway/deployment.yaml +++ b/helm/litellm/templates/gateway/deployment.yaml @@ -23,6 +23,7 @@ spec: {{- include "litellm.gateway.selectorLabels" . | nindent 8 }} spec: serviceAccountName: {{ include "litellm.gateway.serviceAccountName" . }} + automountServiceAccountToken: {{ .Values.serviceAccounts.gateway.automount }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/helm/litellm/templates/serviceaccount.yaml b/helm/litellm/templates/serviceaccount.yaml index ec8e1bb7bde..a2fc52f47c0 100644 --- a/helm/litellm/templates/serviceaccount.yaml +++ b/helm/litellm/templates/serviceaccount.yaml @@ -1,4 +1,6 @@ +{{- $prev := false -}} {{- if .Values.serviceAccounts.gateway.create -}} +{{- $prev = true }} apiVersion: v1 kind: ServiceAccount metadata: @@ -13,7 +15,10 @@ metadata: automountServiceAccountToken: {{ .Values.serviceAccounts.gateway.automount }} {{- end }} {{- if .Values.serviceAccounts.backend.create }} +{{- if $prev }} --- +{{- end }} +{{- $prev = true }} apiVersion: v1 kind: ServiceAccount metadata: @@ -28,7 +33,9 @@ metadata: automountServiceAccountToken: {{ .Values.serviceAccounts.backend.automount }} {{- end }} {{- if .Values.serviceAccounts.ui.create }} +{{- if $prev }} --- +{{- end }} apiVersion: v1 kind: ServiceAccount metadata: