Skip to content

Expose option to not do an etcd quorum read when listing pods on a node #1017

@hieurender

Description

@hieurender

Describe the feature
The fetchAllPods function currently lists all pods in such a way that it requires etcd to do a quorum read out of all pods in the cluster, and pass that (potentially very large) list to the k8s apiserver, who then selects only the ones with the desired spec.nodeName field. In very large clusters, this can be slow operation that's arduous for etcd to execute.

A less expensive way of achieving the same thing would be to leverage the apiserver cache, which indexes pods by their node name. This can be done by passing a non-empty ResourceVersion in the metav1.ListOptions.

I would like the nthConfig to expose a flag to configure this behavior, with the status quo being the default, since most users seem to be happy with a consistent read.

The situation is very similar to this issue in the vector project, which was fixed by this PR.

Is the feature request related to a problem?
A description of what the problem is. For example: I'm frustrated when [...]

Describe alternatives you've considered
A description of any alternative solutions or features you've considered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions