temporalio / helm-charts

Temporal Helm charts
MIT License
282 stars 316 forks source link

[Bug] Create service account after helm install #432

Closed work82mj closed 1 month ago

work82mj commented 9 months ago

What are you really trying to do?

Create service account using command helm upgrade

helm upgrade --set server.replicaCount=1 --install temporal-dev . --values values-dev.yaml -n dev --set serviceAccount.create=true

Describe the bug

Error: UPGRADE FAILED: pre-upgrade hooks failed: timed out waiting for the condition

Minimal Reproduction

using default values of serviceaccount.yaml

Environment/Versions

Additional context

add pre-upgrade to annotations in serviceaccount.yaml

{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ include "temporal.serviceAccountName" . }}
  labels:
    app.kubernetes.io/name: {{ include "temporal.name" . }}
    helm.sh/chart: {{ include "temporal.chart". }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" }}
    app.kubernetes.io/part-of: {{ .Chart.Name }}
  annotations:
    helm.sh/hook: pre-install, pre-upgrade
    helm.sh/hook-weight: "-10"
    {{- with .Values.serviceAccount.extraAnnotations }}
      {{- toYaml . | nindent 4 }}
    {{- end }}
{{- end -}}
punit-kulal commented 4 months ago

Encountered the same issue.