Skip to content

Commit 5a80da6

Browse files
committed
fix: standardize global image registry to match other Grafana charts
Fixes #19212 This PR standardizes the global image registry configuration to match other Grafana charts by supporting the standard global.imageRegistry format while maintaining backwards compatibility. Changes: - Add support for standard global.imageRegistry in _helpers.tpl - Add global.imageRegistry to values.yaml with proper documentation - Maintain backwards compatibility with existing global.image.registry - Update precedence order: global.imageRegistry > global.image.registry > global.registry Users can now use the standard format across all Grafana charts: global: imageRegistry: my-registry.com While existing configurations continue to work: global: image: registry: my-registry.com Signed-off-by: puretension <[email protected]>
1 parent 37eddab commit 5a80da6

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

production/helm/loki/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: loki
33
description: Helm chart for Grafana Loki and Grafana Enterprise Logs supporting monolithic, simple scalable, and microservices modes.
44
type: application
55
appVersion: 3.5.3
6-
version: 6.40.0
6+
version: 6.40.1
77
home: https://grafana.github.io/helm-charts
88
sources:
99
- https://github.com/grafana/loki

production/helm/loki/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Create the name of the service account to use
160160
Base template for building docker image reference
161161
*/}}
162162
{{- define "loki.baseImage" }}
163-
{{- $registry := .global.registry | default .service.registry | default "" -}}
163+
{{- $registry := .global.imageRegistry | default .global.image.registry | default .global.registry | default .service.registry | default "" -}}
164164
{{- $repository := .service.repository | default "" -}}
165165
{{- $ref := ternary (printf ":%s" (.service.tag | default .defaultVersion | toString)) (printf "@%s" .service.digest) (empty .service.digest) -}}
166166
{{- if and $registry $repository -}}

production/helm/loki/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
kubeVersionOverride: null
66

77
global:
8+
# -- Overrides the Docker registry globally for all images (standard format)
9+
imageRegistry: null
810
image:
9-
# -- Overrides the Docker registry globally for all images
11+
# -- Overrides the Docker registry globally for all images (deprecated, use global.imageRegistry)
1012
registry: null
1113
# -- Overrides the priorityClassName for all pods
1214
priorityClassName: null

0 commit comments

Comments
 (0)