Discussing the Use and Modification of Helm Charts

TLDR Shivanshu discussed chart's hardcoded feature and raised a case about missing "otelCollector.image", which Srikanth and Steve clarified can be altered, leading to the creation of a related Github issue by Shivanshu.

Photo of Shivanshu
Shivanshu
Mon, 14 Aug 2023 13:45:11 UTC

Hey Paul, Steve, eg look at and the value is coming from , similarly And the same thing is happening for all the other components. BUT this serves the purpose, since, once the helm charts are rendered, it creates the k8s objects and the images are pulled from respective registries. (, , etc) Even if we modify the charts to default to global registry (if set) you won't be able to use `--set global.image.registry=""` until unless you have a copy of all the images in the specified global registry (`` in this case) Note: `--set global.image.registry=""` is for performing a pull operation not push

Photo of Srikanth
Srikanth
Mon, 14 Aug 2023 13:55:33 UTC

> Hey Paul, Steve, > no, the current helm charts are pretty much hardcoded. What Steve said works. The “hardcoded” values are not hardcoded but default. The registry name can always be overrided by `--set global.imageRegistry=...` .

Photo of Shivanshu
Shivanshu
Mon, 14 Aug 2023 14:00:55 UTC

Correct, but can it be used for pulling the container images? > I trying to change de registry of all containers using helm with the parameter: `--set global.image.registry=""` AFAIU, here the ask is if the registry can be changed for `all containers`, but the answer is no, the rendered deployments are not referring to `global.image.registry` in values.yaml

Photo of Shivanshu
Shivanshu
Mon, 14 Aug 2023 14:02:15 UTC

though individual images can be tweaked as mentioned in the

Photo of Srikanth
Srikanth
Mon, 14 Aug 2023 14:03:42 UTC

Photo of Shivanshu
Shivanshu
Mon, 14 Aug 2023 14:07:41 UTC

this has no effect since the global value defined here is not referenced anywhere in the charts.

Photo of Srikanth
Srikanth
Mon, 14 Aug 2023 14:08:21 UTC

Photo of Shivanshu
Shivanshu
Mon, 14 Aug 2023 14:11:58 UTC

I was referring to

Photo of Shivanshu
Shivanshu
Mon, 14 Aug 2023 14:13:48 UTC

and `_helpers.tpl` does not contain a global default for `.Values.otelCollector.image`

Photo of Shivanshu
Shivanshu
Mon, 14 Aug 2023 14:14:04 UTC

but yes, it contains for others

Photo of Shivanshu
Shivanshu
Mon, 14 Aug 2023 14:14:29 UTC

`otelCollector.image` is the missing case, right?

Photo of Srikanth
Srikanth
Mon, 14 Aug 2023 14:16:19 UTC

Yeah, probably some places were missed, would you mind creating an issue in the charts repo?

Photo of Shivanshu
Shivanshu
Mon, 14 Aug 2023 14:16:49 UTC

Sure, thanks for bearing up with me

Photo of Shivanshu
Shivanshu
Mon, 14 Aug 2023 14:20:44 UTC

filed an issue here

Photo of Srikanth
Srikanth
Mon, 14 Aug 2023 14:22:09 UTC

thanks

Photo of Steve
Steve
Mon, 14 Aug 2023 18:16:45 UTC

it seems like we are looking a different charts. The one I pulled from does have an entry in _helpers.tpl file defining the template symbol that is actually used in the otel-collector deployment.yaml

Photo of Steve
Steve
Mon, 14 Aug 2023 18:17:01 UTC

{{- define "otelCollector.image" -}} {{- $registryName := default .Values.otelCollector.image.registry .Values.global.imageRegistry -}} {{- $repositoryName := .Values.otelCollector.image.repository -}} {{- $tag := .Values.otelCollector.image.tag | toString -}} {{- if $registryName -}} {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} {{- else -}} {{- printf "%s:%s" $repositoryName $tag -}} {{- end -}} {{- end -}}