Skip to content

Commit

Permalink
feat: enable nats chart to use .global.imageRegistry also
Browse files Browse the repository at this point in the history
  • Loading branch information
ed382 committed Oct 24, 2024
1 parent aa08050 commit 5ea2374
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions charts/testkube/templates/_helpers_nats.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{/*
Override the nats.image template to use .global.imageRegistry instead of their
.global.image.registry.
TODO(emil): do the same for global.imagePullSecrets
*/}}
{{- define "nats.image" }}
{{- $image := printf "%s:%s" .repository .tag }}
{{- if or .registry .global.imageRegistry }}
{{- $image = printf "%s/%s" (.registry | default .global.imageRegistry) $image }}
{{- end -}}
image: {{ $image }}
{{- if or .pullPolicy .global.image.pullPolicy }}
imagePullPolicy: {{ .pullPolicy | default .global.image.pullPolicy }}
{{- end }}
{{- end }}

0 comments on commit 5ea2374

Please sign in to comment.