Skip to content

Conversation

@dreamerlzl
Copy link
Contributor

@dreamerlzl dreamerlzl commented Jul 6, 2025

Current listing of pods can go to etcd directly without hitting cache in apiserver. Adding an optional flag to reduce the load on etcd side by setting resourceVersion=0.

@dreamerlzl dreamerlzl force-pushed the config-k8s-resourceVersion branch from 30cce25 to dbb4a12 Compare July 8, 2025 07:37
@dreamerlzl dreamerlzl changed the title feat: add flag for resourceVersion add flag for reading pods from kube-apiserver cache Jul 8, 2025
@brancz
Copy link
Member

brancz commented Jul 8, 2025

Is there a good reason not to make this default?

Another thing I've recently been thinking about, we already have a trigger where we list pods when we don't have metadata. What if we used the kubelet's local pods endpoint instead of hitting the apiserver at all?

@dreamerlzl
Copy link
Contributor Author

dreamerlzl commented Jul 8, 2025

Is there a good reason not to make this default?

Another thing I've recently been thinking about, we already have a trigger where we list pods when we don't have metadata. What if we used the kubelet's local pods endpoint instead of hitting the apiserver at all?

I believe that's even better by using kubelet's local pods. Shall we do this in a another pr?

@brancz
Copy link
Member

brancz commented Jul 8, 2025

Sounds good to me!

@dreamerlzl
Copy link
Contributor Author

Just realize that to query kubelet API proper configuration for authentication & authorization are required. I will craft a draft first and let's see.

@dreamerlzl
Copy link
Contributor Author

Btw, can we merge this pr first?

@dreamerlzl dreamerlzl closed this Sep 25, 2025
brancz added a commit that referenced this pull request Nov 13, 2025
This is a successor for
#3064

The method used in this PR is from crictl:
https://github.com/kubernetes-sigs/cri-tools/blob/master/cmd/crictl/pod_stats.go

The upgrade for selinux and containerd fixes CVE-2025-52881 and
CVE-2024-25621 , respectively.
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.

2 participants