Skip to content

Commit

Permalink
add comment to denote substr purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanburgess committed Nov 15, 2023
1 parent f3c6066 commit 8190380
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions operations/helm/charts/grafana-agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ helm.sh/chart: {{ include "grafana-agent.chart" . }}
app.kubernetes.io/version: "vX.Y.Z"
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- else }}
{{/* substr trims delimeter prefix char from grafana-agent.imageId output
e.g. ':' for tags and '@' for digests. */}}
app.kubernetes.io/version: {{ substr 1 -1 (include "grafana-agent.imageId" .) }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
Expand Down

0 comments on commit 8190380

Please sign in to comment.