Skip to content

Allow to set image registry for proxy #219

@MeneerVaten

Description

@MeneerVaten

Company or project name

No response

Use case

We are currently using the clickhouse-operator with ClickhouseCluster and KeeperCluster.

The image can now only be set with the image.repository variable and you need to set the whole url with registry like

ghcr.io/clickhouse/clickhouse-operator
docker.io/clickhouse/clickhouse-server
docker.io/clickhouse/clickhouse-keeper

If we put this into our own helm chart then we have to override these 3 variables to pull the image through our custom imageRegistry used as a proxy.

    image:
      repository: customregistry/ghcr.io/clickhouse/clickhouse-operator

Our goal is that our company is using our helm chart that has multiple helm chart bundles through the dependencies. We would like to set an variable global.imageRegistry so that every team can use their our registry as proxy.

But because in the template yaml cannot concat variables, we have to declare it three times

Currently we should set this:

clickhouse-operator:
  manager:
    image:
      repository: customregistry/ghcr.io/clickhouse/clickhouse-operator

clickhouse:
  image:
    repository: customregistry/docker.io/clickhouse/clickhouse-server
  keeper:
    image:
      repository: customregistry/docker.io/clickhouse/clickhouse-keeper

What we want:

global:
  imageRegistry: &imageRegistry ""

clickhouse-operator:
  manager:
    image:
      registry: *imageRegistry
      repository: ghcr.io/clickhouse/clickhouse-operator

clickhouse:
  image:
    registry: *imageRegistry
    repository: docker.io/clickhouse/clickhouse-server
  keeper:
    image:
      registry: *imageRegistry
      repository: customregistry/docker.io/clickhouse/clickhouse-keeper

So that in our override we only have to set the global imageRegistry variable.

Describe the solution you'd like

To seperate the image registry from the repository in the image section

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions