From 90fede6efd00eeba2cb48de644fa08a738d27fd7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= <jacobo167@gmail.com>
Date: Wed, 13 Oct 2021 11:15:18 +0100
Subject: [PATCH] Use global.imagePullSecrets at solr-operator helm chart #338

---
 helm/solr-operator/templates/deployment.yaml | 4 ++++
 helm/solr-operator/values.yaml               | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/helm/solr-operator/templates/deployment.yaml b/helm/solr-operator/templates/deployment.yaml
index 946c81c6..4f88e402 100644
--- a/helm/solr-operator/templates/deployment.yaml
+++ b/helm/solr-operator/templates/deployment.yaml
@@ -37,6 +37,10 @@ spec:
         {{ toYaml .Values.labels | nindent 8 }}
         {{- end }}
     spec:
+      {{- if .Values.global.imagePullSecrets }}
+      imagePullSecrets:
+        {{- toYaml .Values.global.imagePullSecrets | nindent 8 }}
+      {{- end }}
       serviceAccountName: {{ include "solr-operator.serviceAccountName" . }}
       {{- if .Values.priorityClassName }}
       priorityClassName: {{ .Values.priorityClassName }}
diff --git a/helm/solr-operator/values.yaml b/helm/solr-operator/values.yaml
index 28a72753..1d61c303 100644
--- a/helm/solr-operator/values.yaml
+++ b/helm/solr-operator/values.yaml
@@ -19,6 +19,10 @@
 
 replicaCount: 1
 
+global:
+  # Lists the secrets you need to use to pull solr-operator and zookeeper-operator images from a private registry.
+  imagePullSecrets: []
+
 image:
   repository: apache/solr-operator
   tag: v0.4.1-prerelease