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

make hook-delete-policy in helm job configurable #4393

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/karmada/templates/post-delete-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metadata:
# job is considered part of the release.
"helm.sh/hook": post-delete
"helm.sh/hook-weight": "0"
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-delete-policy": {{ .Values.postDeleteJob.hookDeletePolicy }}
spec:
parallelism: 1
completions: 1
Expand Down
2 changes: 1 addition & 1 deletion charts/karmada/templates/post-install-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ metadata:
# job is considered part of the release.
"helm.sh/hook": post-install
"helm.sh/hook-weight": "0"
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-delete-policy": {{ .Values.postInstallJob.hookDeletePolicy }}
spec:
parallelism: 1
completions: 1
Expand Down
2 changes: 1 addition & 1 deletion charts/karmada/templates/pre-install-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ metadata:
# job is considered part of the release.
"helm.sh/hook": pre-install
"helm.sh/hook-weight": "3"
"helm.sh/hook-delete-policy": hook-succeeded
"helm.sh/hook-delete-policy": {{ .Values.preInstallJob.hookDeletePolicy }}
{{- if "karmada.preInstallJob.labels" }}
labels:
{{- include "karmada.preInstallJob.labels" . | nindent 4 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/karmada/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,22 @@ kubectl:
preInstallJob:
tolerations: []
nodeSelector: {}
## Define policies that determine when to delete corresponding hook resources: before-hook-creation,hook-succeeded,hook-failed
hookDeletePolicy: "hook-succeeded"

## post-install job config
postInstallJob:
tolerations: []
nodeSelector: {}
## Define policies that determine when to delete corresponding hook resources: before-hook-creation,hook-succeeded,hook-failed
hookDeletePolicy: "hook-succeeded"

## post-delete job config
postDeleteJob:
tolerations: []
nodeSelector: {}
## Define policies that determine when to delete corresponding hook resources: before-hook-creation,hook-succeeded,hook-failed
hookDeletePolicy: "hook-succeeded"

## karmada certificate config
certs:
Expand Down
Loading