This is an automated email from the ASF dual-hosted git repository.

gerlowskija pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new cbf5578  Allow imagePullSecret in operator helm chart (#734)
cbf5578 is described below

commit cbf5578ad6364e00723f8100b53715a3929f8a93
Author: Jason Gerlowski <gerlowsk...@apache.org>
AuthorDate: Tue Jan 7 09:30:10 2025 -0500

    Allow imagePullSecret in operator helm chart (#734)
    
    Operator users may host the image in their own repositories, protected
    by authentication.  This commit adds support for an imagePullSecret to
    the operator helm chart, to support this scenario.
    
    Closes #718
---
 helm/solr-operator/Chart.yaml                | 8 ++++++++
 helm/solr-operator/README.md                 | 1 +
 helm/solr-operator/templates/deployment.yaml | 3 +++
 helm/solr-operator/values.yaml               | 1 +
 4 files changed, 13 insertions(+)

diff --git a/helm/solr-operator/Chart.yaml b/helm/solr-operator/Chart.yaml
index 44ca43e..891e494 100644
--- a/helm/solr-operator/Chart.yaml
+++ b/helm/solr-operator/Chart.yaml
@@ -53,6 +53,7 @@ annotations:
     url: https://dist.apache.org/repos/dist/release/solr/KEYS
   # Add change log for a single release here.
   # Allowed syntax is described at: 
https://artifacthub.io/docs/topics/annotations/helm/#example
+  # 'kind' accepts values: "added", "changed", "deprecated", "removed", 
"fixed" and "security"
   artifacthub.io/changes: |
     - kind: fixed
       description: gen-pkcs12-keystore initContainer now supports 
'ca.crt'-less TLS secrets
@@ -112,6 +113,13 @@ annotations:
           url: https://github.com/apache/solr-operator/issues/731
         - name: Github PR
           url: https://github.com/apache/solr-operator/pull/738
+    - kind: added
+      description: "'imagePullSecret' now used when fetching operator image, 
if provided."
+      links:
+        - name: Github Issue
+          url: https://github.com/apache/solr-operator/issues/718
+        - name: Github PR
+          url: https://github.com/apache/solr-operator/pull/734
   artifacthub.io/images: |
     - name: solr-operator
       image: apache/solr-operator:v0.9.0-prerelease
diff --git a/helm/solr-operator/README.md b/helm/solr-operator/README.md
index 9275542..e324aeb 100644
--- a/helm/solr-operator/README.md
+++ b/helm/solr-operator/README.md
@@ -174,6 +174,7 @@ The command removes all the Kubernetes components 
associated with the chart and
 | image.repository | string | `"apache/solr-operator"` | The repository of the 
Solr Operator image |
 | image.tag | string | `"v0.9.0-prerelease"` | The tag/version of the Solr 
Operator to run |
 | image.pullPolicy | string | `"IfNotPresent"` |  |
+| image.imagePullSecret | string | `""` | PullSecret for the Solr Operator 
image |
 | fullnameOverride | string | `""` | A custom name for the Solr Operator 
Deployment |
 | nameOverride | string | `""` |  |
 | replicaCount | int | `1` | The number of Solr Operator pods to run |
diff --git a/helm/solr-operator/templates/deployment.yaml 
b/helm/solr-operator/templates/deployment.yaml
index 6dd905e..e625124 100644
--- a/helm/solr-operator/templates/deployment.yaml
+++ b/helm/solr-operator/templates/deployment.yaml
@@ -46,6 +46,9 @@ spec:
       - name: {{ .Chart.Name }}
         image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 
         imagePullPolicy: {{ .Values.image.pullPolicy }}
+        {{- if .Values.image.imagePullSecret }}
+        imagePullSecret: {{ .Values.image.imagePullSecret }}
+        {{- end }}
         args:
         {{- if or (index .Values "zookeeper-operator" "install") (index 
.Values "zookeeper-operator" "use") }}
         - -zk-operator=true
diff --git a/helm/solr-operator/values.yaml b/helm/solr-operator/values.yaml
index 300c64d..589457b 100644
--- a/helm/solr-operator/values.yaml
+++ b/helm/solr-operator/values.yaml
@@ -23,6 +23,7 @@ image:
   repository: apache/solr-operator
   tag: v0.9.0-prerelease
   pullPolicy: IfNotPresent
+  imagePullSecret: ""
 
 nameOverride: ""
 fullnameOverride: ""

Reply via email to