Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The reflector performs a _list_and_update every watch timeout (default 10s) requesting most recent data from the apiserver via the default resource_version="". This requires the apiserver to retrieve the latest data from the backing store (etcd) which can be very expensive in large clusters. For example if omit_namespace is set the full cluster pod listings require several seconds retrieve all data from the etcd in clusters with more then 10000 pods. The label selector filtering is only done in the apiserver. As the _list_and_update is used for watches the listing should set the resource version and resource version match to tell the apiserver that its locally cached data is sufficient. The initial listing will fetch any data the apiserver currently has to prepopulate the watch, the watch itself will then fetch whatever is remaining from the etcd. The subsequent relistings after the watch timeouts use their last received resource version in the same way. For details see https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions Closes gh-753
- Loading branch information