#support

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.

Powered by Struct AI
+11
slightly_smiling_face1
17
1mo
Solved
Join the chat
Aug 14, 2023 (1 month ago)
Shivanshu
Photo of md5-47d1c83586e6ed5a2e5d87cc3e6039a9
Shivanshu
01:45 PM
Hey Paul, Steve,

eg look at https://github.com/SigNoz/charts/blob/main/charts/signoz/templates/otel-collector/deployment.yaml#L76 and the value is coming from https://github.com/SigNoz/charts/blob/main/charts/signoz/values.yaml#L1091-L1095, similarly https://github.com/SigNoz/charts/blob/main/charts/clickhouse/values.yaml#L160
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. (docker.io/signoz/signoz-otel-collector, docker.io/clickhouse/clickhouse-server, 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="<http://myregistry.com|myregistry.com>" until unless you have a copy of all the images in the specified global registry (<http://myregistry.com|myregistry.com> in this case)

Note: --set global.image.registry="<http://myregistry.com|myregistry.com>" is for performing a pull operation not push
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
01:55 PM
> 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=... .
Shivanshu
Photo of md5-47d1c83586e6ed5a2e5d87cc3e6039a9
Shivanshu
02:00 PM
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="<http://myregistry.com|myregistry.com>"
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
02:02
Shivanshu
02:02 PM
though individual images can be tweaked as mentioned in the Readme
Shivanshu
Photo of md5-47d1c83586e6ed5a2e5d87cc3e6039a9
Shivanshu
02:07 PM
this has no effect since the global value defined here is not referenced anywhere in the charts.
02:13
Shivanshu
02:13 PM
and _helpers.tpl does not contain a global default for .Values.otelCollector.image
02:14
Shivanshu
02:14 PM
but yes, it contains for others
02:14
Shivanshu
02:14 PM
otelCollector.image is the missing case, right?
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:16 PM
Yeah, probably some places were missed, would you mind creating an issue in the charts repo?
Shivanshu
Photo of md5-47d1c83586e6ed5a2e5d87cc3e6039a9
Shivanshu
02:16 PM
Sure, thanks for bearing up with me
+11
02:20
Shivanshu
02:20 PM
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:22 PM
thanks
slightly_smiling_face1
Steve
Photo of md5-b2010575b99d9a0f909da889d018b583
Steve
06:16 PM
it seems like we are looking a different charts. The one I pulled from charts.signoz.io does have an entry in _helpers.tpl file defining the template symbol that is actually used in the otel-collector deployment.yaml
06:17
Steve
06:17 PM
{{- 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 -}}