mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 20:50:24 +00:00
Step #1 in migrating the service controller away from the apiserver.
Start using the API server for listing services.
This commit is contained in:
@@ -317,6 +317,11 @@ func (c *Client) WatchReplicationControllers(label, field labels.Selector, resou
|
||||
Watch()
|
||||
}
|
||||
|
||||
func (c *Client) ListServices(selector labels.Selector) (list api.ServiceList, err error) {
|
||||
err = c.Get().Path("services").SelectorParam("labels", selector).Do().Into(&list)
|
||||
return
|
||||
}
|
||||
|
||||
// GetService returns information about a particular service.
|
||||
func (c *Client) GetService(name string) (result api.Service, err error) {
|
||||
err = c.Get().Path("services").Path(name).Do().Into(&result)
|
||||
|
Reference in New Issue
Block a user