Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hooks cleaned up too early #117

Open
1 task done
ilya-lesikov opened this issue Jun 17, 2024 · 0 comments
Open
1 task done

Hooks cleaned up too early #117

ilya-lesikov opened this issue Jun 17, 2024 · 0 comments

Comments

@ilya-lesikov
Copy link
Member

Before proceeding

  • I didn't find a similar issue

Version

2.6.0

How to reproduce

Deploy these resources:

apiVersion: v1
kind: ServiceAccount
metadata:
  name: sa
  annotations:
    "helm.sh/hook": post-install, post-upgrade
    "helm.sh/hook-delete-policy": hook-succeeded
  ...
---
apiVersion: batch/v1
kind: Job
metadata:
  name: job
  annotations:
    "helm.sh/hook": post-install, post-upgrade
    "helm.sh/hook-delete-policy": hook-succeeded
  ...

Result

Service Account will be deleted too early, resulting in error.

Expected result

Service Account deleted along with the Job at the very end, after both are executed.

Additional information

Helm 3 deletes hooks after all the hooks in pre or post stage are deployed. In Nelm we delete hook immediately after it is deployed. This breaks backwards compatibility.

Probably we should have a separate stage to cleanup all hooks at once, which will be executed after all hooks deployed, just like in Helm 3.

@alexey-igrychev alexey-igrychev transferred this issue from werf/werf Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant