diff --git a/deploy/charts/litellm-helm/templates/serviceaccount.yaml b/deploy/charts/litellm-helm/templates/serviceaccount.yaml index 7655470fa42..34ac70c4c8c 100644 --- a/deploy/charts/litellm-helm/templates/serviceaccount.yaml +++ b/deploy/charts/litellm-helm/templates/serviceaccount.yaml @@ -5,9 +5,20 @@ metadata: name: {{ include "litellm.serviceAccountName" . }} labels: {{- include "litellm.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} annotations: + {{- if .Values.migrationJob.enabled }} + {{- if .Values.migrationJob.hooks.argocd.enabled }} + argocd.argoproj.io/hook: PreSync + argocd.argoproj.io/hook-delete-policy: BeforeHookCreation + {{- end }} + {{- if .Values.migrationJob.hooks.helm.enabled }} + helm.sh/hook: "pre-install,pre-upgrade" + helm.sh/hook-delete-policy: "before-hook-creation" + helm.sh/hook-weight: {{ .Values.migrationJob.hooks.helm.weight | default "1" | quote }} + {{- end }} + {{- end }} + {{- with .Values.serviceAccount.annotations }} {{- toYaml . | nindent 4 }} - {{- end }} + {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automount }} {{- end }}