addon-operator icon indicating copy to clipboard operation
addon-operator copied to clipboard

Helm deletion hooks seems not to be obeyed

Open diafour opened this issue 3 years ago • 1 comments

Discussed in https://github.com/flant/addon-operator/discussions/343

Originally posted by oscar-martin November 30, 2022 I have created a module that creates a Job with the next Helm hooks:

  annotations:
    helm.sh/hook: post-install
    helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
    helm.sh/hook-weight: "-5"

Addon-operator is not obeying the Helm deletion hooks. This is what I find in the addon-operator's log:

time="2022-11-30T12:24:38Z" level=debug msg="Absent resources detected" module=mymodule operator.component=HelmResourceMonitor
time="2022-11-30T12:24:38Z" level=debug msg="Detect absent resources for mymodule"
time="2022-11-30T12:24:38Z" level=debug msg=test/Job/test-job
time="2022-11-30T12:24:38Z" level=info msg="got 1 absent module resources, append task ModuleRun for module 'mymodule', phase '', trigger is DetectAbsentHelmResources" operator.component=handleManagerEvents task.flow=add

I have read the topic about release auto-healing and I think that should've been managed.I thought that somehow the addon-operator would check only resources that are not annotated with Helm deletion hooks to make the comparison with the actual state of the Helm release.

Thanks!

diafour avatar Dec 05 '22 16:12 diafour

Is there any update on this? Same issue here.

Thanks!

sabotup avatar Mar 30 '23 11:03 sabotup