mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Switch to versioned ListOptions in client.
This commit is contained in:
@@ -18,7 +18,6 @@ package unversioned
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
)
|
||||
|
||||
@@ -30,9 +29,9 @@ type SecretsInterface interface {
|
||||
Create(secret *api.Secret) (*api.Secret, error)
|
||||
Update(secret *api.Secret) (*api.Secret, error)
|
||||
Delete(name string) error
|
||||
List(opts unversioned.ListOptions) (*api.SecretList, error)
|
||||
List(opts api.ListOptions) (*api.SecretList, error)
|
||||
Get(name string) (*api.Secret, error)
|
||||
Watch(opts unversioned.ListOptions) (watch.Interface, error)
|
||||
Watch(opts api.ListOptions) (watch.Interface, error)
|
||||
}
|
||||
|
||||
// events implements Secrets interface
|
||||
@@ -62,7 +61,7 @@ func (s *secrets) Create(secret *api.Secret) (*api.Secret, error) {
|
||||
}
|
||||
|
||||
// List returns a list of secrets matching the selectors.
|
||||
func (s *secrets) List(opts unversioned.ListOptions) (*api.SecretList, error) {
|
||||
func (s *secrets) List(opts api.ListOptions) (*api.SecretList, error) {
|
||||
result := &api.SecretList{}
|
||||
|
||||
err := s.client.Get().
|
||||
@@ -89,7 +88,7 @@ func (s *secrets) Get(name string) (*api.Secret, error) {
|
||||
}
|
||||
|
||||
// Watch starts watching for secrets matching the given selectors.
|
||||
func (s *secrets) Watch(opts unversioned.ListOptions) (watch.Interface, error) {
|
||||
func (s *secrets) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return s.client.Get().
|
||||
Prefix("watch").
|
||||
Namespace(s.namespace).
|
||||
|
||||
Reference in New Issue
Block a user