You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Tweak list opts on initial sync to avoid timeouts on the apiserver.
96
97
// NodeFeature objects are huge and the Kubernetes apiserver
97
98
// (v1.30) experiences http handler timeouts when the resource
98
-
// version is set to some non-empty value (TODO: find out why).
99
+
// version is set to some non-empty value
100
+
// https://github.com/kubernetes/kubernetes/blob/ace55542575fb098b3e413692bbe2bc20d2348ba/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go#L600-L616 if you set resource version to 0
101
+
// it serves the request from apiservers cache and doesn't use pagination otherwise pagination will default to 500
102
+
// so that's why this is required on large clusters
103
+
// So by setting this we're making it go to ETCD instead of from api-server cache, there's some WIP in k/k
104
+
// that seems to imply they're working on improving this behavior where you'll be able to paginate from apiserver cache
105
+
// it's not supported yet (2/2025), would be good to track this though kubernetes/kubernetes#108003
99
106
ifopts.ResourceVersion=="0" {
100
107
opts.ResourceVersion=""
101
108
}
109
+
opts.Limit=nfdApiControllerOptions.ListSize// value of 0 disables pagination
0 commit comments