Skip to content

🌱 replace opentelemetry-operator with /apis sub-module v0.153.0#518

Open
nickytd wants to merge 1 commit into
masterfrom
fix/bump-otel-operator-apis-v0.153.0
Open

🌱 replace opentelemetry-operator with /apis sub-module v0.153.0#518
nickytd wants to merge 1 commit into
masterfrom
fix/bump-otel-operator-apis-v0.153.0

Conversation

@nickytd

@nickytd nickytd commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

How to categorize this PR?

/kind bug
/area logging
/area dev-productivity

What this PR does / why we need it:

Replaces the github.com/open-telemetry/opentelemetry-operator v0.146.0 dependency with the carved-out sub-module github.com/open-telemetry/opentelemetry-operator/apis v0.153.0.

The OpenTelemetry Operator v0.153.0 release moved the apis/ package into a dedicated Go sub-module. The new sub-module has no dependency on sigs.k8s.io/controller-runtime — only k8s.io/api, k8s.io/apimachinery, and small utility libs.

This repo only imports apis/v1beta1 (the OpenTelemetryCollector CRD type and AddToScheme), so the import paths stay identical and no source changes are required.

Which issue(s) this PR fixes:

Unblocks #491 and #501, both of which fail CI with:

# github.com/open-telemetry/opentelemetry-operator/apis/v1beta1
.../opentelemetry-operator@v0.146.0/apis/v1beta1/collector_webhook.go:451:34:
  not enough arguments in call to ctrl.NewWebhookManagedBy
      have (controllerruntime.Manager)
      want (manager.Manager, T)

The error is in the parent module's webhook code, which calls a controller-runtime API that became generic in newer versions. By switching to the apis sub-module we never compile that webhook file, so transitive controller-runtime bumps (e2e-framework → 0.7.0 in #491, controller-runtime → 0.24.1 in #501) no longer break us.

Closes #491.

Special notes for your reviewer:

  • Diff is go.mod / go.sum only — no source files touched. pkg/controller/otelcol_reconciler.go already imports .../apis/v1beta1, which resolves to the new sub-module without any code change.
  • go.sum shrinks by ~250 lines: the old parent module pulled in cert-manager, prometheus-operator, gateway-api, cel-go, openshift APIs, AWS/Azure SDKs, etc. — none of which we use.
  • The apis sub-module declares go 1.26.0; this repo is already on go 1.26.3, so the floor is satisfied.
  • After merge, please rebase 🌱 bump sigs.k8s.io/controller-runtime from 0.22.5 to 0.24.1 #501 (controller-runtime 0.24.1 bump) — it should go green.
  • make verify is clean locally (fmt, gci, go fix, full test suite).

Release note:

Replaced `github.com/open-telemetry/opentelemetry-operator` with the carved-out `github.com/open-telemetry/opentelemetry-operator/apis` sub-module (v0.153.0), unblocking controller-runtime upgrades.

…/apis

In v0.153.0 the OpenTelemetry Operator carved its API types out into a
dedicated 'apis' sub-module (github.com/open-telemetry/opentelemetry-operator/apis).
The carve-out has no dependency on sigs.k8s.io/controller-runtime, so it
unblocks transitive controller-runtime bumps (e.g. #491, #501) that were
breaking the parent module's webhook code:

    apis/v1beta1/collector_webhook.go:451:34: not enough arguments in call
    to ctrl.NewWebhookManagedBy
        have (controllerruntime.Manager)
        want (manager.Manager, T)

gardener/logging only imports apis/v1beta1 (OpenTelemetryCollector type +
AddToScheme), so the migration is transparent — same import path, slimmer
dependency closure (~250 lines pruned from go.sum).
@gardener-prow gardener-prow Bot added kind/bug Bug area/logging Logging related labels Jun 27, 2026
@gardener-prow

gardener-prow Bot commented Jun 27, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign bobi-wan for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@gardener-prow gardener-prow Bot added the area/dev-productivity Developer productivity related (how to improve development) label Jun 27, 2026
@gardener-prow gardener-prow Bot added cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 27, 2026
@nickytd nickytd requested a review from iypetrov June 27, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/dev-productivity Developer productivity related (how to improve development) area/logging Logging related cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/bug Bug size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant