helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

Switch to a 3-upport `global` values for imageRegistry

Open Gui13 opened this issue 3 months ago • 0 comments

Using fluent-bit as a subchart in other charts is sometimes a bit involved, especially when the repository is not the default one. You have to override the image.repository with the correct value, conflating the registry and the repository.

I propose that you switch to using the global values (which are propagated to subcharts as well) to override the default values, and split your image definition in 3:

  • registry
  • repository
  • tag

This is the standard that bitnami has been using, and nearly all other charts are switching to this to ease reuse. It helps have a common basis on values.yml.

So the change would be:

  • modify chart so that it uses 3 components instead of 2 in the image yaml:
image:
  repository: cr.fluentbit.io/fluent/fluent-bit
  tag:

### becomes ###

image:
  registry: cr.fluentbit.io
  repository: /fluent/fluent-bit
  tag:
  • add a global value with empty defaults:
global:
  imageRegistry: ""
  • create a template that uses the global values to override specific components to build the image: reference in the daemonset
  • use this template in the daemonset for the container

What do you think?

This could be applicable to the other charts as well. But will require a major version since you change the format of the image: values.

Gui13 avatar Sep 10 '25 14:09 Gui13