diff --git a/charts/zookeeper-operator/templates/post-install-upgrade-hooks.yaml b/charts/zookeeper-operator/templates/post-install-upgrade-hooks.yaml index bbbe41b8..cf65604d 100644 --- a/charts/zookeeper-operator/templates/post-install-upgrade-hooks.yaml +++ b/charts/zookeeper-operator/templates/post-install-upgrade-hooks.yaml @@ -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 }} --- diff --git a/charts/zookeeper-operator/templates/pre-delete-hooks.yaml b/charts/zookeeper-operator/templates/pre-delete-hooks.yaml index 77fa3895..dc5f27e0 100644 --- a/charts/zookeeper-operator/templates/pre-delete-hooks.yaml +++ b/charts/zookeeper-operator/templates/pre-delete-hooks.yaml @@ -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 }} --- diff --git a/charts/zookeeper-operator/values.yaml b/charts/zookeeper-operator/values.yaml index 3830f81f..e56f54fe 100644 --- a/charts/zookeeper-operator/values.yaml +++ b/charts/zookeeper-operator/values.yaml @@ -57,6 +57,11 @@ tolerations: [] annotations: {} hooks: + ## Optionally specify an array of imagePullSecrets. Will override the global parameter if set + serviceAccount: + imagePullSecrets: [] + # - private-registry-key + backoffLimit: 10 image: repository: lachlanevenson/k8s-kubectl