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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user