Skip to content

[operator] Declare only autoinstrumentation image repository #3828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
davgia opened this issue Mar 20, 2025 · 2 comments
Open

[operator] Declare only autoinstrumentation image repository #3828

davgia opened this issue Mar 20, 2025 · 2 comments
Labels
area:auto-instrumentation Issues for auto-instrumentation enhancement New feature or request

Comments

@davgia
Copy link

davgia commented Mar 20, 2025

Component(s)

auto-instrumentation

Is your feature request related to a problem? Please describe.

My goal is to pull all images from a k8s cluster using a pull through cache strategy. To do that I need to change all the deployed helm charts.
Relative to this chart, I would like to define default auto-instrumentation images repository without specifying the tag. I would like the operator to take care of the tag (so it is still updated when necessary). Those are my values for the opentelemetry-operator chart (version: 0.83.0):

# NB: I am in terraform, so ${image_registry} is substituted with my private oci registry url
manager:
  image:
    repository: "${image_registry}/ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator"
  collectorImage:
    repository: "${image_registry}/docker.io/otel/opentelemetry-collector-contrib"
  autoInstrumentationImage:
    dotnet:
      repository: "${image_registry}/ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet"
      tag: "1.2.0" # it should not be required (or should be defined in the helm chart default values), the operator should take care of this
    java:
      repository: "${image_registry}/ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java"
      tag: "1.33.6" # it should not be required (or should be defined in the helm chart default values), the operator should take care of this
    python:
      repository: "${image_registry}/ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python"
      tag: "0.51b0" # it should not be required (or should be defined in the helm chart default values), the operator should take care of this

Describe the solution you'd like

EDIT: it would be even nicer to expose a single helm chart value to override the default ghcr.io registry for all instrumentations.

The chart currently renders the container cli parameter only if both repository and tag are specified. This forces me to hardcode the tag. I don't know if the tag is strictly required but it would be nice if the auto instrumentation tag was defined in the default values of the helm chart operator (and updated with each release; just like the collector image tag) or if it was not necessary at all (but managed by the operator in some way).

Describe alternatives you've considered

The alternative is to hardcode the tag, but I don't like this approach because I may forget to update it (and it may be necessary in order to function properly).

Additional context

No response

@davgia davgia added enhancement New feature or request needs triage labels Mar 20, 2025
@pavolloffay pavolloffay added the area:auto-instrumentation Issues for auto-instrumentation label Mar 20, 2025
@pavolloffay
Copy link
Member

Note that this is the operator repo and helm charts are hosted in https://github.com/open-telemetry/opentelemetry-helm-charts so please open a request there regarding the helm charts.

The operator is always released with pinned auto-instrumentation image+version and it can be overridden via env var or flag https://github.com/open-telemetry/opentelemetry-operator/blob/main/main.go#L163. The auto-instrumentation images also have the latest tag which could be used to always get the latest image https://github.com/open-telemetry/opentelemetry-operator/pkgs/container/opentelemetry-operator%2Fautoinstrumentation-java

@davgia
Copy link
Author

davgia commented Mar 20, 2025

Hi @pavolloffay,

thanks for the fast reply. I opened here because for me it may be an operator limitation, not only a helm chart limitation. The helm chart allow me to specify the following parameters for the operator container:

args:
- --auto-instrumentation-java-image=[REDACTED]/ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:1.33.6
- --auto-instrumentation-python-image=[REDACTED]/ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python:0.51b0
- --auto-instrumentation-dotnet-image=[REDACTED]/ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:1.2.0

As far as I can see the parameter requires both repository and tag. I don't think using latest is the correct solution because it uses far newer version and I don't know if they are compatible with the operator (it's a new major version for some of them).

Probably the best approach is to hardcode the tag of each instrumentation in the helm chart values.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:auto-instrumentation Issues for auto-instrumentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants