Skip to content

Commit

Permalink
add image value in _helpers template
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaiKuziaevQubership committed Feb 5, 2025
1 parent 7a6c65f commit d5e761d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions charts/network-latency-exporter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,17 @@ Create the name of the service account to use
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

{{/*
Find a network-latency-exporter image in various places.
Image can be found from:
* specified by user from .Values.image
* default value
*/}}
{{- define "network-latency-exporter.image" -}}
{{- if .Values.image -}}
{{- printf "%s" .Values.image -}}
{{- else -}}
{{- printf "ghcr.io/netcracker/qubership-network-latency-exporter:main" -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/network-latency-exporter/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
shareProcessNamespace: true
containers:
- name: {{ include "network-latency-exporter.name" . }}
image: {{ .Values.image }}
image: {{ template "network-latency-exporter.image" . }}
args:
{{- if .Values.extraArgs }}
{{ toYaml .Values.extraArgs | nindent 12 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/network-latency-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ serviceAccount:
# Type: string
# Mandatory: yes
#
image: ghcr.io/netcracker/qubership-network-latency-exporter:main
#image: ghcr.io/netcracker/qubership-network-latency-exporter:main

# Only pods which provide own keys can access the private registry.
# Default: []
Expand Down

0 comments on commit d5e761d

Please sign in to comment.