Vendor: Update k8s version
Signed-off-by: Michał Żyłowski <michal.zylowski@intel.com>
This commit is contained in:
parent
dfa93414c5
commit
52baf68d50
3756 changed files with 113013 additions and 92675 deletions
49
vendor/k8s.io/kubernetes/pkg/client/cache/BUILD
generated
vendored
49
vendor/k8s.io/kubernetes/pkg/client/cache/BUILD
generated
vendored
|
@ -20,9 +20,6 @@ go_library(
|
|||
"fifo.go",
|
||||
"index.go",
|
||||
"listers.go",
|
||||
"listers_core.go",
|
||||
"listers_extensions.go",
|
||||
"listers_rbac.go",
|
||||
"listwatch.go",
|
||||
"mutation_detector.go",
|
||||
"reflector.go",
|
||||
|
@ -34,22 +31,11 @@ go_library(
|
|||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/apps/v1beta1:go_default_library",
|
||||
"//pkg/apis/certificates/v1alpha1:go_default_library",
|
||||
"//pkg/apis/extensions:go_default_library",
|
||||
"//pkg/apis/extensions/v1beta1:go_default_library",
|
||||
"//pkg/apis/policy/v1beta1:go_default_library",
|
||||
"//pkg/apis/rbac:go_default_library",
|
||||
"//pkg/apis/storage:go_default_library",
|
||||
"//pkg/apis/storage/v1beta1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//pkg/fields:go_default_library",
|
||||
"//pkg/util/clock:go_default_library",
|
||||
"//vendor:github.com/golang/glog",
|
||||
"//vendor:k8s.io/apimachinery/pkg/api/errors",
|
||||
"//vendor:k8s.io/apimachinery/pkg/api/meta",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/fields",
|
||||
"//vendor:k8s.io/apimachinery/pkg/labels",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
|
@ -58,6 +44,8 @@ go_library(
|
|||
"//vendor:k8s.io/apimachinery/pkg/util/sets",
|
||||
"//vendor:k8s.io/apimachinery/pkg/util/wait",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
"//vendor:k8s.io/client-go/util/clock",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -69,8 +57,6 @@ go_test(
|
|||
"expiration_cache_test.go",
|
||||
"fifo_test.go",
|
||||
"index_test.go",
|
||||
"listers_test.go",
|
||||
"listwatch_test.go",
|
||||
"mutation_detector_test.go",
|
||||
"processor_listener_test.go",
|
||||
"reflector_test.go",
|
||||
|
@ -81,23 +67,15 @@ go_test(
|
|||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/testapi:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/extensions/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//pkg/client/testing/cache:go_default_library",
|
||||
"//pkg/fields:go_default_library",
|
||||
"//pkg/util/clock:go_default_library",
|
||||
"//pkg/util/testing:go_default_library",
|
||||
"//vendor:github.com/google/gofuzz",
|
||||
"//vendor:k8s.io/apimachinery/pkg/api/errors",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/labels",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime",
|
||||
"//vendor:k8s.io/apimachinery/pkg/util/sets",
|
||||
"//vendor:k8s.io/apimachinery/pkg/util/wait",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/util/clock",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -113,3 +91,22 @@ filegroup(
|
|||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
)
|
||||
|
||||
go_test(
|
||||
name = "go_default_xtest",
|
||||
srcs = ["listwatch_test.go"],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/testapi:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/client/cache:go_default_library",
|
||||
"//pkg/client/clientset_generated/internalclientset:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/fields",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
"//vendor:k8s.io/client-go/util/testing",
|
||||
],
|
||||
)
|
||||
|
|
11
vendor/k8s.io/kubernetes/pkg/client/cache/controller_test.go
generated
vendored
11
vendor/k8s.io/kubernetes/pkg/client/cache/controller_test.go
generated
vendored
|
@ -23,6 +23,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
|
@ -101,7 +102,7 @@ func Example() {
|
|||
for _, name := range testIDs {
|
||||
// Note that these pods are not valid-- the fake source doesn't
|
||||
// call validation or anything.
|
||||
source.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: name}})
|
||||
source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: name}})
|
||||
}
|
||||
|
||||
// Let's wait for the controller to process the things we just added.
|
||||
|
@ -158,7 +159,7 @@ func ExampleNewInformer() {
|
|||
for _, name := range testIDs {
|
||||
// Note that these pods are not valid-- the fake source doesn't
|
||||
// call validation or anything.
|
||||
source.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: name}})
|
||||
source.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: name}})
|
||||
}
|
||||
|
||||
// Let's wait for the controller to process the things we just added.
|
||||
|
@ -317,7 +318,7 @@ func TestUpdate(t *testing.T) {
|
|||
|
||||
pod := func(name, check string, final bool) *v1.Pod {
|
||||
p := &v1.Pod{
|
||||
ObjectMeta: v1.ObjectMeta{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: name,
|
||||
Labels: map[string]string{"check": check},
|
||||
},
|
||||
|
@ -350,12 +351,12 @@ func TestUpdate(t *testing.T) {
|
|||
watchCh := make(chan struct{})
|
||||
_, controller := NewInformer(
|
||||
&testLW{
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
watch, err := source.Watch(options)
|
||||
close(watchCh)
|
||||
return watch, err
|
||||
},
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
return source.List(options)
|
||||
},
|
||||
},
|
||||
|
|
2
vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache.go
generated
vendored
|
@ -21,7 +21,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kubernetes/pkg/util/clock"
|
||||
"k8s.io/client-go/util/clock"
|
||||
)
|
||||
|
||||
// ExpirationCache implements the store interface
|
||||
|
|
2
vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_fakes.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_fakes.go
generated
vendored
|
@ -18,7 +18,7 @@ package cache
|
|||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/kubernetes/pkg/util/clock"
|
||||
"k8s.io/client-go/util/clock"
|
||||
)
|
||||
|
||||
type fakeThreadSafeMap struct {
|
||||
|
|
2
vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_test.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/client/cache/expiration_cache_test.go
generated
vendored
|
@ -23,7 +23,7 @@ import (
|
|||
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
"k8s.io/kubernetes/pkg/util/clock"
|
||||
"k8s.io/client-go/util/clock"
|
||||
)
|
||||
|
||||
func TestTTLExpirationBasic(t *testing.T) {
|
||||
|
|
13
vendor/k8s.io/kubernetes/pkg/client/cache/index_test.go
generated
vendored
13
vendor/k8s.io/kubernetes/pkg/client/cache/index_test.go
generated
vendored
|
@ -20,6 +20,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
)
|
||||
|
@ -32,9 +33,9 @@ func testIndexFunc(obj interface{}) ([]string, error) {
|
|||
func TestGetIndexFuncValues(t *testing.T) {
|
||||
index := NewIndexer(MetaNamespaceKeyFunc, Indexers{"testmodes": testIndexFunc})
|
||||
|
||||
pod1 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "one", Labels: map[string]string{"foo": "bar"}}}
|
||||
pod2 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "two", Labels: map[string]string{"foo": "bar"}}}
|
||||
pod3 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "tre", Labels: map[string]string{"foo": "biz"}}}
|
||||
pod1 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "one", Labels: map[string]string{"foo": "bar"}}}
|
||||
pod2 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "two", Labels: map[string]string{"foo": "bar"}}}
|
||||
pod3 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "tre", Labels: map[string]string{"foo": "biz"}}}
|
||||
|
||||
index.Add(pod1)
|
||||
index.Add(pod2)
|
||||
|
@ -62,9 +63,9 @@ func testUsersIndexFunc(obj interface{}) ([]string, error) {
|
|||
func TestMultiIndexKeys(t *testing.T) {
|
||||
index := NewIndexer(MetaNamespaceKeyFunc, Indexers{"byUser": testUsersIndexFunc})
|
||||
|
||||
pod1 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "one", Annotations: map[string]string{"users": "ernie,bert"}}}
|
||||
pod2 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "two", Annotations: map[string]string{"users": "bert,oscar"}}}
|
||||
pod3 := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "tre", Annotations: map[string]string{"users": "ernie,elmo"}}}
|
||||
pod1 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "one", Annotations: map[string]string{"users": "ernie,bert"}}}
|
||||
pod2 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "two", Annotations: map[string]string{"users": "bert,oscar"}}}
|
||||
pod3 := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "tre", Annotations: map[string]string{"users": "ernie,elmo"}}}
|
||||
|
||||
index.Add(pod1)
|
||||
index.Add(pod2)
|
||||
|
|
326
vendor/k8s.io/kubernetes/pkg/client/cache/listers.go
generated
vendored
326
vendor/k8s.io/kubernetes/pkg/client/cache/listers.go
generated
vendored
|
@ -17,22 +17,14 @@ limitations under the License.
|
|||
package cache
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/glog"
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
apps "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
|
||||
certificates "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
policy "k8s.io/kubernetes/pkg/apis/policy/v1beta1"
|
||||
storageinternal "k8s.io/kubernetes/pkg/apis/storage"
|
||||
storage "k8s.io/kubernetes/pkg/apis/storage/v1beta1"
|
||||
)
|
||||
|
||||
// AppendFunc is used to add a matching item to whatever list the caller is using
|
||||
|
@ -52,7 +44,7 @@ func ListAll(store Store, selector labels.Selector, appendFn AppendFunc) error {
|
|||
}
|
||||
|
||||
func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selector, appendFn AppendFunc) error {
|
||||
if namespace == v1.NamespaceAll {
|
||||
if namespace == metav1.NamespaceAll {
|
||||
for _, m := range indexer.List() {
|
||||
metadata, err := meta.Accessor(m)
|
||||
if err != nil {
|
||||
|
@ -65,7 +57,7 @@ func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selec
|
|||
return nil
|
||||
}
|
||||
|
||||
items, err := indexer.Index(NamespaceIndex, &v1.ObjectMeta{Namespace: namespace})
|
||||
items, err := indexer.Index(NamespaceIndex, &metav1.ObjectMeta{Namespace: namespace})
|
||||
if err != nil {
|
||||
// Ignore error; do slow search without index.
|
||||
glog.Warningf("can not retrieve list of objects using index : %v", err)
|
||||
|
@ -166,315 +158,3 @@ func (s *genericNamespaceLister) Get(name string) (runtime.Object, error) {
|
|||
}
|
||||
return obj.(runtime.Object), nil
|
||||
}
|
||||
|
||||
// TODO: generate these classes and methods for all resources of interest using
|
||||
// a script. Can use "go generate" once 1.4 is supported by all users.
|
||||
|
||||
// NodeConditionPredicate is a function that indicates whether the given node's conditions meet
|
||||
// some set of criteria defined by the function.
|
||||
type NodeConditionPredicate func(node *v1.Node) bool
|
||||
|
||||
// StoreToNodeLister makes a Store have the List method of the client.NodeInterface
|
||||
// The Store must contain (only) Nodes.
|
||||
type StoreToNodeLister struct {
|
||||
Store
|
||||
}
|
||||
|
||||
func (s *StoreToNodeLister) List() (machines v1.NodeList, err error) {
|
||||
for _, m := range s.Store.List() {
|
||||
machines.Items = append(machines.Items, *(m.(*v1.Node)))
|
||||
}
|
||||
return machines, nil
|
||||
}
|
||||
|
||||
// NodeCondition returns a storeToNodeConditionLister
|
||||
func (s *StoreToNodeLister) NodeCondition(predicate NodeConditionPredicate) storeToNodeConditionLister {
|
||||
// TODO: Move this filtering server side. Currently our selectors don't facilitate searching through a list so we
|
||||
// have the reflector filter out the Unschedulable field and sift through node conditions in the lister.
|
||||
return storeToNodeConditionLister{s.Store, predicate}
|
||||
}
|
||||
|
||||
// storeToNodeConditionLister filters and returns nodes matching the given type and status from the store.
|
||||
type storeToNodeConditionLister struct {
|
||||
store Store
|
||||
predicate NodeConditionPredicate
|
||||
}
|
||||
|
||||
// List returns a list of nodes that match the conditions defined by the predicate functions in the storeToNodeConditionLister.
|
||||
func (s storeToNodeConditionLister) List() (nodes []*v1.Node, err error) {
|
||||
for _, m := range s.store.List() {
|
||||
node := m.(*v1.Node)
|
||||
if s.predicate(node) {
|
||||
nodes = append(nodes, node)
|
||||
} else {
|
||||
glog.V(5).Infof("Node %s matches none of the conditions", node.Name)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// StoreToDaemonSetLister gives a store List and Exists methods. The store must contain only DaemonSets.
|
||||
type StoreToDaemonSetLister struct {
|
||||
Store
|
||||
}
|
||||
|
||||
// Exists checks if the given daemon set exists in the store.
|
||||
func (s *StoreToDaemonSetLister) Exists(ds *extensions.DaemonSet) (bool, error) {
|
||||
_, exists, err := s.Store.Get(ds)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return exists, nil
|
||||
}
|
||||
|
||||
// List lists all daemon sets in the store.
|
||||
// TODO: converge on the interface in pkg/client
|
||||
func (s *StoreToDaemonSetLister) List() (dss extensions.DaemonSetList, err error) {
|
||||
for _, c := range s.Store.List() {
|
||||
dss.Items = append(dss.Items, *(c.(*extensions.DaemonSet)))
|
||||
}
|
||||
return dss, nil
|
||||
}
|
||||
|
||||
// GetPodDaemonSets returns a list of daemon sets managing a pod.
|
||||
// Returns an error if and only if no matching daemon sets are found.
|
||||
func (s *StoreToDaemonSetLister) GetPodDaemonSets(pod *v1.Pod) (daemonSets []extensions.DaemonSet, err error) {
|
||||
var selector labels.Selector
|
||||
var daemonSet extensions.DaemonSet
|
||||
|
||||
if len(pod.Labels) == 0 {
|
||||
err = fmt.Errorf("no daemon sets found for pod %v because it has no labels", pod.Name)
|
||||
return
|
||||
}
|
||||
|
||||
for _, m := range s.Store.List() {
|
||||
daemonSet = *m.(*extensions.DaemonSet)
|
||||
if daemonSet.Namespace != pod.Namespace {
|
||||
continue
|
||||
}
|
||||
selector, err = metav1.LabelSelectorAsSelector(daemonSet.Spec.Selector)
|
||||
if err != nil {
|
||||
// this should not happen if the DaemonSet passed validation
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// If a daemonSet with a nil or empty selector creeps in, it should match nothing, not everything.
|
||||
if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
|
||||
continue
|
||||
}
|
||||
daemonSets = append(daemonSets, daemonSet)
|
||||
}
|
||||
if len(daemonSets) == 0 {
|
||||
err = fmt.Errorf("could not find daemon set for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// StoreToEndpointsLister makes a Store that lists endpoints.
|
||||
type StoreToEndpointsLister struct {
|
||||
Store
|
||||
}
|
||||
|
||||
// List lists all endpoints in the store.
|
||||
func (s *StoreToEndpointsLister) List() (services v1.EndpointsList, err error) {
|
||||
for _, m := range s.Store.List() {
|
||||
services.Items = append(services.Items, *(m.(*v1.Endpoints)))
|
||||
}
|
||||
return services, nil
|
||||
}
|
||||
|
||||
// GetServiceEndpoints returns the endpoints of a service, matched on service name.
|
||||
func (s *StoreToEndpointsLister) GetServiceEndpoints(svc *v1.Service) (ep v1.Endpoints, err error) {
|
||||
for _, m := range s.Store.List() {
|
||||
ep = *m.(*v1.Endpoints)
|
||||
if svc.Name == ep.Name && svc.Namespace == ep.Namespace {
|
||||
return ep, nil
|
||||
}
|
||||
}
|
||||
err = fmt.Errorf("could not find endpoints for service: %v", svc.Name)
|
||||
return
|
||||
}
|
||||
|
||||
// Typed wrapper around a store of PersistentVolumes
|
||||
type StoreToPVFetcher struct {
|
||||
Store
|
||||
}
|
||||
|
||||
// GetPersistentVolumeInfo returns cached data for the PersistentVolume 'id'.
|
||||
func (s *StoreToPVFetcher) GetPersistentVolumeInfo(id string) (*v1.PersistentVolume, error) {
|
||||
o, exists, err := s.Get(&v1.PersistentVolume{ObjectMeta: v1.ObjectMeta{Name: id}})
|
||||
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error retrieving PersistentVolume '%v' from cache: %v", id, err)
|
||||
}
|
||||
|
||||
if !exists {
|
||||
return nil, fmt.Errorf("PersistentVolume '%v' not found", id)
|
||||
}
|
||||
|
||||
return o.(*v1.PersistentVolume), nil
|
||||
}
|
||||
|
||||
// StoreToStatefulSetLister gives a store List and Exists methods. The store must contain only StatefulSets.
|
||||
type StoreToStatefulSetLister struct {
|
||||
Store
|
||||
}
|
||||
|
||||
// Exists checks if the given StatefulSet exists in the store.
|
||||
func (s *StoreToStatefulSetLister) Exists(ps *apps.StatefulSet) (bool, error) {
|
||||
_, exists, err := s.Store.Get(ps)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return exists, nil
|
||||
}
|
||||
|
||||
// List lists all StatefulSets in the store.
|
||||
func (s *StoreToStatefulSetLister) List() (psList []apps.StatefulSet, err error) {
|
||||
for _, ps := range s.Store.List() {
|
||||
psList = append(psList, *(ps.(*apps.StatefulSet)))
|
||||
}
|
||||
return psList, nil
|
||||
}
|
||||
|
||||
type storeStatefulSetsNamespacer struct {
|
||||
store Store
|
||||
namespace string
|
||||
}
|
||||
|
||||
func (s *StoreToStatefulSetLister) StatefulSets(namespace string) storeStatefulSetsNamespacer {
|
||||
return storeStatefulSetsNamespacer{s.Store, namespace}
|
||||
}
|
||||
|
||||
// GetPodStatefulSets returns a list of StatefulSets managing a pod. Returns an error only if no matching StatefulSets are found.
|
||||
func (s *StoreToStatefulSetLister) GetPodStatefulSets(pod *v1.Pod) (psList []apps.StatefulSet, err error) {
|
||||
var selector labels.Selector
|
||||
var ps apps.StatefulSet
|
||||
|
||||
if len(pod.Labels) == 0 {
|
||||
err = fmt.Errorf("no StatefulSets found for pod %v because it has no labels", pod.Name)
|
||||
return
|
||||
}
|
||||
|
||||
for _, m := range s.Store.List() {
|
||||
ps = *m.(*apps.StatefulSet)
|
||||
if ps.Namespace != pod.Namespace {
|
||||
continue
|
||||
}
|
||||
selector, err = metav1.LabelSelectorAsSelector(ps.Spec.Selector)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("invalid selector: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
// If a StatefulSet with a nil or empty selector creeps in, it should match nothing, not everything.
|
||||
if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
|
||||
continue
|
||||
}
|
||||
psList = append(psList, ps)
|
||||
}
|
||||
if len(psList) == 0 {
|
||||
err = fmt.Errorf("could not find StatefulSet for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// StoreToCertificateRequestLister gives a store List and Exists methods. The store must contain only CertificateRequests.
|
||||
type StoreToCertificateRequestLister struct {
|
||||
Store
|
||||
}
|
||||
|
||||
// Exists checks if the given csr exists in the store.
|
||||
func (s *StoreToCertificateRequestLister) Exists(csr *certificates.CertificateSigningRequest) (bool, error) {
|
||||
_, exists, err := s.Store.Get(csr)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return exists, nil
|
||||
}
|
||||
|
||||
// StoreToCertificateRequestLister lists all csrs in the store.
|
||||
func (s *StoreToCertificateRequestLister) List() (csrs certificates.CertificateSigningRequestList, err error) {
|
||||
for _, c := range s.Store.List() {
|
||||
csrs.Items = append(csrs.Items, *(c.(*certificates.CertificateSigningRequest)))
|
||||
}
|
||||
return csrs, nil
|
||||
}
|
||||
|
||||
type StoreToPodDisruptionBudgetLister struct {
|
||||
Store
|
||||
}
|
||||
|
||||
// GetPodPodDisruptionBudgets returns a list of PodDisruptionBudgets matching a pod. Returns an error only if no matching PodDisruptionBudgets are found.
|
||||
func (s *StoreToPodDisruptionBudgetLister) GetPodPodDisruptionBudgets(pod *v1.Pod) (pdbList []policy.PodDisruptionBudget, err error) {
|
||||
var selector labels.Selector
|
||||
|
||||
if len(pod.Labels) == 0 {
|
||||
err = fmt.Errorf("no PodDisruptionBudgets found for pod %v because it has no labels", pod.Name)
|
||||
return
|
||||
}
|
||||
|
||||
for _, m := range s.Store.List() {
|
||||
pdb, ok := m.(*policy.PodDisruptionBudget)
|
||||
if !ok {
|
||||
glog.Errorf("Unexpected: %v is not a PodDisruptionBudget", m)
|
||||
continue
|
||||
}
|
||||
if pdb.Namespace != pod.Namespace {
|
||||
continue
|
||||
}
|
||||
selector, err = metav1.LabelSelectorAsSelector(pdb.Spec.Selector)
|
||||
if err != nil {
|
||||
glog.Warningf("invalid selector: %v", err)
|
||||
// TODO(mml): add an event to the PDB
|
||||
continue
|
||||
}
|
||||
|
||||
// If a PDB with a nil or empty selector creeps in, it should match nothing, not everything.
|
||||
if selector.Empty() || !selector.Matches(labels.Set(pod.Labels)) {
|
||||
continue
|
||||
}
|
||||
pdbList = append(pdbList, *pdb)
|
||||
}
|
||||
if len(pdbList) == 0 {
|
||||
err = fmt.Errorf("could not find PodDisruptionBudget for pod %s in namespace %s with labels: %v", pod.Name, pod.Namespace, pod.Labels)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// StorageClassLister knows how to list storage classes
|
||||
type StorageClassLister interface {
|
||||
List(selector labels.Selector) (ret []*storage.StorageClass, err error)
|
||||
Get(name string) (*storage.StorageClass, error)
|
||||
}
|
||||
|
||||
// storageClassLister implements StorageClassLister
|
||||
type storageClassLister struct {
|
||||
indexer Indexer
|
||||
}
|
||||
|
||||
// NewStorageClassLister returns a new lister.
|
||||
func NewStorageClassLister(indexer Indexer) StorageClassLister {
|
||||
return &storageClassLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List returns a list of storage classes
|
||||
func (s *storageClassLister) List(selector labels.Selector) (ret []*storage.StorageClass, err error) {
|
||||
err = ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*storage.StorageClass))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get returns storage class with name 'name'.
|
||||
func (s *storageClassLister) Get(name string) (*storage.StorageClass, error) {
|
||||
key := &storage.StorageClass{ObjectMeta: v1.ObjectMeta{Name: name}}
|
||||
obj, exists, err := s.indexer.Get(key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(storageinternal.Resource("storageclass"), name)
|
||||
}
|
||||
return obj.(*storage.StorageClass), nil
|
||||
}
|
||||
|
|
33
vendor/k8s.io/kubernetes/pkg/client/cache/listwatch.go
generated
vendored
33
vendor/k8s.io/kubernetes/pkg/client/cache/listwatch.go
generated
vendored
|
@ -20,28 +20,27 @@ import (
|
|||
"time"
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/client/restclient"
|
||||
"k8s.io/kubernetes/pkg/fields"
|
||||
restclient "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ListerWatcher is any object that knows how to perform an initial list and start a watch on a resource.
|
||||
type ListerWatcher interface {
|
||||
// List should return a list type object; the Items field will be extracted, and the
|
||||
// ResourceVersion field will be used to start the watch in the right place.
|
||||
List(options v1.ListOptions) (runtime.Object, error)
|
||||
List(options metav1.ListOptions) (runtime.Object, error)
|
||||
// Watch should begin a watch at the specified version.
|
||||
Watch(options v1.ListOptions) (watch.Interface, error)
|
||||
Watch(options metav1.ListOptions) (watch.Interface, error)
|
||||
}
|
||||
|
||||
// ListFunc knows how to list resources
|
||||
type ListFunc func(options v1.ListOptions) (runtime.Object, error)
|
||||
type ListFunc func(options metav1.ListOptions) (runtime.Object, error)
|
||||
|
||||
// WatchFunc knows how to watch resources
|
||||
type WatchFunc func(options v1.ListOptions) (watch.Interface, error)
|
||||
type WatchFunc func(options metav1.ListOptions) (watch.Interface, error)
|
||||
|
||||
// ListWatch knows how to list and watch a set of apiserver resources. It satisfies the ListerWatcher interface.
|
||||
// It is a convenience function for users of NewReflector, etc.
|
||||
|
@ -58,28 +57,28 @@ type Getter interface {
|
|||
|
||||
// NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector.
|
||||
func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSelector fields.Selector) *ListWatch {
|
||||
listFunc := func(options v1.ListOptions) (runtime.Object, error) {
|
||||
listFunc := func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
return c.Get().
|
||||
Namespace(namespace).
|
||||
Resource(resource).
|
||||
VersionedParams(&options, api.ParameterCodec).
|
||||
VersionedParams(&options, metav1.ParameterCodec).
|
||||
FieldsSelectorParam(fieldSelector).
|
||||
Do().
|
||||
Get()
|
||||
}
|
||||
watchFunc := func(options v1.ListOptions) (watch.Interface, error) {
|
||||
watchFunc := func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
return c.Get().
|
||||
Prefix("watch").
|
||||
Namespace(namespace).
|
||||
Resource(resource).
|
||||
VersionedParams(&options, api.ParameterCodec).
|
||||
VersionedParams(&options, metav1.ParameterCodec).
|
||||
FieldsSelectorParam(fieldSelector).
|
||||
Watch()
|
||||
}
|
||||
return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc}
|
||||
}
|
||||
|
||||
func timeoutFromListOptions(options v1.ListOptions) time.Duration {
|
||||
func timeoutFromListOptions(options metav1.ListOptions) time.Duration {
|
||||
if options.TimeoutSeconds != nil {
|
||||
return time.Duration(*options.TimeoutSeconds) * time.Second
|
||||
}
|
||||
|
@ -87,12 +86,12 @@ func timeoutFromListOptions(options v1.ListOptions) time.Duration {
|
|||
}
|
||||
|
||||
// List a set of apiserver resources
|
||||
func (lw *ListWatch) List(options v1.ListOptions) (runtime.Object, error) {
|
||||
func (lw *ListWatch) List(options metav1.ListOptions) (runtime.Object, error) {
|
||||
return lw.ListFunc(options)
|
||||
}
|
||||
|
||||
// Watch a set of apiserver resources
|
||||
func (lw *ListWatch) Watch(options v1.ListOptions) (watch.Interface, error) {
|
||||
func (lw *ListWatch) Watch(options metav1.ListOptions) (watch.Interface, error) {
|
||||
return lw.WatchFunc(options)
|
||||
}
|
||||
|
||||
|
@ -102,7 +101,7 @@ func ListWatchUntil(timeout time.Duration, lw ListerWatcher, conditions ...watch
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
list, err := lw.List(v1.ListOptions{})
|
||||
list, err := lw.List(metav1.ListOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -154,7 +153,7 @@ func ListWatchUntil(timeout time.Duration, lw ListerWatcher, conditions ...watch
|
|||
}
|
||||
currResourceVersion := metaObj.GetResourceVersion()
|
||||
|
||||
watchInterface, err := lw.Watch(v1.ListOptions{ResourceVersion: currResourceVersion})
|
||||
watchInterface, err := lw.Watch(metav1.ListOptions{ResourceVersion: currResourceVersion})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
37
vendor/k8s.io/kubernetes/pkg/client/cache/listwatch_test.go
generated
vendored
37
vendor/k8s.io/kubernetes/pkg/client/cache/listwatch_test.go
generated
vendored
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
package cache
|
||||
package cache_test
|
||||
|
||||
import (
|
||||
"net/http/httptest"
|
||||
|
@ -23,15 +23,16 @@ import (
|
|||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
restclient "k8s.io/client-go/rest"
|
||||
utiltesting "k8s.io/client-go/util/testing"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/testapi"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
. "k8s.io/kubernetes/pkg/client/cache"
|
||||
clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
|
||||
"k8s.io/kubernetes/pkg/client/restclient"
|
||||
"k8s.io/kubernetes/pkg/fields"
|
||||
utiltesting "k8s.io/kubernetes/pkg/util/testing"
|
||||
)
|
||||
|
||||
func parseSelectorOrDie(s string) fields.Selector {
|
||||
|
@ -69,18 +70,18 @@ func TestListWatchesCanList(t *testing.T) {
|
|||
}{
|
||||
// Node
|
||||
{
|
||||
location: testapi.Default.ResourcePath("nodes", v1.NamespaceAll, ""),
|
||||
location: testapi.Default.ResourcePath("nodes", metav1.NamespaceAll, ""),
|
||||
resource: "nodes",
|
||||
namespace: v1.NamespaceAll,
|
||||
namespace: metav1.NamespaceAll,
|
||||
fieldSelector: parseSelectorOrDie(""),
|
||||
},
|
||||
// pod with "assigned" field selector.
|
||||
{
|
||||
location: buildLocation(
|
||||
testapi.Default.ResourcePath("pods", v1.NamespaceAll, ""),
|
||||
testapi.Default.ResourcePath("pods", metav1.NamespaceAll, ""),
|
||||
buildQueryValues(url.Values{fieldSelectorQueryParamName: []string{"spec.host="}})),
|
||||
resource: "pods",
|
||||
namespace: v1.NamespaceAll,
|
||||
namespace: metav1.NamespaceAll,
|
||||
fieldSelector: fields.Set{"spec.host": ""}.AsSelector(),
|
||||
},
|
||||
// pod in namespace "foo"
|
||||
|
@ -104,7 +105,7 @@ func TestListWatchesCanList(t *testing.T) {
|
|||
client := clientset.NewForConfigOrDie(&restclient.Config{Host: server.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}})
|
||||
lw := NewListWatchFromClient(client.Core().RESTClient(), item.resource, item.namespace, item.fieldSelector)
|
||||
// This test merely tests that the correct request is made.
|
||||
lw.List(v1.ListOptions{})
|
||||
lw.List(metav1.ListOptions{})
|
||||
handler.ValidateRequest(t, item.location, "GET", nil)
|
||||
}
|
||||
}
|
||||
|
@ -121,30 +122,30 @@ func TestListWatchesCanWatch(t *testing.T) {
|
|||
// Node
|
||||
{
|
||||
location: buildLocation(
|
||||
testapi.Default.ResourcePathWithPrefix("watch", "nodes", v1.NamespaceAll, ""),
|
||||
testapi.Default.ResourcePathWithPrefix("watch", "nodes", metav1.NamespaceAll, ""),
|
||||
buildQueryValues(url.Values{})),
|
||||
rv: "",
|
||||
resource: "nodes",
|
||||
namespace: v1.NamespaceAll,
|
||||
namespace: metav1.NamespaceAll,
|
||||
fieldSelector: parseSelectorOrDie(""),
|
||||
},
|
||||
{
|
||||
location: buildLocation(
|
||||
testapi.Default.ResourcePathWithPrefix("watch", "nodes", v1.NamespaceAll, ""),
|
||||
testapi.Default.ResourcePathWithPrefix("watch", "nodes", metav1.NamespaceAll, ""),
|
||||
buildQueryValues(url.Values{"resourceVersion": []string{"42"}})),
|
||||
rv: "42",
|
||||
resource: "nodes",
|
||||
namespace: v1.NamespaceAll,
|
||||
namespace: metav1.NamespaceAll,
|
||||
fieldSelector: parseSelectorOrDie(""),
|
||||
},
|
||||
// pod with "assigned" field selector.
|
||||
{
|
||||
location: buildLocation(
|
||||
testapi.Default.ResourcePathWithPrefix("watch", "pods", v1.NamespaceAll, ""),
|
||||
testapi.Default.ResourcePathWithPrefix("watch", "pods", metav1.NamespaceAll, ""),
|
||||
buildQueryValues(url.Values{fieldSelectorQueryParamName: []string{"spec.host="}, "resourceVersion": []string{"0"}})),
|
||||
rv: "0",
|
||||
resource: "pods",
|
||||
namespace: v1.NamespaceAll,
|
||||
namespace: metav1.NamespaceAll,
|
||||
fieldSelector: fields.Set{"spec.host": ""}.AsSelector(),
|
||||
},
|
||||
// pod with namespace foo and assigned field selector
|
||||
|
@ -170,7 +171,7 @@ func TestListWatchesCanWatch(t *testing.T) {
|
|||
client := clientset.NewForConfigOrDie(&restclient.Config{Host: server.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(v1.GroupName).GroupVersion}})
|
||||
lw := NewListWatchFromClient(client.Core().RESTClient(), item.resource, item.namespace, item.fieldSelector)
|
||||
// This test merely tests that the correct request is made.
|
||||
lw.Watch(v1.ListOptions{ResourceVersion: item.rv})
|
||||
lw.Watch(metav1.ListOptions{ResourceVersion: item.rv})
|
||||
handler.ValidateRequest(t, item.location, "GET", nil)
|
||||
}
|
||||
}
|
||||
|
@ -180,11 +181,11 @@ type lw struct {
|
|||
watch watch.Interface
|
||||
}
|
||||
|
||||
func (w lw) List(options v1.ListOptions) (runtime.Object, error) {
|
||||
func (w lw) List(options metav1.ListOptions) (runtime.Object, error) {
|
||||
return w.list, nil
|
||||
}
|
||||
|
||||
func (w lw) Watch(options v1.ListOptions) (watch.Interface, error) {
|
||||
func (w lw) Watch(options metav1.ListOptions) (watch.Interface, error) {
|
||||
return w.watch, nil
|
||||
}
|
||||
|
||||
|
|
7
vendor/k8s.io/kubernetes/pkg/client/cache/mutation_detector_test.go
generated
vendored
7
vendor/k8s.io/kubernetes/pkg/client/cache/mutation_detector_test.go
generated
vendored
|
@ -22,6 +22,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
|
@ -30,15 +31,15 @@ import (
|
|||
func TestMutationDetector(t *testing.T) {
|
||||
fakeWatch := watch.NewFake()
|
||||
lw := &testLW{
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
return fakeWatch, nil
|
||||
},
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
return &v1.PodList{}, nil
|
||||
},
|
||||
}
|
||||
pod := &v1.Pod{
|
||||
ObjectMeta: v1.ObjectMeta{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "anything",
|
||||
Labels: map[string]string{"check": "foo"},
|
||||
},
|
||||
|
|
6
vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go
generated
vendored
6
vendor/k8s.io/kubernetes/pkg/client/cache/reflector.go
generated
vendored
|
@ -36,11 +36,11 @@ import (
|
|||
"github.com/golang/glog"
|
||||
apierrs "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
)
|
||||
|
||||
// Reflector watches a specified resource and causes all changes to be reflected in the given store.
|
||||
|
@ -239,7 +239,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error {
|
|||
// Explicitly set "0" as resource version - it's fine for the List()
|
||||
// to be served from cache and potentially be delayed relative to
|
||||
// etcd contents. Reflector framework will catch up via Watch() eventually.
|
||||
options := v1.ListOptions{ResourceVersion: "0"}
|
||||
options := metav1.ListOptions{ResourceVersion: "0"}
|
||||
list, err := r.listerWatcher.List(options)
|
||||
if err != nil {
|
||||
return fmt.Errorf("%s: Failed to list %v: %v", r.name, r.expectedType, err)
|
||||
|
@ -282,7 +282,7 @@ func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error {
|
|||
|
||||
for {
|
||||
timemoutseconds := int64(minWatchTimeout.Seconds() * (rand.Float64() + 1.0))
|
||||
options = v1.ListOptions{
|
||||
options = metav1.ListOptions{
|
||||
ResourceVersion: resourceVersion,
|
||||
// We want to avoid situations of hanging watchers. Stop any wachers that do not
|
||||
// receive any events within the timeout window.
|
||||
|
|
50
vendor/k8s.io/kubernetes/pkg/client/cache/reflector_test.go
generated
vendored
50
vendor/k8s.io/kubernetes/pkg/client/cache/reflector_test.go
generated
vendored
|
@ -34,26 +34,26 @@ import (
|
|||
var nevererrc chan error
|
||||
|
||||
type testLW struct {
|
||||
ListFunc func(options v1.ListOptions) (runtime.Object, error)
|
||||
WatchFunc func(options v1.ListOptions) (watch.Interface, error)
|
||||
ListFunc func(options metav1.ListOptions) (runtime.Object, error)
|
||||
WatchFunc func(options metav1.ListOptions) (watch.Interface, error)
|
||||
}
|
||||
|
||||
func (t *testLW) List(options v1.ListOptions) (runtime.Object, error) {
|
||||
func (t *testLW) List(options metav1.ListOptions) (runtime.Object, error) {
|
||||
return t.ListFunc(options)
|
||||
}
|
||||
func (t *testLW) Watch(options v1.ListOptions) (watch.Interface, error) {
|
||||
func (t *testLW) Watch(options metav1.ListOptions) (watch.Interface, error) {
|
||||
return t.WatchFunc(options)
|
||||
}
|
||||
|
||||
func TestCloseWatchChannelOnError(t *testing.T) {
|
||||
r := NewReflector(&testLW{}, &v1.Pod{}, NewStore(MetaNamespaceKeyFunc), 0)
|
||||
pod := &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar"}}
|
||||
pod := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}}
|
||||
fw := watch.NewFake()
|
||||
r.listerWatcher = &testLW{
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
return fw, nil
|
||||
},
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil
|
||||
},
|
||||
}
|
||||
|
@ -76,17 +76,17 @@ func TestRunUntil(t *testing.T) {
|
|||
r := NewReflector(&testLW{}, &v1.Pod{}, store, 0)
|
||||
fw := watch.NewFake()
|
||||
r.listerWatcher = &testLW{
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
return fw, nil
|
||||
},
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil
|
||||
},
|
||||
}
|
||||
r.RunUntil(stopCh)
|
||||
// Synchronously add a dummy pod into the watch channel so we
|
||||
// know the RunUntil go routine is in the watch handler.
|
||||
fw.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar"}})
|
||||
fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}})
|
||||
close(stopCh)
|
||||
select {
|
||||
case _, ok := <-fw.ResultChan():
|
||||
|
@ -142,13 +142,13 @@ func TestReflectorWatchHandler(t *testing.T) {
|
|||
s := NewStore(MetaNamespaceKeyFunc)
|
||||
g := NewReflector(&testLW{}, &v1.Pod{}, s, 0)
|
||||
fw := watch.NewFake()
|
||||
s.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}})
|
||||
s.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar"}})
|
||||
s.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}})
|
||||
s.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar"}})
|
||||
go func() {
|
||||
fw.Add(&v1.Service{ObjectMeta: v1.ObjectMeta{Name: "rejected"}})
|
||||
fw.Delete(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "foo"}})
|
||||
fw.Modify(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "bar", ResourceVersion: "55"}})
|
||||
fw.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: "baz", ResourceVersion: "32"}})
|
||||
fw.Add(&v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "rejected"}})
|
||||
fw.Delete(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo"}})
|
||||
fw.Modify(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "bar", ResourceVersion: "55"}})
|
||||
fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "baz", ResourceVersion: "32"}})
|
||||
fw.Stop()
|
||||
}()
|
||||
var resumeRV string
|
||||
|
@ -158,7 +158,7 @@ func TestReflectorWatchHandler(t *testing.T) {
|
|||
}
|
||||
|
||||
mkPod := func(id string, rv string) *v1.Pod {
|
||||
return &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: id, ResourceVersion: rv}}
|
||||
return &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: rv}}
|
||||
}
|
||||
|
||||
table := []struct {
|
||||
|
@ -215,7 +215,7 @@ func TestReflectorListAndWatch(t *testing.T) {
|
|||
// inject an error.
|
||||
expectedRVs := []string{"1", "3"}
|
||||
lw := &testLW{
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
rv := options.ResourceVersion
|
||||
fw := watch.NewFake()
|
||||
if e, a := expectedRVs[0], rv; e != a {
|
||||
|
@ -227,7 +227,7 @@ func TestReflectorListAndWatch(t *testing.T) {
|
|||
go func() { createdFakes <- fw }()
|
||||
return fw, nil
|
||||
},
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "1"}}, nil
|
||||
},
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ func TestReflectorListAndWatch(t *testing.T) {
|
|||
fw = <-createdFakes
|
||||
}
|
||||
sendingRV := strconv.FormatUint(uint64(i+2), 10)
|
||||
fw.Add(&v1.Pod{ObjectMeta: v1.ObjectMeta{Name: id, ResourceVersion: sendingRV}})
|
||||
fw.Add(&v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: sendingRV}})
|
||||
if sendingRV == "3" {
|
||||
// Inject a failure.
|
||||
fw.Stop()
|
||||
|
@ -268,7 +268,7 @@ func TestReflectorListAndWatch(t *testing.T) {
|
|||
|
||||
func TestReflectorListAndWatchWithErrors(t *testing.T) {
|
||||
mkPod := func(id string, rv string) *v1.Pod {
|
||||
return &v1.Pod{ObjectMeta: v1.ObjectMeta{Name: id, ResourceVersion: rv}}
|
||||
return &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: id, ResourceVersion: rv}}
|
||||
}
|
||||
mkList := func(rv string, pods ...*v1.Pod) *v1.PodList {
|
||||
list := &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: rv}}
|
||||
|
@ -331,7 +331,7 @@ func TestReflectorListAndWatchWithErrors(t *testing.T) {
|
|||
}
|
||||
watchRet, watchErr := item.events, item.watchErr
|
||||
lw := &testLW{
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if watchErr != nil {
|
||||
return nil, watchErr
|
||||
}
|
||||
|
@ -345,7 +345,7 @@ func TestReflectorListAndWatchWithErrors(t *testing.T) {
|
|||
}()
|
||||
return fw, nil
|
||||
},
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
return item.list, item.listErr
|
||||
},
|
||||
}
|
||||
|
@ -369,11 +369,11 @@ func TestReflectorResync(t *testing.T) {
|
|||
}
|
||||
|
||||
lw := &testLW{
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
fw := watch.NewFake()
|
||||
return fw, nil
|
||||
},
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
|
||||
return &v1.PodList{ListMeta: metav1.ListMeta{ResourceVersion: "0"}}, nil
|
||||
},
|
||||
}
|
||||
|
|
13
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/BUILD
generated
vendored
13
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/BUILD
generated
vendored
|
@ -34,17 +34,18 @@ go_library(
|
|||
"//pkg/client/clientset_generated/clientset/typed/autoscaling/v1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/batch/v1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/batch/v2alpha1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/policy/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//pkg/client/typed/discovery:go_default_library",
|
||||
"//pkg/util/flowcontrol:go_default_library",
|
||||
"//plugin/pkg/client/auth:go_default_library",
|
||||
"//vendor:github.com/golang/glog",
|
||||
"//vendor:k8s.io/client-go/plugin/pkg/client/auth",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
"//vendor:k8s.io/client-go/util/flowcontrol",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -66,12 +67,12 @@ filegroup(
|
|||
"//pkg/client/clientset_generated/clientset/typed/autoscaling/v1:all-srcs",
|
||||
"//pkg/client/clientset_generated/clientset/typed/batch/v1:all-srcs",
|
||||
"//pkg/client/clientset_generated/clientset/typed/batch/v2alpha1:all-srcs",
|
||||
"//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1:all-srcs",
|
||||
"//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:all-srcs",
|
||||
"//pkg/client/clientset_generated/clientset/typed/core/v1:all-srcs",
|
||||
"//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:all-srcs",
|
||||
"//pkg/client/clientset_generated/clientset/typed/policy/v1alpha1:all-srcs",
|
||||
"//pkg/client/clientset_generated/clientset/typed/policy/v1beta1:all-srcs",
|
||||
"//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1:all-srcs",
|
||||
"//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:all-srcs",
|
||||
"//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
|
|
66
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/clientset.go
generated
vendored
66
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/clientset.go
generated
vendored
|
@ -18,22 +18,23 @@ package clientset
|
|||
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
_ "k8s.io/client-go/plugin/pkg/client/auth"
|
||||
rest "k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/util/flowcontrol"
|
||||
v1beta1apps "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1"
|
||||
v1beta1authentication "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1"
|
||||
v1beta1authorization "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1"
|
||||
v1autoscaling "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1"
|
||||
v1batch "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1"
|
||||
v2alpha1batch "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1"
|
||||
v1alpha1certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1"
|
||||
v1beta1certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1"
|
||||
v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1"
|
||||
v1beta1extensions "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1"
|
||||
v1beta1policy "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1"
|
||||
v1alpha1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1"
|
||||
v1beta1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1"
|
||||
v1beta1storage "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
discovery "k8s.io/kubernetes/pkg/client/typed/discovery"
|
||||
"k8s.io/kubernetes/pkg/util/flowcontrol"
|
||||
_ "k8s.io/kubernetes/plugin/pkg/client/auth"
|
||||
)
|
||||
|
||||
type Interface interface {
|
||||
|
@ -58,18 +59,20 @@ type Interface interface {
|
|||
Batch() v1batch.BatchV1Interface
|
||||
BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface
|
||||
|
||||
CertificatesV1alpha1() v1alpha1certificates.CertificatesV1alpha1Interface
|
||||
CertificatesV1beta1() v1beta1certificates.CertificatesV1beta1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Certificates() v1alpha1certificates.CertificatesV1alpha1Interface
|
||||
Certificates() v1beta1certificates.CertificatesV1beta1Interface
|
||||
ExtensionsV1beta1() v1beta1extensions.ExtensionsV1beta1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Extensions() v1beta1extensions.ExtensionsV1beta1Interface
|
||||
PolicyV1beta1() v1beta1policy.PolicyV1beta1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Policy() v1beta1policy.PolicyV1beta1Interface
|
||||
RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface
|
||||
RbacV1beta1() v1beta1rbac.RbacV1beta1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Rbac() v1alpha1rbac.RbacV1alpha1Interface
|
||||
Rbac() v1beta1rbac.RbacV1beta1Interface
|
||||
RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface
|
||||
|
||||
StorageV1beta1() v1beta1storage.StorageV1beta1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Storage() v1beta1storage.StorageV1beta1Interface
|
||||
|
@ -86,9 +89,10 @@ type Clientset struct {
|
|||
*v1autoscaling.AutoscalingV1Client
|
||||
*v1batch.BatchV1Client
|
||||
*v2alpha1batch.BatchV2alpha1Client
|
||||
*v1alpha1certificates.CertificatesV1alpha1Client
|
||||
*v1beta1certificates.CertificatesV1beta1Client
|
||||
*v1beta1extensions.ExtensionsV1beta1Client
|
||||
*v1beta1policy.PolicyV1beta1Client
|
||||
*v1beta1rbac.RbacV1beta1Client
|
||||
*v1alpha1rbac.RbacV1alpha1Client
|
||||
*v1beta1storage.StorageV1beta1Client
|
||||
}
|
||||
|
@ -203,21 +207,21 @@ func (c *Clientset) BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface {
|
|||
return c.BatchV2alpha1Client
|
||||
}
|
||||
|
||||
// CertificatesV1alpha1 retrieves the CertificatesV1alpha1Client
|
||||
func (c *Clientset) CertificatesV1alpha1() v1alpha1certificates.CertificatesV1alpha1Interface {
|
||||
// CertificatesV1beta1 retrieves the CertificatesV1beta1Client
|
||||
func (c *Clientset) CertificatesV1beta1() v1beta1certificates.CertificatesV1beta1Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.CertificatesV1alpha1Client
|
||||
return c.CertificatesV1beta1Client
|
||||
}
|
||||
|
||||
// Deprecated: Certificates retrieves the default version of CertificatesClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Certificates() v1alpha1certificates.CertificatesV1alpha1Interface {
|
||||
func (c *Clientset) Certificates() v1beta1certificates.CertificatesV1beta1Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.CertificatesV1alpha1Client
|
||||
return c.CertificatesV1beta1Client
|
||||
}
|
||||
|
||||
// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client
|
||||
|
@ -254,17 +258,25 @@ func (c *Clientset) Policy() v1beta1policy.PolicyV1beta1Interface {
|
|||
return c.PolicyV1beta1Client
|
||||
}
|
||||
|
||||
// RbacV1alpha1 retrieves the RbacV1alpha1Client
|
||||
func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface {
|
||||
// RbacV1beta1 retrieves the RbacV1beta1Client
|
||||
func (c *Clientset) RbacV1beta1() v1beta1rbac.RbacV1beta1Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.RbacV1alpha1Client
|
||||
return c.RbacV1beta1Client
|
||||
}
|
||||
|
||||
// Deprecated: Rbac retrieves the default version of RbacClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Rbac() v1alpha1rbac.RbacV1alpha1Interface {
|
||||
func (c *Clientset) Rbac() v1beta1rbac.RbacV1beta1Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.RbacV1beta1Client
|
||||
}
|
||||
|
||||
// RbacV1alpha1 retrieves the RbacV1alpha1Client
|
||||
func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
|
@ -297,7 +309,7 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
|||
}
|
||||
|
||||
// NewForConfig creates a new Clientset for the given config.
|
||||
func NewForConfig(c *restclient.Config) (*Clientset, error) {
|
||||
func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
configShallowCopy := *c
|
||||
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
|
||||
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
|
||||
|
@ -332,7 +344,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.CertificatesV1alpha1Client, err = v1alpha1certificates.NewForConfig(&configShallowCopy)
|
||||
cs.CertificatesV1beta1Client, err = v1beta1certificates.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -344,6 +356,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.RbacV1beta1Client, err = v1beta1rbac.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.RbacV1alpha1Client, err = v1alpha1rbac.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -363,7 +379,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) {
|
|||
|
||||
// NewForConfigOrDie creates a new Clientset for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *restclient.Config) *Clientset {
|
||||
func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||
var cs Clientset
|
||||
cs.CoreV1Client = v1core.NewForConfigOrDie(c)
|
||||
cs.AppsV1beta1Client = v1beta1apps.NewForConfigOrDie(c)
|
||||
|
@ -372,9 +388,10 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset {
|
|||
cs.AutoscalingV1Client = v1autoscaling.NewForConfigOrDie(c)
|
||||
cs.BatchV1Client = v1batch.NewForConfigOrDie(c)
|
||||
cs.BatchV2alpha1Client = v2alpha1batch.NewForConfigOrDie(c)
|
||||
cs.CertificatesV1alpha1Client = v1alpha1certificates.NewForConfigOrDie(c)
|
||||
cs.CertificatesV1beta1Client = v1beta1certificates.NewForConfigOrDie(c)
|
||||
cs.ExtensionsV1beta1Client = v1beta1extensions.NewForConfigOrDie(c)
|
||||
cs.PolicyV1beta1Client = v1beta1policy.NewForConfigOrDie(c)
|
||||
cs.RbacV1beta1Client = v1beta1rbac.NewForConfigOrDie(c)
|
||||
cs.RbacV1alpha1Client = v1alpha1rbac.NewForConfigOrDie(c)
|
||||
cs.StorageV1beta1Client = v1beta1storage.NewForConfigOrDie(c)
|
||||
|
||||
|
@ -383,7 +400,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset {
|
|||
}
|
||||
|
||||
// New creates a new Clientset for the given RESTClient.
|
||||
func New(c restclient.Interface) *Clientset {
|
||||
func New(c rest.Interface) *Clientset {
|
||||
var cs Clientset
|
||||
cs.CoreV1Client = v1core.New(c)
|
||||
cs.AppsV1beta1Client = v1beta1apps.New(c)
|
||||
|
@ -392,9 +409,10 @@ func New(c restclient.Interface) *Clientset {
|
|||
cs.AutoscalingV1Client = v1autoscaling.New(c)
|
||||
cs.BatchV1Client = v1batch.New(c)
|
||||
cs.BatchV2alpha1Client = v2alpha1batch.New(c)
|
||||
cs.CertificatesV1alpha1Client = v1alpha1certificates.New(c)
|
||||
cs.CertificatesV1beta1Client = v1beta1certificates.New(c)
|
||||
cs.ExtensionsV1beta1Client = v1beta1extensions.New(c)
|
||||
cs.PolicyV1beta1Client = v1beta1policy.New(c)
|
||||
cs.RbacV1beta1Client = v1beta1rbac.New(c)
|
||||
cs.RbacV1alpha1Client = v1alpha1rbac.New(c)
|
||||
cs.StorageV1beta1Client = v1beta1storage.New(c)
|
||||
|
||||
|
|
2
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/doc.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/doc.go
generated
vendored
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
package clientset
|
||||
|
|
6
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/BUILD
generated
vendored
6
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/BUILD
generated
vendored
|
@ -29,8 +29,8 @@ go_library(
|
|||
"//pkg/client/clientset_generated/clientset/typed/batch/v1/fake:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/batch/v2alpha1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/core/v1/fake:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/extensions/v1beta1:go_default_library",
|
||||
|
@ -39,6 +39,8 @@ go_library(
|
|||
"//pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/storage/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake:go_default_library",
|
||||
"//pkg/client/testing/core:go_default_library",
|
||||
|
|
|
@ -33,8 +33,8 @@ import (
|
|||
fakev1batch "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/fake"
|
||||
v2alpha1batch "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1"
|
||||
fakev2alpha1batch "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1/fake"
|
||||
v1alpha1certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1"
|
||||
fakev1alpha1certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake"
|
||||
v1beta1certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1"
|
||||
fakev1beta1certificates "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake"
|
||||
v1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1"
|
||||
fakev1core "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/fake"
|
||||
v1beta1extensions "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/extensions/v1beta1"
|
||||
|
@ -43,6 +43,8 @@ import (
|
|||
fakev1beta1policy "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/policy/v1beta1/fake"
|
||||
v1alpha1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1"
|
||||
fakev1alpha1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1alpha1/fake"
|
||||
v1beta1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1"
|
||||
fakev1beta1rbac "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/rbac/v1beta1/fake"
|
||||
v1beta1storage "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1"
|
||||
fakev1beta1storage "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/storage/v1beta1/fake"
|
||||
"k8s.io/kubernetes/pkg/client/testing/core"
|
||||
|
@ -148,14 +150,14 @@ func (c *Clientset) BatchV2alpha1() v2alpha1batch.BatchV2alpha1Interface {
|
|||
return &fakev2alpha1batch.FakeBatchV2alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// CertificatesV1alpha1 retrieves the CertificatesV1alpha1Client
|
||||
func (c *Clientset) CertificatesV1alpha1() v1alpha1certificates.CertificatesV1alpha1Interface {
|
||||
return &fakev1alpha1certificates.FakeCertificatesV1alpha1{Fake: &c.Fake}
|
||||
// CertificatesV1beta1 retrieves the CertificatesV1beta1Client
|
||||
func (c *Clientset) CertificatesV1beta1() v1beta1certificates.CertificatesV1beta1Interface {
|
||||
return &fakev1beta1certificates.FakeCertificatesV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Certificates retrieves the CertificatesV1alpha1Client
|
||||
func (c *Clientset) Certificates() v1alpha1certificates.CertificatesV1alpha1Interface {
|
||||
return &fakev1alpha1certificates.FakeCertificatesV1alpha1{Fake: &c.Fake}
|
||||
// Certificates retrieves the CertificatesV1beta1Client
|
||||
func (c *Clientset) Certificates() v1beta1certificates.CertificatesV1beta1Interface {
|
||||
return &fakev1beta1certificates.FakeCertificatesV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// ExtensionsV1beta1 retrieves the ExtensionsV1beta1Client
|
||||
|
@ -178,13 +180,18 @@ func (c *Clientset) Policy() v1beta1policy.PolicyV1beta1Interface {
|
|||
return &fakev1beta1policy.FakePolicyV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// RbacV1alpha1 retrieves the RbacV1alpha1Client
|
||||
func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface {
|
||||
return &fakev1alpha1rbac.FakeRbacV1alpha1{Fake: &c.Fake}
|
||||
// RbacV1beta1 retrieves the RbacV1beta1Client
|
||||
func (c *Clientset) RbacV1beta1() v1beta1rbac.RbacV1beta1Interface {
|
||||
return &fakev1beta1rbac.FakeRbacV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Rbac retrieves the RbacV1alpha1Client
|
||||
func (c *Clientset) Rbac() v1alpha1rbac.RbacV1alpha1Interface {
|
||||
// Rbac retrieves the RbacV1beta1Client
|
||||
func (c *Clientset) Rbac() v1beta1rbac.RbacV1beta1Interface {
|
||||
return &fakev1beta1rbac.FakeRbacV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// RbacV1alpha1 retrieves the RbacV1alpha1Client
|
||||
func (c *Clientset) RbacV1alpha1() v1alpha1rbac.RbacV1alpha1Interface {
|
||||
return &fakev1alpha1rbac.FakeRbacV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
|
|
2
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/doc.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/fake/doc.go
generated
vendored
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// This package has the automatically generated fake clientset.
|
||||
package fake
|
||||
|
|
|
@ -18,13 +18,13 @@ go_library(
|
|||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/apps/v1beta1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -20,18 +20,18 @@ import (
|
|||
fmt "fmt"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
type AppsV1beta1Interface interface {
|
||||
RESTClient() restclient.Interface
|
||||
RESTClient() rest.Interface
|
||||
StatefulSetsGetter
|
||||
}
|
||||
|
||||
// AppsV1beta1Client is used to interact with features provided by the apps group.
|
||||
type AppsV1beta1Client struct {
|
||||
restClient restclient.Interface
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *AppsV1beta1Client) StatefulSets(namespace string) StatefulSetInterface {
|
||||
|
@ -39,12 +39,12 @@ func (c *AppsV1beta1Client) StatefulSets(namespace string) StatefulSetInterface
|
|||
}
|
||||
|
||||
// NewForConfig creates a new AppsV1beta1Client for the given config.
|
||||
func NewForConfig(c *restclient.Config) (*AppsV1beta1Client, error) {
|
||||
func NewForConfig(c *rest.Config) (*AppsV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := restclient.RESTClientFor(&config)
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*AppsV1beta1Client, error) {
|
|||
|
||||
// NewForConfigOrDie creates a new AppsV1beta1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *restclient.Config) *AppsV1beta1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *AppsV1beta1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *AppsV1beta1Client {
|
|||
}
|
||||
|
||||
// New creates a new AppsV1beta1Client for the given RESTClient.
|
||||
func New(c restclient.Interface) *AppsV1beta1Client {
|
||||
func New(c rest.Interface) *AppsV1beta1Client {
|
||||
return &AppsV1beta1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *restclient.Config) error {
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv, err := schema.ParseGroupVersion("apps/v1beta1")
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
}
|
||||
config.APIPath = "/apis"
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = restclient.DefaultKubernetesUserAgent()
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
copyGroupVersion := gv
|
||||
config.GroupVersion = ©GroupVersion
|
||||
|
@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *AppsV1beta1Client) RESTClient() restclient.Interface {
|
||||
func (c *AppsV1beta1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1beta1
|
||||
|
|
|
@ -16,16 +16,15 @@ go_library(
|
|||
],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/apps/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/apps/v1beta1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//pkg/client/testing/core:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/labels",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
|
|
@ -17,8 +17,8 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/apps/v1beta1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
||||
|
@ -32,7 +32,7 @@ func (c *FakeAppsV1beta1) StatefulSets(namespace string) v1beta1.StatefulSetInte
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeAppsV1beta1) RESTClient() restclient.Interface {
|
||||
var ret *restclient.RESTClient
|
||||
func (c *FakeAppsV1beta1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
|
|
|
@ -17,12 +17,11 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -79,7 +78,7 @@ func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptio
|
|||
return err
|
||||
}
|
||||
|
||||
func (c *FakeStatefulSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.StatefulSet, err error) {
|
||||
func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction(statefulsetsResource, c.ns, name), &v1beta1.StatefulSet{})
|
||||
|
||||
|
@ -118,7 +117,7 @@ func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched statefulSet.
|
||||
func (c *FakeStatefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) {
|
||||
func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, data, subresources...), &v1beta1.StatefulSet{})
|
||||
|
||||
|
|
|
@ -17,12 +17,12 @@ limitations under the License.
|
|||
package v1beta1
|
||||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
// StatefulSetsGetter has a method to return a StatefulSetInterface.
|
||||
|
@ -38,16 +38,16 @@ type StatefulSetInterface interface {
|
|||
UpdateStatus(*v1beta1.StatefulSet) (*v1beta1.StatefulSet, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v1beta1.StatefulSet, error)
|
||||
Get(name string, options v1.GetOptions) (*v1beta1.StatefulSet, error)
|
||||
List(opts v1.ListOptions) (*v1beta1.StatefulSetList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error)
|
||||
StatefulSetExpansion
|
||||
}
|
||||
|
||||
// statefulSets implements StatefulSetInterface
|
||||
type statefulSets struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ func (c *statefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v
|
|||
}
|
||||
|
||||
// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
|
||||
func (c *statefulSets) Get(name string, options meta_v1.GetOptions) (result *v1beta1.StatefulSet, err error) {
|
||||
func (c *statefulSets) Get(name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) {
|
||||
result = &v1beta1.StatefulSet{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
|
@ -158,7 +158,7 @@ func (c *statefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched statefulSet.
|
||||
func (c *statefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) {
|
||||
func (c *statefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.StatefulSet, err error) {
|
||||
result = &v1beta1.StatefulSet{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
|
|
|
@ -20,9 +20,9 @@ go_library(
|
|||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/apis/authentication/v1beta1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -20,18 +20,18 @@ import (
|
|||
fmt "fmt"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
type AuthenticationV1beta1Interface interface {
|
||||
RESTClient() restclient.Interface
|
||||
RESTClient() rest.Interface
|
||||
TokenReviewsGetter
|
||||
}
|
||||
|
||||
// AuthenticationV1beta1Client is used to interact with features provided by the authentication.k8s.io group.
|
||||
type AuthenticationV1beta1Client struct {
|
||||
restClient restclient.Interface
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *AuthenticationV1beta1Client) TokenReviews() TokenReviewInterface {
|
||||
|
@ -39,12 +39,12 @@ func (c *AuthenticationV1beta1Client) TokenReviews() TokenReviewInterface {
|
|||
}
|
||||
|
||||
// NewForConfig creates a new AuthenticationV1beta1Client for the given config.
|
||||
func NewForConfig(c *restclient.Config) (*AuthenticationV1beta1Client, error) {
|
||||
func NewForConfig(c *rest.Config) (*AuthenticationV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := restclient.RESTClientFor(&config)
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*AuthenticationV1beta1Client, error) {
|
|||
|
||||
// NewForConfigOrDie creates a new AuthenticationV1beta1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *restclient.Config) *AuthenticationV1beta1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *AuthenticationV1beta1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *AuthenticationV1beta1Client {
|
|||
}
|
||||
|
||||
// New creates a new AuthenticationV1beta1Client for the given RESTClient.
|
||||
func New(c restclient.Interface) *AuthenticationV1beta1Client {
|
||||
func New(c rest.Interface) *AuthenticationV1beta1Client {
|
||||
return &AuthenticationV1beta1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *restclient.Config) error {
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv, err := schema.ParseGroupVersion("authentication.k8s.io/v1beta1")
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
}
|
||||
config.APIPath = "/apis"
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = restclient.DefaultKubernetesUserAgent()
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
copyGroupVersion := gv
|
||||
config.GroupVersion = ©GroupVersion
|
||||
|
@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *AuthenticationV1beta1Client) RESTClient() restclient.Interface {
|
||||
func (c *AuthenticationV1beta1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1beta1
|
||||
|
|
|
@ -19,8 +19,8 @@ go_library(
|
|||
deps = [
|
||||
"//pkg/apis/authentication/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/authentication/v1beta1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//pkg/client/testing/core:go_default_library",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
|
|
@ -17,8 +17,8 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authentication/v1beta1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
||||
|
@ -32,7 +32,7 @@ func (c *FakeAuthenticationV1beta1) TokenReviews() v1beta1.TokenReviewInterface
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeAuthenticationV1beta1) RESTClient() restclient.Interface {
|
||||
var ret *restclient.RESTClient
|
||||
func (c *FakeAuthenticationV1beta1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
package v1beta1
|
||||
|
||||
import (
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// TokenReviewsGetter has a method to return a TokenReviewInterface.
|
||||
|
@ -33,7 +33,7 @@ type TokenReviewInterface interface {
|
|||
|
||||
// tokenReviews implements TokenReviewInterface
|
||||
type tokenReviews struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newTokenReviews returns a TokenReviews
|
||||
|
|
|
@ -24,9 +24,9 @@ go_library(
|
|||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/apis/authorization/v1beta1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -20,12 +20,12 @@ import (
|
|||
fmt "fmt"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
type AuthorizationV1beta1Interface interface {
|
||||
RESTClient() restclient.Interface
|
||||
RESTClient() rest.Interface
|
||||
LocalSubjectAccessReviewsGetter
|
||||
SelfSubjectAccessReviewsGetter
|
||||
SubjectAccessReviewsGetter
|
||||
|
@ -33,7 +33,7 @@ type AuthorizationV1beta1Interface interface {
|
|||
|
||||
// AuthorizationV1beta1Client is used to interact with features provided by the authorization.k8s.io group.
|
||||
type AuthorizationV1beta1Client struct {
|
||||
restClient restclient.Interface
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *AuthorizationV1beta1Client) LocalSubjectAccessReviews(namespace string) LocalSubjectAccessReviewInterface {
|
||||
|
@ -49,12 +49,12 @@ func (c *AuthorizationV1beta1Client) SubjectAccessReviews() SubjectAccessReviewI
|
|||
}
|
||||
|
||||
// NewForConfig creates a new AuthorizationV1beta1Client for the given config.
|
||||
func NewForConfig(c *restclient.Config) (*AuthorizationV1beta1Client, error) {
|
||||
func NewForConfig(c *rest.Config) (*AuthorizationV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := restclient.RESTClientFor(&config)
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ func NewForConfig(c *restclient.Config) (*AuthorizationV1beta1Client, error) {
|
|||
|
||||
// NewForConfigOrDie creates a new AuthorizationV1beta1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *restclient.Config) *AuthorizationV1beta1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *AuthorizationV1beta1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -72,11 +72,11 @@ func NewForConfigOrDie(c *restclient.Config) *AuthorizationV1beta1Client {
|
|||
}
|
||||
|
||||
// New creates a new AuthorizationV1beta1Client for the given RESTClient.
|
||||
func New(c restclient.Interface) *AuthorizationV1beta1Client {
|
||||
func New(c rest.Interface) *AuthorizationV1beta1Client {
|
||||
return &AuthorizationV1beta1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *restclient.Config) error {
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv, err := schema.ParseGroupVersion("authorization.k8s.io/v1beta1")
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -87,7 +87,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
}
|
||||
config.APIPath = "/apis"
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = restclient.DefaultKubernetesUserAgent()
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
copyGroupVersion := gv
|
||||
config.GroupVersion = ©GroupVersion
|
||||
|
@ -99,7 +99,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *AuthorizationV1beta1Client) RESTClient() restclient.Interface {
|
||||
func (c *AuthorizationV1beta1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1beta1
|
||||
|
|
|
@ -24,8 +24,8 @@ go_library(
|
|||
deps = [
|
||||
"//pkg/apis/authorization/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/authorization/v1beta1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//pkg/client/testing/core:go_default_library",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
|
|
@ -17,8 +17,8 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/authorization/v1beta1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
||||
|
@ -40,7 +40,7 @@ func (c *FakeAuthorizationV1beta1) SubjectAccessReviews() v1beta1.SubjectAccessR
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeAuthorizationV1beta1) RESTClient() restclient.Interface {
|
||||
var ret *restclient.RESTClient
|
||||
func (c *FakeAuthorizationV1beta1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
package v1beta1
|
||||
|
||||
import (
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// LocalSubjectAccessReviewsGetter has a method to return a LocalSubjectAccessReviewInterface.
|
||||
|
@ -33,7 +33,7 @@ type LocalSubjectAccessReviewInterface interface {
|
|||
|
||||
// localSubjectAccessReviews implements LocalSubjectAccessReviewInterface
|
||||
type localSubjectAccessReviews struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
package v1beta1
|
||||
|
||||
import (
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// SelfSubjectAccessReviewsGetter has a method to return a SelfSubjectAccessReviewInterface.
|
||||
|
@ -33,7 +33,7 @@ type SelfSubjectAccessReviewInterface interface {
|
|||
|
||||
// selfSubjectAccessReviews implements SelfSubjectAccessReviewInterface
|
||||
type selfSubjectAccessReviews struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newSelfSubjectAccessReviews returns a SelfSubjectAccessReviews
|
||||
|
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
package v1beta1
|
||||
|
||||
import (
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// SubjectAccessReviewsGetter has a method to return a SubjectAccessReviewInterface.
|
||||
|
@ -33,7 +33,7 @@ type SubjectAccessReviewInterface interface {
|
|||
|
||||
// subjectAccessReviews implements SubjectAccessReviewInterface
|
||||
type subjectAccessReviews struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newSubjectAccessReviews returns a SubjectAccessReviews
|
||||
|
|
|
@ -18,13 +18,13 @@ go_library(
|
|||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/autoscaling/v1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -20,18 +20,18 @@ import (
|
|||
fmt "fmt"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
type AutoscalingV1Interface interface {
|
||||
RESTClient() restclient.Interface
|
||||
RESTClient() rest.Interface
|
||||
HorizontalPodAutoscalersGetter
|
||||
}
|
||||
|
||||
// AutoscalingV1Client is used to interact with features provided by the autoscaling group.
|
||||
type AutoscalingV1Client struct {
|
||||
restClient restclient.Interface
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
|
||||
|
@ -39,12 +39,12 @@ func (c *AutoscalingV1Client) HorizontalPodAutoscalers(namespace string) Horizon
|
|||
}
|
||||
|
||||
// NewForConfig creates a new AutoscalingV1Client for the given config.
|
||||
func NewForConfig(c *restclient.Config) (*AutoscalingV1Client, error) {
|
||||
func NewForConfig(c *rest.Config) (*AutoscalingV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := restclient.RESTClientFor(&config)
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*AutoscalingV1Client, error) {
|
|||
|
||||
// NewForConfigOrDie creates a new AutoscalingV1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *restclient.Config) *AutoscalingV1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *AutoscalingV1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *AutoscalingV1Client {
|
|||
}
|
||||
|
||||
// New creates a new AutoscalingV1Client for the given RESTClient.
|
||||
func New(c restclient.Interface) *AutoscalingV1Client {
|
||||
func New(c rest.Interface) *AutoscalingV1Client {
|
||||
return &AutoscalingV1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *restclient.Config) error {
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv, err := schema.ParseGroupVersion("autoscaling/v1")
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
}
|
||||
config.APIPath = "/apis"
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = restclient.DefaultKubernetesUserAgent()
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
copyGroupVersion := gv
|
||||
config.GroupVersion = ©GroupVersion
|
||||
|
@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *AutoscalingV1Client) RESTClient() restclient.Interface {
|
||||
func (c *AutoscalingV1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1
|
||||
|
|
|
@ -16,16 +16,15 @@ go_library(
|
|||
],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/autoscaling/v1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/autoscaling/v1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//pkg/client/testing/core:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/labels",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
|
|
@ -17,8 +17,8 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
v1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/autoscaling/v1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
||||
|
@ -32,7 +32,7 @@ func (c *FakeAutoscalingV1) HorizontalPodAutoscalers(namespace string) v1.Horizo
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeAutoscalingV1) RESTClient() restclient.Interface {
|
||||
var ret *restclient.RESTClient
|
||||
func (c *FakeAutoscalingV1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
|
|
|
@ -20,9 +20,8 @@ import (
|
|||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
api_v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -65,14 +64,14 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.
|
|||
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api_v1.DeleteOptions) error {
|
||||
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
|
||||
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.HorizontalPodAutoscalerList{})
|
||||
|
@ -89,7 +88,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string, options meta_v1.GetOptio
|
|||
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
|
||||
func (c *FakeHorizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &v1.HorizontalPodAutoscalerList{})
|
||||
|
||||
|
@ -111,14 +110,14 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
||||
func (c *FakeHorizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeHorizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
|
||||
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &v1.HorizontalPodAutoscaler{})
|
||||
|
||||
|
|
|
@ -18,11 +18,11 @@ package v1
|
|||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
api_v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
|
||||
|
@ -36,18 +36,18 @@ type HorizontalPodAutoscalerInterface interface {
|
|||
Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
|
||||
Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
|
||||
UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
|
||||
Delete(name string, options *api_v1.DeleteOptions) error
|
||||
DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error
|
||||
Delete(name string, options *meta_v1.DeleteOptions) error
|
||||
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v1.HorizontalPodAutoscaler, error)
|
||||
List(opts api_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
|
||||
Watch(opts api_v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error)
|
||||
List(opts meta_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
|
||||
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error)
|
||||
HorizontalPodAutoscalerExpansion
|
||||
}
|
||||
|
||||
// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
|
||||
type horizontalPodAutoscalers struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.Hori
|
|||
}
|
||||
|
||||
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
|
||||
func (c *horizontalPodAutoscalers) Delete(name string, options *api_v1.DeleteOptions) error {
|
||||
func (c *horizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("horizontalpodautoscalers").
|
||||
|
@ -112,7 +112,7 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *api_v1.DeleteOpt
|
|||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *horizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
|
||||
func (c *horizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("horizontalpodautoscalers").
|
||||
|
@ -136,7 +136,7 @@ func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions)
|
|||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||
func (c *horizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
|
||||
func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
|
||||
result = &v1.HorizontalPodAutoscalerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
|
@ -148,7 +148,7 @@ func (c *horizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.Hor
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
||||
func (c *horizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.client.Get().
|
||||
Prefix("watch").
|
||||
Namespace(c.ns).
|
||||
|
@ -158,7 +158,7 @@ func (c *horizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interfa
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
|
||||
func (c *horizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||
func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||
result = &v1.HorizontalPodAutoscaler{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
|
|
|
@ -18,13 +18,13 @@ go_library(
|
|||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/batch/v1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -20,18 +20,18 @@ import (
|
|||
fmt "fmt"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
type BatchV1Interface interface {
|
||||
RESTClient() restclient.Interface
|
||||
RESTClient() rest.Interface
|
||||
JobsGetter
|
||||
}
|
||||
|
||||
// BatchV1Client is used to interact with features provided by the batch group.
|
||||
type BatchV1Client struct {
|
||||
restClient restclient.Interface
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *BatchV1Client) Jobs(namespace string) JobInterface {
|
||||
|
@ -39,12 +39,12 @@ func (c *BatchV1Client) Jobs(namespace string) JobInterface {
|
|||
}
|
||||
|
||||
// NewForConfig creates a new BatchV1Client for the given config.
|
||||
func NewForConfig(c *restclient.Config) (*BatchV1Client, error) {
|
||||
func NewForConfig(c *rest.Config) (*BatchV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := restclient.RESTClientFor(&config)
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ func NewForConfig(c *restclient.Config) (*BatchV1Client, error) {
|
|||
|
||||
// NewForConfigOrDie creates a new BatchV1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *restclient.Config) *BatchV1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *BatchV1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -62,11 +62,11 @@ func NewForConfigOrDie(c *restclient.Config) *BatchV1Client {
|
|||
}
|
||||
|
||||
// New creates a new BatchV1Client for the given RESTClient.
|
||||
func New(c restclient.Interface) *BatchV1Client {
|
||||
func New(c rest.Interface) *BatchV1Client {
|
||||
return &BatchV1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *restclient.Config) error {
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv, err := schema.ParseGroupVersion("batch/v1")
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -77,7 +77,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
}
|
||||
config.APIPath = "/apis"
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = restclient.DefaultKubernetesUserAgent()
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
copyGroupVersion := gv
|
||||
config.GroupVersion = ©GroupVersion
|
||||
|
@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *BatchV1Client) RESTClient() restclient.Interface {
|
||||
func (c *BatchV1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1
|
||||
|
|
|
@ -16,16 +16,15 @@ go_library(
|
|||
],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/batch/v1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/batch/v1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//pkg/client/testing/core:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/labels",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
|
|
@ -17,8 +17,8 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
v1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
||||
|
@ -32,7 +32,7 @@ func (c *FakeBatchV1) Jobs(namespace string) v1.JobInterface {
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeBatchV1) RESTClient() restclient.Interface {
|
||||
var ret *restclient.RESTClient
|
||||
func (c *FakeBatchV1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
|
|
|
@ -20,9 +20,8 @@ import (
|
|||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
api_v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
v1 "k8s.io/kubernetes/pkg/apis/batch/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -65,14 +64,14 @@ func (c *FakeJobs) UpdateStatus(job *v1.Job) (*v1.Job, error) {
|
|||
return obj.(*v1.Job), err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) Delete(name string, options *api_v1.DeleteOptions) error {
|
||||
func (c *FakeJobs) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &v1.Job{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
|
||||
func (c *FakeJobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.JobList{})
|
||||
|
@ -89,7 +88,7 @@ func (c *FakeJobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job,
|
|||
return obj.(*v1.Job), err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) {
|
||||
func (c *FakeJobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction(jobsResource, c.ns, opts), &v1.JobList{})
|
||||
|
||||
|
@ -111,14 +110,14 @@ func (c *FakeJobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error)
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested jobs.
|
||||
func (c *FakeJobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeJobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched job.
|
||||
func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
|
||||
func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &v1.Job{})
|
||||
|
||||
|
|
26
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go
generated
vendored
26
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v1/job.go
generated
vendored
|
@ -18,11 +18,11 @@ package v1
|
|||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
api_v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
v1 "k8s.io/kubernetes/pkg/apis/batch/v1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
// JobsGetter has a method to return a JobInterface.
|
||||
|
@ -36,18 +36,18 @@ type JobInterface interface {
|
|||
Create(*v1.Job) (*v1.Job, error)
|
||||
Update(*v1.Job) (*v1.Job, error)
|
||||
UpdateStatus(*v1.Job) (*v1.Job, error)
|
||||
Delete(name string, options *api_v1.DeleteOptions) error
|
||||
DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error
|
||||
Delete(name string, options *meta_v1.DeleteOptions) error
|
||||
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v1.Job, error)
|
||||
List(opts api_v1.ListOptions) (*v1.JobList, error)
|
||||
Watch(opts api_v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error)
|
||||
List(opts meta_v1.ListOptions) (*v1.JobList, error)
|
||||
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error)
|
||||
JobExpansion
|
||||
}
|
||||
|
||||
// jobs implements JobInterface
|
||||
type jobs struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) {
|
|||
}
|
||||
|
||||
// Delete takes name of the job and deletes it. Returns an error if one occurs.
|
||||
func (c *jobs) Delete(name string, options *api_v1.DeleteOptions) error {
|
||||
func (c *jobs) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("jobs").
|
||||
|
@ -112,7 +112,7 @@ func (c *jobs) Delete(name string, options *api_v1.DeleteOptions) error {
|
|||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *jobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
|
||||
func (c *jobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("jobs").
|
||||
|
@ -136,7 +136,7 @@ func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, err
|
|||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
|
||||
func (c *jobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) {
|
||||
func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) {
|
||||
result = &v1.JobList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
|
@ -148,7 +148,7 @@ func (c *jobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) {
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested jobs.
|
||||
func (c *jobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.client.Get().
|
||||
Prefix("watch").
|
||||
Namespace(c.ns).
|
||||
|
@ -158,7 +158,7 @@ func (c *jobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched job.
|
||||
func (c *jobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
|
||||
func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) {
|
||||
result = &v1.Job{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
|
|
|
@ -19,13 +19,13 @@ go_library(
|
|||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/batch/v2alpha1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -20,19 +20,19 @@ import (
|
|||
fmt "fmt"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
type BatchV2alpha1Interface interface {
|
||||
RESTClient() restclient.Interface
|
||||
RESTClient() rest.Interface
|
||||
CronJobsGetter
|
||||
JobsGetter
|
||||
}
|
||||
|
||||
// BatchV2alpha1Client is used to interact with features provided by the batch group.
|
||||
type BatchV2alpha1Client struct {
|
||||
restClient restclient.Interface
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *BatchV2alpha1Client) CronJobs(namespace string) CronJobInterface {
|
||||
|
@ -44,12 +44,12 @@ func (c *BatchV2alpha1Client) Jobs(namespace string) JobInterface {
|
|||
}
|
||||
|
||||
// NewForConfig creates a new BatchV2alpha1Client for the given config.
|
||||
func NewForConfig(c *restclient.Config) (*BatchV2alpha1Client, error) {
|
||||
func NewForConfig(c *rest.Config) (*BatchV2alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := restclient.RESTClientFor(&config)
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ func NewForConfig(c *restclient.Config) (*BatchV2alpha1Client, error) {
|
|||
|
||||
// NewForConfigOrDie creates a new BatchV2alpha1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *restclient.Config) *BatchV2alpha1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *BatchV2alpha1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -67,11 +67,11 @@ func NewForConfigOrDie(c *restclient.Config) *BatchV2alpha1Client {
|
|||
}
|
||||
|
||||
// New creates a new BatchV2alpha1Client for the given RESTClient.
|
||||
func New(c restclient.Interface) *BatchV2alpha1Client {
|
||||
func New(c rest.Interface) *BatchV2alpha1Client {
|
||||
return &BatchV2alpha1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *restclient.Config) error {
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv, err := schema.ParseGroupVersion("batch/v2alpha1")
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -82,7 +82,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
}
|
||||
config.APIPath = "/apis"
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = restclient.DefaultKubernetesUserAgent()
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
copyGroupVersion := gv
|
||||
config.GroupVersion = ©GroupVersion
|
||||
|
@ -94,7 +94,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *BatchV2alpha1Client) RESTClient() restclient.Interface {
|
||||
func (c *BatchV2alpha1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -17,12 +17,12 @@ limitations under the License.
|
|||
package v2alpha1
|
||||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
// CronJobsGetter has a method to return a CronJobInterface.
|
||||
|
@ -38,16 +38,16 @@ type CronJobInterface interface {
|
|||
UpdateStatus(*v2alpha1.CronJob) (*v2alpha1.CronJob, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v2alpha1.CronJob, error)
|
||||
Get(name string, options v1.GetOptions) (*v2alpha1.CronJob, error)
|
||||
List(opts v1.ListOptions) (*v2alpha1.CronJobList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error)
|
||||
CronJobExpansion
|
||||
}
|
||||
|
||||
// cronJobs implements CronJobInterface
|
||||
type cronJobs struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ func (c *cronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li
|
|||
}
|
||||
|
||||
// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
|
||||
func (c *cronJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.CronJob, err error) {
|
||||
func (c *cronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) {
|
||||
result = &v2alpha1.CronJob{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
|
@ -158,7 +158,7 @@ func (c *cronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched cronJob.
|
||||
func (c *cronJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) {
|
||||
func (c *cronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) {
|
||||
result = &v2alpha1.CronJob{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v2alpha1
|
||||
|
|
|
@ -17,16 +17,15 @@ go_library(
|
|||
],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/batch/v2alpha1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/batch/v2alpha1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//pkg/client/testing/core:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/labels",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
|
|
@ -17,8 +17,8 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
v2alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/batch/v2alpha1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
||||
|
@ -36,7 +36,7 @@ func (c *FakeBatchV2alpha1) Jobs(namespace string) v2alpha1.JobInterface {
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeBatchV2alpha1) RESTClient() restclient.Interface {
|
||||
var ret *restclient.RESTClient
|
||||
func (c *FakeBatchV2alpha1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
|
|
|
@ -17,12 +17,11 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -79,7 +78,7 @@ func (c *FakeCronJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v
|
|||
return err
|
||||
}
|
||||
|
||||
func (c *FakeCronJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.CronJob, err error) {
|
||||
func (c *FakeCronJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction(cronjobsResource, c.ns, name), &v2alpha1.CronJob{})
|
||||
|
||||
|
@ -118,7 +117,7 @@ func (c *FakeCronJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched cronJob.
|
||||
func (c *FakeCronJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) {
|
||||
func (c *FakeCronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.CronJob, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewPatchSubresourceAction(cronjobsResource, c.ns, name, data, subresources...), &v2alpha1.CronJob{})
|
||||
|
||||
|
|
|
@ -17,12 +17,11 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -79,7 +78,7 @@ func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.Li
|
|||
return err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.Job, err error) {
|
||||
func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *v2alpha1.Job, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction(jobsResource, c.ns, name), &v2alpha1.Job{})
|
||||
|
||||
|
@ -118,7 +117,7 @@ func (c *FakeJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched job.
|
||||
func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) {
|
||||
func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &v2alpha1.Job{})
|
||||
|
||||
|
|
|
@ -17,12 +17,12 @@ limitations under the License.
|
|||
package v2alpha1
|
||||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
v2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
// JobsGetter has a method to return a JobInterface.
|
||||
|
@ -38,16 +38,16 @@ type JobInterface interface {
|
|||
UpdateStatus(*v2alpha1.Job) (*v2alpha1.Job, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v2alpha1.Job, error)
|
||||
Get(name string, options v1.GetOptions) (*v2alpha1.Job, error)
|
||||
List(opts v1.ListOptions) (*v2alpha1.JobList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error)
|
||||
JobExpansion
|
||||
}
|
||||
|
||||
// jobs implements JobInterface
|
||||
type jobs struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ func (c *jobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOp
|
|||
}
|
||||
|
||||
// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
|
||||
func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v2alpha1.Job, err error) {
|
||||
func (c *jobs) Get(name string, options v1.GetOptions) (result *v2alpha1.Job, err error) {
|
||||
result = &v2alpha1.Job{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
|
@ -158,7 +158,7 @@ func (c *jobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched job.
|
||||
func (c *jobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) {
|
||||
func (c *jobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2alpha1.Job, err error) {
|
||||
result = &v2alpha1.Job{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
|
|
|
@ -19,13 +19,13 @@ go_library(
|
|||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/certificates/v1alpha1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//pkg/apis/certificates/v1beta1:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -40,7 +40,7 @@ filegroup(
|
|||
name = "all-srcs",
|
||||
srcs = [
|
||||
":package-srcs",
|
||||
"//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1/fake:all-srcs",
|
||||
"//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1/fake:all-srcs",
|
||||
],
|
||||
tags = ["automanaged"],
|
||||
)
|
|
@ -14,46 +14,46 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
type CertificatesV1alpha1Interface interface {
|
||||
RESTClient() restclient.Interface
|
||||
type CertificatesV1beta1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
CertificateSigningRequestsGetter
|
||||
}
|
||||
|
||||
// CertificatesV1alpha1Client is used to interact with features provided by the certificates.k8s.io group.
|
||||
type CertificatesV1alpha1Client struct {
|
||||
restClient restclient.Interface
|
||||
// CertificatesV1beta1Client is used to interact with features provided by the certificates.k8s.io group.
|
||||
type CertificatesV1beta1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *CertificatesV1alpha1Client) CertificateSigningRequests() CertificateSigningRequestInterface {
|
||||
func (c *CertificatesV1beta1Client) CertificateSigningRequests() CertificateSigningRequestInterface {
|
||||
return newCertificateSigningRequests(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new CertificatesV1alpha1Client for the given config.
|
||||
func NewForConfig(c *restclient.Config) (*CertificatesV1alpha1Client, error) {
|
||||
// NewForConfig creates a new CertificatesV1beta1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*CertificatesV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := restclient.RESTClientFor(&config)
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &CertificatesV1alpha1Client{client}, nil
|
||||
return &CertificatesV1beta1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new CertificatesV1alpha1Client for the given config and
|
||||
// NewForConfigOrDie creates a new CertificatesV1beta1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *restclient.Config) *CertificatesV1alpha1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *CertificatesV1beta1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -61,23 +61,23 @@ func NewForConfigOrDie(c *restclient.Config) *CertificatesV1alpha1Client {
|
|||
return client
|
||||
}
|
||||
|
||||
// New creates a new CertificatesV1alpha1Client for the given RESTClient.
|
||||
func New(c restclient.Interface) *CertificatesV1alpha1Client {
|
||||
return &CertificatesV1alpha1Client{c}
|
||||
// New creates a new CertificatesV1beta1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *CertificatesV1beta1Client {
|
||||
return &CertificatesV1beta1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *restclient.Config) error {
|
||||
gv, err := schema.ParseGroupVersion("certificates.k8s.io/v1alpha1")
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv, err := schema.ParseGroupVersion("certificates.k8s.io/v1beta1")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// if certificates.k8s.io/v1alpha1 is not enabled, return an error
|
||||
// if certificates.k8s.io/v1beta1 is not enabled, return an error
|
||||
if !api.Registry.IsEnabledVersion(gv) {
|
||||
return fmt.Errorf("certificates.k8s.io/v1alpha1 is not enabled")
|
||||
return fmt.Errorf("certificates.k8s.io/v1beta1 is not enabled")
|
||||
}
|
||||
config.APIPath = "/apis"
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = restclient.DefaultKubernetesUserAgent()
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
copyGroupVersion := gv
|
||||
config.GroupVersion = ©GroupVersion
|
||||
|
@ -89,7 +89,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *CertificatesV1alpha1Client) RESTClient() restclient.Interface {
|
||||
func (c *CertificatesV1beta1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
|
@ -14,15 +14,15 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
v1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1"
|
||||
)
|
||||
|
||||
// CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface.
|
||||
|
@ -33,33 +33,33 @@ type CertificateSigningRequestsGetter interface {
|
|||
|
||||
// CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources.
|
||||
type CertificateSigningRequestInterface interface {
|
||||
Create(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error)
|
||||
Update(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error)
|
||||
UpdateStatus(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error)
|
||||
Create(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
|
||||
Update(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
|
||||
UpdateStatus(*v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v1alpha1.CertificateSigningRequest, error)
|
||||
List(opts v1.ListOptions) (*v1alpha1.CertificateSigningRequestList, error)
|
||||
Get(name string, options v1.GetOptions) (*v1beta1.CertificateSigningRequest, error)
|
||||
List(opts v1.ListOptions) (*v1beta1.CertificateSigningRequestList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error)
|
||||
CertificateSigningRequestExpansion
|
||||
}
|
||||
|
||||
// certificateSigningRequests implements CertificateSigningRequestInterface
|
||||
type certificateSigningRequests struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newCertificateSigningRequests returns a CertificateSigningRequests
|
||||
func newCertificateSigningRequests(c *CertificatesV1alpha1Client) *certificateSigningRequests {
|
||||
func newCertificateSigningRequests(c *CertificatesV1beta1Client) *certificateSigningRequests {
|
||||
return &certificateSigningRequests{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
|
||||
func (c *certificateSigningRequests) Create(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) {
|
||||
result = &v1alpha1.CertificateSigningRequest{}
|
||||
func (c *certificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
|
||||
result = &v1beta1.CertificateSigningRequest{}
|
||||
err = c.client.Post().
|
||||
Resource("certificatesigningrequests").
|
||||
Body(certificateSigningRequest).
|
||||
|
@ -69,8 +69,8 @@ func (c *certificateSigningRequests) Create(certificateSigningRequest *v1alpha1.
|
|||
}
|
||||
|
||||
// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
|
||||
func (c *certificateSigningRequests) Update(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) {
|
||||
result = &v1alpha1.CertificateSigningRequest{}
|
||||
func (c *certificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
|
||||
result = &v1beta1.CertificateSigningRequest{}
|
||||
err = c.client.Put().
|
||||
Resource("certificatesigningrequests").
|
||||
Name(certificateSigningRequest.Name).
|
||||
|
@ -83,8 +83,8 @@ func (c *certificateSigningRequests) Update(certificateSigningRequest *v1alpha1.
|
|||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclientstatus=false comment above the type to avoid generating UpdateStatus().
|
||||
|
||||
func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) {
|
||||
result = &v1alpha1.CertificateSigningRequest{}
|
||||
func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
|
||||
result = &v1beta1.CertificateSigningRequest{}
|
||||
err = c.client.Put().
|
||||
Resource("certificatesigningrequests").
|
||||
Name(certificateSigningRequest.Name).
|
||||
|
@ -116,8 +116,8 @@ func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions,
|
|||
}
|
||||
|
||||
// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any.
|
||||
func (c *certificateSigningRequests) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.CertificateSigningRequest, err error) {
|
||||
result = &v1alpha1.CertificateSigningRequest{}
|
||||
func (c *certificateSigningRequests) Get(name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) {
|
||||
result = &v1beta1.CertificateSigningRequest{}
|
||||
err = c.client.Get().
|
||||
Resource("certificatesigningrequests").
|
||||
Name(name).
|
||||
|
@ -128,8 +128,8 @@ func (c *certificateSigningRequests) Get(name string, options meta_v1.GetOptions
|
|||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors.
|
||||
func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1alpha1.CertificateSigningRequestList, err error) {
|
||||
result = &v1alpha1.CertificateSigningRequestList{}
|
||||
func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) {
|
||||
result = &v1beta1.CertificateSigningRequestList{}
|
||||
err = c.client.Get().
|
||||
Resource("certificatesigningrequests").
|
||||
VersionedParams(&opts, api.ParameterCodec).
|
||||
|
@ -148,8 +148,8 @@ func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched certificateSigningRequest.
|
||||
func (c *certificateSigningRequests) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error) {
|
||||
result = &v1alpha1.CertificateSigningRequest{}
|
||||
func (c *certificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) {
|
||||
result = &v1beta1.CertificateSigningRequest{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("certificatesigningrequests").
|
||||
SubResource(subresources...).
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2016 The Kubernetes Authors.
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
certificates "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1"
|
||||
certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1"
|
||||
)
|
||||
|
||||
type CertificateSigningRequestExpansion interface {
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1alpha1
|
||||
package v1beta1
|
|
@ -17,16 +17,15 @@ go_library(
|
|||
],
|
||||
tags = ["automanaged"],
|
||||
deps = [
|
||||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/certificates/v1alpha1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//pkg/apis/certificates/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/certificates/v1beta1:go_default_library",
|
||||
"//pkg/client/testing/core:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/labels",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
|
@ -17,22 +17,22 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1alpha1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
rest "k8s.io/client-go/rest"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/certificates/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
||||
type FakeCertificatesV1alpha1 struct {
|
||||
type FakeCertificatesV1beta1 struct {
|
||||
*core.Fake
|
||||
}
|
||||
|
||||
func (c *FakeCertificatesV1alpha1) CertificateSigningRequests() v1alpha1.CertificateSigningRequestInterface {
|
||||
func (c *FakeCertificatesV1beta1) CertificateSigningRequests() v1beta1.CertificateSigningRequestInterface {
|
||||
return &FakeCertificateSigningRequests{c}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeCertificatesV1alpha1) RESTClient() restclient.Interface {
|
||||
var ret *restclient.RESTClient
|
||||
func (c *FakeCertificatesV1beta1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
|
@ -17,75 +17,74 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
v1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/certificates/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
||||
// FakeCertificateSigningRequests implements CertificateSigningRequestInterface
|
||||
type FakeCertificateSigningRequests struct {
|
||||
Fake *FakeCertificatesV1alpha1
|
||||
Fake *FakeCertificatesV1beta1
|
||||
}
|
||||
|
||||
var certificatesigningrequestsResource = schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1alpha1", Resource: "certificatesigningrequests"}
|
||||
var certificatesigningrequestsResource = schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1beta1", Resource: "certificatesigningrequests"}
|
||||
|
||||
func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) {
|
||||
func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1alpha1.CertificateSigningRequest{})
|
||||
Invokes(core.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.CertificateSigningRequest), err
|
||||
return obj.(*v1beta1.CertificateSigningRequest), err
|
||||
}
|
||||
|
||||
func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (result *v1alpha1.CertificateSigningRequest, err error) {
|
||||
func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *v1beta1.CertificateSigningRequest) (result *v1beta1.CertificateSigningRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1alpha1.CertificateSigningRequest{})
|
||||
Invokes(core.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &v1beta1.CertificateSigningRequest{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.CertificateSigningRequest), err
|
||||
return obj.(*v1beta1.CertificateSigningRequest), err
|
||||
}
|
||||
|
||||
func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest *v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) {
|
||||
func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest *v1beta1.CertificateSigningRequest) (*v1beta1.CertificateSigningRequest, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &v1alpha1.CertificateSigningRequest{})
|
||||
Invokes(core.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &v1beta1.CertificateSigningRequest{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.CertificateSigningRequest), err
|
||||
return obj.(*v1beta1.CertificateSigningRequest), err
|
||||
}
|
||||
|
||||
func (c *FakeCertificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1alpha1.CertificateSigningRequest{})
|
||||
Invokes(core.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeCertificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.CertificateSigningRequestList{})
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.CertificateSigningRequestList{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeCertificateSigningRequests) Get(name string, options meta_v1.GetOptions) (result *v1alpha1.CertificateSigningRequest, err error) {
|
||||
func (c *FakeCertificateSigningRequests) Get(name string, options v1.GetOptions) (result *v1beta1.CertificateSigningRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction(certificatesigningrequestsResource, name), &v1alpha1.CertificateSigningRequest{})
|
||||
Invokes(core.NewRootGetAction(certificatesigningrequestsResource, name), &v1beta1.CertificateSigningRequest{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.CertificateSigningRequest), err
|
||||
return obj.(*v1beta1.CertificateSigningRequest), err
|
||||
}
|
||||
|
||||
func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1alpha1.CertificateSigningRequestList, err error) {
|
||||
func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1beta1.CertificateSigningRequestList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction(certificatesigningrequestsResource, opts), &v1alpha1.CertificateSigningRequestList{})
|
||||
Invokes(core.NewRootListAction(certificatesigningrequestsResource, opts), &v1beta1.CertificateSigningRequestList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -94,8 +93,8 @@ func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1al
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.CertificateSigningRequestList{}
|
||||
for _, item := range obj.(*v1alpha1.CertificateSigningRequestList).Items {
|
||||
list := &v1beta1.CertificateSigningRequestList{}
|
||||
for _, item := range obj.(*v1beta1.CertificateSigningRequestList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
|
@ -110,11 +109,11 @@ func (c *FakeCertificateSigningRequests) Watch(opts v1.ListOptions) (watch.Inter
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched certificateSigningRequest.
|
||||
func (c *FakeCertificateSigningRequests) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error) {
|
||||
func (c *FakeCertificateSigningRequests) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.CertificateSigningRequest, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, data, subresources...), &v1alpha1.CertificateSigningRequest{})
|
||||
Invokes(core.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, data, subresources...), &v1beta1.CertificateSigningRequest{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.CertificateSigningRequest), err
|
||||
return obj.(*v1beta1.CertificateSigningRequest), err
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright 2016 The Kubernetes Authors.
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
certificates "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1"
|
||||
certificates "k8s.io/kubernetes/pkg/apis/certificates/v1beta1"
|
||||
"k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
|
@ -14,4 +14,4 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
|
@ -40,14 +40,15 @@ go_library(
|
|||
"//pkg/api:go_default_library",
|
||||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/policy/v1beta1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//pkg/fields:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/fields",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/serializer",
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
"//vendor:k8s.io/apimachinery/pkg/util/net",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -18,10 +18,11 @@ package v1
|
|||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
// ComponentStatusesGetter has a method to return a ComponentStatusInterface.
|
||||
|
@ -34,18 +35,18 @@ type ComponentStatusesGetter interface {
|
|||
type ComponentStatusInterface interface {
|
||||
Create(*v1.ComponentStatus) (*v1.ComponentStatus, error)
|
||||
Update(*v1.ComponentStatus) (*v1.ComponentStatus, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Delete(name string, options *meta_v1.DeleteOptions) error
|
||||
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v1.ComponentStatus, error)
|
||||
List(opts v1.ListOptions) (*v1.ComponentStatusList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error)
|
||||
List(opts meta_v1.ListOptions) (*v1.ComponentStatusList, error)
|
||||
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error)
|
||||
ComponentStatusExpansion
|
||||
}
|
||||
|
||||
// componentStatuses implements ComponentStatusInterface
|
||||
type componentStatuses struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newComponentStatuses returns a ComponentStatuses
|
||||
|
@ -79,7 +80,7 @@ func (c *componentStatuses) Update(componentStatus *v1.ComponentStatus) (result
|
|||
}
|
||||
|
||||
// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs.
|
||||
func (c *componentStatuses) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *componentStatuses) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("componentstatuses").
|
||||
Name(name).
|
||||
|
@ -89,7 +90,7 @@ func (c *componentStatuses) Delete(name string, options *v1.DeleteOptions) error
|
|||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *componentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *componentStatuses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("componentstatuses").
|
||||
VersionedParams(&listOptions, api.ParameterCodec).
|
||||
|
@ -111,7 +112,7 @@ func (c *componentStatuses) Get(name string, options meta_v1.GetOptions) (result
|
|||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors.
|
||||
func (c *componentStatuses) List(opts v1.ListOptions) (result *v1.ComponentStatusList, err error) {
|
||||
func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.ComponentStatusList, err error) {
|
||||
result = &v1.ComponentStatusList{}
|
||||
err = c.client.Get().
|
||||
Resource("componentstatuses").
|
||||
|
@ -122,7 +123,7 @@ func (c *componentStatuses) List(opts v1.ListOptions) (result *v1.ComponentStatu
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested componentStatuses.
|
||||
func (c *componentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.client.Get().
|
||||
Prefix("watch").
|
||||
Resource("componentstatuses").
|
||||
|
@ -131,7 +132,7 @@ func (c *componentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error)
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched componentStatus.
|
||||
func (c *componentStatuses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) {
|
||||
func (c *componentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) {
|
||||
result = &v1.ComponentStatus{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("componentstatuses").
|
||||
|
|
|
@ -18,10 +18,11 @@ package v1
|
|||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
// ConfigMapsGetter has a method to return a ConfigMapInterface.
|
||||
|
@ -34,18 +35,18 @@ type ConfigMapsGetter interface {
|
|||
type ConfigMapInterface interface {
|
||||
Create(*v1.ConfigMap) (*v1.ConfigMap, error)
|
||||
Update(*v1.ConfigMap) (*v1.ConfigMap, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Delete(name string, options *meta_v1.DeleteOptions) error
|
||||
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v1.ConfigMap, error)
|
||||
List(opts v1.ListOptions) (*v1.ConfigMapList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error)
|
||||
List(opts meta_v1.ListOptions) (*v1.ConfigMapList, error)
|
||||
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error)
|
||||
ConfigMapExpansion
|
||||
}
|
||||
|
||||
// configMaps implements ConfigMapInterface
|
||||
type configMaps struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
|
@ -83,7 +84,7 @@ func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err
|
|||
}
|
||||
|
||||
// Delete takes name of the configMap and deletes it. Returns an error if one occurs.
|
||||
func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *configMaps) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("configmaps").
|
||||
|
@ -94,7 +95,7 @@ func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error {
|
|||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *configMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *configMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("configmaps").
|
||||
|
@ -118,7 +119,7 @@ func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.Co
|
|||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors.
|
||||
func (c *configMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) {
|
||||
func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) {
|
||||
result = &v1.ConfigMapList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
|
@ -130,7 +131,7 @@ func (c *configMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err er
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested configMaps.
|
||||
func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.client.Get().
|
||||
Prefix("watch").
|
||||
Namespace(c.ns).
|
||||
|
@ -140,7 +141,7 @@ func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched configMap.
|
||||
func (c *configMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
|
||||
func (c *configMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
|
||||
result = &v1.ConfigMap{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
|
|
|
@ -20,12 +20,12 @@ import (
|
|||
fmt "fmt"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
type CoreV1Interface interface {
|
||||
RESTClient() restclient.Interface
|
||||
RESTClient() rest.Interface
|
||||
ComponentStatusesGetter
|
||||
ConfigMapsGetter
|
||||
EndpointsGetter
|
||||
|
@ -46,7 +46,7 @@ type CoreV1Interface interface {
|
|||
|
||||
// CoreV1Client is used to interact with features provided by the group.
|
||||
type CoreV1Client struct {
|
||||
restClient restclient.Interface
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *CoreV1Client) ComponentStatuses() ComponentStatusInterface {
|
||||
|
@ -114,12 +114,12 @@ func (c *CoreV1Client) ServiceAccounts(namespace string) ServiceAccountInterface
|
|||
}
|
||||
|
||||
// NewForConfig creates a new CoreV1Client for the given config.
|
||||
func NewForConfig(c *restclient.Config) (*CoreV1Client, error) {
|
||||
func NewForConfig(c *rest.Config) (*CoreV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := restclient.RESTClientFor(&config)
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ func NewForConfig(c *restclient.Config) (*CoreV1Client, error) {
|
|||
|
||||
// NewForConfigOrDie creates a new CoreV1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *restclient.Config) *CoreV1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *CoreV1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -137,11 +137,11 @@ func NewForConfigOrDie(c *restclient.Config) *CoreV1Client {
|
|||
}
|
||||
|
||||
// New creates a new CoreV1Client for the given RESTClient.
|
||||
func New(c restclient.Interface) *CoreV1Client {
|
||||
func New(c rest.Interface) *CoreV1Client {
|
||||
return &CoreV1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *restclient.Config) error {
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv, err := schema.ParseGroupVersion("/v1")
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -152,7 +152,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
}
|
||||
config.APIPath = "/api"
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = restclient.DefaultKubernetesUserAgent()
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
copyGroupVersion := gv
|
||||
config.GroupVersion = ©GroupVersion
|
||||
|
@ -164,7 +164,7 @@ func setConfigDefaults(config *restclient.Config) error {
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *CoreV1Client) RESTClient() restclient.Interface {
|
||||
func (c *CoreV1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1
|
||||
|
|
|
@ -18,10 +18,11 @@ package v1
|
|||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
// EndpointsGetter has a method to return a EndpointsInterface.
|
||||
|
@ -34,18 +35,18 @@ type EndpointsGetter interface {
|
|||
type EndpointsInterface interface {
|
||||
Create(*v1.Endpoints) (*v1.Endpoints, error)
|
||||
Update(*v1.Endpoints) (*v1.Endpoints, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Delete(name string, options *meta_v1.DeleteOptions) error
|
||||
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v1.Endpoints, error)
|
||||
List(opts v1.ListOptions) (*v1.EndpointsList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error)
|
||||
List(opts meta_v1.ListOptions) (*v1.EndpointsList, error)
|
||||
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error)
|
||||
EndpointsExpansion
|
||||
}
|
||||
|
||||
// endpoints implements EndpointsInterface
|
||||
type endpoints struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
|
@ -83,7 +84,7 @@ func (c *endpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err e
|
|||
}
|
||||
|
||||
// Delete takes name of the endpoints and deletes it. Returns an error if one occurs.
|
||||
func (c *endpoints) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *endpoints) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("endpoints").
|
||||
|
@ -94,7 +95,7 @@ func (c *endpoints) Delete(name string, options *v1.DeleteOptions) error {
|
|||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *endpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *endpoints) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("endpoints").
|
||||
|
@ -118,7 +119,7 @@ func (c *endpoints) Get(name string, options meta_v1.GetOptions) (result *v1.End
|
|||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Endpoints that match those selectors.
|
||||
func (c *endpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err error) {
|
||||
func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, err error) {
|
||||
result = &v1.EndpointsList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
|
@ -130,7 +131,7 @@ func (c *endpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err err
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested endpoints.
|
||||
func (c *endpoints) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.client.Get().
|
||||
Prefix("watch").
|
||||
Namespace(c.ns).
|
||||
|
@ -140,7 +141,7 @@ func (c *endpoints) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched endpoints.
|
||||
func (c *endpoints) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) {
|
||||
func (c *endpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) {
|
||||
result = &v1.Endpoints{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
|
|
25
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event.go
generated
vendored
25
vendor/k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1/event.go
generated
vendored
|
@ -18,10 +18,11 @@ package v1
|
|||
|
||||
import (
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
rest "k8s.io/client-go/rest"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
)
|
||||
|
||||
// EventsGetter has a method to return a EventInterface.
|
||||
|
@ -34,18 +35,18 @@ type EventsGetter interface {
|
|||
type EventInterface interface {
|
||||
Create(*v1.Event) (*v1.Event, error)
|
||||
Update(*v1.Event) (*v1.Event, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Delete(name string, options *meta_v1.DeleteOptions) error
|
||||
DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error
|
||||
Get(name string, options meta_v1.GetOptions) (*v1.Event, error)
|
||||
List(opts v1.ListOptions) (*v1.EventList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
|
||||
List(opts meta_v1.ListOptions) (*v1.EventList, error)
|
||||
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
|
||||
EventExpansion
|
||||
}
|
||||
|
||||
// events implements EventInterface
|
||||
type events struct {
|
||||
client restclient.Interface
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
|
@ -83,7 +84,7 @@ func (c *events) Update(event *v1.Event) (result *v1.Event, err error) {
|
|||
}
|
||||
|
||||
// Delete takes name of the event and deletes it. Returns an error if one occurs.
|
||||
func (c *events) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *events) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("events").
|
||||
|
@ -94,7 +95,7 @@ func (c *events) Delete(name string, options *v1.DeleteOptions) error {
|
|||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *events) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("events").
|
||||
|
@ -118,7 +119,7 @@ func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event,
|
|||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Events that match those selectors.
|
||||
func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) {
|
||||
func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) {
|
||||
result = &v1.EventList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
|
@ -130,7 +131,7 @@ func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) {
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested events.
|
||||
func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.client.Get().
|
||||
Prefix("watch").
|
||||
Namespace(c.ns).
|
||||
|
@ -140,7 +141,7 @@ func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|||
}
|
||||
|
||||
// Patch applies the patch and returns the patched event.
|
||||
func (c *events) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
|
||||
func (c *events) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
|
||||
result = &v1.Event{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
|
|
|
@ -19,10 +19,12 @@ package v1
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/fields"
|
||||
)
|
||||
|
||||
// The EventExpansion interface allows manually adding extra methods to the EventInterface.
|
||||
|
@ -84,7 +86,7 @@ func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte)
|
|||
return nil, fmt.Errorf("can't patch an event with namespace '%v' in namespace '%v'", incompleteEvent.Namespace, e.ns)
|
||||
}
|
||||
result := &v1.Event{}
|
||||
err := e.client.Patch(api.StrategicMergePatchType).
|
||||
err := e.client.Patch(types.StrategicMergePatchType).
|
||||
NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0).
|
||||
Resource("events").
|
||||
Name(incompleteEvent.Name).
|
||||
|
@ -116,7 +118,7 @@ func (e *events) Search(objOrRef runtime.Object) (*v1.EventList, error) {
|
|||
refUID = &stringRefUID
|
||||
}
|
||||
fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID)
|
||||
return e.List(v1.ListOptions{FieldSelector: fieldSelector.String()})
|
||||
return e.List(metav1.ListOptions{FieldSelector: fieldSelector.String()})
|
||||
}
|
||||
|
||||
// Returns the appropriate field selector based on the API version being used to communicate with the server.
|
||||
|
|
|
@ -40,14 +40,15 @@ go_library(
|
|||
"//pkg/api/v1:go_default_library",
|
||||
"//pkg/apis/policy/v1beta1:go_default_library",
|
||||
"//pkg/client/clientset_generated/clientset/typed/core/v1:go_default_library",
|
||||
"//pkg/client/restclient:go_default_library",
|
||||
"//pkg/client/testing/core:go_default_library",
|
||||
"//pkg/fields:go_default_library",
|
||||
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||
"//vendor:k8s.io/apimachinery/pkg/fields",
|
||||
"//vendor:k8s.io/apimachinery/pkg/labels",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime",
|
||||
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",
|
||||
"//vendor:k8s.io/apimachinery/pkg/types",
|
||||
"//vendor:k8s.io/apimachinery/pkg/watch",
|
||||
"//vendor:k8s.io/client-go/rest",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1alpha1,extensions/v1beta1,policy/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
// This package is generated by client-gen with arguments: --clientset-name=clientset --input=[api/v1,apps/v1beta1,authentication/v1beta1,authorization/v1beta1,autoscaling/v1,batch/v1,batch/v2alpha1,certificates/v1beta1,extensions/v1beta1,policy/v1beta1,rbac/v1beta1,rbac/v1alpha1,storage/v1beta1]
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
|
|
@ -20,8 +20,8 @@ import (
|
|||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -51,13 +51,13 @@ func (c *FakeComponentStatuses) Update(componentStatus *v1.ComponentStatus) (res
|
|||
return obj.(*v1.ComponentStatus), err
|
||||
}
|
||||
|
||||
func (c *FakeComponentStatuses) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeComponentStatuses) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction(componentstatusesResource, name), &v1.ComponentStatus{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeComponentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *FakeComponentStatuses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction(componentstatusesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ComponentStatusList{})
|
||||
|
@ -73,7 +73,7 @@ func (c *FakeComponentStatuses) Get(name string, options meta_v1.GetOptions) (re
|
|||
return obj.(*v1.ComponentStatus), err
|
||||
}
|
||||
|
||||
func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *v1.ComponentStatusList, err error) {
|
||||
func (c *FakeComponentStatuses) List(opts meta_v1.ListOptions) (result *v1.ComponentStatusList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction(componentstatusesResource, opts), &v1.ComponentStatusList{})
|
||||
if obj == nil {
|
||||
|
@ -94,13 +94,13 @@ func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *v1.ComponentS
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested componentStatuses.
|
||||
func (c *FakeComponentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeComponentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction(componentstatusesResource, opts))
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched componentStatus.
|
||||
func (c *FakeComponentStatuses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) {
|
||||
func (c *FakeComponentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootPatchSubresourceAction(componentstatusesResource, name, data, subresources...), &v1.ComponentStatus{})
|
||||
if obj == nil {
|
||||
|
|
|
@ -20,8 +20,8 @@ import (
|
|||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -54,14 +54,14 @@ func (c *FakeConfigMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap,
|
|||
return obj.(*v1.ConfigMap), err
|
||||
}
|
||||
|
||||
func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeConfigMaps) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction(configmapsResource, c.ns, name), &v1.ConfigMap{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *FakeConfigMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ConfigMapList{})
|
||||
|
@ -78,7 +78,7 @@ func (c *FakeConfigMaps) Get(name string, options meta_v1.GetOptions) (result *v
|
|||
return obj.(*v1.ConfigMap), err
|
||||
}
|
||||
|
||||
func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) {
|
||||
func (c *FakeConfigMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction(configmapsResource, c.ns, opts), &v1.ConfigMapList{})
|
||||
|
||||
|
@ -100,14 +100,14 @@ func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, er
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested configMaps.
|
||||
func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeConfigMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched configMap.
|
||||
func (c *FakeConfigMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
|
||||
func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewPatchSubresourceAction(configmapsResource, c.ns, name, data, subresources...), &v1.ConfigMap{})
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
rest "k8s.io/client-go/rest"
|
||||
v1 "k8s.io/kubernetes/pkg/client/clientset_generated/clientset/typed/core/v1"
|
||||
restclient "k8s.io/kubernetes/pkg/client/restclient"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
||||
|
@ -92,7 +92,7 @@ func (c *FakeCoreV1) ServiceAccounts(namespace string) v1.ServiceAccountInterfac
|
|||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeCoreV1) RESTClient() restclient.Interface {
|
||||
var ret *restclient.RESTClient
|
||||
func (c *FakeCoreV1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@ import (
|
|||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -54,14 +54,14 @@ func (c *FakeEndpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, e
|
|||
return obj.(*v1.Endpoints), err
|
||||
}
|
||||
|
||||
func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeEndpoints) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction(endpointsResource, c.ns, name), &v1.Endpoints{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeEndpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *FakeEndpoints) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.EndpointsList{})
|
||||
|
@ -78,7 +78,7 @@ func (c *FakeEndpoints) Get(name string, options meta_v1.GetOptions) (result *v1
|
|||
return obj.(*v1.Endpoints), err
|
||||
}
|
||||
|
||||
func (c *FakeEndpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err error) {
|
||||
func (c *FakeEndpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction(endpointsResource, c.ns, opts), &v1.EndpointsList{})
|
||||
|
||||
|
@ -100,14 +100,14 @@ func (c *FakeEndpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested endpoints.
|
||||
func (c *FakeEndpoints) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeEndpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction(endpointsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched endpoints.
|
||||
func (c *FakeEndpoints) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) {
|
||||
func (c *FakeEndpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewPatchSubresourceAction(endpointsResource, c.ns, name, data, subresources...), &v1.Endpoints{})
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ import (
|
|||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -54,14 +54,14 @@ func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) {
|
|||
return obj.(*v1.Event), err
|
||||
}
|
||||
|
||||
func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeEvents) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &v1.Event{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *FakeEvents) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.EventList{})
|
||||
|
@ -78,7 +78,7 @@ func (c *FakeEvents) Get(name string, options meta_v1.GetOptions) (result *v1.Ev
|
|||
return obj.(*v1.Event), err
|
||||
}
|
||||
|
||||
func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error) {
|
||||
func (c *FakeEvents) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction(eventsResource, c.ns, opts), &v1.EventList{})
|
||||
|
||||
|
@ -100,14 +100,14 @@ func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error)
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested events.
|
||||
func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeEvents) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched event.
|
||||
func (c *FakeEvents) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
|
||||
func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewPatchSubresourceAction(eventsResource, c.ns, name, data, subresources...), &v1.Event{})
|
||||
|
||||
|
|
|
@ -17,11 +17,11 @@ limitations under the License.
|
|||
package fake
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/client/testing/core"
|
||||
"k8s.io/kubernetes/pkg/fields"
|
||||
)
|
||||
|
||||
func (c *FakeEvents) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
|
||||
|
|
|
@ -20,8 +20,8 @@ import (
|
|||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -54,14 +54,14 @@ func (c *FakeLimitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRan
|
|||
return obj.(*v1.LimitRange), err
|
||||
}
|
||||
|
||||
func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeLimitRanges) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction(limitrangesResource, c.ns, name), &v1.LimitRange{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeLimitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *FakeLimitRanges) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.LimitRangeList{})
|
||||
|
@ -78,7 +78,7 @@ func (c *FakeLimitRanges) Get(name string, options meta_v1.GetOptions) (result *
|
|||
return obj.(*v1.LimitRange), err
|
||||
}
|
||||
|
||||
func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *v1.LimitRangeList, err error) {
|
||||
func (c *FakeLimitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction(limitrangesResource, c.ns, opts), &v1.LimitRangeList{})
|
||||
|
||||
|
@ -100,14 +100,14 @@ func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *v1.LimitRangeList,
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested limitRanges.
|
||||
func (c *FakeLimitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeLimitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction(limitrangesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched limitRange.
|
||||
func (c *FakeLimitRanges) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) {
|
||||
func (c *FakeLimitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewPatchSubresourceAction(limitrangesResource, c.ns, name, data, subresources...), &v1.LimitRange{})
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ import (
|
|||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -60,13 +60,13 @@ func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, e
|
|||
return obj.(*v1.Namespace), err
|
||||
}
|
||||
|
||||
func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeNamespaces) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction(namespacesResource, name), &v1.Namespace{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *FakeNamespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.NamespaceList{})
|
||||
|
@ -82,7 +82,7 @@ func (c *FakeNamespaces) Get(name string, options meta_v1.GetOptions) (result *v
|
|||
return obj.(*v1.Namespace), err
|
||||
}
|
||||
|
||||
func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) {
|
||||
func (c *FakeNamespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{})
|
||||
if obj == nil {
|
||||
|
@ -103,13 +103,13 @@ func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, er
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested namespaces.
|
||||
func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeNamespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction(namespacesResource, opts))
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched namespace.
|
||||
func (c *FakeNamespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) {
|
||||
func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootPatchSubresourceAction(namespacesResource, name, data, subresources...), &v1.Namespace{})
|
||||
if obj == nil {
|
||||
|
|
|
@ -20,8 +20,8 @@ import (
|
|||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -60,13 +60,13 @@ func (c *FakeNodes) UpdateStatus(node *v1.Node) (*v1.Node, error) {
|
|||
return obj.(*v1.Node), err
|
||||
}
|
||||
|
||||
func (c *FakeNodes) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakeNodes) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction(nodesResource, name), &v1.Node{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeNodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *FakeNodes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction(nodesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.NodeList{})
|
||||
|
@ -82,7 +82,7 @@ func (c *FakeNodes) Get(name string, options meta_v1.GetOptions) (result *v1.Nod
|
|||
return obj.(*v1.Node), err
|
||||
}
|
||||
|
||||
func (c *FakeNodes) List(opts v1.ListOptions) (result *v1.NodeList, err error) {
|
||||
func (c *FakeNodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction(nodesResource, opts), &v1.NodeList{})
|
||||
if obj == nil {
|
||||
|
@ -103,13 +103,13 @@ func (c *FakeNodes) List(opts v1.ListOptions) (result *v1.NodeList, err error) {
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested nodes.
|
||||
func (c *FakeNodes) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeNodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction(nodesResource, opts))
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched node.
|
||||
func (c *FakeNodes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) {
|
||||
func (c *FakeNodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootPatchSubresourceAction(nodesResource, name, data, subresources...), &v1.Node{})
|
||||
if obj == nil {
|
||||
|
|
|
@ -20,8 +20,8 @@ import (
|
|||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -60,13 +60,13 @@ func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolu
|
|||
return obj.(*v1.PersistentVolume), err
|
||||
}
|
||||
|
||||
func (c *FakePersistentVolumes) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakePersistentVolumes) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction(persistentvolumesResource, name), &v1.PersistentVolume{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakePersistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *FakePersistentVolumes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.PersistentVolumeList{})
|
||||
|
@ -82,7 +82,7 @@ func (c *FakePersistentVolumes) Get(name string, options meta_v1.GetOptions) (re
|
|||
return obj.(*v1.PersistentVolume), err
|
||||
}
|
||||
|
||||
func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *v1.PersistentVolumeList, err error) {
|
||||
func (c *FakePersistentVolumes) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction(persistentvolumesResource, opts), &v1.PersistentVolumeList{})
|
||||
if obj == nil {
|
||||
|
@ -103,13 +103,13 @@ func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *v1.Persistent
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested persistentVolumes.
|
||||
func (c *FakePersistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakePersistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction(persistentvolumesResource, opts))
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched persistentVolume.
|
||||
func (c *FakePersistentVolumes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) {
|
||||
func (c *FakePersistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootPatchSubresourceAction(persistentvolumesResource, name, data, subresources...), &v1.PersistentVolume{})
|
||||
if obj == nil {
|
||||
|
|
|
@ -20,8 +20,8 @@ import (
|
|||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
|
@ -64,14 +64,14 @@ func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.Pers
|
|||
return obj.(*v1.PersistentVolumeClaim), err
|
||||
}
|
||||
|
||||
func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) error {
|
||||
func (c *FakePersistentVolumeClaims) Delete(name string, options *meta_v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &v1.PersistentVolumeClaim{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakePersistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
func (c *FakePersistentVolumeClaims) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.PersistentVolumeClaimList{})
|
||||
|
@ -88,7 +88,7 @@ func (c *FakePersistentVolumeClaims) Get(name string, options meta_v1.GetOptions
|
|||
return obj.(*v1.PersistentVolumeClaim), err
|
||||
}
|
||||
|
||||
func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) {
|
||||
func (c *FakePersistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction(persistentvolumeclaimsResource, c.ns, opts), &v1.PersistentVolumeClaimList{})
|
||||
|
||||
|
@ -110,14 +110,14 @@ func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *v1.Persi
|
|||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested persistentVolumeClaims.
|
||||
func (c *FakePersistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakePersistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched persistentVolumeClaim.
|
||||
func (c *FakePersistentVolumeClaims) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) {
|
||||
func (c *FakePersistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, data, subresources...), &v1.PersistentVolumeClaim{})
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue