Skip to content

Commit c39e4ef

Browse files
[prometheus-yet-another-cloudwatch-exporter] Allow to override image registry (#5466)
Signed-off-by: Slawomir Skowron <[email protected]> Co-authored-by: Cristian Greco <[email protected]>
1 parent aa91dc9 commit c39e4ef

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

Diff for: charts/prometheus-yet-another-cloudwatch-exporter/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: prometheus-yet-another-cloudwatch-exporter
33
description: Yace - Yet Another CloudWatch Exporter
44
type: application
5-
version: 0.39.5
5+
version: 0.40.0
66
appVersion: "v0.62.1"
77
home: https://github.com/prometheus-community/helm-charts
88
sources:

Diff for: charts/prometheus-yet-another-cloudwatch-exporter/templates/_helpers.tpl

+12
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,15 @@ Create the name of the service account to use
5959
{{- default "default" .Values.serviceAccount.name }}
6060
{{- end }}
6161
{{- end }}
62+
63+
{{/*
64+
Return the correct image registry.
65+
*/}}
66+
{{- define "yet-another-cloudwatch-exporter.image.repository" -}}
67+
{{- $registry := .Values.image.registry -}}
68+
{{- if $registry -}}
69+
{{- printf "%s/%s" $registry .Values.image.repository -}}
70+
{{- else -}}
71+
{{- printf "%s" .Values.image.repository -}}
72+
{{- end }}
73+
{{- end -}}

Diff for: charts/prometheus-yet-another-cloudwatch-exporter/templates/deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ spec:
4242
- name: {{ .Chart.Name }}
4343
securityContext:
4444
{{- toYaml .Values.securityContext | nindent 12 }}
45-
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
45+
image: "{{- include "yet-another-cloudwatch-exporter.image.repository" . }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
4646
imagePullPolicy: {{ .Values.image.pullPolicy }}
4747
command:
4848
- "yace"

0 commit comments

Comments
 (0)