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

The event is not obtained from the apiserver cache #124724

Open
Black-max12138 opened this issue May 7, 2024 · 5 comments
Open

The event is not obtained from the apiserver cache #124724

Black-max12138 opened this issue May 7, 2024 · 5 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.

Comments

@Black-max12138
Copy link

What happened?

When /api/v1/namespaces/sop/events is requested, data is obtained from etcd instead of the apiserver cache. When there are too many events, etcd memory increases.

What did you expect to happen?

We expect that when /api/v1/namespaces/sop/events is requested, data is also fetched from the apiserver cache

How can we reproduce it (as minimally and precisely as possible)?

Request /api/v1/namespaces/sop/events. Check the etcd logs. It is found that data is directly obtained from etcd instead of apiserver cache.

Anything else we need to know?

No response

Kubernetes version

$ kubectl version
# 1.28

Cloud provider

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

@Black-max12138 Black-max12138 added the kind/bug Categorizes issue or PR as related to a bug. label May 7, 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 May 7, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@Black-max12138
Copy link
Author

/sig api-machinery

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 7, 2024
@olderTaoist
Copy link
Contributor

/api/v1/namespaces/sop/events is List request?if it is List request,due to without resourceVersion,the default behavior is directly obtained from etcd, you can use ConsistentListFromCache feature gate change fetching data from the apiserver cache

@Black-max12138
Copy link
Author

/api/v1/namespaces/sop/events is List request?if it is List request,due to without resourceVersion,the default behavior is directly obtained from etcd, you can use ConsistentListFromCache feature gate change fetching data from the apiserver cache

Yes, this is a list request, and the request carries resourceVersion, but why is it not cached?

@olderTaoist
Copy link
Contributor

/api/v1/namespaces/sop/events is List request?if it is List request,due to without resourceVersion,the default behavior is directly obtained from etcd, you can use ConsistentListFromCache feature gate change fetching data from the apiserver cache

Yes, this is a list request, and the request carries resourceVersion, but why is it not cached?

you can refer to shouldDelegateList, the reason maybe is the request with resourceVersionMatch="Exact" query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Projects
None yet
Development

No branches or pull requests

3 participants