Skip to content

Commit

Permalink
Merge pull request #2735 from pvallone/users/pvallone/grafana-global-…
Browse files Browse the repository at this point in the history
…image-registry-rename

[grafana] Rename global.image.registry to global.imageRegistry
  • Loading branch information
zanhsieh authored Oct 29, 2023
2 parents 27692df + 50a4e4a commit 48c5b03
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion charts/grafana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: grafana
version: 6.61.2
version: 7.0.0
appVersion: 10.1.5
kubeVersion: "^1.8.0-0"
description: The leading tool for querying and visualizing time series and metrics.
Expand Down
9 changes: 8 additions & 1 deletion charts/grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ You have to add --force to your helm upgrade command as the labels of the chart

This version requires Helm >= 3.1.0.

### To 7.0.0

For consistency with other Helm charts, the `global.image.registry` parameter was renamed
to `global.imageRegistry`. If you were not previously setting `global.image.registry`, no action
is required on upgrade. If you were previously setting `global.image.registry`, you will
need to instead set `global.imageRegistry`.

## Configuration

| Parameter | Description | Default |
Expand Down Expand Up @@ -140,7 +147,7 @@ This version requires Helm >= 3.1.0.
| `dashboards` | Dashboards to import | `{}` |
| `dashboardsConfigMaps` | ConfigMaps reference that contains dashboards | `{}` |
| `grafana.ini` | Grafana's primary configuration | `{}` |
| `global.image.registry` | Global image pull registry for all images. | `null` |
| `global.imageRegistry` | Global image pull registry for all images. | `null` |
| `global.imagePullSecrets` | Global image pull secrets (can be templated). Allows either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style). | `[]` |
| `ldap.enabled` | Enable LDAP authentication | `false` |
| `ldap.existingSecret` | The name of an existing secret containing the `ldap.toml` file, this must have the key `ldap-toml`. | `""` |
Expand Down
20 changes: 10 additions & 10 deletions charts/grafana/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ initContainers:
{{- end }}
{{- if ( and .Values.persistence.enabled .Values.initChownData.enabled ) }}
- name: init-chown-data
{{- $registry := .Values.global.image.registry | default .Values.initChownData.image.registry -}}
{{- $registry := .Values.global.imageRegistry | default .Values.initChownData.image.registry -}}
{{- if .Values.initChownData.image.sha }}
image: "{{ $registry }}/{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}@sha256:{{ .Values.initChownData.image.sha }}"
{{- else }}
Expand Down Expand Up @@ -51,7 +51,7 @@ initContainers:
{{- end }}
{{- if .Values.dashboards }}
- name: download-dashboards
{{- $registry := .Values.global.image.registry | default .Values.downloadDashboardsImage.registry -}}
{{- $registry := .Values.global.imageRegistry | default .Values.downloadDashboardsImage.registry -}}
{{- if .Values.downloadDashboardsImage.sha }}
image: "{{ $registry }}/{{ .Values.downloadDashboardsImage.repository }}:{{ .Values.downloadDashboardsImage.tag }}@sha256:{{ .Values.downloadDashboardsImage.sha }}"
{{- else }}
Expand Down Expand Up @@ -100,7 +100,7 @@ initContainers:
{{- end }}
{{- if and .Values.sidecar.datasources.enabled .Values.sidecar.datasources.initDatasources }}
- name: {{ include "grafana.name" . }}-init-sc-datasources
{{- $registry := .Values.global.image.registry | default .Values.sidecar.image.registry -}}
{{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
{{- if .Values.sidecar.image.sha }}
image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
{{- else }}
Expand Down Expand Up @@ -158,7 +158,7 @@ initContainers:
{{- end }}
{{- if and .Values.sidecar.notifiers.enabled .Values.sidecar.notifiers.initNotifiers }}
- name: {{ include "grafana.name" . }}-init-sc-notifiers
{{- $registry := .Values.global.image.registry | default .Values.sidecar.image.registry -}}
{{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
{{- if .Values.sidecar.image.sha }}
image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
{{- else }}
Expand Down Expand Up @@ -235,7 +235,7 @@ enableServiceLinks: {{ .Values.enableServiceLinks }}
containers:
{{- if .Values.sidecar.alerts.enabled }}
- name: {{ include "grafana.name" . }}-sc-alerts
{{- $registry := .Values.global.image.registry | default .Values.sidecar.image.registry -}}
{{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
{{- if .Values.sidecar.image.sha }}
image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
{{- else }}
Expand Down Expand Up @@ -342,7 +342,7 @@ containers:
{{- end}}
{{- if .Values.sidecar.dashboards.enabled }}
- name: {{ include "grafana.name" . }}-sc-dashboard
{{- $registry := .Values.global.image.registry | default .Values.sidecar.image.registry -}}
{{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
{{- if .Values.sidecar.image.sha }}
image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
{{- else }}
Expand Down Expand Up @@ -453,7 +453,7 @@ containers:
{{- end}}
{{- if .Values.sidecar.datasources.enabled }}
- name: {{ include "grafana.name" . }}-sc-datasources
{{- $registry := .Values.global.image.registry | default .Values.sidecar.image.registry -}}
{{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
{{- if .Values.sidecar.image.sha }}
image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
{{- else }}
Expand Down Expand Up @@ -557,7 +557,7 @@ containers:
{{- end}}
{{- if .Values.sidecar.notifiers.enabled }}
- name: {{ include "grafana.name" . }}-sc-notifiers
{{- $registry := .Values.global.image.registry | default .Values.sidecar.image.registry -}}
{{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
{{- if .Values.sidecar.image.sha }}
image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
{{- else }}
Expand Down Expand Up @@ -661,7 +661,7 @@ containers:
{{- end}}
{{- if .Values.sidecar.plugins.enabled }}
- name: {{ include "grafana.name" . }}-sc-plugins
{{- $registry := .Values.global.image.registry | default .Values.sidecar.image.registry -}}
{{- $registry := .Values.global.imageRegistry | default .Values.sidecar.image.registry -}}
{{- if .Values.sidecar.image.sha }}
image: "{{ $registry }}/{{ .Values.sidecar.image.repository }}:{{ .Values.sidecar.image.tag }}@sha256:{{ .Values.sidecar.image.sha }}"
{{- else }}
Expand Down Expand Up @@ -764,7 +764,7 @@ containers:
mountPath: "/etc/grafana/provisioning/plugins"
{{- end}}
- name: {{ .Chart.Name }}
{{- $registry := .Values.global.image.registry | default .Values.image.registry -}}
{{- $registry := .Values.global.imageRegistry | default .Values.image.registry -}}
{{- if .Values.image.sha }}
image: "{{ $registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}@sha256:{{ .Values.image.sha }}"
{{- else }}
Expand Down
2 changes: 1 addition & 1 deletion charts/grafana/templates/image-renderer-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}-image-renderer
{{- $registry := .Values.global.image.registry | default .Values.imageRenderer.image.registry -}}
{{- $registry := .Values.global.imageRegistry | default .Values.imageRenderer.image.registry -}}
{{- if .Values.imageRenderer.image.sha }}
image: "{{ $registry }}/{{ .Values.imageRenderer.image.repository }}:{{ .Values.imageRenderer.image.tag }}@sha256:{{ .Values.imageRenderer.image.sha }}"
{{- else }}
Expand Down
2 changes: 1 addition & 1 deletion charts/grafana/templates/tests/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
{{- end }}
containers:
- name: {{ .Release.Name }}-test
image: "{{ .Values.global.image.registry | default .Values.testFramework.image.registry }}/{{ .Values.testFramework.image.repository }}:{{ .Values.testFramework.image.tag }}"
image: "{{ .Values.global.imageRegistry | default .Values.testFramework.image.registry }}/{{ .Values.testFramework.image.repository }}:{{ .Values.testFramework.image.tag }}"
imagePullPolicy: "{{ .Values.testFramework.imagePullPolicy}}"
command: ["/opt/bats/bin/bats", "-t", "/tests/run.sh"]
volumeMounts:
Expand Down
5 changes: 2 additions & 3 deletions charts/grafana/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
global:
image:
# -- Overrides the Docker registry globally for all images
registry: null
# -- Overrides the Docker registry globally for all images
imageRegistry: null

# To help compatibility with other charts which use global.imagePullSecrets.
# Allow either an array of {name: pullSecret} maps (k8s-style), or an array of strings (more common helm-style).
Expand Down

0 comments on commit 48c5b03

Please sign in to comment.