Skip to content

kube: register metrics api resources#60683

Merged
tigrato merged 2 commits intomasterfrom
tigrato/register-metrics-schema
Nov 3, 2025
Merged

kube: register metrics api resources#60683
tigrato merged 2 commits intomasterfrom
tigrato/register-metrics-schema

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Oct 28, 2025

kubectl is moving towards using protobuf behind the scenes for kubectl top, this means our fallback unstrucutred.Unstructured object couldn't unmarshal the protobuf and failed.

This PR properly registers the metrics apis making them available for unmarshaling.

Changelog: Fixed Kubernetes metrics API unmarshaling errors causing kubectl top commands to fail in certain scenarios.

kubectl is moving towards using protobuf behind the scenes for kubectl
top, this means our fallback unstrucutred.Unstructured object couldn't unmarshal
the protobuf and failed.

This PR properly registers the metrics apis making them available for
unmarshaling.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@tigrato tigrato force-pushed the tigrato/register-metrics-schema branch from f94d6a7 to 6848cea Compare October 28, 2025 18:31
Copy link
Copy Markdown
Contributor

@rosstimothy rosstimothy left a comment

Choose a reason for hiding this comment

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

Can we add test coverage?

@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from ravicious November 3, 2025 20:59
@tigrato tigrato added this pull request to the merge queue Nov 3, 2025
Merged via the queue into master with commit f8e359c Nov 3, 2025
44 checks passed
@tigrato tigrato deleted the tigrato/register-metrics-schema branch November 3, 2025 21:24
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@tigrato See the table below for backport results.

Branch Result
branch/v16 Failed
branch/v17 Failed
branch/v18 Failed

@tigrato tigrato mentioned this pull request Nov 3, 2025
tigrato added a commit that referenced this pull request Nov 3, 2025
* kube: register metrics api resources

kubectl is moving towards using protobuf behind the scenes for kubectl
top, this means our fallback unstrucutred.Unstructured object couldn't unmarshal
the protobuf and failed.

This PR properly registers the metrics apis making them available for
unmarshaling.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* add unit tests

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
github-merge-queue bot pushed a commit that referenced this pull request Nov 4, 2025
* kube: register metrics api resources

kubectl is moving towards using protobuf behind the scenes for kubectl
top, this means our fallback unstrucutred.Unstructured object couldn't unmarshal
the protobuf and failed.

This PR properly registers the metrics apis making them available for
unmarshaling.



* add unit tests

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
mmcallister pushed a commit that referenced this pull request Nov 19, 2025
* kube: register metrics api resources

kubectl is moving towards using protobuf behind the scenes for kubectl
top, this means our fallback unstrucutred.Unstructured object couldn't unmarshal
the protobuf and failed.

This PR properly registers the metrics apis making them available for
unmarshaling.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* add unit tests

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
mmcallister pushed a commit that referenced this pull request Nov 20, 2025
* kube: register metrics api resources

kubectl is moving towards using protobuf behind the scenes for kubectl
top, this means our fallback unstrucutred.Unstructured object couldn't unmarshal
the protobuf and failed.

This PR properly registers the metrics apis making them available for
unmarshaling.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* add unit tests

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants