mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Switch to versioned ListOptions in client.
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
||||
"fmt"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
)
|
||||
|
||||
@@ -31,11 +30,11 @@ type NodesInterface interface {
|
||||
type NodeInterface interface {
|
||||
Get(name string) (result *api.Node, err error)
|
||||
Create(node *api.Node) (*api.Node, error)
|
||||
List(opts unversioned.ListOptions) (*api.NodeList, error)
|
||||
List(opts api.ListOptions) (*api.NodeList, error)
|
||||
Delete(name string) error
|
||||
Update(*api.Node) (*api.Node, error)
|
||||
UpdateStatus(*api.Node) (*api.Node, error)
|
||||
Watch(opts unversioned.ListOptions) (watch.Interface, error)
|
||||
Watch(opts api.ListOptions) (watch.Interface, error)
|
||||
}
|
||||
|
||||
// nodes implements NodesInterface
|
||||
@@ -61,7 +60,7 @@ func (c *nodes) Create(node *api.Node) (*api.Node, error) {
|
||||
}
|
||||
|
||||
// List takes a selector, and returns the list of nodes that match that selector in the cluster.
|
||||
func (c *nodes) List(opts unversioned.ListOptions) (*api.NodeList, error) {
|
||||
func (c *nodes) List(opts api.ListOptions) (*api.NodeList, error) {
|
||||
result := &api.NodeList{}
|
||||
err := c.r.Get().Resource(c.resourceName()).VersionedParams(&opts, api.Scheme).Do().Into(result)
|
||||
return result, err
|
||||
@@ -101,7 +100,7 @@ func (c *nodes) UpdateStatus(node *api.Node) (*api.Node, error) {
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested nodes.
|
||||
func (c *nodes) Watch(opts unversioned.ListOptions) (watch.Interface, error) {
|
||||
func (c *nodes) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.r.Get().
|
||||
Prefix("watch").
|
||||
Namespace(api.NamespaceAll).
|
||||
|
||||
Reference in New Issue
Block a user