Skip to content

Bump dependencies: k8s.io v0.35, prometheus v0.311.3, otel v1.42, Go 1.26.3#383

Merged
mitali-salvi merged 9 commits into
mainfrom
bump-dependencies
Jun 5, 2026
Merged

Bump dependencies: k8s.io v0.35, prometheus v0.311.3, otel v1.42, Go 1.26.3#383
mitali-salvi merged 9 commits into
mainfrom
bump-dependencies

Conversation

@mitali-salvi

@mitali-salvi mitali-salvi commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Bumps major dependencies to latest compatible versions:

Dependency From To
k8s.io/* v0.33.1 v0.35.4
sigs.k8s.io/controller-runtime v0.21.0 v0.23.3
github.com/prometheus/prometheus v0.48.1 v0.311.3
go.opentelemetry.io/otel v1.39.0 v1.42.0
golang.org/x/crypto v0.46.0 v0.52.0
golang.org/x/net v0.48.0 v0.55.0
github.com/docker/docker v25.0.13 v28.5.2
Go runtime 1.25.9 1.26.3

Code Changes

  • target-allocator: Adapted to prometheus-operator v0.91 API changes (StoreBuilder, slog logger, simplified GenerateServerConfiguration)
  • featuregate: Updated gate IDs to comply with new alphanumeric-only validation, migrated to RegisterFlags API
  • webhooks: Migrated to controller-runtime v0.23 typed webhook API (Validator[T], Defaulter[T])
  • podmonitor: Port field changed from string to *string
  • prehook/relabel: Migrated to labels.NewBuilder and relabel.ProcessBuilder

Testing

  • go build ./... passes
  • 20 test packages pass
  • Remaining test failures are pre-existing (missing kubebuilder envtest binaries, port conflicts, integration test needing k8s cluster)

@mitali-salvi mitali-salvi changed the title Bump dependencies Bump dependencies: k8s.io v0.35, prometheus v0.311.3, otel v1.42, Go 1.26.3 Jun 4, 2026
}

func (c CollectorWebhook) Default(ctx context.Context, obj runtime.Object) error {
otelcol, ok := obj.(*AmazonCloudWatchAgent)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In controller-runtime v0.23, the webhook interfaces changed from untyped to generic:

  - Old: admission.CustomValidator — methods receive runtime.Object, you manually cast and check
  - New: admission.Validator[*AmazonCloudWatchAgent] — methods receive *AmazonCloudWatchAgent directly

The type safety that was enforced at runtime with if !ok { return fmt.Errorf(...) } is now enforced at compile time by the generic type parameter.

JayPolanco
JayPolanco previously approved these changes Jun 4, 2026
movence
movence previously approved these changes Jun 4, 2026
@mitali-salvi mitali-salvi merged commit 88348f8 into main Jun 5, 2026
10 checks passed
@mitali-salvi mitali-salvi deleted the bump-dependencies branch June 5, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants