From ea48b8c3cef78323bc497d18c49abb9d1a424e52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Salazar?= Date: Tue, 23 May 2023 11:10:52 +0200 Subject: [PATCH] fixed templating nil pointer error Signed-off-by: Tom Billiet --- charts/zookeeper/templates/post-install-upgrade-hooks.yaml | 4 ++-- charts/zookeeper/values.yaml | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/charts/zookeeper/templates/post-install-upgrade-hooks.yaml b/charts/zookeeper/templates/post-install-upgrade-hooks.yaml index 08cd0183..d36a2ce4 100644 --- a/charts/zookeeper/templates/post-install-upgrade-hooks.yaml +++ b/charts/zookeeper/templates/post-install-upgrade-hooks.yaml @@ -38,9 +38,9 @@ roleRef: apiVersion: v1 kind: ServiceAccount -{{- if or .Values.global.imagePullSecrets .Values.serviceAccount.imagePullSecrets }} +{{- if .Values.global.imagePullSecrets }} imagePullSecrets: -{{- range (default .Values.global.imagePullSecrets .Values.serviceAccount.imagePullSecrets) }} +{{- range .Values.global.imagePullSecrets }} - name: {{ . }} {{- end }} {{- end }} diff --git a/charts/zookeeper/values.yaml b/charts/zookeeper/values.yaml index 8a449f0b..68ae476a 100644 --- a/charts/zookeeper/values.yaml +++ b/charts/zookeeper/values.yaml @@ -8,6 +8,11 @@ image: triggerRollingRestart: false +global: + # Lists the secrets you need to use to pull zookeeper image from a private registry. + imagePullSecrets: [] + # - private-registry-key + domainName: labels: {} ports: []