UNCLASSIFIED - NO CUI

Skip to content

Update Alloy renovate.json to fix image tags

Bug

Summary

Update Alloy renovate.json to fix image tags

Description

default the tag is not set in the top level values yaml and the default tag set is controlled by the alloy subchart helper template locate here:

./chart/charts/k8s-monitoring/charts/alloy/templates/_helpers.tpl

This helper template has a custom defined function for setting the alloy image conditionally

{{/*
Calculate name of image ID to use for "alloy.
*/}}
{{- define "alloy.imageId" -}}
{{- if .Values.image.digest }}
{{- $digest := .Values.image.digest }}
{{- if not (hasPrefix "sha256:" $digest) }}
{{- $digest = printf "sha256:%s" $digest }}
{{- end }}
{{- printf "@%s" $digest }}
{{- else if .Values.image.tag }}
{{- printf ":%s" .Values.image.tag }}
{{- else }}
{{- printf ":%s" .Chart.AppVersion }}
{{- end }}
{{- end }}

if the tag is provided via the top level values.yaml it will use that.. If not, it will default to using the appVersion values of the nested alloy subchart... which what was occurring with your particular situation (see screenshot).

alloy itself is a nested subchart to the parent sub chart k8s-monitoring which is tar balled.

image

will have to add regex or use helm-values enabledManager to have renovate update this new tag in ./chart/values.yaml

the config reloaded is controlled in a similar fashion with a custom function in the alloy subchart helpers template:

except this one is hardcoded to v0.8.0 if tag is not present in top level values.yaml

{{/*
Calculate name of image ID to use for "config-reloader".
*/}}
{{- define "config-reloader.imageId" -}}
{{- if .Values.configReloader.image.digest }}
{{- $digest := .Values.configReloader.image.digest }}
{{- if not (hasPrefix "sha256:" $digest) }}
{{- $digest = printf "sha256:%s" $digest }}
{{- end }}
{{- printf "@%s" $digest }}
{{- else if .Values.configReloader.image.tag }}
{{- printf ":%s" .Values.configReloader.image.tag }}
{{- else }}
{{- printf ":%s" "v0.8.0" }}
{{- end }}
{{- end }}

need to add a tag for this one as well in ./chart/values.yaml and new renovate regex for this too

Edited by Steven Donald