fix: keep DB migration hook logs inspectable after deployment

Switch hook-delete-policy from hook-succeeded to before-hook-creation on
both the pre-upgrade and post-upgrade migration Jobs. hook-succeeded
deleted the Job immediately on success, making post-deploy log
inspection impossible. before-hook-creation keeps the most recent run's
Job and logs around (inspectable via kubectl logs job/<name>) and only
removes the previous Job when the next deployment fires the hook,
avoiding name conflicts and accumulation.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
This commit is contained in:
2026-07-15 17:59:12 +02:00
parent 35161b9b6d
commit 1ed6a4c129
2 changed files with 2 additions and 2 deletions
@@ -8,7 +8,7 @@ metadata:
annotations:
helm.sh/hook: post-install,post-upgrade
helm.sh/hook-weight: "5"
helm.sh/hook-delete-policy: hook-succeeded
helm.sh/hook-delete-policy: before-hook-creation
spec:
backoffLimit: 0
template:
@@ -8,7 +8,7 @@ metadata:
annotations:
helm.sh/hook: pre-upgrade
helm.sh/hook-weight: "-5"
helm.sh/hook-delete-policy: hook-succeeded
helm.sh/hook-delete-policy: before-hook-creation
spec:
backoffLimit: 0
template: