kubernetes / client-go

Go client for Kubernetes.
Apache License 2.0
8.79k stars 2.91k forks source link

ListOptions with specific Limit option not working #1258

Closed lianghao208 closed 1 year ago

lianghao208 commented 1 year ago

I use Limit option to limit the number of returning nodes, but it returns all the data.

nodeList, err := client.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{
        Limit: 10,
    })

I notice the comment of Limit field: Servers may choose not to support the limit argument and will return all of the available results

How do I know whether the server side choose not to support the limit argument?