Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement per-request watch cache opt-out #123187

Open
Tracked by #2340
serathius opened this issue Feb 8, 2024 · 4 comments · May be fixed by #123472
Open
Tracked by #2340

Implement per-request watch cache opt-out #123187

serathius opened this issue Feb 8, 2024 · 4 comments · May be fixed by #123472
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@serathius
Copy link
Contributor

serathius commented Feb 8, 2024

What would you like to be added?

Part of kubernetes/enhancements#2340

From https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/2340-Consistent-reads-from-cache/README.md#what-if-the-watch-cache-is-stale

Per request override should allow user to compare request results without impacting other requests or requiring to redeploy whole cluster. The exact details of override API will be clarified during API review. In healthy situation, using this override should not cause any impact on the response, however it might increase resource usage. In our tests cpu load could increase tenfold. To prevent abuse access to it should be limited to users with cluster-admin role, rejecting the request otherwise.

This issue will require designing an API and going through API review. Definitely not a beginner issue

Up to now we have discussed using HTTP headers or adding another option for ListOptions struct. Some of my thoughts:

  • Don't want to commit to stable API, as we don't want to design a full request debugging API.
  • It changes how requests are internally handled, but not API semantics. It doesn't make sense to be part of ListOptions that is passed to both watch cache and storage.
  • On the other hand we want to avoid a obscure flag that make API surface hard to track.
  • Should be included in API request cost calculations

Why is this needed?

A way to debug watch cache

@serathius serathius added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 8, 2024
@k8s-ci-robot k8s-ci-robot added needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 8, 2024
@serathius
Copy link
Contributor Author

/sig api-machinery
/triage accepted

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 8, 2024
@serathius
Copy link
Contributor Author

serathius commented Feb 8, 2024

/cc @deads2k @liggitt
for suggestions about the API design.

@serathius
Copy link
Contributor Author

/assign

@serathius
Copy link
Contributor Author

The PR #123472 sparked a lengthy discussion about the proposed design. We need to reach consensus among all stakeholders before implementing it @deads2k @liggitt @wojtek-t

@p0lyn0mial maybe you could help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants