diff --git a/charts/fleet/templates/job-migration.yaml b/charts/fleet/templates/job-migration.yaml index 135dac9a63..cd2e963712 100644 --- a/charts/fleet/templates/job-migration.yaml +++ b/charts/fleet/templates/job-migration.yaml @@ -10,13 +10,14 @@ metadata: name: fleet-migration namespace: {{ .Release.Namespace }} annotations: - {{- if .Values.mysql.enabled }} - {} - {{- else }} + {{- if not .Values.mysql.enabled }} "helm.sh/hook": pre-install,pre-upgrade "helm.sh/hook-weight": "1" "helm.sh/hook-delete-policy": hook-succeeded {{- end }} + {{- with .Values.fleet.migrationJobAnnotations }} + {{- toYaml . | trim | nindent 4 }} + {{- end }} spec: ttlSecondsAfterFinished: 100 template: diff --git a/charts/fleet/values.yaml b/charts/fleet/values.yaml index dfa0df541a..d18d5d457f 100644 --- a/charts/fleet/values.yaml +++ b/charts/fleet/values.yaml @@ -65,6 +65,8 @@ fleet: secretName: fleet # Whether or not to run `fleet db prepare` to run SQL migrations before starting Fleet autoApplySQLMigrations: true + # Add extra annotations to the migration Job + migrationJobAnnotations: tls: enabled: true # Set to true if you need a separate secret for just TLS data.