jykae commented on code in PR #68074:
URL: https://github.com/apache/airflow/pull/68074#discussion_r3387219415
##########
chart/templates/jobs/migrate-database-job.yaml:
##########
@@ -43,7 +43,7 @@ metadata:
{{- end }}
{{- $annotations := dict }}
{{- if .Values.migrateDatabaseJob.useHelmHooks }}
- {{- $_ := set $annotations "helm.sh/hook" "post-install,post-upgrade" }}
+ {{- $_ := set $annotations "helm.sh/hook" "pre-install,pre-upgrade" }}
{{- $_ := set $annotations "helm.sh/hook-weight" "1" }}
{{- $_ := set $annotations "helm.sh/hook-delete-policy"
"before-hook-creation,hook-succeeded" }}
{{- end }}
Review Comment:
The ServiceAccount, Role, and RoleBinding are now hook resources
(`helm.sh/hook: post-install,pre-upgrade`) with `hook-weight: "-5"`, while the
Job runs at `hook-weight: "1"`. Helm applies lower-weighted hook resources
first, so the SA and RBAC exist before the Job hook runs on both fresh installs
and the first downgrade after adopting this version.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]