chore: vendor opentelemetry types and events recording to bump kcm to 1.8.0#846
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the operator’s Go dependencies to support bumping KCM to v1.8.0, removes the direct dependency on the upstream OpenTelemetry Operator module by vendoring the required API types, and adjusts event recording and imports accordingly.
Changes:
- Bump dependencies including
github.com/K0rdent/kcmtov1.8.0andsigs.k8s.io/controller-runtimetov0.23.1. - Vendor OpenTelemetry Operator
v1beta1API types intointernal/otelv1beta1and switch code/tests to use the internal package. - Migrate controller event recording from
k8s.io/client-go/tools/recordtok8s.io/client-go/tools/events(and adjust test fakes / manager wiring).
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| kof-operator/internal/server/tests/suite_test.go | Switch server test scheme registration/imports to internal vendored OTel v1beta1 types. |
| kof-operator/internal/server/tests/collector_metrics_handler_test.go | Update test imports to use internal vendored OTel types. |
| kof-operator/internal/server/handlers/collector_metrics_handler.go | Update handler import to internal vendored OTel types. |
| kof-operator/internal/otelv1beta1/types.go | Add vendored OpenTelemetryCollector v1beta1 API type definitions. |
| kof-operator/internal/otelv1beta1/groupversion_info.go | Add vendored group/version registration helpers (with kubebuilder skip markers). |
| kof-operator/internal/otelv1beta1/deepcopy.go | Add vendored deepcopy implementations for the v1beta1 types. |
| kof-operator/internal/k8s/otel.go | Switch OTel API import to internal vendored package. |
| kof-operator/internal/k8s/client.go | Register internal vendored OTel types into the client scheme. |
| kof-operator/internal/controller/suite_test.go | Update controller test setup to use tools/events fake recorder. |
| kof-operator/internal/controller/record/recorder.go | Change recorder abstraction to tools/events EventRecorder and update helper methods. |
| kof-operator/go.mod | Dependency bumps/removals (drop upstream opentelemetry-operator module; bump controller-runtime, flux APIs, etc.). |
| kof-operator/go.sum | Reflect dependency graph changes from the module updates. |
| kof-operator/cmd/main.go | Adjust goroutine/event-recorder wiring to match updated APIs. |
AndrejsPon00
approved these changes
Mar 10, 2026
denis-ryzhkov
approved these changes
Mar 10, 2026
6576ab7 to
ad013e1
Compare
gmlexx
added a commit
that referenced
this pull request
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.