Skip to content

Commit

Permalink
[nats helm] Allow specifying pullSecrets (#814)
Browse files Browse the repository at this point in the history
* [nats helm] Allow specifying pullSecrets

* Apply suggestions from code review

---------

Co-authored-by: Caleb Lloyd <[email protected]>
  • Loading branch information
adberger and caleblloyd authored Nov 1, 2023
1 parent 02b99fe commit 2324054
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helm/charts/nats/files/nats-box/deployment/pod-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ metadata:
labels:
{{- include "natsBox.labels" $ | nindent 4 }}
spec:
{{- with .Values.global.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 4 }}
{{- end }}
containers:
{{- with .Values.natsBox.container }}
- {{ include "nats.loadMergePatch" (merge (dict "file" "nats-box/deployment/container.yaml" "ctx" $) .) | nindent 4 }}
Expand Down
4 changes: 4 additions & 0 deletions helm/charts/nats/files/stateful-set/pod-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ metadata:
checksum/config: {{ sha256sum $configMap }}
{{- end }}
spec:
{{- with .Values.global.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 4 }}
{{- end }}
containers:
# nats
{{- $nats := dict }}
Expand Down
3 changes: 3 additions & 0 deletions helm/charts/nats/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ global:
# global image pull policy to use for all container images in the chart
# can be overridden by individual image pullPolicy
pullPolicy:
# global image pull secrets to use for all pod templates in the chart
# https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
pullSecrets: []
# global registry to use for all container images in the chart
# can be overridden by individual image registry
registry:
Expand Down

0 comments on commit 2324054

Please sign in to comment.