diff --git a/helm/solr-operator/Chart.yaml b/helm/solr-operator/Chart.yaml index 81138d09..29fe1cc5 100644 --- a/helm/solr-operator/Chart.yaml +++ b/helm/solr-operator/Chart.yaml @@ -55,6 +55,13 @@ annotations: # 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: added + description: Support global.imagePullSecrets for pulling images from private registries + links: + - name: Github Issue + url: https://github.com/apache/solr-operator/issues/338 + - name: Github PR + url: https://github.com/apache/solr-operator/pull/343 - kind: changed description: A container PostStart Hook is no longer used to create the ZooKeeper ChRoot, instead the initContainer will manage this links: diff --git a/helm/solr-operator/README.md b/helm/solr-operator/README.md index 2e44b873..57dd5b03 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 1c13fae4..63a8d3f6 100644 --- a/helm/solr-operator/templates/deployment.yaml +++ b/helm/solr-operator/templates/deployment.yaml @@ -38,6 +38,16 @@ spec: {{ toYaml .Values.labels | nindent 8 }} {{- end }} spec: + {{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- range . }} + {{- if kindIs "string" . }} + - name: {{ . }} + {{- else }} + - {{ toYaml . | nindent 10 }} + {{- end }} + {{- end }} + {{- 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 efdbe0a0..541adc72 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