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

Allow user to delete job pod on completion #222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EnriqueLop
Copy link

New parameter in init object that allow user to automatically delete init job pod when complete.

@@ -364,6 +364,9 @@ init:
# Additional annotations to apply to the Pod of this Job.
annotations: {}

# If true init job is deleted when completed. If false the job stays in complete status.
deleteJobOnCompletion: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better if we rename it to something helm hook related like enable-delete-hook

Comment on lines +23 to +27
{{- if .Values.init.deleteJobOnCompletion }}
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
{{- else }}
helm.sh/hook-delete-policy: before-hook-creation
{{- end }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can keep this deletion behaviour as default one and add an option in values.yaml to disable this

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

Successfully merging this pull request may close these issues.

2 participants