fix(hooks): correct hooks delete order

Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
pull/13365/head
Suleiman Dibirov 2 months ago
parent d2ae7d0ed1
commit f4f4a6b81f

@ -99,7 +99,8 @@ func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent,
// If all hooks are successful, check the annotation of each hook to determine whether the hook should be deleted
// under succeeded condition. If so, then clear the corresponding resource object in each hook
for _, h := range executingHooks {
for i := len(executingHooks) - 1; i >= 0; i-- {
h := executingHooks[i]
if err := cfg.deleteHookByPolicy(h, release.HookSucceeded, timeout); err != nil {
return err
}

Loading…
Cancel
Save