Skip to content

Commit

Permalink
Merge pull request #4393 from chaosi-zju/hook-delete-policy
Browse files Browse the repository at this point in the history
make hook-delete-policy in helm job configurable
  • Loading branch information
karmada-bot authored Dec 15, 2023
2 parents f7b6e79 + 9315b02 commit 90bdfcb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
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

0 comments on commit 90bdfcb

Please sign in to comment.