Skip to content

Comments

chore(deps): bump knative.dev/pkg for OTEL metrics support#1935

Open
nissessenap wants to merge 2 commits intosigstore:mainfrom
nissessenap:bump-knative-pkg
Open

chore(deps): bump knative.dev/pkg for OTEL metrics support#1935
nissessenap wants to merge 2 commits intosigstore:mainfrom
nissessenap:bump-knative-pkg

Conversation

@nissessenap
Copy link

@nissessenap nissessenap commented Feb 16, 2026

Summary

  • Bump knative.dev/pkg from v0.0.0-20230612155445 (June 2023) to v0.0.0-20260213150858 (Feb 2026) to enable OpenTelemetry metrics support
  • Remove stale replace directives for k8s.io/code-generator and k8s.io/kube-openapi that were pinning old versions incompatible with the new transitive deps
  • Update e2e test k8s matrix from v1.31-v1.34 to v1.32-v1.35, dropping EOL v1.31
  • Update config-observability ConfigMap for the new knative/pkg metrics API

Notable transitive upgrades

Dependency Old New
k8s.io/{api,apimachinery,client-go} v0.32.3 v0.35.0
go.opentelemetry.io/otel v1.35.0 v1.39.0
knative.dev/hack 20240111 20260212
google.golang.org/grpc v1.71.1 v1.77.0
prometheus/client_golang v1.21.1 v1.23.2

Key changes in new knative/pkg

  • Migrated from OpenCensus to OpenTelemetry for metrics
  • New OTEL exporters now available (prometheus, OTLP gRPC/HTTP)
  • Drops go.opencensus.io and contrib.go.opencensus.io dependencies

config-observability ConfigMap update

The new knative/pkg replaced the old config keys with new ones:

Old key (removed) New key
metrics.backend-destination metrics-protocol
metrics.request-metrics-backend-destination (removed)
metrics.stackdriver-project-id (removed — Stackdriver no longer supported)

Breaking change: The default changed from prometheus to none (disabled). The ConfigMap now explicitly sets metrics-protocol: prometheus to keep the pull-based /metrics endpoint on :9090 working.

Supported metrics-protocol values: prometheus, grpc, http/protobuf, none.

Test plan

  • go build ./... passes
  • go test ./... passes (one pre-existing flaky test in pkg/policy that hits live Fulcio/Rekor)

🤖 Generated with Claude Code

Bump knative.dev/pkg from v0.0.0-20230612155445 to
v0.0.0-20260213150858 to enable OTEL metrics support.

This also upgrades transitive dependencies:
- k8s.io/{api,apimachinery,client-go}: v0.32.3 -> v0.35.0
- go.opentelemetry.io/otel: v1.35.0 -> v1.39.0
- knative.dev/hack: to latest
- Various other deps (prometheus, grpc, protobuf, etc.)

Removed stale replace directives for k8s.io/code-generator and
k8s.io/kube-openapi that were pinning old versions incompatible
with the new k8s.io v0.35.0 dependencies.

Update e2e test k8s matrix from v1.31-v1.34 to v1.32-v1.35 to
align with the k8s dependency bump and drop EOL v1.31.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Edvin Norling <edvin.norling@kognic.com>
matrix:
k8s-version:
- v1.31.x
- v1.32.x
Copy link
Author

Choose a reason for hiding this comment

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

You could argue we should drop 1.32 as well, since the k8s communinty only support 3 versions and not 4 now a days.
But since it's currently 4 I decide against it.
The main reason todo this in the same PR was that it felt natrual since we are starting to use k8s client 1.35, shouldn't be an issue but still.
Happy to revert the changes done in e2e.

# this example block and unindented to be in the data block
# to actually change the configuration.

# metrics.backend-destination field specifies the system metrics destination.
Copy link
Author

Choose a reason for hiding this comment

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

We could argue this is a breaking change.
We could probably solve this in the helm chart or in the code for that matter to make sure the users don't see any difference. At the same time, this project is in 0.x, so I would personally argue it's a breaking change which should be documented and the users should change the config.

But easy for me to say ;)

The new knative.dev/pkg dropped the old metrics.backend-destination
and Stackdriver keys in favor of metrics-protocol (prometheus, grpc,
http/protobuf, none). Default changed from prometheus to none, so
explicitly set metrics-protocol: prometheus to keep the /metrics
endpoint alive on :9090.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Edvin Norling <edvin.norling@kognic.com>
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.

1 participant