Skip to content

Adjust FP metrics endpoint - #4258

Merged
kcp-ci-bot merged 1 commit into
kcp-dev:mainfrom
mjudeikis:fp.metrics
Aug 5, 2026
Merged

Adjust FP metrics endpoint#4258
kcp-ci-bot merged 1 commit into
kcp-dev:mainfrom
mjudeikis:fp.metrics

Conversation

@mjudeikis

Copy link
Copy Markdown
Contributor

Summary

Adjust how we serve /metrics in the front-proxy

What Type of PR Is This?

/kind cleanup

Related Issue(s)

Fixes #

Release Notes

NONE

@kcp-ci-bot kcp-ci-bot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 9, 2026
@mjudeikis

Copy link
Copy Markdown
Contributor Author

/retest

@kcp-ci-bot kcp-ci-bot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 9, 2026
@kcp-ci-bot kcp-ci-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 9, 2026
@mjudeikis

Copy link
Copy Markdown
Contributor Author

/retest

@SimonTheLeg SimonTheLeg self-assigned this Jul 20, 2026
@SimonTheLeg

Copy link
Copy Markdown
Member

hmm been brooding over this for a little while now. I am not the biggest fan of routing all of these requests to the rootshard. Especially if we think about a distributed system where these requests could have a bigger network penalty.

Even though it is not perfect, I think I would prefer allowing for a local group passthrough, which includes the fixed builtin group and maybe allows for passing in additional groups via flags during startup. Yes that would make it a little inconsistent across, but since metrics scraping is more of a one time setup, I think it is ok and better than to have the long running disadvantage of increasing load on root shard.

@mjudeikis

mjudeikis commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

hmm been brooding over this for a little while now. I am not the biggest fan of routing all of these requests to the rootshard. Especially if we think about a distributed system where these requests could have a bigger network penalty.

Even though it is not perfect, I think I would prefer allowing for a local group passthrough, which includes the fixed builtin group and maybe allows for passing in additional groups via flags during startup. Yes that would make it a little inconsistent across, but since metrics scraping is more of a one time setup, I think it is ok and better than to have the long running disadvantage of increasing load on root shard.

Thanks for chewing on this one :). I get your worry about sending everything to root shard, especially the network cost when system is distributed.

But honestly, I don't see other way here. The metrics RBAC lives on root shard, so we must route there for delegated authorization. And this is not metrics passthrough — is delegated authorization, so this RBAC must live somewhere anyway, even if later we wire in the groups. We already do exactly same thing for shards, is the same machinery (every other shard than non root will route to root shard). So either we refactor everything, or we stick with what we have — and I don't want to make front-proxy the odd duck.

Also, about the load — I would not worry too much. The delegated authorizer uses cache (default 5 min), so not every request hits the delegate. This should keep us safe from hammering root shard. And worst case, only /metrics endpoint is not working, nothing more.

The local group passthrough is nice idea, but for me the inconsistency it brings is not worth it here. If cache does not hold in practice, then sure, we can look again. Small iterrative changes, not skewed system engineering for problems we dont know we gonna have yet.

TL:DR: Its ok,. let it break (if it gonna break...) and fix later :D

@xrstf

xrstf commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

/approve
/lgtm

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 4, 2026
@kcp-ci-bot

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 5a88dc25b6fa0f698306bdcc6b7c874968db78c3

@kcp-ci-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xrstf

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

The pull request process is described 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

@kcp-ci-bot kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 4, 2026
@mjudeikis

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@mjudeikis

Copy link
Copy Markdown
Contributor Author

/retest

@kcp-ci-bot
kcp-ci-bot merged commit 46d2a1c into kcp-dev:main Aug 5, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. 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.

4 participants