Skip to content

[opentelemetry-operator] Seperate the registry from the repository #2245

Description

@MeneerVaten

We are currently using the opentelemetry-operator with OpenTelemetryCollector and Instrumentation.

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/open-telemetry/opentelemetry-operator/opentelemetry-operator
ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s
ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java

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/open-telemetry/opentelemetry-operator/opentelemetry-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:

opentelemetry-operator:
  manager:
    image:
      repository: customregistry/ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
    collectorImage:
      repository: customregistry/ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s
    autoInstrumentationImage:
      java:
        repository: customregistry/ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java

What we want:

global:
  imageRegistry: &imageRegistry ""

opentelemetry-operator:
  manager:
    image:
      registry: *imageRegistry
      repository: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
    collectorImage:
      registry: *imageRegistry
      repository: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-k8s
    autoInstrumentationImage:
      java:
        registry: *imageRegistry
        repository: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    chart:operatorIssue related to opentelemetry-operator helm chartenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions