You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2026/06/18 20:25:26 UTC
(solr-operator) branch main updated: Support global.imagePullSecrets in both helm charts (#832)
This is an automated email from the ASF dual-hosted git repository.
HoustonPutman 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 73af13c Support global.imagePullSecrets in both helm charts (#832)
73af13c is described below
commit 73af13cd0445383ac50e0ae6aefd8f5d185c9ac7
Author: Mattias Persson <ma...@gmail.com>
AuthorDate: Thu Jun 18 22:25:20 2026 +0200
Support global.imagePullSecrets in both helm charts (#832)
Co-authored-by: Mattias Persson <ma...@sartorius.com>
Co-authored-by: Houston Putman <ho...@apache.org>
---
helm/solr-operator/Chart.yaml | 9 ++++++++-
helm/solr-operator/README.md | 1 +
helm/solr-operator/templates/deployment.yaml | 17 +++++++++++++----
helm/solr-operator/values.yaml | 5 +++++
helm/solr/Chart.yaml | 7 +++++++
helm/solr/README.md | 4 ++--
helm/solr/templates/_custom_option_helpers.tpl | 8 +++++++-
helm/solr/values.yaml | 5 +++++
8 files changed, 48 insertions(+), 8 deletions(-)
diff --git a/helm/solr-operator/Chart.yaml b/helm/solr-operator/Chart.yaml
index a95c838..81ba86c 100644
--- a/helm/solr-operator/Chart.yaml
+++ b/helm/solr-operator/Chart.yaml
@@ -106,7 +106,7 @@ annotations:
- name: Github PR
url: https://github.com/apache/solr-operator/pull/790
- kind: fixed
- description: Correct the placement and syntax of the imagePullSecret in the Solr-Operator Helm chart
+ description: Correct the placement and syntax of the image.imagePullSecret in the Solr-Operator Helm chart
links:
- name: Github PR
url: https://github.com/apache/solr-operator/pull/782
@@ -124,6 +124,13 @@ annotations:
url: https://github.com/apache/solr-operator/issues/817
- name: Github PR
url: https://github.com/apache/solr-operator/pull/818
+ - kind: added
+ description: Support global.imagePullSecrets for pulling images from private registries, this is merged with image.imagePullSecret. Both accept plain strings in addition to objects
+ links:
+ - name: Github Issue
+ url: https://github.com/apache/solr-operator/issues/338
+ - name: Github PR
+ url: https://github.com/apache/solr-operator/pull/832
artifacthub.io/images: |
- name: solr-operator
image: apache/solr-operator:v0.10.0-prerelease
diff --git a/helm/solr-operator/README.md b/helm/solr-operator/README.md
index 50a3424..79acc1a 100644
--- a/helm/solr-operator/README.md
+++ b/helm/solr-operator/README.md
@@ -171,6 +171,7 @@ The command removes all the Kubernetes components associated with the chart and
| Key | Type | Default | Description |
|-----|------|---------|-------------|
+| global.imagePullSecrets | []object/string | `[]` | Secrets for pulling images from private registries. Accepts both Kubernetes-native format (`[{name: "secret"}]`) and plain strings (`["secret"]`). |
| image.repository | string | `"apache/solr-operator"` | The repository of the Solr Operator image |
| image.tag | string | `"v0.10.0-prerelease"` | The tag/version of the Solr Operator to run |
| image.pullPolicy | string | `"IfNotPresent"` | |
diff --git a/helm/solr-operator/templates/deployment.yaml b/helm/solr-operator/templates/deployment.yaml
index 7541371..2def7ef 100644
--- a/helm/solr-operator/templates/deployment.yaml
+++ b/helm/solr-operator/templates/deployment.yaml
@@ -38,14 +38,23 @@ spec:
{{ toYaml .Values.labels | nindent 8 }}
{{- end }}
spec:
+ {{- if or .Values.global.imagePullSecrets .Values.image.imagePullSecret }}
+ imagePullSecrets:
+ {{- range .Values.global.imagePullSecrets }}
+ {{- if kindIs "string" . }}
+ - name: {{ . }}
+ {{- else }}
+ - name: {{ required "Each entry in global.imagePullSecrets must be a string or an object with a 'name' field" .name }}
+ {{- end }}
+ {{- end }}
+ {{- with .Values.image.imagePullSecret }}
+ - name: {{ . }}
+ {{- end }}
+ {{- end }}
serviceAccountName: {{ include "solr-operator.serviceAccountName" . }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
- {{- if .Values.image.imagePullSecret }}
- imagePullSecrets:
- - name: {{ .Values.image.imagePullSecret }}
- {{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
diff --git a/helm/solr-operator/values.yaml b/helm/solr-operator/values.yaml
index 3a293e3..7453b61 100644
--- a/helm/solr-operator/values.yaml
+++ b/helm/solr-operator/values.yaml
@@ -19,6 +19,11 @@
replicaCount: 1
+global:
+ # List the secrets needed to pull images from a private registry.
+ # Accepts both Kubernetes-native format [{name: "secret"}] and plain strings ["secret"].
+ imagePullSecrets: []
+
# Development mode configures certain settings for convenient development.
# When 'true', logging will use: encoder=console, level=debug, stacktrace-level=warn
development: false
diff --git a/helm/solr/Chart.yaml b/helm/solr/Chart.yaml
index 224b3ed..29a4baf 100644
--- a/helm/solr/Chart.yaml
+++ b/helm/solr/Chart.yaml
@@ -53,6 +53,13 @@ annotations:
links:
- name: Github PR
url: https://github.com/apache/solr-operator/pull/811
+ - kind: added
+ description: global.imagePullSecrets and podOptions.imagePullSecrets now accept plain strings in addition to objects, and are merged correctly into the Solr pods
+ links:
+ - name: Github Issue
+ url: https://github.com/apache/solr-operator/issues/338
+ - name: Github PR
+ url: https://github.com/apache/solr-operator/pull/832
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/recommendations: |
- url: https://artifacthub.io/packages/helm/apache-solr/solr-operator
diff --git a/helm/solr/README.md b/helm/solr/README.md
index 2d95171..a7a1078 100644
--- a/helm/solr/README.md
+++ b/helm/solr/README.md
@@ -265,7 +265,7 @@ Configure Solr to use a separate TLS certificate for client auth.
| Key | Type | Default | Description |
|-----|------|---------|-------------|
-| global.imagePullSecrets | []object | | The list of imagePullSecrets to include in pods |
+| global.imagePullSecrets | []object/string | | The list of imagePullSecrets to include in all pods (Solr and ZK). Accepts both Kubernetes-native format (`[{name: "secret"}]`) and plain strings (`["secret"]`). |
| global.clusterDomain | string | | The cluster domain the Kubernetes is addressed under. |
### Custom Kubernetes Options
@@ -300,7 +300,7 @@ When using the helm chart, omit `customSolrKubeOptions.`
| podOptions.readinessProbe | object | | Custom readiness probe for the Solr container |
| podOptions.startupProbe | object | | Custom startup probe for the Solr container |
| podOptions.lifecycle | object | | Custom lifecycle for the Solr container |
-| podOptions.imagePullSecrets | []object | | List of image pull secrets to inject into the Solr pod, in addition to `global.imagePullSecrets` |
+| podOptions.imagePullSecrets | []object/string | | List of image pull secrets to inject into the Solr pod, in addition to `global.imagePullSecrets`. Accepts both Kubernetes-native format (`[{name: "secret"}]`) and plain strings (`["secret"]`). |
| podOptions.volumes | []object | | List of additional volumes to attach to the Solr pod, and optionally how to mount them to the Solr container |
| statefulSetOptions.annotations | map[string]string | | Custom annotations to add to the Solr statefulSet |
| statefulSetOptions.labels | map[string]string | | Custom labels to add to the Solr statefulSet |
diff --git a/helm/solr/templates/_custom_option_helpers.tpl b/helm/solr/templates/_custom_option_helpers.tpl
index 4082e6c..b74c52d 100644
--- a/helm/solr/templates/_custom_option_helpers.tpl
+++ b/helm/solr/templates/_custom_option_helpers.tpl
@@ -71,7 +71,13 @@ containerSecurityContext:
{{ end }}
{{- if (or .Values.podOptions.imagePullSecrets .Values.global.imagePullSecrets) -}}
imagePullSecrets:
- {{- toYaml (append .Values.podOptions.imagePullSecrets .Values.global.imagePullSecrets) | nindent 2 }}
+{{- range (concat .Values.podOptions.imagePullSecrets .Values.global.imagePullSecrets) }}
+{{- if kindIs "string" . }}
+ - name: {{ . }}
+{{- else }}
+ - name: {{ required "Each entry in imagePullSecrets must be a string or an object with a 'name' field" .name }}
+{{- end }}
+{{- end }}
{{ end }}
{{- if .Values.podOptions.volumes -}}
volumes:
diff --git a/helm/solr/values.yaml b/helm/solr/values.yaml
index 595fd85..281a757 100644
--- a/helm/solr/values.yaml
+++ b/helm/solr/values.yaml
@@ -24,6 +24,9 @@ fullnameOverride: ""
replicas: null
global:
+ # List the secrets needed to pull images from a private registry.
+ # Accepts both Kubernetes-native format [{name: "secret"}] and plain strings ["secret"].
+ # These are merged with podOptions.imagePullSecrets and applied to the Solr pods.
imagePullSecrets: []
clusterDomain: ""
@@ -325,6 +328,8 @@ podOptions:
# Lifecycle for the Solr container
lifecycle: {}
+ # List of image pull secrets to inject into the Solr pod, in addition to global.imagePullSecrets.
+ # Accepts both Kubernetes-native format [{name: "secret"}] and plain strings ["secret"].
imagePullSecrets: []
resources: {}