diff --git a/charts/zookeeper-operator/templates/post-install-upgrade-hooks.yaml b/charts/zookeeper-operator/templates/post-install-upgrade-hooks.yaml index bbbe41b8..ac2188bf 100644 --- a/charts/zookeeper-operator/templates/post-install-upgrade-hooks.yaml +++ b/charts/zookeeper-operator/templates/post-install-upgrade-hooks.yaml @@ -44,6 +44,12 @@ roleRef: apiVersion: v1 kind: ServiceAccount +{{- if or .Values.global.imagePullSecrets .Values.serviceAccount.imagePullSecrets }} +imagePullSecrets: +{{- range (default .Values.global.imagePullSecrets .Values.serviceAccount.imagePullSecrets) }} + - name: {{ . }} +{{- end }} +{{- end }} metadata: name: {{ template "zookeeper-operator.fullname" . }}-post-install-upgrade namespace: {{ .Release.Namespace }} diff --git a/charts/zookeeper/templates/post-install-upgrade-hooks.yaml b/charts/zookeeper/templates/post-install-upgrade-hooks.yaml index dfb5f1bb..08cd0183 100644 --- a/charts/zookeeper/templates/post-install-upgrade-hooks.yaml +++ b/charts/zookeeper/templates/post-install-upgrade-hooks.yaml @@ -38,6 +38,12 @@ roleRef: apiVersion: v1 kind: ServiceAccount +{{- if or .Values.global.imagePullSecrets .Values.serviceAccount.imagePullSecrets }} +imagePullSecrets: +{{- range (default .Values.global.imagePullSecrets .Values.serviceAccount.imagePullSecrets) }} + - name: {{ . }} +{{- end }} +{{- end }} metadata: name: {{ template "zookeeper.fullname" . }}-post-install-upgrade namespace: {{ .Release.Namespace }} diff --git a/charts/zookeeper/templates/zookeeper.yaml b/charts/zookeeper/templates/zookeeper.yaml index 902440e6..5c378ce5 100644 --- a/charts/zookeeper/templates/zookeeper.yaml +++ b/charts/zookeeper/templates/zookeeper.yaml @@ -105,9 +105,11 @@ spec: terminationGracePeriodSeconds: {{ .Values.pod.terminationGracePeriodSeconds }} {{- end }} serviceAccountName: {{ default "zookeeper" .Values.pod.serviceAccountName }} - {{- if .Values.pod.imagePullSecrets }} + {{- if or .Values.global.imagePullSecrets .Values.pod.imagePullSecrets }} imagePullSecrets: -{{ toYaml .Values.pod.imagePullSecrets | indent 6 }} + {{- range (default .Values.global.imagePullSecrets .Values.pod.imagePullSecrets) }} + - name: {{ . }} + {{- end }} {{- end }} {{- if .Values.clientService }} clientService: diff --git a/charts/zookeeper/values.yaml b/charts/zookeeper/values.yaml index 8a449f0b..3487ecf4 100644 --- a/charts/zookeeper/values.yaml +++ b/charts/zookeeper/values.yaml @@ -1,6 +1,11 @@ replicas: 3 maxUnavailableReplicas: +global: + # Lists the secrets you need to use to pull zookeeper image from a private registry. + imagePullSecrets: [] + # - private-registry-key + image: repository: pravega/zookeeper tag: 0.2.15 @@ -10,6 +15,11 @@ triggerRollingRestart: false domainName: labels: {} + +serviceAccount: {} + ## Optionally specify an array of imagePullSecrets. Will override the global parameter if set + # imagePullSecrets: + ports: [] # - containerPort: 2181 # name: client