Skip to content

Commit

Permalink
Issue 589: Add imagePullSecrets for Helm hooks (#591)
Browse files Browse the repository at this point in the history
Signed-off-by: Reinhard Nägele <[email protected]>
  • Loading branch information
unguiculus authored Jun 12, 2024
1 parent a9b059d commit 644ebe3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ metadata:
"helm.sh/hook": post-install, post-upgrade
"helm.sh/hook-weight": "1"
"helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation, hook-failed
{{- if or .Values.global.imagePullSecrets .Values.hooks.serviceAccount.imagePullSecrets }}
imagePullSecrets:
{{- range (default .Values.global.imagePullSecrets .Values.hooks.serviceAccount.imagePullSecrets) }}
- name: {{ . }}
{{- end }}
{{- end }}

---

Expand Down
6 changes: 6 additions & 0 deletions charts/zookeeper-operator/templates/pre-delete-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ metadata:
"helm.sh/hook": pre-delete
"helm.sh/hook-weight": "1"
"helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation, hook-failed
{{- if or .Values.global.imagePullSecrets .Values.hooks.serviceAccount.imagePullSecrets }}
imagePullSecrets:
{{- range (default .Values.global.imagePullSecrets .Values.hooks.serviceAccount.imagePullSecrets) }}
- name: {{ . }}
{{- end }}
{{- end }}

---

Expand Down
4 changes: 4 additions & 0 deletions charts/zookeeper-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ tolerations: []
annotations: {}

hooks:
## Optionally specify an array of imagePullSecrets. Will override the global parameter if set
serviceAccount:
imagePullSecrets: []

backoffLimit: 10
image:
repository: lachlanevenson/k8s-kubectl
Expand Down

0 comments on commit 644ebe3

Please sign in to comment.