Update vendor files to point to kubernetes-1.12.0-beta.1

This commit is contained in:
Xing Yang
2018-09-17 18:36:04 -07:00
parent 0021c22eec
commit dc2a6df45a
764 changed files with 73120 additions and 13753 deletions

View File

@@ -31,10 +31,12 @@ import (
authorizationv1beta1 "k8s.io/client-go/kubernetes/typed/authorization/v1beta1"
autoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1"
autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1"
autoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2"
batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1"
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
@@ -76,6 +78,7 @@ type Interface interface {
// Deprecated: please explicitly pick a version if possible.
Autoscaling() autoscalingv1.AutoscalingV1Interface
AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1Interface
AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface
BatchV1() batchv1.BatchV1Interface
// Deprecated: please explicitly pick a version if possible.
Batch() batchv1.BatchV1Interface
@@ -84,6 +87,9 @@ type Interface interface {
CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface
// Deprecated: please explicitly pick a version if possible.
Certificates() certificatesv1beta1.CertificatesV1beta1Interface
CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface
// Deprecated: please explicitly pick a version if possible.
Coordination() coordinationv1beta1.CoordinationV1beta1Interface
CoreV1() corev1.CoreV1Interface
// Deprecated: please explicitly pick a version if possible.
Core() corev1.CoreV1Interface
@@ -133,10 +139,12 @@ type Clientset struct {
authorizationV1beta1 *authorizationv1beta1.AuthorizationV1beta1Client
autoscalingV1 *autoscalingv1.AutoscalingV1Client
autoscalingV2beta1 *autoscalingv2beta1.AutoscalingV2beta1Client
autoscalingV2beta2 *autoscalingv2beta2.AutoscalingV2beta2Client
batchV1 *batchv1.BatchV1Client
batchV1beta1 *batchv1beta1.BatchV1beta1Client
batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client
certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client
coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client
coreV1 *corev1.CoreV1Client
eventsV1beta1 *eventsv1beta1.EventsV1beta1Client
extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
@@ -238,6 +246,11 @@ func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1In
return c.autoscalingV2beta1
}
// AutoscalingV2beta2 retrieves the AutoscalingV2beta2Client
func (c *Clientset) AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface {
return c.autoscalingV2beta2
}
// BatchV1 retrieves the BatchV1Client
func (c *Clientset) BatchV1() batchv1.BatchV1Interface {
return c.batchV1
@@ -270,6 +283,17 @@ func (c *Clientset) Certificates() certificatesv1beta1.CertificatesV1beta1Interf
return c.certificatesV1beta1
}
// CoordinationV1beta1 retrieves the CoordinationV1beta1Client
func (c *Clientset) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface {
return c.coordinationV1beta1
}
// Deprecated: Coordination retrieves the default version of CoordinationClient.
// Please explicitly pick a version.
func (c *Clientset) Coordination() coordinationv1beta1.CoordinationV1beta1Interface {
return c.coordinationV1beta1
}
// CoreV1 retrieves the CoreV1Client
func (c *Clientset) CoreV1() corev1.CoreV1Interface {
return c.coreV1
@@ -454,6 +478,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
cs.autoscalingV2beta2, err = autoscalingv2beta2.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.batchV1, err = batchv1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@@ -470,6 +498,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
cs.coordinationV1beta1, err = coordinationv1beta1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.coreV1, err = corev1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@@ -549,10 +581,12 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
cs.authorizationV1beta1 = authorizationv1beta1.NewForConfigOrDie(c)
cs.autoscalingV1 = autoscalingv1.NewForConfigOrDie(c)
cs.autoscalingV2beta1 = autoscalingv2beta1.NewForConfigOrDie(c)
cs.autoscalingV2beta2 = autoscalingv2beta2.NewForConfigOrDie(c)
cs.batchV1 = batchv1.NewForConfigOrDie(c)
cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c)
cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c)
cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c)
cs.coordinationV1beta1 = coordinationv1beta1.NewForConfigOrDie(c)
cs.coreV1 = corev1.NewForConfigOrDie(c)
cs.eventsV1beta1 = eventsv1beta1.NewForConfigOrDie(c)
cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c)
@@ -586,10 +620,12 @@ func New(c rest.Interface) *Clientset {
cs.authorizationV1beta1 = authorizationv1beta1.New(c)
cs.autoscalingV1 = autoscalingv1.New(c)
cs.autoscalingV2beta1 = autoscalingv2beta1.New(c)
cs.autoscalingV2beta2 = autoscalingv2beta2.New(c)
cs.batchV1 = batchv1.New(c)
cs.batchV1beta1 = batchv1beta1.New(c)
cs.batchV2alpha1 = batchv2alpha1.New(c)
cs.certificatesV1beta1 = certificatesv1beta1.New(c)
cs.coordinationV1beta1 = coordinationv1beta1.New(c)
cs.coreV1 = corev1.New(c)
cs.eventsV1beta1 = eventsv1beta1.New(c)
cs.extensionsV1beta1 = extensionsv1beta1.New(c)

View File

@@ -46,6 +46,8 @@ import (
fakeautoscalingv1 "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake"
autoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1"
fakeautoscalingv2beta1 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake"
autoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2"
fakeautoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake"
batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
fakebatchv1 "k8s.io/client-go/kubernetes/typed/batch/v1/fake"
batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
@@ -54,6 +56,8 @@ import (
fakebatchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake"
certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
fakecertificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake"
coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1"
fakecoordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake"
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake"
eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
@@ -207,6 +211,11 @@ func (c *Clientset) AutoscalingV2beta1() autoscalingv2beta1.AutoscalingV2beta1In
return &fakeautoscalingv2beta1.FakeAutoscalingV2beta1{Fake: &c.Fake}
}
// AutoscalingV2beta2 retrieves the AutoscalingV2beta2Client
func (c *Clientset) AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface {
return &fakeautoscalingv2beta2.FakeAutoscalingV2beta2{Fake: &c.Fake}
}
// BatchV1 retrieves the BatchV1Client
func (c *Clientset) BatchV1() batchv1.BatchV1Interface {
return &fakebatchv1.FakeBatchV1{Fake: &c.Fake}
@@ -237,6 +246,16 @@ func (c *Clientset) Certificates() certificatesv1beta1.CertificatesV1beta1Interf
return &fakecertificatesv1beta1.FakeCertificatesV1beta1{Fake: &c.Fake}
}
// CoordinationV1beta1 retrieves the CoordinationV1beta1Client
func (c *Clientset) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface {
return &fakecoordinationv1beta1.FakeCoordinationV1beta1{Fake: &c.Fake}
}
// Coordination retrieves the CoordinationV1beta1Client
func (c *Clientset) Coordination() coordinationv1beta1.CoordinationV1beta1Interface {
return &fakecoordinationv1beta1.FakeCoordinationV1beta1{Fake: &c.Fake}
}
// CoreV1 retrieves the CoreV1Client
func (c *Clientset) CoreV1() corev1.CoreV1Interface {
return &fakecorev1.FakeCoreV1{Fake: &c.Fake}

View File

@@ -30,10 +30,12 @@ import (
authorizationv1beta1 "k8s.io/api/authorization/v1beta1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1"
batchv2alpha1 "k8s.io/api/batch/v2alpha1"
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
corev1 "k8s.io/api/core/v1"
eventsv1beta1 "k8s.io/api/events/v1beta1"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
@@ -52,15 +54,44 @@ import (
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
)
var scheme = runtime.NewScheme()
var codecs = serializer.NewCodecFactory(scheme)
var parameterCodec = runtime.NewParameterCodec(scheme)
func init() {
v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"})
AddToScheme(scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
admissionregistrationv1alpha1.AddToScheme,
admissionregistrationv1beta1.AddToScheme,
appsv1beta1.AddToScheme,
appsv1beta2.AddToScheme,
appsv1.AddToScheme,
authenticationv1.AddToScheme,
authenticationv1beta1.AddToScheme,
authorizationv1.AddToScheme,
authorizationv1beta1.AddToScheme,
autoscalingv1.AddToScheme,
autoscalingv2beta1.AddToScheme,
autoscalingv2beta2.AddToScheme,
batchv1.AddToScheme,
batchv1beta1.AddToScheme,
batchv2alpha1.AddToScheme,
certificatesv1beta1.AddToScheme,
coordinationv1beta1.AddToScheme,
corev1.AddToScheme,
eventsv1beta1.AddToScheme,
extensionsv1beta1.AddToScheme,
networkingv1.AddToScheme,
policyv1beta1.AddToScheme,
rbacv1.AddToScheme,
rbacv1beta1.AddToScheme,
rbacv1alpha1.AddToScheme,
schedulingv1alpha1.AddToScheme,
schedulingv1beta1.AddToScheme,
settingsv1alpha1.AddToScheme,
storagev1beta1.AddToScheme,
storagev1.AddToScheme,
storagev1alpha1.AddToScheme,
}
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
@@ -73,38 +104,13 @@ func init() {
// )
//
// kclientset, _ := kubernetes.NewForConfig(c)
// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
//
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
// correctly.
func AddToScheme(scheme *runtime.Scheme) {
admissionregistrationv1alpha1.AddToScheme(scheme)
admissionregistrationv1beta1.AddToScheme(scheme)
appsv1beta1.AddToScheme(scheme)
appsv1beta2.AddToScheme(scheme)
appsv1.AddToScheme(scheme)
authenticationv1.AddToScheme(scheme)
authenticationv1beta1.AddToScheme(scheme)
authorizationv1.AddToScheme(scheme)
authorizationv1beta1.AddToScheme(scheme)
autoscalingv1.AddToScheme(scheme)
autoscalingv2beta1.AddToScheme(scheme)
batchv1.AddToScheme(scheme)
batchv1beta1.AddToScheme(scheme)
batchv2alpha1.AddToScheme(scheme)
certificatesv1beta1.AddToScheme(scheme)
corev1.AddToScheme(scheme)
eventsv1beta1.AddToScheme(scheme)
extensionsv1beta1.AddToScheme(scheme)
networkingv1.AddToScheme(scheme)
policyv1beta1.AddToScheme(scheme)
rbacv1.AddToScheme(scheme)
rbacv1beta1.AddToScheme(scheme)
rbacv1alpha1.AddToScheme(scheme)
schedulingv1alpha1.AddToScheme(scheme)
schedulingv1beta1.AddToScheme(scheme)
settingsv1alpha1.AddToScheme(scheme)
storagev1beta1.AddToScheme(scheme)
storagev1.AddToScheme(scheme)
storagev1alpha1.AddToScheme(scheme)
var AddToScheme = localSchemeBuilder.AddToScheme
func init() {
v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"})
utilruntime.Must(AddToScheme(scheme))
}

View File

@@ -30,10 +30,12 @@ import (
authorizationv1beta1 "k8s.io/api/authorization/v1beta1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1"
batchv2alpha1 "k8s.io/api/batch/v2alpha1"
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
corev1 "k8s.io/api/core/v1"
eventsv1beta1 "k8s.io/api/events/v1beta1"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
@@ -52,15 +54,44 @@ import (
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
)
var Scheme = runtime.NewScheme()
var Codecs = serializer.NewCodecFactory(Scheme)
var ParameterCodec = runtime.NewParameterCodec(Scheme)
func init() {
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
AddToScheme(Scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
admissionregistrationv1alpha1.AddToScheme,
admissionregistrationv1beta1.AddToScheme,
appsv1beta1.AddToScheme,
appsv1beta2.AddToScheme,
appsv1.AddToScheme,
authenticationv1.AddToScheme,
authenticationv1beta1.AddToScheme,
authorizationv1.AddToScheme,
authorizationv1beta1.AddToScheme,
autoscalingv1.AddToScheme,
autoscalingv2beta1.AddToScheme,
autoscalingv2beta2.AddToScheme,
batchv1.AddToScheme,
batchv1beta1.AddToScheme,
batchv2alpha1.AddToScheme,
certificatesv1beta1.AddToScheme,
coordinationv1beta1.AddToScheme,
corev1.AddToScheme,
eventsv1beta1.AddToScheme,
extensionsv1beta1.AddToScheme,
networkingv1.AddToScheme,
policyv1beta1.AddToScheme,
rbacv1.AddToScheme,
rbacv1beta1.AddToScheme,
rbacv1alpha1.AddToScheme,
schedulingv1alpha1.AddToScheme,
schedulingv1beta1.AddToScheme,
settingsv1alpha1.AddToScheme,
storagev1beta1.AddToScheme,
storagev1.AddToScheme,
storagev1alpha1.AddToScheme,
}
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
@@ -73,38 +104,13 @@ func init() {
// )
//
// kclientset, _ := kubernetes.NewForConfig(c)
// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
//
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
// correctly.
func AddToScheme(scheme *runtime.Scheme) {
admissionregistrationv1alpha1.AddToScheme(scheme)
admissionregistrationv1beta1.AddToScheme(scheme)
appsv1beta1.AddToScheme(scheme)
appsv1beta2.AddToScheme(scheme)
appsv1.AddToScheme(scheme)
authenticationv1.AddToScheme(scheme)
authenticationv1beta1.AddToScheme(scheme)
authorizationv1.AddToScheme(scheme)
authorizationv1beta1.AddToScheme(scheme)
autoscalingv1.AddToScheme(scheme)
autoscalingv2beta1.AddToScheme(scheme)
batchv1.AddToScheme(scheme)
batchv1beta1.AddToScheme(scheme)
batchv2alpha1.AddToScheme(scheme)
certificatesv1beta1.AddToScheme(scheme)
corev1.AddToScheme(scheme)
eventsv1beta1.AddToScheme(scheme)
extensionsv1beta1.AddToScheme(scheme)
networkingv1.AddToScheme(scheme)
policyv1beta1.AddToScheme(scheme)
rbacv1.AddToScheme(scheme)
rbacv1beta1.AddToScheme(scheme)
rbacv1alpha1.AddToScheme(scheme)
schedulingv1alpha1.AddToScheme(scheme)
schedulingv1beta1.AddToScheme(scheme)
settingsv1alpha1.AddToScheme(scheme)
storagev1beta1.AddToScheme(scheme)
storagev1.AddToScheme(scheme)
storagev1alpha1.AddToScheme(scheme)
var AddToScheme = localSchemeBuilder.AddToScheme
func init() {
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
utilruntime.Must(AddToScheme(Scheme))
}

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/apps/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type ControllerRevisionsGetter interface {
type ControllerRevisionInterface interface {
Create(*v1.ControllerRevision) (*v1.ControllerRevision, error)
Update(*v1.ControllerRevision) (*v1.ControllerRevision, 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.ControllerRevision, error)
List(opts meta_v1.ListOptions) (*v1.ControllerRevisionList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ControllerRevision, error)
List(opts metav1.ListOptions) (*v1.ControllerRevisionList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ControllerRevision, err error)
ControllerRevisionExpansion
}
@@ -61,7 +61,7 @@ func newControllerRevisions(c *AppsV1Client, namespace string) *controllerRevisi
}
// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
func (c *controllerRevisions) Get(name string, options meta_v1.GetOptions) (result *v1.ControllerRevision, err error) {
func (c *controllerRevisions) Get(name string, options metav1.GetOptions) (result *v1.ControllerRevision, err error) {
result = &v1.ControllerRevision{}
err = c.client.Get().
Namespace(c.ns).
@@ -74,7 +74,7 @@ func (c *controllerRevisions) Get(name string, options meta_v1.GetOptions) (resu
}
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
func (c *controllerRevisions) List(opts meta_v1.ListOptions) (result *v1.ControllerRevisionList, err error) {
func (c *controllerRevisions) List(opts metav1.ListOptions) (result *v1.ControllerRevisionList, err error) {
result = &v1.ControllerRevisionList{}
err = c.client.Get().
Namespace(c.ns).
@@ -86,7 +86,7 @@ func (c *controllerRevisions) List(opts meta_v1.ListOptions) (result *v1.Control
}
// Watch returns a watch.Interface that watches the requested controllerRevisions.
func (c *controllerRevisions) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *controllerRevisions) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -121,7 +121,7 @@ func (c *controllerRevisions) Update(controllerRevision *v1.ControllerRevision)
}
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *controllerRevisions) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *controllerRevisions) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("controllerrevisions").
@@ -132,7 +132,7 @@ func (c *controllerRevisions) Delete(name string, options *meta_v1.DeleteOptions
}
// DeleteCollection deletes a collection of objects.
func (c *controllerRevisions) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *controllerRevisions) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("controllerrevisions").

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/apps/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -38,11 +38,11 @@ type DaemonSetInterface interface {
Create(*v1.DaemonSet) (*v1.DaemonSet, error)
Update(*v1.DaemonSet) (*v1.DaemonSet, error)
UpdateStatus(*v1.DaemonSet) (*v1.DaemonSet, 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.DaemonSet, error)
List(opts meta_v1.ListOptions) (*v1.DaemonSetList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.DaemonSet, error)
List(opts metav1.ListOptions) (*v1.DaemonSetList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error)
DaemonSetExpansion
}
@@ -62,7 +62,7 @@ func newDaemonSets(c *AppsV1Client, namespace string) *daemonSets {
}
// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
func (c *daemonSets) Get(name string, options meta_v1.GetOptions) (result *v1.DaemonSet, err error) {
func (c *daemonSets) Get(name string, options metav1.GetOptions) (result *v1.DaemonSet, err error) {
result = &v1.DaemonSet{}
err = c.client.Get().
Namespace(c.ns).
@@ -75,7 +75,7 @@ func (c *daemonSets) Get(name string, options meta_v1.GetOptions) (result *v1.Da
}
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
func (c *daemonSets) List(opts meta_v1.ListOptions) (result *v1.DaemonSetList, err error) {
func (c *daemonSets) List(opts metav1.ListOptions) (result *v1.DaemonSetList, err error) {
result = &v1.DaemonSetList{}
err = c.client.Get().
Namespace(c.ns).
@@ -87,7 +87,7 @@ func (c *daemonSets) List(opts meta_v1.ListOptions) (result *v1.DaemonSetList, e
}
// Watch returns a watch.Interface that watches the requested daemonSets.
func (c *daemonSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *daemonSets) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -138,7 +138,7 @@ func (c *daemonSets) UpdateStatus(daemonSet *v1.DaemonSet) (result *v1.DaemonSet
}
// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
func (c *daemonSets) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *daemonSets) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("daemonsets").
@@ -149,7 +149,7 @@ func (c *daemonSets) Delete(name string, options *meta_v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *daemonSets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *daemonSets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("daemonsets").

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/apps/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -38,11 +38,11 @@ type DeploymentInterface interface {
Create(*v1.Deployment) (*v1.Deployment, error)
Update(*v1.Deployment) (*v1.Deployment, error)
UpdateStatus(*v1.Deployment) (*v1.Deployment, 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.Deployment, error)
List(opts meta_v1.ListOptions) (*v1.DeploymentList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Deployment, error)
List(opts metav1.ListOptions) (*v1.DeploymentList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Deployment, err error)
DeploymentExpansion
}
@@ -62,7 +62,7 @@ func newDeployments(c *AppsV1Client, namespace string) *deployments {
}
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
func (c *deployments) Get(name string, options meta_v1.GetOptions) (result *v1.Deployment, err error) {
func (c *deployments) Get(name string, options metav1.GetOptions) (result *v1.Deployment, err error) {
result = &v1.Deployment{}
err = c.client.Get().
Namespace(c.ns).
@@ -75,7 +75,7 @@ func (c *deployments) Get(name string, options meta_v1.GetOptions) (result *v1.D
}
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
func (c *deployments) List(opts meta_v1.ListOptions) (result *v1.DeploymentList, err error) {
func (c *deployments) List(opts metav1.ListOptions) (result *v1.DeploymentList, err error) {
result = &v1.DeploymentList{}
err = c.client.Get().
Namespace(c.ns).
@@ -87,7 +87,7 @@ func (c *deployments) List(opts meta_v1.ListOptions) (result *v1.DeploymentList,
}
// Watch returns a watch.Interface that watches the requested deployments.
func (c *deployments) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *deployments) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -138,7 +138,7 @@ func (c *deployments) UpdateStatus(deployment *v1.Deployment) (result *v1.Deploy
}
// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *deployments) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *deployments) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("deployments").
@@ -149,7 +149,7 @@ func (c *deployments) Delete(name string, options *meta_v1.DeleteOptions) error
}
// DeleteCollection deletes a collection of objects.
func (c *deployments) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *deployments) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("deployments").

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
apps_v1 "k8s.io/api/apps/v1"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var controllerrevisionsResource = schema.GroupVersionResource{Group: "apps", Ver
var controllerrevisionsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ControllerRevision"}
// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (result *apps_v1.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (result *appsv1.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &apps_v1.ControllerRevision{})
Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &appsv1.ControllerRevision{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.ControllerRevision), err
return obj.(*appsv1.ControllerRevision), err
}
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *apps_v1.ControllerRevisionList, err error) {
func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *appsv1.ControllerRevisionList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &apps_v1.ControllerRevisionList{})
Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &appsv1.ControllerRevisionList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *apps_v1.Con
if label == nil {
label = labels.Everything()
}
list := &apps_v1.ControllerRevisionList{ListMeta: obj.(*apps_v1.ControllerRevisionList).ListMeta}
for _, item := range obj.(*apps_v1.ControllerRevisionList).Items {
list := &appsv1.ControllerRevisionList{ListMeta: obj.(*appsv1.ControllerRevisionList).ListMeta}
for _, item := range obj.(*appsv1.ControllerRevisionList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,31 +79,31 @@ func (c *FakeControllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, e
}
// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
func (c *FakeControllerRevisions) Create(controllerRevision *apps_v1.ControllerRevision) (result *apps_v1.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Create(controllerRevision *appsv1.ControllerRevision) (result *appsv1.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &apps_v1.ControllerRevision{})
Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &appsv1.ControllerRevision{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.ControllerRevision), err
return obj.(*appsv1.ControllerRevision), err
}
// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
func (c *FakeControllerRevisions) Update(controllerRevision *apps_v1.ControllerRevision) (result *apps_v1.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Update(controllerRevision *appsv1.ControllerRevision) (result *appsv1.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &apps_v1.ControllerRevision{})
Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &appsv1.ControllerRevision{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.ControllerRevision), err
return obj.(*appsv1.ControllerRevision), err
}
// Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs.
func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &apps_v1.ControllerRevision{})
Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &appsv1.ControllerRevision{})
return err
}
@@ -112,17 +112,17 @@ func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions)
func (c *FakeControllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &apps_v1.ControllerRevisionList{})
_, err := c.Fake.Invokes(action, &appsv1.ControllerRevisionList{})
return err
}
// Patch applies the patch and returns the patched controllerRevision.
func (c *FakeControllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps_v1.ControllerRevision, err error) {
func (c *FakeControllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.ControllerRevision, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, data, subresources...), &apps_v1.ControllerRevision{})
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, data, subresources...), &appsv1.ControllerRevision{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.ControllerRevision), err
return obj.(*appsv1.ControllerRevision), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
apps_v1 "k8s.io/api/apps/v1"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var daemonsetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1
var daemonsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DaemonSet"}
// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *apps_v1.DaemonSet, err error) {
func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *appsv1.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &apps_v1.DaemonSet{})
Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &appsv1.DaemonSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.DaemonSet), err
return obj.(*appsv1.DaemonSet), err
}
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *apps_v1.DaemonSetList, err error) {
func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *appsv1.DaemonSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &apps_v1.DaemonSetList{})
Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &appsv1.DaemonSetList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *apps_v1.DaemonSetLis
if label == nil {
label = labels.Everything()
}
list := &apps_v1.DaemonSetList{ListMeta: obj.(*apps_v1.DaemonSetList).ListMeta}
for _, item := range obj.(*apps_v1.DaemonSetList).Items {
list := &appsv1.DaemonSetList{ListMeta: obj.(*appsv1.DaemonSetList).ListMeta}
for _, item := range obj.(*appsv1.DaemonSetList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,43 +79,43 @@ func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any.
func (c *FakeDaemonSets) Create(daemonSet *apps_v1.DaemonSet) (result *apps_v1.DaemonSet, err error) {
func (c *FakeDaemonSets) Create(daemonSet *appsv1.DaemonSet) (result *appsv1.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &apps_v1.DaemonSet{})
Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &appsv1.DaemonSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.DaemonSet), err
return obj.(*appsv1.DaemonSet), err
}
// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
func (c *FakeDaemonSets) Update(daemonSet *apps_v1.DaemonSet) (result *apps_v1.DaemonSet, err error) {
func (c *FakeDaemonSets) Update(daemonSet *appsv1.DaemonSet) (result *appsv1.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &apps_v1.DaemonSet{})
Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &appsv1.DaemonSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.DaemonSet), err
return obj.(*appsv1.DaemonSet), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeDaemonSets) UpdateStatus(daemonSet *apps_v1.DaemonSet) (*apps_v1.DaemonSet, error) {
func (c *FakeDaemonSets) UpdateStatus(daemonSet *appsv1.DaemonSet) (*appsv1.DaemonSet, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &apps_v1.DaemonSet{})
Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &appsv1.DaemonSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.DaemonSet), err
return obj.(*appsv1.DaemonSet), err
}
// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &apps_v1.DaemonSet{})
Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &appsv1.DaemonSet{})
return err
}
@@ -124,17 +124,17 @@ func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &apps_v1.DaemonSetList{})
_, err := c.Fake.Invokes(action, &appsv1.DaemonSetList{})
return err
}
// Patch applies the patch and returns the patched daemonSet.
func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps_v1.DaemonSet, err error) {
func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, data, subresources...), &apps_v1.DaemonSet{})
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, data, subresources...), &appsv1.DaemonSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.DaemonSet), err
return obj.(*appsv1.DaemonSet), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
apps_v1 "k8s.io/api/apps/v1"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var deploymentsResource = schema.GroupVersionResource{Group: "apps", Version: "v
var deploymentsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "Deployment"}
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *apps_v1.Deployment, err error) {
func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *appsv1.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &apps_v1.Deployment{})
Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &appsv1.Deployment{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.Deployment), err
return obj.(*appsv1.Deployment), err
}
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
func (c *FakeDeployments) List(opts v1.ListOptions) (result *apps_v1.DeploymentList, err error) {
func (c *FakeDeployments) List(opts v1.ListOptions) (result *appsv1.DeploymentList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &apps_v1.DeploymentList{})
Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &appsv1.DeploymentList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *apps_v1.DeploymentL
if label == nil {
label = labels.Everything()
}
list := &apps_v1.DeploymentList{ListMeta: obj.(*apps_v1.DeploymentList).ListMeta}
for _, item := range obj.(*apps_v1.DeploymentList).Items {
list := &appsv1.DeploymentList{ListMeta: obj.(*appsv1.DeploymentList).ListMeta}
for _, item := range obj.(*appsv1.DeploymentList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,43 +79,43 @@ func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
func (c *FakeDeployments) Create(deployment *apps_v1.Deployment) (result *apps_v1.Deployment, err error) {
func (c *FakeDeployments) Create(deployment *appsv1.Deployment) (result *appsv1.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &apps_v1.Deployment{})
Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &appsv1.Deployment{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.Deployment), err
return obj.(*appsv1.Deployment), err
}
// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
func (c *FakeDeployments) Update(deployment *apps_v1.Deployment) (result *apps_v1.Deployment, err error) {
func (c *FakeDeployments) Update(deployment *appsv1.Deployment) (result *appsv1.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &apps_v1.Deployment{})
Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &appsv1.Deployment{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.Deployment), err
return obj.(*appsv1.Deployment), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeDeployments) UpdateStatus(deployment *apps_v1.Deployment) (*apps_v1.Deployment, error) {
func (c *FakeDeployments) UpdateStatus(deployment *appsv1.Deployment) (*appsv1.Deployment, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &apps_v1.Deployment{})
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &appsv1.Deployment{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.Deployment), err
return obj.(*appsv1.Deployment), err
}
// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &apps_v1.Deployment{})
Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &appsv1.Deployment{})
return err
}
@@ -124,17 +124,17 @@ func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &apps_v1.DeploymentList{})
_, err := c.Fake.Invokes(action, &appsv1.DeploymentList{})
return err
}
// Patch applies the patch and returns the patched deployment.
func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps_v1.Deployment, err error) {
func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.Deployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, data, subresources...), &apps_v1.Deployment{})
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, data, subresources...), &appsv1.Deployment{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.Deployment), err
return obj.(*appsv1.Deployment), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
apps_v1 "k8s.io/api/apps/v1"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var replicasetsResource = schema.GroupVersionResource{Group: "apps", Version: "v
var replicasetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ReplicaSet"}
// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *apps_v1.ReplicaSet, err error) {
func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *appsv1.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &apps_v1.ReplicaSet{})
Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &appsv1.ReplicaSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.ReplicaSet), err
return obj.(*appsv1.ReplicaSet), err
}
// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *apps_v1.ReplicaSetList, err error) {
func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *appsv1.ReplicaSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &apps_v1.ReplicaSetList{})
Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &appsv1.ReplicaSetList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *apps_v1.ReplicaSetL
if label == nil {
label = labels.Everything()
}
list := &apps_v1.ReplicaSetList{ListMeta: obj.(*apps_v1.ReplicaSetList).ListMeta}
for _, item := range obj.(*apps_v1.ReplicaSetList).Items {
list := &appsv1.ReplicaSetList{ListMeta: obj.(*appsv1.ReplicaSetList).ListMeta}
for _, item := range obj.(*appsv1.ReplicaSetList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,43 +79,43 @@ func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any.
func (c *FakeReplicaSets) Create(replicaSet *apps_v1.ReplicaSet) (result *apps_v1.ReplicaSet, err error) {
func (c *FakeReplicaSets) Create(replicaSet *appsv1.ReplicaSet) (result *appsv1.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &apps_v1.ReplicaSet{})
Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &appsv1.ReplicaSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.ReplicaSet), err
return obj.(*appsv1.ReplicaSet), err
}
// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any.
func (c *FakeReplicaSets) Update(replicaSet *apps_v1.ReplicaSet) (result *apps_v1.ReplicaSet, err error) {
func (c *FakeReplicaSets) Update(replicaSet *appsv1.ReplicaSet) (result *appsv1.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &apps_v1.ReplicaSet{})
Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &appsv1.ReplicaSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.ReplicaSet), err
return obj.(*appsv1.ReplicaSet), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeReplicaSets) UpdateStatus(replicaSet *apps_v1.ReplicaSet) (*apps_v1.ReplicaSet, error) {
func (c *FakeReplicaSets) UpdateStatus(replicaSet *appsv1.ReplicaSet) (*appsv1.ReplicaSet, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &apps_v1.ReplicaSet{})
Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &appsv1.ReplicaSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.ReplicaSet), err
return obj.(*appsv1.ReplicaSet), err
}
// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &apps_v1.ReplicaSet{})
Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &appsv1.ReplicaSet{})
return err
}
@@ -124,17 +124,17 @@ func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &apps_v1.ReplicaSetList{})
_, err := c.Fake.Invokes(action, &appsv1.ReplicaSetList{})
return err
}
// Patch applies the patch and returns the patched replicaSet.
func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps_v1.ReplicaSet, err error) {
func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.ReplicaSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, data, subresources...), &apps_v1.ReplicaSet{})
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, data, subresources...), &appsv1.ReplicaSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.ReplicaSet), err
return obj.(*appsv1.ReplicaSet), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
apps_v1 "k8s.io/api/apps/v1"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var statefulsetsResource = schema.GroupVersionResource{Group: "apps", Version: "
var statefulsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "StatefulSet"}
// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *apps_v1.StatefulSet, err error) {
func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *appsv1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &apps_v1.StatefulSet{})
Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &appsv1.StatefulSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.StatefulSet), err
return obj.(*appsv1.StatefulSet), err
}
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *apps_v1.StatefulSetList, err error) {
func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *appsv1.StatefulSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &apps_v1.StatefulSetList{})
Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &appsv1.StatefulSetList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *apps_v1.StatefulSe
if label == nil {
label = labels.Everything()
}
list := &apps_v1.StatefulSetList{ListMeta: obj.(*apps_v1.StatefulSetList).ListMeta}
for _, item := range obj.(*apps_v1.StatefulSetList).Items {
list := &appsv1.StatefulSetList{ListMeta: obj.(*appsv1.StatefulSetList).ListMeta}
for _, item := range obj.(*appsv1.StatefulSetList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,43 +79,43 @@ func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any.
func (c *FakeStatefulSets) Create(statefulSet *apps_v1.StatefulSet) (result *apps_v1.StatefulSet, err error) {
func (c *FakeStatefulSets) Create(statefulSet *appsv1.StatefulSet) (result *appsv1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &apps_v1.StatefulSet{})
Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &appsv1.StatefulSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.StatefulSet), err
return obj.(*appsv1.StatefulSet), err
}
// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
func (c *FakeStatefulSets) Update(statefulSet *apps_v1.StatefulSet) (result *apps_v1.StatefulSet, err error) {
func (c *FakeStatefulSets) Update(statefulSet *appsv1.StatefulSet) (result *appsv1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &apps_v1.StatefulSet{})
Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &appsv1.StatefulSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.StatefulSet), err
return obj.(*appsv1.StatefulSet), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeStatefulSets) UpdateStatus(statefulSet *apps_v1.StatefulSet) (*apps_v1.StatefulSet, error) {
func (c *FakeStatefulSets) UpdateStatus(statefulSet *appsv1.StatefulSet) (*appsv1.StatefulSet, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &apps_v1.StatefulSet{})
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &appsv1.StatefulSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.StatefulSet), err
return obj.(*appsv1.StatefulSet), err
}
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &apps_v1.StatefulSet{})
Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &appsv1.StatefulSet{})
return err
}
@@ -124,17 +124,17 @@ func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error
func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &apps_v1.StatefulSetList{})
_, err := c.Fake.Invokes(action, &appsv1.StatefulSetList{})
return err
}
// Patch applies the patch and returns the patched statefulSet.
func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps_v1.StatefulSet, err error) {
func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, data, subresources...), &apps_v1.StatefulSet{})
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, data, subresources...), &appsv1.StatefulSet{})
if obj == nil {
return nil, err
}
return obj.(*apps_v1.StatefulSet), err
return obj.(*appsv1.StatefulSet), err
}

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/apps/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -38,11 +38,11 @@ type ReplicaSetInterface interface {
Create(*v1.ReplicaSet) (*v1.ReplicaSet, error)
Update(*v1.ReplicaSet) (*v1.ReplicaSet, error)
UpdateStatus(*v1.ReplicaSet) (*v1.ReplicaSet, 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.ReplicaSet, error)
List(opts meta_v1.ListOptions) (*v1.ReplicaSetList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ReplicaSet, error)
List(opts metav1.ListOptions) (*v1.ReplicaSetList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicaSet, err error)
ReplicaSetExpansion
}
@@ -62,7 +62,7 @@ func newReplicaSets(c *AppsV1Client, namespace string) *replicaSets {
}
// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
func (c *replicaSets) Get(name string, options meta_v1.GetOptions) (result *v1.ReplicaSet, err error) {
func (c *replicaSets) Get(name string, options metav1.GetOptions) (result *v1.ReplicaSet, err error) {
result = &v1.ReplicaSet{}
err = c.client.Get().
Namespace(c.ns).
@@ -75,7 +75,7 @@ func (c *replicaSets) Get(name string, options meta_v1.GetOptions) (result *v1.R
}
// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
func (c *replicaSets) List(opts meta_v1.ListOptions) (result *v1.ReplicaSetList, err error) {
func (c *replicaSets) List(opts metav1.ListOptions) (result *v1.ReplicaSetList, err error) {
result = &v1.ReplicaSetList{}
err = c.client.Get().
Namespace(c.ns).
@@ -87,7 +87,7 @@ func (c *replicaSets) List(opts meta_v1.ListOptions) (result *v1.ReplicaSetList,
}
// Watch returns a watch.Interface that watches the requested replicaSets.
func (c *replicaSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *replicaSets) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -138,7 +138,7 @@ func (c *replicaSets) UpdateStatus(replicaSet *v1.ReplicaSet) (result *v1.Replic
}
// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
func (c *replicaSets) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *replicaSets) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("replicasets").
@@ -149,7 +149,7 @@ func (c *replicaSets) Delete(name string, options *meta_v1.DeleteOptions) error
}
// DeleteCollection deletes a collection of objects.
func (c *replicaSets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *replicaSets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("replicasets").

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/apps/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -38,11 +38,11 @@ type StatefulSetInterface interface {
Create(*v1.StatefulSet) (*v1.StatefulSet, error)
Update(*v1.StatefulSet) (*v1.StatefulSet, error)
UpdateStatus(*v1.StatefulSet) (*v1.StatefulSet, 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.StatefulSet, error)
List(opts meta_v1.ListOptions) (*v1.StatefulSetList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.StatefulSet, error)
List(opts metav1.ListOptions) (*v1.StatefulSetList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StatefulSet, err error)
StatefulSetExpansion
}
@@ -62,7 +62,7 @@ func newStatefulSets(c *AppsV1Client, namespace string) *statefulSets {
}
// 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 *v1.StatefulSet, err error) {
func (c *statefulSets) Get(name string, options metav1.GetOptions) (result *v1.StatefulSet, err error) {
result = &v1.StatefulSet{}
err = c.client.Get().
Namespace(c.ns).
@@ -75,7 +75,7 @@ func (c *statefulSets) Get(name string, options meta_v1.GetOptions) (result *v1.
}
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
func (c *statefulSets) List(opts meta_v1.ListOptions) (result *v1.StatefulSetList, err error) {
func (c *statefulSets) List(opts metav1.ListOptions) (result *v1.StatefulSetList, err error) {
result = &v1.StatefulSetList{}
err = c.client.Get().
Namespace(c.ns).
@@ -87,7 +87,7 @@ func (c *statefulSets) List(opts meta_v1.ListOptions) (result *v1.StatefulSetLis
}
// Watch returns a watch.Interface that watches the requested statefulSets.
func (c *statefulSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *statefulSets) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -138,7 +138,7 @@ func (c *statefulSets) UpdateStatus(statefulSet *v1.StatefulSet) (result *v1.Sta
}
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *statefulSets) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *statefulSets) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("statefulsets").
@@ -149,7 +149,7 @@ func (c *statefulSets) Delete(name string, options *meta_v1.DeleteOptions) error
}
// DeleteCollection deletes a collection of objects.
func (c *statefulSets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *statefulSets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("statefulsets").

View File

@@ -23,5 +23,8 @@ import (
func (c *FakeSubjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("subjectaccessreviews"), sar), &authorizationapi.SubjectAccessReview{})
if obj == nil {
return nil, err
}
return obj.(*authorizationapi.SubjectAccessReview), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
autoscaling_v1 "k8s.io/api/autoscaling/v1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autos
var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscaler"}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *autoscaling_v1.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &autoscaling_v1.HorizontalPodAutoscaler{})
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &autoscalingv1.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*autoscaling_v1.HorizontalPodAutoscaler), err
return obj.(*autoscalingv1.HorizontalPodAutoscaler), err
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscaling_v1.HorizontalPodAutoscalerList, err error) {
func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscalingv1.HorizontalPodAutoscalerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &autoscaling_v1.HorizontalPodAutoscalerList{})
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &autoscalingv1.HorizontalPodAutoscalerList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autosc
if label == nil {
label = labels.Everything()
}
list := &autoscaling_v1.HorizontalPodAutoscalerList{ListMeta: obj.(*autoscaling_v1.HorizontalPodAutoscalerList).ListMeta}
for _, item := range obj.(*autoscaling_v1.HorizontalPodAutoscalerList).Items {
list := &autoscalingv1.HorizontalPodAutoscalerList{ListMeta: obj.(*autoscalingv1.HorizontalPodAutoscalerList).ListMeta}
for _, item := range obj.(*autoscalingv1.HorizontalPodAutoscalerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,43 +79,43 @@ func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interfa
}
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscaling_v1.HorizontalPodAutoscaler) (result *autoscaling_v1.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (result *autoscalingv1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscaling_v1.HorizontalPodAutoscaler{})
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*autoscaling_v1.HorizontalPodAutoscaler), err
return obj.(*autoscalingv1.HorizontalPodAutoscaler), err
}
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscaling_v1.HorizontalPodAutoscaler) (result *autoscaling_v1.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (result *autoscalingv1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscaling_v1.HorizontalPodAutoscaler{})
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*autoscaling_v1.HorizontalPodAutoscaler), err
return obj.(*autoscalingv1.HorizontalPodAutoscaler), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscaling_v1.HorizontalPodAutoscaler) (*autoscaling_v1.HorizontalPodAutoscaler, error) {
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (*autoscalingv1.HorizontalPodAutoscaler, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &autoscaling_v1.HorizontalPodAutoscaler{})
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*autoscaling_v1.HorizontalPodAutoscaler), err
return obj.(*autoscalingv1.HorizontalPodAutoscaler), err
}
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &autoscaling_v1.HorizontalPodAutoscaler{})
Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &autoscalingv1.HorizontalPodAutoscaler{})
return err
}
@@ -124,17 +124,17 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOpt
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &autoscaling_v1.HorizontalPodAutoscalerList{})
_, err := c.Fake.Invokes(action, &autoscalingv1.HorizontalPodAutoscalerList{})
return err
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling_v1.HorizontalPodAutoscaler, err error) {
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscalingv1.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &autoscaling_v1.HorizontalPodAutoscaler{})
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &autoscalingv1.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*autoscaling_v1.HorizontalPodAutoscaler), err
return obj.(*autoscalingv1.HorizontalPodAutoscaler), err
}

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/autoscaling/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -38,11 +38,11 @@ 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 *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 meta_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.HorizontalPodAutoscaler, error)
List(opts metav1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error)
HorizontalPodAutoscalerExpansion
}
@@ -62,7 +62,7 @@ func newHorizontalPodAutoscalers(c *AutoscalingV1Client, namespace string) *hori
}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) {
func (c *horizontalPodAutoscalers) Get(name string, options metav1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) {
result = &v1.HorizontalPodAutoscaler{}
err = c.client.Get().
Namespace(c.ns).
@@ -75,7 +75,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 meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
func (c *horizontalPodAutoscalers) List(opts metav1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
result = &v1.HorizontalPodAutoscalerList{}
err = c.client.Get().
Namespace(c.ns).
@@ -87,7 +87,7 @@ func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.Ho
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *horizontalPodAutoscalers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -138,7 +138,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 *meta_v1.DeleteOptions) error {
func (c *horizontalPodAutoscalers) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
@@ -149,7 +149,7 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOp
}
// DeleteCollection deletes a collection of objects.
func (c *horizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *horizontalPodAutoscalers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("horizontalpodautoscalers").

View File

@@ -0,0 +1,90 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v2beta2
import (
v2beta2 "k8s.io/api/autoscaling/v2beta2"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
type AutoscalingV2beta2Interface interface {
RESTClient() rest.Interface
HorizontalPodAutoscalersGetter
}
// AutoscalingV2beta2Client is used to interact with features provided by the autoscaling group.
type AutoscalingV2beta2Client struct {
restClient rest.Interface
}
func (c *AutoscalingV2beta2Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
return newHorizontalPodAutoscalers(c, namespace)
}
// NewForConfig creates a new AutoscalingV2beta2Client for the given config.
func NewForConfig(c *rest.Config) (*AutoscalingV2beta2Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &AutoscalingV2beta2Client{client}, nil
}
// NewForConfigOrDie creates a new AutoscalingV2beta2Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *AutoscalingV2beta2Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new AutoscalingV2beta2Client for the given RESTClient.
func New(c rest.Interface) *AutoscalingV2beta2Client {
return &AutoscalingV2beta2Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v2beta2.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *AutoscalingV2beta2Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View File

@@ -0,0 +1,20 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v2beta2

View File

@@ -0,0 +1,20 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake

View File

@@ -0,0 +1,40 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeAutoscalingV2beta2 struct {
*testing.Fake
}
func (c *FakeAutoscalingV2beta2) HorizontalPodAutoscalers(namespace string) v2beta2.HorizontalPodAutoscalerInterface {
return &FakeHorizontalPodAutoscalers{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeAutoscalingV2beta2) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@@ -0,0 +1,140 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v2beta2 "k8s.io/api/autoscaling/v2beta2"
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"
testing "k8s.io/client-go/testing"
)
// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
type FakeHorizontalPodAutoscalers struct {
Fake *FakeAutoscalingV2beta2
ns string
}
var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autoscaling", Version: "v2beta2", Resource: "horizontalpodautoscalers"}
var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v2beta2", Kind: "HorizontalPodAutoscaler"}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2beta2.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta2.HorizontalPodAutoscaler), err
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2beta2.HorizontalPodAutoscalerList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v2beta2.HorizontalPodAutoscalerList{ListMeta: obj.(*v2beta2.HorizontalPodAutoscalerList).ListMeta}
for _, item := range obj.(*v2beta2.HorizontalPodAutoscalerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
}
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta2.HorizontalPodAutoscaler), err
}
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta2.HorizontalPodAutoscaler), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta2.HorizontalPodAutoscaler), err
}
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v2beta2.HorizontalPodAutoscaler{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v2beta2.HorizontalPodAutoscalerList{})
return err
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &v2beta2.HorizontalPodAutoscaler{})
if obj == nil {
return nil, err
}
return obj.(*v2beta2.HorizontalPodAutoscaler), err
}

View File

@@ -0,0 +1,21 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v2beta2
type HorizontalPodAutoscalerExpansion interface{}

View File

@@ -0,0 +1,174 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v2beta2
import (
v2beta2 "k8s.io/api/autoscaling/v2beta2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
// A group's client should implement this interface.
type HorizontalPodAutoscalersGetter interface {
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
}
// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
type HorizontalPodAutoscalerInterface interface {
Create(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error)
Update(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error)
UpdateStatus(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error)
List(opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error)
HorizontalPodAutoscalerExpansion
}
// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
type horizontalPodAutoscalers struct {
client rest.Interface
ns string
}
// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
func newHorizontalPodAutoscalers(c *AutoscalingV2beta2Client, namespace string) *horizontalPodAutoscalers {
return &horizontalPodAutoscalers{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
func (c *horizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Get().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *horizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) {
result = &v2beta2.HorizontalPodAutoscalerList{}
err = c.client.Get().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
VersionedParams(&opts, scheme.ParameterCodec).
Watch()
}
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Post().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Body(horizontalPodAutoscaler).
Do().
Into(result)
return
}
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(horizontalPodAutoscaler.Name).
Body(horizontalPodAutoscaler).
Do().
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Put().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(horizontalPodAutoscaler.Name).
SubResource("status").
Body(horizontalPodAutoscaler).
Do().
Into(result)
return
}
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *horizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *horizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("horizontalpodautoscalers").
VersionedParams(&listOptions, scheme.ParameterCodec).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *horizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) {
result = &v2beta2.HorizontalPodAutoscaler{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("horizontalpodautoscalers").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
batch_v1 "k8s.io/api/batch/v1"
batchv1 "k8s.io/api/batch/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var jobsResource = schema.GroupVersionResource{Group: "batch", Version: "v1", Re
var jobsKind = schema.GroupVersionKind{Group: "batch", Version: "v1", Kind: "Job"}
// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *batch_v1.Job, err error) {
func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *batchv1.Job, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(jobsResource, c.ns, name), &batch_v1.Job{})
Invokes(testing.NewGetAction(jobsResource, c.ns, name), &batchv1.Job{})
if obj == nil {
return nil, err
}
return obj.(*batch_v1.Job), err
return obj.(*batchv1.Job), err
}
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
func (c *FakeJobs) List(opts v1.ListOptions) (result *batch_v1.JobList, err error) {
func (c *FakeJobs) List(opts v1.ListOptions) (result *batchv1.JobList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(jobsResource, jobsKind, c.ns, opts), &batch_v1.JobList{})
Invokes(testing.NewListAction(jobsResource, jobsKind, c.ns, opts), &batchv1.JobList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeJobs) List(opts v1.ListOptions) (result *batch_v1.JobList, err erro
if label == nil {
label = labels.Everything()
}
list := &batch_v1.JobList{ListMeta: obj.(*batch_v1.JobList).ListMeta}
for _, item := range obj.(*batch_v1.JobList).Items {
list := &batchv1.JobList{ListMeta: obj.(*batchv1.JobList).ListMeta}
for _, item := range obj.(*batchv1.JobList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,43 +79,43 @@ func (c *FakeJobs) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any.
func (c *FakeJobs) Create(job *batch_v1.Job) (result *batch_v1.Job, err error) {
func (c *FakeJobs) Create(job *batchv1.Job) (result *batchv1.Job, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(jobsResource, c.ns, job), &batch_v1.Job{})
Invokes(testing.NewCreateAction(jobsResource, c.ns, job), &batchv1.Job{})
if obj == nil {
return nil, err
}
return obj.(*batch_v1.Job), err
return obj.(*batchv1.Job), err
}
// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
func (c *FakeJobs) Update(job *batch_v1.Job) (result *batch_v1.Job, err error) {
func (c *FakeJobs) Update(job *batchv1.Job) (result *batchv1.Job, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &batch_v1.Job{})
Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &batchv1.Job{})
if obj == nil {
return nil, err
}
return obj.(*batch_v1.Job), err
return obj.(*batchv1.Job), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeJobs) UpdateStatus(job *batch_v1.Job) (*batch_v1.Job, error) {
func (c *FakeJobs) UpdateStatus(job *batchv1.Job) (*batchv1.Job, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &batch_v1.Job{})
Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &batchv1.Job{})
if obj == nil {
return nil, err
}
return obj.(*batch_v1.Job), err
return obj.(*batchv1.Job), err
}
// Delete takes name of the job and deletes it. Returns an error if one occurs.
func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(jobsResource, c.ns, name), &batch_v1.Job{})
Invokes(testing.NewDeleteAction(jobsResource, c.ns, name), &batchv1.Job{})
return err
}
@@ -124,17 +124,17 @@ func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &batch_v1.JobList{})
_, err := c.Fake.Invokes(action, &batchv1.JobList{})
return err
}
// Patch applies the patch and returns the patched job.
func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch_v1.Job, err error) {
func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batchv1.Job, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &batch_v1.Job{})
Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &batchv1.Job{})
if obj == nil {
return nil, err
}
return obj.(*batch_v1.Job), err
return obj.(*batchv1.Job), err
}

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/batch/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -38,11 +38,11 @@ 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 *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 meta_v1.ListOptions) (*v1.JobList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Job, error)
List(opts metav1.ListOptions) (*v1.JobList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error)
JobExpansion
}
@@ -62,7 +62,7 @@ func newJobs(c *BatchV1Client, namespace string) *jobs {
}
// 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 *v1.Job, err error) {
func (c *jobs) Get(name string, options metav1.GetOptions) (result *v1.Job, err error) {
result = &v1.Job{}
err = c.client.Get().
Namespace(c.ns).
@@ -75,7 +75,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 meta_v1.ListOptions) (result *v1.JobList, err error) {
func (c *jobs) List(opts metav1.ListOptions) (result *v1.JobList, err error) {
result = &v1.JobList{}
err = c.client.Get().
Namespace(c.ns).
@@ -87,7 +87,7 @@ func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) {
}
// Watch returns a watch.Interface that watches the requested jobs.
func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *jobs) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -138,7 +138,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 *meta_v1.DeleteOptions) error {
func (c *jobs) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("jobs").
@@ -149,7 +149,7 @@ func (c *jobs) Delete(name string, options *meta_v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *jobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *jobs) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("jobs").

View File

@@ -0,0 +1,90 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
v1beta1 "k8s.io/api/coordination/v1beta1"
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
type CoordinationV1beta1Interface interface {
RESTClient() rest.Interface
LeasesGetter
}
// CoordinationV1beta1Client is used to interact with features provided by the coordination.k8s.io group.
type CoordinationV1beta1Client struct {
restClient rest.Interface
}
func (c *CoordinationV1beta1Client) Leases(namespace string) LeaseInterface {
return newLeases(c, namespace)
}
// NewForConfig creates a new CoordinationV1beta1Client for the given config.
func NewForConfig(c *rest.Config) (*CoordinationV1beta1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &CoordinationV1beta1Client{client}, nil
}
// NewForConfigOrDie creates a new CoordinationV1beta1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *CoordinationV1beta1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new CoordinationV1beta1Client for the given RESTClient.
func New(c rest.Interface) *CoordinationV1beta1Client {
return &CoordinationV1beta1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1beta1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *CoordinationV1beta1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View File

@@ -0,0 +1,20 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1beta1

View File

@@ -0,0 +1,20 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake

View File

@@ -0,0 +1,40 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeCoordinationV1beta1 struct {
*testing.Fake
}
func (c *FakeCoordinationV1beta1) Leases(namespace string) v1beta1.LeaseInterface {
return &FakeLeases{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeCoordinationV1beta1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@@ -0,0 +1,128 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1beta1 "k8s.io/api/coordination/v1beta1"
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"
testing "k8s.io/client-go/testing"
)
// FakeLeases implements LeaseInterface
type FakeLeases struct {
Fake *FakeCoordinationV1beta1
ns string
}
var leasesResource = schema.GroupVersionResource{Group: "coordination.k8s.io", Version: "v1beta1", Resource: "leases"}
var leasesKind = schema.GroupVersionKind{Group: "coordination.k8s.io", Version: "v1beta1", Kind: "Lease"}
// Get takes name of the lease, and returns the corresponding lease object, and an error if there is any.
func (c *FakeLeases) Get(name string, options v1.GetOptions) (result *v1beta1.Lease, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(leasesResource, c.ns, name), &v1beta1.Lease{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Lease), err
}
// List takes label and field selectors, and returns the list of Leases that match those selectors.
func (c *FakeLeases) List(opts v1.ListOptions) (result *v1beta1.LeaseList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(leasesResource, leasesKind, c.ns, opts), &v1beta1.LeaseList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1beta1.LeaseList{ListMeta: obj.(*v1beta1.LeaseList).ListMeta}
for _, item := range obj.(*v1beta1.LeaseList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested leases.
func (c *FakeLeases) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(leasesResource, c.ns, opts))
}
// Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any.
func (c *FakeLeases) Create(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(leasesResource, c.ns, lease), &v1beta1.Lease{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Lease), err
}
// Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any.
func (c *FakeLeases) Update(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(leasesResource, c.ns, lease), &v1beta1.Lease{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Lease), err
}
// Delete takes name of the lease and deletes it. Returns an error if one occurs.
func (c *FakeLeases) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(leasesResource, c.ns, name), &v1beta1.Lease{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeLeases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.LeaseList{})
return err
}
// Patch applies the patch and returns the patched lease.
func (c *FakeLeases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(leasesResource, c.ns, name, data, subresources...), &v1beta1.Lease{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.Lease), err
}

View File

@@ -0,0 +1,21 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
type LeaseExpansion interface{}

View File

@@ -0,0 +1,157 @@
/*
Copyright 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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
v1beta1 "k8s.io/api/coordination/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
// LeasesGetter has a method to return a LeaseInterface.
// A group's client should implement this interface.
type LeasesGetter interface {
Leases(namespace string) LeaseInterface
}
// LeaseInterface has methods to work with Lease resources.
type LeaseInterface interface {
Create(*v1beta1.Lease) (*v1beta1.Lease, error)
Update(*v1beta1.Lease) (*v1beta1.Lease, error)
Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string, options v1.GetOptions) (*v1beta1.Lease, error)
List(opts v1.ListOptions) (*v1beta1.LeaseList, error)
Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error)
LeaseExpansion
}
// leases implements LeaseInterface
type leases struct {
client rest.Interface
ns string
}
// newLeases returns a Leases
func newLeases(c *CoordinationV1beta1Client, namespace string) *leases {
return &leases{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the lease, and returns the corresponding lease object, and an error if there is any.
func (c *leases) Get(name string, options v1.GetOptions) (result *v1beta1.Lease, err error) {
result = &v1beta1.Lease{}
err = c.client.Get().
Namespace(c.ns).
Resource("leases").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of Leases that match those selectors.
func (c *leases) List(opts v1.ListOptions) (result *v1beta1.LeaseList, err error) {
result = &v1beta1.LeaseList{}
err = c.client.Get().
Namespace(c.ns).
Resource("leases").
VersionedParams(&opts, scheme.ParameterCodec).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested leases.
func (c *leases) Watch(opts v1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("leases").
VersionedParams(&opts, scheme.ParameterCodec).
Watch()
}
// Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any.
func (c *leases) Create(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) {
result = &v1beta1.Lease{}
err = c.client.Post().
Namespace(c.ns).
Resource("leases").
Body(lease).
Do().
Into(result)
return
}
// Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any.
func (c *leases) Update(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) {
result = &v1beta1.Lease{}
err = c.client.Put().
Namespace(c.ns).
Resource("leases").
Name(lease.Name).
Body(lease).
Do().
Into(result)
return
}
// Delete takes name of the lease and deletes it. Returns an error if one occurs.
func (c *leases) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("leases").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *leases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("leases").
VersionedParams(&listOptions, scheme.ParameterCodec).
Body(options).
Do().
Error()
}
// Patch applies the patch and returns the patched lease.
func (c *leases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) {
result = &v1beta1.Lease{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("leases").
SubResource(subresources...).
Name(name).
Body(data).
Do().
Into(result)
return
}

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type ComponentStatusesGetter interface {
type ComponentStatusInterface interface {
Create(*v1.ComponentStatus) (*v1.ComponentStatus, error)
Update(*v1.ComponentStatus) (*v1.ComponentStatus, 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 meta_v1.ListOptions) (*v1.ComponentStatusList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ComponentStatus, error)
List(opts metav1.ListOptions) (*v1.ComponentStatusList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error)
ComponentStatusExpansion
}
@@ -59,7 +59,7 @@ func newComponentStatuses(c *CoreV1Client) *componentStatuses {
}
// Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any.
func (c *componentStatuses) Get(name string, options meta_v1.GetOptions) (result *v1.ComponentStatus, err error) {
func (c *componentStatuses) Get(name string, options metav1.GetOptions) (result *v1.ComponentStatus, err error) {
result = &v1.ComponentStatus{}
err = c.client.Get().
Resource("componentstatuses").
@@ -71,7 +71,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 meta_v1.ListOptions) (result *v1.ComponentStatusList, err error) {
func (c *componentStatuses) List(opts metav1.ListOptions) (result *v1.ComponentStatusList, err error) {
result = &v1.ComponentStatusList{}
err = c.client.Get().
Resource("componentstatuses").
@@ -82,7 +82,7 @@ func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.Component
}
// Watch returns a watch.Interface that watches the requested componentStatuses.
func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *componentStatuses) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Resource("componentstatuses").
@@ -114,7 +114,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 *meta_v1.DeleteOptions) error {
func (c *componentStatuses) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Resource("componentstatuses").
Name(name).
@@ -124,7 +124,7 @@ func (c *componentStatuses) Delete(name string, options *meta_v1.DeleteOptions)
}
// DeleteCollection deletes a collection of objects.
func (c *componentStatuses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *componentStatuses) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Resource("componentstatuses").
VersionedParams(&listOptions, scheme.ParameterCodec).

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type ConfigMapsGetter interface {
type ConfigMapInterface interface {
Create(*v1.ConfigMap) (*v1.ConfigMap, error)
Update(*v1.ConfigMap) (*v1.ConfigMap, 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 meta_v1.ListOptions) (*v1.ConfigMapList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ConfigMap, error)
List(opts metav1.ListOptions) (*v1.ConfigMapList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error)
ConfigMapExpansion
}
@@ -61,7 +61,7 @@ func newConfigMaps(c *CoreV1Client, namespace string) *configMaps {
}
// Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any.
func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.ConfigMap, err error) {
func (c *configMaps) Get(name string, options metav1.GetOptions) (result *v1.ConfigMap, err error) {
result = &v1.ConfigMap{}
err = c.client.Get().
Namespace(c.ns).
@@ -74,7 +74,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 meta_v1.ListOptions) (result *v1.ConfigMapList, err error) {
func (c *configMaps) List(opts metav1.ListOptions) (result *v1.ConfigMapList, err error) {
result = &v1.ConfigMapList{}
err = c.client.Get().
Namespace(c.ns).
@@ -86,7 +86,7 @@ func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, e
}
// Watch returns a watch.Interface that watches the requested configMaps.
func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *configMaps) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -121,7 +121,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 *meta_v1.DeleteOptions) error {
func (c *configMaps) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("configmaps").
@@ -132,7 +132,7 @@ func (c *configMaps) Delete(name string, options *meta_v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *configMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *configMaps) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("configmaps").

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type EndpointsGetter interface {
type EndpointsInterface interface {
Create(*v1.Endpoints) (*v1.Endpoints, error)
Update(*v1.Endpoints) (*v1.Endpoints, 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 meta_v1.ListOptions) (*v1.EndpointsList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Endpoints, error)
List(opts metav1.ListOptions) (*v1.EndpointsList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error)
EndpointsExpansion
}
@@ -61,7 +61,7 @@ func newEndpoints(c *CoreV1Client, namespace string) *endpoints {
}
// Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any.
func (c *endpoints) Get(name string, options meta_v1.GetOptions) (result *v1.Endpoints, err error) {
func (c *endpoints) Get(name string, options metav1.GetOptions) (result *v1.Endpoints, err error) {
result = &v1.Endpoints{}
err = c.client.Get().
Namespace(c.ns).
@@ -74,7 +74,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 meta_v1.ListOptions) (result *v1.EndpointsList, err error) {
func (c *endpoints) List(opts metav1.ListOptions) (result *v1.EndpointsList, err error) {
result = &v1.EndpointsList{}
err = c.client.Get().
Namespace(c.ns).
@@ -86,7 +86,7 @@ func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, er
}
// Watch returns a watch.Interface that watches the requested endpoints.
func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *endpoints) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -121,7 +121,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 *meta_v1.DeleteOptions) error {
func (c *endpoints) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("endpoints").
@@ -132,7 +132,7 @@ func (c *endpoints) Delete(name string, options *meta_v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *endpoints) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *endpoints) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("endpoints").

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type EventsGetter interface {
type EventInterface interface {
Create(*v1.Event) (*v1.Event, error)
Update(*v1.Event) (*v1.Event, 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 meta_v1.ListOptions) (*v1.EventList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Event, error)
List(opts metav1.ListOptions) (*v1.EventList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
EventExpansion
}
@@ -61,7 +61,7 @@ func newEvents(c *CoreV1Client, namespace string) *events {
}
// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event, err error) {
func (c *events) Get(name string, options metav1.GetOptions) (result *v1.Event, err error) {
result = &v1.Event{}
err = c.client.Get().
Namespace(c.ns).
@@ -74,7 +74,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 meta_v1.ListOptions) (result *v1.EventList, err error) {
func (c *events) List(opts metav1.ListOptions) (result *v1.EventList, err error) {
result = &v1.EventList{}
err = c.client.Get().
Namespace(c.ns).
@@ -86,7 +86,7 @@ func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error
}
// Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *events) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -121,7 +121,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 *meta_v1.DeleteOptions) error {
func (c *events) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("events").
@@ -132,7 +132,7 @@ func (c *events) Delete(name string, options *meta_v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *events) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *events) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("events").

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -38,19 +38,19 @@ var componentstatusesResource = schema.GroupVersionResource{Group: "", Version:
var componentstatusesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ComponentStatus"}
// Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any.
func (c *FakeComponentStatuses) Get(name string, options v1.GetOptions) (result *core_v1.ComponentStatus, err error) {
func (c *FakeComponentStatuses) Get(name string, options v1.GetOptions) (result *corev1.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(componentstatusesResource, name), &core_v1.ComponentStatus{})
Invokes(testing.NewRootGetAction(componentstatusesResource, name), &corev1.ComponentStatus{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ComponentStatus), err
return obj.(*corev1.ComponentStatus), err
}
// List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors.
func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *core_v1.ComponentStatusList, err error) {
func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *corev1.ComponentStatusList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(componentstatusesResource, componentstatusesKind, opts), &core_v1.ComponentStatusList{})
Invokes(testing.NewRootListAction(componentstatusesResource, componentstatusesKind, opts), &corev1.ComponentStatusList{})
if obj == nil {
return nil, err
}
@@ -59,8 +59,8 @@ func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *core_v1.Compo
if label == nil {
label = labels.Everything()
}
list := &core_v1.ComponentStatusList{ListMeta: obj.(*core_v1.ComponentStatusList).ListMeta}
for _, item := range obj.(*core_v1.ComponentStatusList).Items {
list := &corev1.ComponentStatusList{ListMeta: obj.(*corev1.ComponentStatusList).ListMeta}
for _, item := range obj.(*corev1.ComponentStatusList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -75,29 +75,29 @@ func (c *FakeComponentStatuses) Watch(opts v1.ListOptions) (watch.Interface, err
}
// Create takes the representation of a componentStatus and creates it. Returns the server's representation of the componentStatus, and an error, if there is any.
func (c *FakeComponentStatuses) Create(componentStatus *core_v1.ComponentStatus) (result *core_v1.ComponentStatus, err error) {
func (c *FakeComponentStatuses) Create(componentStatus *corev1.ComponentStatus) (result *corev1.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(componentstatusesResource, componentStatus), &core_v1.ComponentStatus{})
Invokes(testing.NewRootCreateAction(componentstatusesResource, componentStatus), &corev1.ComponentStatus{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ComponentStatus), err
return obj.(*corev1.ComponentStatus), err
}
// Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any.
func (c *FakeComponentStatuses) Update(componentStatus *core_v1.ComponentStatus) (result *core_v1.ComponentStatus, err error) {
func (c *FakeComponentStatuses) Update(componentStatus *corev1.ComponentStatus) (result *corev1.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(componentstatusesResource, componentStatus), &core_v1.ComponentStatus{})
Invokes(testing.NewRootUpdateAction(componentstatusesResource, componentStatus), &corev1.ComponentStatus{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ComponentStatus), err
return obj.(*corev1.ComponentStatus), err
}
// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs.
func (c *FakeComponentStatuses) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(componentstatusesResource, name), &core_v1.ComponentStatus{})
Invokes(testing.NewRootDeleteAction(componentstatusesResource, name), &corev1.ComponentStatus{})
return err
}
@@ -105,16 +105,16 @@ func (c *FakeComponentStatuses) Delete(name string, options *v1.DeleteOptions) e
func (c *FakeComponentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(componentstatusesResource, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.ComponentStatusList{})
_, err := c.Fake.Invokes(action, &corev1.ComponentStatusList{})
return err
}
// Patch applies the patch and returns the patched componentStatus.
func (c *FakeComponentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.ComponentStatus, err error) {
func (c *FakeComponentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(componentstatusesResource, name, data, subresources...), &core_v1.ComponentStatus{})
Invokes(testing.NewRootPatchSubresourceAction(componentstatusesResource, name, data, subresources...), &corev1.ComponentStatus{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ComponentStatus), err
return obj.(*corev1.ComponentStatus), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var configmapsResource = schema.GroupVersionResource{Group: "", Version: "v1", R
var configmapsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ConfigMap"}
// Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any.
func (c *FakeConfigMaps) Get(name string, options v1.GetOptions) (result *core_v1.ConfigMap, err error) {
func (c *FakeConfigMaps) Get(name string, options v1.GetOptions) (result *corev1.ConfigMap, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(configmapsResource, c.ns, name), &core_v1.ConfigMap{})
Invokes(testing.NewGetAction(configmapsResource, c.ns, name), &corev1.ConfigMap{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ConfigMap), err
return obj.(*corev1.ConfigMap), err
}
// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors.
func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *core_v1.ConfigMapList, err error) {
func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *corev1.ConfigMapList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(configmapsResource, configmapsKind, c.ns, opts), &core_v1.ConfigMapList{})
Invokes(testing.NewListAction(configmapsResource, configmapsKind, c.ns, opts), &corev1.ConfigMapList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *core_v1.ConfigMapLis
if label == nil {
label = labels.Everything()
}
list := &core_v1.ConfigMapList{ListMeta: obj.(*core_v1.ConfigMapList).ListMeta}
for _, item := range obj.(*core_v1.ConfigMapList).Items {
list := &corev1.ConfigMapList{ListMeta: obj.(*corev1.ConfigMapList).ListMeta}
for _, item := range obj.(*corev1.ConfigMapList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,31 +79,31 @@ func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any.
func (c *FakeConfigMaps) Create(configMap *core_v1.ConfigMap) (result *core_v1.ConfigMap, err error) {
func (c *FakeConfigMaps) Create(configMap *corev1.ConfigMap) (result *corev1.ConfigMap, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(configmapsResource, c.ns, configMap), &core_v1.ConfigMap{})
Invokes(testing.NewCreateAction(configmapsResource, c.ns, configMap), &corev1.ConfigMap{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ConfigMap), err
return obj.(*corev1.ConfigMap), err
}
// Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any.
func (c *FakeConfigMaps) Update(configMap *core_v1.ConfigMap) (result *core_v1.ConfigMap, err error) {
func (c *FakeConfigMaps) Update(configMap *corev1.ConfigMap) (result *corev1.ConfigMap, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(configmapsResource, c.ns, configMap), &core_v1.ConfigMap{})
Invokes(testing.NewUpdateAction(configmapsResource, c.ns, configMap), &corev1.ConfigMap{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ConfigMap), err
return obj.(*corev1.ConfigMap), err
}
// Delete takes name of the configMap and deletes it. Returns an error if one occurs.
func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(configmapsResource, c.ns, name), &core_v1.ConfigMap{})
Invokes(testing.NewDeleteAction(configmapsResource, c.ns, name), &corev1.ConfigMap{})
return err
}
@@ -112,17 +112,17 @@ func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.ConfigMapList{})
_, err := c.Fake.Invokes(action, &corev1.ConfigMapList{})
return err
}
// Patch applies the patch and returns the patched configMap.
func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.ConfigMap, err error) {
func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ConfigMap, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(configmapsResource, c.ns, name, data, subresources...), &core_v1.ConfigMap{})
Invokes(testing.NewPatchSubresourceAction(configmapsResource, c.ns, name, data, subresources...), &corev1.ConfigMap{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ConfigMap), err
return obj.(*corev1.ConfigMap), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var endpointsResource = schema.GroupVersionResource{Group: "", Version: "v1", Re
var endpointsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Endpoints"}
// Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any.
func (c *FakeEndpoints) Get(name string, options v1.GetOptions) (result *core_v1.Endpoints, err error) {
func (c *FakeEndpoints) Get(name string, options v1.GetOptions) (result *corev1.Endpoints, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(endpointsResource, c.ns, name), &core_v1.Endpoints{})
Invokes(testing.NewGetAction(endpointsResource, c.ns, name), &corev1.Endpoints{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Endpoints), err
return obj.(*corev1.Endpoints), err
}
// List takes label and field selectors, and returns the list of Endpoints that match those selectors.
func (c *FakeEndpoints) List(opts v1.ListOptions) (result *core_v1.EndpointsList, err error) {
func (c *FakeEndpoints) List(opts v1.ListOptions) (result *corev1.EndpointsList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(endpointsResource, endpointsKind, c.ns, opts), &core_v1.EndpointsList{})
Invokes(testing.NewListAction(endpointsResource, endpointsKind, c.ns, opts), &corev1.EndpointsList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeEndpoints) List(opts v1.ListOptions) (result *core_v1.EndpointsList
if label == nil {
label = labels.Everything()
}
list := &core_v1.EndpointsList{ListMeta: obj.(*core_v1.EndpointsList).ListMeta}
for _, item := range obj.(*core_v1.EndpointsList).Items {
list := &corev1.EndpointsList{ListMeta: obj.(*corev1.EndpointsList).ListMeta}
for _, item := range obj.(*corev1.EndpointsList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,31 +79,31 @@ func (c *FakeEndpoints) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a endpoints and creates it. Returns the server's representation of the endpoints, and an error, if there is any.
func (c *FakeEndpoints) Create(endpoints *core_v1.Endpoints) (result *core_v1.Endpoints, err error) {
func (c *FakeEndpoints) Create(endpoints *corev1.Endpoints) (result *corev1.Endpoints, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(endpointsResource, c.ns, endpoints), &core_v1.Endpoints{})
Invokes(testing.NewCreateAction(endpointsResource, c.ns, endpoints), &corev1.Endpoints{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Endpoints), err
return obj.(*corev1.Endpoints), err
}
// Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any.
func (c *FakeEndpoints) Update(endpoints *core_v1.Endpoints) (result *core_v1.Endpoints, err error) {
func (c *FakeEndpoints) Update(endpoints *corev1.Endpoints) (result *corev1.Endpoints, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(endpointsResource, c.ns, endpoints), &core_v1.Endpoints{})
Invokes(testing.NewUpdateAction(endpointsResource, c.ns, endpoints), &corev1.Endpoints{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Endpoints), err
return obj.(*corev1.Endpoints), err
}
// Delete takes name of the endpoints and deletes it. Returns an error if one occurs.
func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(endpointsResource, c.ns, name), &core_v1.Endpoints{})
Invokes(testing.NewDeleteAction(endpointsResource, c.ns, name), &corev1.Endpoints{})
return err
}
@@ -112,17 +112,17 @@ func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeEndpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.EndpointsList{})
_, err := c.Fake.Invokes(action, &corev1.EndpointsList{})
return err
}
// Patch applies the patch and returns the patched endpoints.
func (c *FakeEndpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Endpoints, err error) {
func (c *FakeEndpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Endpoints, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(endpointsResource, c.ns, name, data, subresources...), &core_v1.Endpoints{})
Invokes(testing.NewPatchSubresourceAction(endpointsResource, c.ns, name, data, subresources...), &corev1.Endpoints{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Endpoints), err
return obj.(*corev1.Endpoints), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var eventsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resou
var eventsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Event"}
// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *core_v1.Event, err error) {
func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *corev1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(eventsResource, c.ns, name), &core_v1.Event{})
Invokes(testing.NewGetAction(eventsResource, c.ns, name), &corev1.Event{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Event), err
return obj.(*corev1.Event), err
}
// List takes label and field selectors, and returns the list of Events that match those selectors.
func (c *FakeEvents) List(opts v1.ListOptions) (result *core_v1.EventList, err error) {
func (c *FakeEvents) List(opts v1.ListOptions) (result *corev1.EventList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &core_v1.EventList{})
Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &corev1.EventList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeEvents) List(opts v1.ListOptions) (result *core_v1.EventList, err e
if label == nil {
label = labels.Everything()
}
list := &core_v1.EventList{ListMeta: obj.(*core_v1.EventList).ListMeta}
for _, item := range obj.(*core_v1.EventList).Items {
list := &corev1.EventList{ListMeta: obj.(*corev1.EventList).ListMeta}
for _, item := range obj.(*corev1.EventList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,31 +79,31 @@ func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any.
func (c *FakeEvents) Create(event *core_v1.Event) (result *core_v1.Event, err error) {
func (c *FakeEvents) Create(event *corev1.Event) (result *corev1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &core_v1.Event{})
Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &corev1.Event{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Event), err
return obj.(*corev1.Event), err
}
// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.
func (c *FakeEvents) Update(event *core_v1.Event) (result *core_v1.Event, err error) {
func (c *FakeEvents) Update(event *corev1.Event) (result *corev1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &core_v1.Event{})
Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &corev1.Event{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Event), err
return obj.(*corev1.Event), err
}
// Delete takes name of the event and deletes it. Returns an error if one occurs.
func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(eventsResource, c.ns, name), &core_v1.Event{})
Invokes(testing.NewDeleteAction(eventsResource, c.ns, name), &corev1.Event{})
return err
}
@@ -112,17 +112,17 @@ func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.EventList{})
_, err := c.Fake.Invokes(action, &corev1.EventList{})
return err
}
// Patch applies the patch and returns the patched event.
func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Event, err error) {
func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, data, subresources...), &core_v1.Event{})
Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, data, subresources...), &corev1.Event{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Event), err
return obj.(*corev1.Event), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var limitrangesResource = schema.GroupVersionResource{Group: "", Version: "v1",
var limitrangesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "LimitRange"}
// Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any.
func (c *FakeLimitRanges) Get(name string, options v1.GetOptions) (result *core_v1.LimitRange, err error) {
func (c *FakeLimitRanges) Get(name string, options v1.GetOptions) (result *corev1.LimitRange, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(limitrangesResource, c.ns, name), &core_v1.LimitRange{})
Invokes(testing.NewGetAction(limitrangesResource, c.ns, name), &corev1.LimitRange{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.LimitRange), err
return obj.(*corev1.LimitRange), err
}
// List takes label and field selectors, and returns the list of LimitRanges that match those selectors.
func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *core_v1.LimitRangeList, err error) {
func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *corev1.LimitRangeList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(limitrangesResource, limitrangesKind, c.ns, opts), &core_v1.LimitRangeList{})
Invokes(testing.NewListAction(limitrangesResource, limitrangesKind, c.ns, opts), &corev1.LimitRangeList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *core_v1.LimitRangeL
if label == nil {
label = labels.Everything()
}
list := &core_v1.LimitRangeList{ListMeta: obj.(*core_v1.LimitRangeList).ListMeta}
for _, item := range obj.(*core_v1.LimitRangeList).Items {
list := &corev1.LimitRangeList{ListMeta: obj.(*corev1.LimitRangeList).ListMeta}
for _, item := range obj.(*corev1.LimitRangeList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,31 +79,31 @@ func (c *FakeLimitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a limitRange and creates it. Returns the server's representation of the limitRange, and an error, if there is any.
func (c *FakeLimitRanges) Create(limitRange *core_v1.LimitRange) (result *core_v1.LimitRange, err error) {
func (c *FakeLimitRanges) Create(limitRange *corev1.LimitRange) (result *corev1.LimitRange, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(limitrangesResource, c.ns, limitRange), &core_v1.LimitRange{})
Invokes(testing.NewCreateAction(limitrangesResource, c.ns, limitRange), &corev1.LimitRange{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.LimitRange), err
return obj.(*corev1.LimitRange), err
}
// Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any.
func (c *FakeLimitRanges) Update(limitRange *core_v1.LimitRange) (result *core_v1.LimitRange, err error) {
func (c *FakeLimitRanges) Update(limitRange *corev1.LimitRange) (result *corev1.LimitRange, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(limitrangesResource, c.ns, limitRange), &core_v1.LimitRange{})
Invokes(testing.NewUpdateAction(limitrangesResource, c.ns, limitRange), &corev1.LimitRange{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.LimitRange), err
return obj.(*corev1.LimitRange), err
}
// Delete takes name of the limitRange and deletes it. Returns an error if one occurs.
func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(limitrangesResource, c.ns, name), &core_v1.LimitRange{})
Invokes(testing.NewDeleteAction(limitrangesResource, c.ns, name), &corev1.LimitRange{})
return err
}
@@ -112,17 +112,17 @@ func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeLimitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.LimitRangeList{})
_, err := c.Fake.Invokes(action, &corev1.LimitRangeList{})
return err
}
// Patch applies the patch and returns the patched limitRange.
func (c *FakeLimitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.LimitRange, err error) {
func (c *FakeLimitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.LimitRange, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(limitrangesResource, c.ns, name, data, subresources...), &core_v1.LimitRange{})
Invokes(testing.NewPatchSubresourceAction(limitrangesResource, c.ns, name, data, subresources...), &corev1.LimitRange{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.LimitRange), err
return obj.(*corev1.LimitRange), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -38,19 +38,19 @@ var namespacesResource = schema.GroupVersionResource{Group: "", Version: "v1", R
var namespacesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Namespace"}
// Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any.
func (c *FakeNamespaces) Get(name string, options v1.GetOptions) (result *core_v1.Namespace, err error) {
func (c *FakeNamespaces) Get(name string, options v1.GetOptions) (result *corev1.Namespace, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(namespacesResource, name), &core_v1.Namespace{})
Invokes(testing.NewRootGetAction(namespacesResource, name), &corev1.Namespace{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Namespace), err
return obj.(*corev1.Namespace), err
}
// List takes label and field selectors, and returns the list of Namespaces that match those selectors.
func (c *FakeNamespaces) List(opts v1.ListOptions) (result *core_v1.NamespaceList, err error) {
func (c *FakeNamespaces) List(opts v1.ListOptions) (result *corev1.NamespaceList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(namespacesResource, namespacesKind, opts), &core_v1.NamespaceList{})
Invokes(testing.NewRootListAction(namespacesResource, namespacesKind, opts), &corev1.NamespaceList{})
if obj == nil {
return nil, err
}
@@ -59,8 +59,8 @@ func (c *FakeNamespaces) List(opts v1.ListOptions) (result *core_v1.NamespaceLis
if label == nil {
label = labels.Everything()
}
list := &core_v1.NamespaceList{ListMeta: obj.(*core_v1.NamespaceList).ListMeta}
for _, item := range obj.(*core_v1.NamespaceList).Items {
list := &corev1.NamespaceList{ListMeta: obj.(*corev1.NamespaceList).ListMeta}
for _, item := range obj.(*corev1.NamespaceList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -75,49 +75,49 @@ func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any.
func (c *FakeNamespaces) Create(namespace *core_v1.Namespace) (result *core_v1.Namespace, err error) {
func (c *FakeNamespaces) Create(namespace *corev1.Namespace) (result *corev1.Namespace, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(namespacesResource, namespace), &core_v1.Namespace{})
Invokes(testing.NewRootCreateAction(namespacesResource, namespace), &corev1.Namespace{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Namespace), err
return obj.(*corev1.Namespace), err
}
// Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any.
func (c *FakeNamespaces) Update(namespace *core_v1.Namespace) (result *core_v1.Namespace, err error) {
func (c *FakeNamespaces) Update(namespace *corev1.Namespace) (result *corev1.Namespace, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(namespacesResource, namespace), &core_v1.Namespace{})
Invokes(testing.NewRootUpdateAction(namespacesResource, namespace), &corev1.Namespace{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Namespace), err
return obj.(*corev1.Namespace), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeNamespaces) UpdateStatus(namespace *core_v1.Namespace) (*core_v1.Namespace, error) {
func (c *FakeNamespaces) UpdateStatus(namespace *corev1.Namespace) (*corev1.Namespace, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &core_v1.Namespace{})
Invokes(testing.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &corev1.Namespace{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Namespace), err
return obj.(*corev1.Namespace), err
}
// Delete takes name of the namespace and deletes it. Returns an error if one occurs.
func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(namespacesResource, name), &core_v1.Namespace{})
Invokes(testing.NewRootDeleteAction(namespacesResource, name), &corev1.Namespace{})
return err
}
// Patch applies the patch and returns the patched namespace.
func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Namespace, err error) {
func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Namespace, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, name, data, subresources...), &core_v1.Namespace{})
Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, name, data, subresources...), &corev1.Namespace{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Namespace), err
return obj.(*corev1.Namespace), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -38,19 +38,19 @@ var nodesResource = schema.GroupVersionResource{Group: "", Version: "v1", Resour
var nodesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Node"}
// Get takes name of the node, and returns the corresponding node object, and an error if there is any.
func (c *FakeNodes) Get(name string, options v1.GetOptions) (result *core_v1.Node, err error) {
func (c *FakeNodes) Get(name string, options v1.GetOptions) (result *corev1.Node, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(nodesResource, name), &core_v1.Node{})
Invokes(testing.NewRootGetAction(nodesResource, name), &corev1.Node{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Node), err
return obj.(*corev1.Node), err
}
// List takes label and field selectors, and returns the list of Nodes that match those selectors.
func (c *FakeNodes) List(opts v1.ListOptions) (result *core_v1.NodeList, err error) {
func (c *FakeNodes) List(opts v1.ListOptions) (result *corev1.NodeList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(nodesResource, nodesKind, opts), &core_v1.NodeList{})
Invokes(testing.NewRootListAction(nodesResource, nodesKind, opts), &corev1.NodeList{})
if obj == nil {
return nil, err
}
@@ -59,8 +59,8 @@ func (c *FakeNodes) List(opts v1.ListOptions) (result *core_v1.NodeList, err err
if label == nil {
label = labels.Everything()
}
list := &core_v1.NodeList{ListMeta: obj.(*core_v1.NodeList).ListMeta}
for _, item := range obj.(*core_v1.NodeList).Items {
list := &corev1.NodeList{ListMeta: obj.(*corev1.NodeList).ListMeta}
for _, item := range obj.(*corev1.NodeList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -75,40 +75,40 @@ func (c *FakeNodes) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a node and creates it. Returns the server's representation of the node, and an error, if there is any.
func (c *FakeNodes) Create(node *core_v1.Node) (result *core_v1.Node, err error) {
func (c *FakeNodes) Create(node *corev1.Node) (result *corev1.Node, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(nodesResource, node), &core_v1.Node{})
Invokes(testing.NewRootCreateAction(nodesResource, node), &corev1.Node{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Node), err
return obj.(*corev1.Node), err
}
// Update takes the representation of a node and updates it. Returns the server's representation of the node, and an error, if there is any.
func (c *FakeNodes) Update(node *core_v1.Node) (result *core_v1.Node, err error) {
func (c *FakeNodes) Update(node *corev1.Node) (result *corev1.Node, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(nodesResource, node), &core_v1.Node{})
Invokes(testing.NewRootUpdateAction(nodesResource, node), &corev1.Node{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Node), err
return obj.(*corev1.Node), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeNodes) UpdateStatus(node *core_v1.Node) (*core_v1.Node, error) {
func (c *FakeNodes) UpdateStatus(node *corev1.Node) (*corev1.Node, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(nodesResource, "status", node), &core_v1.Node{})
Invokes(testing.NewRootUpdateSubresourceAction(nodesResource, "status", node), &corev1.Node{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Node), err
return obj.(*corev1.Node), err
}
// Delete takes name of the node and deletes it. Returns an error if one occurs.
func (c *FakeNodes) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(nodesResource, name), &core_v1.Node{})
Invokes(testing.NewRootDeleteAction(nodesResource, name), &corev1.Node{})
return err
}
@@ -116,16 +116,16 @@ func (c *FakeNodes) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeNodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(nodesResource, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.NodeList{})
_, err := c.Fake.Invokes(action, &corev1.NodeList{})
return err
}
// Patch applies the patch and returns the patched node.
func (c *FakeNodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Node, err error) {
func (c *FakeNodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Node, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(nodesResource, name, data, subresources...), &core_v1.Node{})
Invokes(testing.NewRootPatchSubresourceAction(nodesResource, name, data, subresources...), &corev1.Node{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Node), err
return obj.(*corev1.Node), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -38,19 +38,19 @@ var persistentvolumesResource = schema.GroupVersionResource{Group: "", Version:
var persistentvolumesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PersistentVolume"}
// Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any.
func (c *FakePersistentVolumes) Get(name string, options v1.GetOptions) (result *core_v1.PersistentVolume, err error) {
func (c *FakePersistentVolumes) Get(name string, options v1.GetOptions) (result *corev1.PersistentVolume, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(persistentvolumesResource, name), &core_v1.PersistentVolume{})
Invokes(testing.NewRootGetAction(persistentvolumesResource, name), &corev1.PersistentVolume{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PersistentVolume), err
return obj.(*corev1.PersistentVolume), err
}
// List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors.
func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *core_v1.PersistentVolumeList, err error) {
func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *corev1.PersistentVolumeList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(persistentvolumesResource, persistentvolumesKind, opts), &core_v1.PersistentVolumeList{})
Invokes(testing.NewRootListAction(persistentvolumesResource, persistentvolumesKind, opts), &corev1.PersistentVolumeList{})
if obj == nil {
return nil, err
}
@@ -59,8 +59,8 @@ func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *core_v1.Persi
if label == nil {
label = labels.Everything()
}
list := &core_v1.PersistentVolumeList{ListMeta: obj.(*core_v1.PersistentVolumeList).ListMeta}
for _, item := range obj.(*core_v1.PersistentVolumeList).Items {
list := &corev1.PersistentVolumeList{ListMeta: obj.(*corev1.PersistentVolumeList).ListMeta}
for _, item := range obj.(*corev1.PersistentVolumeList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -75,40 +75,40 @@ func (c *FakePersistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, err
}
// Create takes the representation of a persistentVolume and creates it. Returns the server's representation of the persistentVolume, and an error, if there is any.
func (c *FakePersistentVolumes) Create(persistentVolume *core_v1.PersistentVolume) (result *core_v1.PersistentVolume, err error) {
func (c *FakePersistentVolumes) Create(persistentVolume *corev1.PersistentVolume) (result *corev1.PersistentVolume, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(persistentvolumesResource, persistentVolume), &core_v1.PersistentVolume{})
Invokes(testing.NewRootCreateAction(persistentvolumesResource, persistentVolume), &corev1.PersistentVolume{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PersistentVolume), err
return obj.(*corev1.PersistentVolume), err
}
// Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any.
func (c *FakePersistentVolumes) Update(persistentVolume *core_v1.PersistentVolume) (result *core_v1.PersistentVolume, err error) {
func (c *FakePersistentVolumes) Update(persistentVolume *corev1.PersistentVolume) (result *corev1.PersistentVolume, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &core_v1.PersistentVolume{})
Invokes(testing.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &corev1.PersistentVolume{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PersistentVolume), err
return obj.(*corev1.PersistentVolume), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *core_v1.PersistentVolume) (*core_v1.PersistentVolume, error) {
func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *corev1.PersistentVolume) (*corev1.PersistentVolume, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &core_v1.PersistentVolume{})
Invokes(testing.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &corev1.PersistentVolume{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PersistentVolume), err
return obj.(*corev1.PersistentVolume), err
}
// Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs.
func (c *FakePersistentVolumes) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(persistentvolumesResource, name), &core_v1.PersistentVolume{})
Invokes(testing.NewRootDeleteAction(persistentvolumesResource, name), &corev1.PersistentVolume{})
return err
}
@@ -116,16 +116,16 @@ func (c *FakePersistentVolumes) Delete(name string, options *v1.DeleteOptions) e
func (c *FakePersistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.PersistentVolumeList{})
_, err := c.Fake.Invokes(action, &corev1.PersistentVolumeList{})
return err
}
// Patch applies the patch and returns the patched persistentVolume.
func (c *FakePersistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.PersistentVolume, err error) {
func (c *FakePersistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PersistentVolume, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(persistentvolumesResource, name, data, subresources...), &core_v1.PersistentVolume{})
Invokes(testing.NewRootPatchSubresourceAction(persistentvolumesResource, name, data, subresources...), &corev1.PersistentVolume{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PersistentVolume), err
return obj.(*corev1.PersistentVolume), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var persistentvolumeclaimsResource = schema.GroupVersionResource{Group: "", Vers
var persistentvolumeclaimsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PersistentVolumeClaim"}
// Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any.
func (c *FakePersistentVolumeClaims) Get(name string, options v1.GetOptions) (result *core_v1.PersistentVolumeClaim, err error) {
func (c *FakePersistentVolumeClaims) Get(name string, options v1.GetOptions) (result *corev1.PersistentVolumeClaim, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(persistentvolumeclaimsResource, c.ns, name), &core_v1.PersistentVolumeClaim{})
Invokes(testing.NewGetAction(persistentvolumeclaimsResource, c.ns, name), &corev1.PersistentVolumeClaim{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PersistentVolumeClaim), err
return obj.(*corev1.PersistentVolumeClaim), err
}
// List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors.
func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *core_v1.PersistentVolumeClaimList, err error) {
func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *corev1.PersistentVolumeClaimList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(persistentvolumeclaimsResource, persistentvolumeclaimsKind, c.ns, opts), &core_v1.PersistentVolumeClaimList{})
Invokes(testing.NewListAction(persistentvolumeclaimsResource, persistentvolumeclaimsKind, c.ns, opts), &corev1.PersistentVolumeClaimList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *core_v1.
if label == nil {
label = labels.Everything()
}
list := &core_v1.PersistentVolumeClaimList{ListMeta: obj.(*core_v1.PersistentVolumeClaimList).ListMeta}
for _, item := range obj.(*core_v1.PersistentVolumeClaimList).Items {
list := &corev1.PersistentVolumeClaimList{ListMeta: obj.(*corev1.PersistentVolumeClaimList).ListMeta}
for _, item := range obj.(*corev1.PersistentVolumeClaimList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,43 +79,43 @@ func (c *FakePersistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface
}
// Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any.
func (c *FakePersistentVolumeClaims) Create(persistentVolumeClaim *core_v1.PersistentVolumeClaim) (result *core_v1.PersistentVolumeClaim, err error) {
func (c *FakePersistentVolumeClaims) Create(persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &core_v1.PersistentVolumeClaim{})
Invokes(testing.NewCreateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PersistentVolumeClaim), err
return obj.(*corev1.PersistentVolumeClaim), err
}
// Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any.
func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *core_v1.PersistentVolumeClaim) (result *core_v1.PersistentVolumeClaim, err error) {
func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &core_v1.PersistentVolumeClaim{})
Invokes(testing.NewUpdateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PersistentVolumeClaim), err
return obj.(*corev1.PersistentVolumeClaim), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *core_v1.PersistentVolumeClaim) (*core_v1.PersistentVolumeClaim, error) {
func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(persistentvolumeclaimsResource, "status", c.ns, persistentVolumeClaim), &core_v1.PersistentVolumeClaim{})
Invokes(testing.NewUpdateSubresourceAction(persistentvolumeclaimsResource, "status", c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PersistentVolumeClaim), err
return obj.(*corev1.PersistentVolumeClaim), err
}
// Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs.
func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &core_v1.PersistentVolumeClaim{})
Invokes(testing.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &corev1.PersistentVolumeClaim{})
return err
}
@@ -124,17 +124,17 @@ func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptio
func (c *FakePersistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.PersistentVolumeClaimList{})
_, err := c.Fake.Invokes(action, &corev1.PersistentVolumeClaimList{})
return err
}
// Patch applies the patch and returns the patched persistentVolumeClaim.
func (c *FakePersistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.PersistentVolumeClaim, err error) {
func (c *FakePersistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PersistentVolumeClaim, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, data, subresources...), &core_v1.PersistentVolumeClaim{})
Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, data, subresources...), &corev1.PersistentVolumeClaim{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PersistentVolumeClaim), err
return obj.(*corev1.PersistentVolumeClaim), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var podsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resourc
var podsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Pod"}
// Get takes name of the pod, and returns the corresponding pod object, and an error if there is any.
func (c *FakePods) Get(name string, options v1.GetOptions) (result *core_v1.Pod, err error) {
func (c *FakePods) Get(name string, options v1.GetOptions) (result *corev1.Pod, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(podsResource, c.ns, name), &core_v1.Pod{})
Invokes(testing.NewGetAction(podsResource, c.ns, name), &corev1.Pod{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Pod), err
return obj.(*corev1.Pod), err
}
// List takes label and field selectors, and returns the list of Pods that match those selectors.
func (c *FakePods) List(opts v1.ListOptions) (result *core_v1.PodList, err error) {
func (c *FakePods) List(opts v1.ListOptions) (result *corev1.PodList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(podsResource, podsKind, c.ns, opts), &core_v1.PodList{})
Invokes(testing.NewListAction(podsResource, podsKind, c.ns, opts), &corev1.PodList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakePods) List(opts v1.ListOptions) (result *core_v1.PodList, err error
if label == nil {
label = labels.Everything()
}
list := &core_v1.PodList{ListMeta: obj.(*core_v1.PodList).ListMeta}
for _, item := range obj.(*core_v1.PodList).Items {
list := &corev1.PodList{ListMeta: obj.(*corev1.PodList).ListMeta}
for _, item := range obj.(*corev1.PodList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,43 +79,43 @@ func (c *FakePods) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any.
func (c *FakePods) Create(pod *core_v1.Pod) (result *core_v1.Pod, err error) {
func (c *FakePods) Create(pod *corev1.Pod) (result *corev1.Pod, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(podsResource, c.ns, pod), &core_v1.Pod{})
Invokes(testing.NewCreateAction(podsResource, c.ns, pod), &corev1.Pod{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Pod), err
return obj.(*corev1.Pod), err
}
// Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any.
func (c *FakePods) Update(pod *core_v1.Pod) (result *core_v1.Pod, err error) {
func (c *FakePods) Update(pod *corev1.Pod) (result *corev1.Pod, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(podsResource, c.ns, pod), &core_v1.Pod{})
Invokes(testing.NewUpdateAction(podsResource, c.ns, pod), &corev1.Pod{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Pod), err
return obj.(*corev1.Pod), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakePods) UpdateStatus(pod *core_v1.Pod) (*core_v1.Pod, error) {
func (c *FakePods) UpdateStatus(pod *corev1.Pod) (*corev1.Pod, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &core_v1.Pod{})
Invokes(testing.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &corev1.Pod{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Pod), err
return obj.(*corev1.Pod), err
}
// Delete takes name of the pod and deletes it. Returns an error if one occurs.
func (c *FakePods) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(podsResource, c.ns, name), &core_v1.Pod{})
Invokes(testing.NewDeleteAction(podsResource, c.ns, name), &corev1.Pod{})
return err
}
@@ -124,17 +124,17 @@ func (c *FakePods) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakePods) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(podsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.PodList{})
_, err := c.Fake.Invokes(action, &corev1.PodList{})
return err
}
// Patch applies the patch and returns the patched pod.
func (c *FakePods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Pod, err error) {
func (c *FakePods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Pod, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, name, data, subresources...), &core_v1.Pod{})
Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, name, data, subresources...), &corev1.Pod{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Pod), err
return obj.(*corev1.Pod), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var podtemplatesResource = schema.GroupVersionResource{Group: "", Version: "v1",
var podtemplatesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PodTemplate"}
// Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any.
func (c *FakePodTemplates) Get(name string, options v1.GetOptions) (result *core_v1.PodTemplate, err error) {
func (c *FakePodTemplates) Get(name string, options v1.GetOptions) (result *corev1.PodTemplate, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(podtemplatesResource, c.ns, name), &core_v1.PodTemplate{})
Invokes(testing.NewGetAction(podtemplatesResource, c.ns, name), &corev1.PodTemplate{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PodTemplate), err
return obj.(*corev1.PodTemplate), err
}
// List takes label and field selectors, and returns the list of PodTemplates that match those selectors.
func (c *FakePodTemplates) List(opts v1.ListOptions) (result *core_v1.PodTemplateList, err error) {
func (c *FakePodTemplates) List(opts v1.ListOptions) (result *corev1.PodTemplateList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(podtemplatesResource, podtemplatesKind, c.ns, opts), &core_v1.PodTemplateList{})
Invokes(testing.NewListAction(podtemplatesResource, podtemplatesKind, c.ns, opts), &corev1.PodTemplateList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakePodTemplates) List(opts v1.ListOptions) (result *core_v1.PodTemplat
if label == nil {
label = labels.Everything()
}
list := &core_v1.PodTemplateList{ListMeta: obj.(*core_v1.PodTemplateList).ListMeta}
for _, item := range obj.(*core_v1.PodTemplateList).Items {
list := &corev1.PodTemplateList{ListMeta: obj.(*corev1.PodTemplateList).ListMeta}
for _, item := range obj.(*corev1.PodTemplateList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,31 +79,31 @@ func (c *FakePodTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a podTemplate and creates it. Returns the server's representation of the podTemplate, and an error, if there is any.
func (c *FakePodTemplates) Create(podTemplate *core_v1.PodTemplate) (result *core_v1.PodTemplate, err error) {
func (c *FakePodTemplates) Create(podTemplate *corev1.PodTemplate) (result *corev1.PodTemplate, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &core_v1.PodTemplate{})
Invokes(testing.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &corev1.PodTemplate{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PodTemplate), err
return obj.(*corev1.PodTemplate), err
}
// Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any.
func (c *FakePodTemplates) Update(podTemplate *core_v1.PodTemplate) (result *core_v1.PodTemplate, err error) {
func (c *FakePodTemplates) Update(podTemplate *corev1.PodTemplate) (result *corev1.PodTemplate, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &core_v1.PodTemplate{})
Invokes(testing.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &corev1.PodTemplate{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PodTemplate), err
return obj.(*corev1.PodTemplate), err
}
// Delete takes name of the podTemplate and deletes it. Returns an error if one occurs.
func (c *FakePodTemplates) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(podtemplatesResource, c.ns, name), &core_v1.PodTemplate{})
Invokes(testing.NewDeleteAction(podtemplatesResource, c.ns, name), &corev1.PodTemplate{})
return err
}
@@ -112,17 +112,17 @@ func (c *FakePodTemplates) Delete(name string, options *v1.DeleteOptions) error
func (c *FakePodTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.PodTemplateList{})
_, err := c.Fake.Invokes(action, &corev1.PodTemplateList{})
return err
}
// Patch applies the patch and returns the patched podTemplate.
func (c *FakePodTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.PodTemplate, err error) {
func (c *FakePodTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PodTemplate, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(podtemplatesResource, c.ns, name, data, subresources...), &core_v1.PodTemplate{})
Invokes(testing.NewPatchSubresourceAction(podtemplatesResource, c.ns, name, data, subresources...), &corev1.PodTemplate{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.PodTemplate), err
return obj.(*corev1.PodTemplate), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1beta1 "k8s.io/api/extensions/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
@@ -40,20 +40,20 @@ var replicationcontrollersResource = schema.GroupVersionResource{Group: "", Vers
var replicationcontrollersKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ReplicationController"}
// Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any.
func (c *FakeReplicationControllers) Get(name string, options v1.GetOptions) (result *core_v1.ReplicationController, err error) {
func (c *FakeReplicationControllers) Get(name string, options v1.GetOptions) (result *corev1.ReplicationController, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(replicationcontrollersResource, c.ns, name), &core_v1.ReplicationController{})
Invokes(testing.NewGetAction(replicationcontrollersResource, c.ns, name), &corev1.ReplicationController{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ReplicationController), err
return obj.(*corev1.ReplicationController), err
}
// List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors.
func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *core_v1.ReplicationControllerList, err error) {
func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *corev1.ReplicationControllerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(replicationcontrollersResource, replicationcontrollersKind, c.ns, opts), &core_v1.ReplicationControllerList{})
Invokes(testing.NewListAction(replicationcontrollersResource, replicationcontrollersKind, c.ns, opts), &corev1.ReplicationControllerList{})
if obj == nil {
return nil, err
@@ -63,8 +63,8 @@ func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *core_v1.
if label == nil {
label = labels.Everything()
}
list := &core_v1.ReplicationControllerList{ListMeta: obj.(*core_v1.ReplicationControllerList).ListMeta}
for _, item := range obj.(*core_v1.ReplicationControllerList).Items {
list := &corev1.ReplicationControllerList{ListMeta: obj.(*corev1.ReplicationControllerList).ListMeta}
for _, item := range obj.(*corev1.ReplicationControllerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -80,43 +80,43 @@ func (c *FakeReplicationControllers) Watch(opts v1.ListOptions) (watch.Interface
}
// Create takes the representation of a replicationController and creates it. Returns the server's representation of the replicationController, and an error, if there is any.
func (c *FakeReplicationControllers) Create(replicationController *core_v1.ReplicationController) (result *core_v1.ReplicationController, err error) {
func (c *FakeReplicationControllers) Create(replicationController *corev1.ReplicationController) (result *corev1.ReplicationController, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(replicationcontrollersResource, c.ns, replicationController), &core_v1.ReplicationController{})
Invokes(testing.NewCreateAction(replicationcontrollersResource, c.ns, replicationController), &corev1.ReplicationController{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ReplicationController), err
return obj.(*corev1.ReplicationController), err
}
// Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any.
func (c *FakeReplicationControllers) Update(replicationController *core_v1.ReplicationController) (result *core_v1.ReplicationController, err error) {
func (c *FakeReplicationControllers) Update(replicationController *corev1.ReplicationController) (result *corev1.ReplicationController, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &core_v1.ReplicationController{})
Invokes(testing.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &corev1.ReplicationController{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ReplicationController), err
return obj.(*corev1.ReplicationController), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeReplicationControllers) UpdateStatus(replicationController *core_v1.ReplicationController) (*core_v1.ReplicationController, error) {
func (c *FakeReplicationControllers) UpdateStatus(replicationController *corev1.ReplicationController) (*corev1.ReplicationController, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &core_v1.ReplicationController{})
Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &corev1.ReplicationController{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ReplicationController), err
return obj.(*corev1.ReplicationController), err
}
// Delete takes name of the replicationController and deletes it. Returns an error if one occurs.
func (c *FakeReplicationControllers) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(replicationcontrollersResource, c.ns, name), &core_v1.ReplicationController{})
Invokes(testing.NewDeleteAction(replicationcontrollersResource, c.ns, name), &corev1.ReplicationController{})
return err
}
@@ -125,19 +125,19 @@ func (c *FakeReplicationControllers) Delete(name string, options *v1.DeleteOptio
func (c *FakeReplicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.ReplicationControllerList{})
_, err := c.Fake.Invokes(action, &corev1.ReplicationControllerList{})
return err
}
// Patch applies the patch and returns the patched replicationController.
func (c *FakeReplicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.ReplicationController, err error) {
func (c *FakeReplicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ReplicationController, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, data, subresources...), &core_v1.ReplicationController{})
Invokes(testing.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, data, subresources...), &corev1.ReplicationController{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ReplicationController), err
return obj.(*corev1.ReplicationController), err
}
// GetScale takes name of the replicationController, and returns the corresponding scale object, and an error if there is any.

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var resourcequotasResource = schema.GroupVersionResource{Group: "", Version: "v1
var resourcequotasKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ResourceQuota"}
// Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any.
func (c *FakeResourceQuotas) Get(name string, options v1.GetOptions) (result *core_v1.ResourceQuota, err error) {
func (c *FakeResourceQuotas) Get(name string, options v1.GetOptions) (result *corev1.ResourceQuota, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(resourcequotasResource, c.ns, name), &core_v1.ResourceQuota{})
Invokes(testing.NewGetAction(resourcequotasResource, c.ns, name), &corev1.ResourceQuota{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ResourceQuota), err
return obj.(*corev1.ResourceQuota), err
}
// List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors.
func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *core_v1.ResourceQuotaList, err error) {
func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *corev1.ResourceQuotaList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(resourcequotasResource, resourcequotasKind, c.ns, opts), &core_v1.ResourceQuotaList{})
Invokes(testing.NewListAction(resourcequotasResource, resourcequotasKind, c.ns, opts), &corev1.ResourceQuotaList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *core_v1.Resource
if label == nil {
label = labels.Everything()
}
list := &core_v1.ResourceQuotaList{ListMeta: obj.(*core_v1.ResourceQuotaList).ListMeta}
for _, item := range obj.(*core_v1.ResourceQuotaList).Items {
list := &corev1.ResourceQuotaList{ListMeta: obj.(*corev1.ResourceQuotaList).ListMeta}
for _, item := range obj.(*corev1.ResourceQuotaList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,43 +79,43 @@ func (c *FakeResourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error)
}
// Create takes the representation of a resourceQuota and creates it. Returns the server's representation of the resourceQuota, and an error, if there is any.
func (c *FakeResourceQuotas) Create(resourceQuota *core_v1.ResourceQuota) (result *core_v1.ResourceQuota, err error) {
func (c *FakeResourceQuotas) Create(resourceQuota *corev1.ResourceQuota) (result *corev1.ResourceQuota, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(resourcequotasResource, c.ns, resourceQuota), &core_v1.ResourceQuota{})
Invokes(testing.NewCreateAction(resourcequotasResource, c.ns, resourceQuota), &corev1.ResourceQuota{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ResourceQuota), err
return obj.(*corev1.ResourceQuota), err
}
// Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any.
func (c *FakeResourceQuotas) Update(resourceQuota *core_v1.ResourceQuota) (result *core_v1.ResourceQuota, err error) {
func (c *FakeResourceQuotas) Update(resourceQuota *corev1.ResourceQuota) (result *corev1.ResourceQuota, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &core_v1.ResourceQuota{})
Invokes(testing.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &corev1.ResourceQuota{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ResourceQuota), err
return obj.(*corev1.ResourceQuota), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *core_v1.ResourceQuota) (*core_v1.ResourceQuota, error) {
func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *corev1.ResourceQuota) (*corev1.ResourceQuota, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &core_v1.ResourceQuota{})
Invokes(testing.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &corev1.ResourceQuota{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ResourceQuota), err
return obj.(*corev1.ResourceQuota), err
}
// Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs.
func (c *FakeResourceQuotas) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(resourcequotasResource, c.ns, name), &core_v1.ResourceQuota{})
Invokes(testing.NewDeleteAction(resourcequotasResource, c.ns, name), &corev1.ResourceQuota{})
return err
}
@@ -124,17 +124,17 @@ func (c *FakeResourceQuotas) Delete(name string, options *v1.DeleteOptions) erro
func (c *FakeResourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.ResourceQuotaList{})
_, err := c.Fake.Invokes(action, &corev1.ResourceQuotaList{})
return err
}
// Patch applies the patch and returns the patched resourceQuota.
func (c *FakeResourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.ResourceQuota, err error) {
func (c *FakeResourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ResourceQuota, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, data, subresources...), &core_v1.ResourceQuota{})
Invokes(testing.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, data, subresources...), &corev1.ResourceQuota{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ResourceQuota), err
return obj.(*corev1.ResourceQuota), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var secretsResource = schema.GroupVersionResource{Group: "", Version: "v1", Reso
var secretsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Secret"}
// Get takes name of the secret, and returns the corresponding secret object, and an error if there is any.
func (c *FakeSecrets) Get(name string, options v1.GetOptions) (result *core_v1.Secret, err error) {
func (c *FakeSecrets) Get(name string, options v1.GetOptions) (result *corev1.Secret, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(secretsResource, c.ns, name), &core_v1.Secret{})
Invokes(testing.NewGetAction(secretsResource, c.ns, name), &corev1.Secret{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Secret), err
return obj.(*corev1.Secret), err
}
// List takes label and field selectors, and returns the list of Secrets that match those selectors.
func (c *FakeSecrets) List(opts v1.ListOptions) (result *core_v1.SecretList, err error) {
func (c *FakeSecrets) List(opts v1.ListOptions) (result *corev1.SecretList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(secretsResource, secretsKind, c.ns, opts), &core_v1.SecretList{})
Invokes(testing.NewListAction(secretsResource, secretsKind, c.ns, opts), &corev1.SecretList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeSecrets) List(opts v1.ListOptions) (result *core_v1.SecretList, err
if label == nil {
label = labels.Everything()
}
list := &core_v1.SecretList{ListMeta: obj.(*core_v1.SecretList).ListMeta}
for _, item := range obj.(*core_v1.SecretList).Items {
list := &corev1.SecretList{ListMeta: obj.(*corev1.SecretList).ListMeta}
for _, item := range obj.(*corev1.SecretList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,31 +79,31 @@ func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any.
func (c *FakeSecrets) Create(secret *core_v1.Secret) (result *core_v1.Secret, err error) {
func (c *FakeSecrets) Create(secret *corev1.Secret) (result *corev1.Secret, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(secretsResource, c.ns, secret), &core_v1.Secret{})
Invokes(testing.NewCreateAction(secretsResource, c.ns, secret), &corev1.Secret{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Secret), err
return obj.(*corev1.Secret), err
}
// Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any.
func (c *FakeSecrets) Update(secret *core_v1.Secret) (result *core_v1.Secret, err error) {
func (c *FakeSecrets) Update(secret *corev1.Secret) (result *corev1.Secret, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(secretsResource, c.ns, secret), &core_v1.Secret{})
Invokes(testing.NewUpdateAction(secretsResource, c.ns, secret), &corev1.Secret{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Secret), err
return obj.(*corev1.Secret), err
}
// Delete takes name of the secret and deletes it. Returns an error if one occurs.
func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(secretsResource, c.ns, name), &core_v1.Secret{})
Invokes(testing.NewDeleteAction(secretsResource, c.ns, name), &corev1.Secret{})
return err
}
@@ -112,17 +112,17 @@ func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(secretsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.SecretList{})
_, err := c.Fake.Invokes(action, &corev1.SecretList{})
return err
}
// Patch applies the patch and returns the patched secret.
func (c *FakeSecrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Secret, err error) {
func (c *FakeSecrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Secret, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(secretsResource, c.ns, name, data, subresources...), &core_v1.Secret{})
Invokes(testing.NewPatchSubresourceAction(secretsResource, c.ns, name, data, subresources...), &corev1.Secret{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Secret), err
return obj.(*corev1.Secret), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var servicesResource = schema.GroupVersionResource{Group: "", Version: "v1", Res
var servicesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Service"}
// Get takes name of the service, and returns the corresponding service object, and an error if there is any.
func (c *FakeServices) Get(name string, options v1.GetOptions) (result *core_v1.Service, err error) {
func (c *FakeServices) Get(name string, options v1.GetOptions) (result *corev1.Service, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(servicesResource, c.ns, name), &core_v1.Service{})
Invokes(testing.NewGetAction(servicesResource, c.ns, name), &corev1.Service{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Service), err
return obj.(*corev1.Service), err
}
// List takes label and field selectors, and returns the list of Services that match those selectors.
func (c *FakeServices) List(opts v1.ListOptions) (result *core_v1.ServiceList, err error) {
func (c *FakeServices) List(opts v1.ListOptions) (result *corev1.ServiceList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(servicesResource, servicesKind, c.ns, opts), &core_v1.ServiceList{})
Invokes(testing.NewListAction(servicesResource, servicesKind, c.ns, opts), &corev1.ServiceList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeServices) List(opts v1.ListOptions) (result *core_v1.ServiceList, e
if label == nil {
label = labels.Everything()
}
list := &core_v1.ServiceList{ListMeta: obj.(*core_v1.ServiceList).ListMeta}
for _, item := range obj.(*core_v1.ServiceList).Items {
list := &corev1.ServiceList{ListMeta: obj.(*corev1.ServiceList).ListMeta}
for _, item := range obj.(*corev1.ServiceList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,54 +79,54 @@ func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any.
func (c *FakeServices) Create(service *core_v1.Service) (result *core_v1.Service, err error) {
func (c *FakeServices) Create(service *corev1.Service) (result *corev1.Service, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(servicesResource, c.ns, service), &core_v1.Service{})
Invokes(testing.NewCreateAction(servicesResource, c.ns, service), &corev1.Service{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Service), err
return obj.(*corev1.Service), err
}
// Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any.
func (c *FakeServices) Update(service *core_v1.Service) (result *core_v1.Service, err error) {
func (c *FakeServices) Update(service *corev1.Service) (result *corev1.Service, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(servicesResource, c.ns, service), &core_v1.Service{})
Invokes(testing.NewUpdateAction(servicesResource, c.ns, service), &corev1.Service{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Service), err
return obj.(*corev1.Service), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeServices) UpdateStatus(service *core_v1.Service) (*core_v1.Service, error) {
func (c *FakeServices) UpdateStatus(service *corev1.Service) (*corev1.Service, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &core_v1.Service{})
Invokes(testing.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &corev1.Service{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Service), err
return obj.(*corev1.Service), err
}
// Delete takes name of the service and deletes it. Returns an error if one occurs.
func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(servicesResource, c.ns, name), &core_v1.Service{})
Invokes(testing.NewDeleteAction(servicesResource, c.ns, name), &corev1.Service{})
return err
}
// Patch applies the patch and returns the patched service.
func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Service, err error) {
func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Service, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, name, data, subresources...), &core_v1.Service{})
Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, name, data, subresources...), &corev1.Service{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.Service), err
return obj.(*corev1.Service), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
core_v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var serviceaccountsResource = schema.GroupVersionResource{Group: "", Version: "v
var serviceaccountsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ServiceAccount"}
// Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any.
func (c *FakeServiceAccounts) Get(name string, options v1.GetOptions) (result *core_v1.ServiceAccount, err error) {
func (c *FakeServiceAccounts) Get(name string, options v1.GetOptions) (result *corev1.ServiceAccount, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(serviceaccountsResource, c.ns, name), &core_v1.ServiceAccount{})
Invokes(testing.NewGetAction(serviceaccountsResource, c.ns, name), &corev1.ServiceAccount{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ServiceAccount), err
return obj.(*corev1.ServiceAccount), err
}
// List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors.
func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *core_v1.ServiceAccountList, err error) {
func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *corev1.ServiceAccountList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(serviceaccountsResource, serviceaccountsKind, c.ns, opts), &core_v1.ServiceAccountList{})
Invokes(testing.NewListAction(serviceaccountsResource, serviceaccountsKind, c.ns, opts), &corev1.ServiceAccountList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *core_v1.Service
if label == nil {
label = labels.Everything()
}
list := &core_v1.ServiceAccountList{ListMeta: obj.(*core_v1.ServiceAccountList).ListMeta}
for _, item := range obj.(*core_v1.ServiceAccountList).Items {
list := &corev1.ServiceAccountList{ListMeta: obj.(*corev1.ServiceAccountList).ListMeta}
for _, item := range obj.(*corev1.ServiceAccountList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,31 +79,31 @@ func (c *FakeServiceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error
}
// Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any.
func (c *FakeServiceAccounts) Create(serviceAccount *core_v1.ServiceAccount) (result *core_v1.ServiceAccount, err error) {
func (c *FakeServiceAccounts) Create(serviceAccount *corev1.ServiceAccount) (result *corev1.ServiceAccount, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &core_v1.ServiceAccount{})
Invokes(testing.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &corev1.ServiceAccount{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ServiceAccount), err
return obj.(*corev1.ServiceAccount), err
}
// Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any.
func (c *FakeServiceAccounts) Update(serviceAccount *core_v1.ServiceAccount) (result *core_v1.ServiceAccount, err error) {
func (c *FakeServiceAccounts) Update(serviceAccount *corev1.ServiceAccount) (result *corev1.ServiceAccount, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &core_v1.ServiceAccount{})
Invokes(testing.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &corev1.ServiceAccount{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ServiceAccount), err
return obj.(*corev1.ServiceAccount), err
}
// Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs.
func (c *FakeServiceAccounts) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(serviceaccountsResource, c.ns, name), &core_v1.ServiceAccount{})
Invokes(testing.NewDeleteAction(serviceaccountsResource, c.ns, name), &corev1.ServiceAccount{})
return err
}
@@ -112,17 +112,17 @@ func (c *FakeServiceAccounts) Delete(name string, options *v1.DeleteOptions) err
func (c *FakeServiceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &core_v1.ServiceAccountList{})
_, err := c.Fake.Invokes(action, &corev1.ServiceAccountList{})
return err
}
// Patch applies the patch and returns the patched serviceAccount.
func (c *FakeServiceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.ServiceAccount, err error) {
func (c *FakeServiceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ServiceAccount, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, data, subresources...), &core_v1.ServiceAccount{})
Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, data, subresources...), &corev1.ServiceAccount{})
if obj == nil {
return nil, err
}
return obj.(*core_v1.ServiceAccount), err
return obj.(*corev1.ServiceAccount), err
}

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type LimitRangesGetter interface {
type LimitRangeInterface interface {
Create(*v1.LimitRange) (*v1.LimitRange, error)
Update(*v1.LimitRange) (*v1.LimitRange, 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.LimitRange, error)
List(opts meta_v1.ListOptions) (*v1.LimitRangeList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.LimitRange, error)
List(opts metav1.ListOptions) (*v1.LimitRangeList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error)
LimitRangeExpansion
}
@@ -61,7 +61,7 @@ func newLimitRanges(c *CoreV1Client, namespace string) *limitRanges {
}
// Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any.
func (c *limitRanges) Get(name string, options meta_v1.GetOptions) (result *v1.LimitRange, err error) {
func (c *limitRanges) Get(name string, options metav1.GetOptions) (result *v1.LimitRange, err error) {
result = &v1.LimitRange{}
err = c.client.Get().
Namespace(c.ns).
@@ -74,7 +74,7 @@ func (c *limitRanges) Get(name string, options meta_v1.GetOptions) (result *v1.L
}
// List takes label and field selectors, and returns the list of LimitRanges that match those selectors.
func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList, err error) {
func (c *limitRanges) List(opts metav1.ListOptions) (result *v1.LimitRangeList, err error) {
result = &v1.LimitRangeList{}
err = c.client.Get().
Namespace(c.ns).
@@ -86,7 +86,7 @@ func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList,
}
// Watch returns a watch.Interface that watches the requested limitRanges.
func (c *limitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *limitRanges) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -121,7 +121,7 @@ func (c *limitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRange,
}
// Delete takes name of the limitRange and deletes it. Returns an error if one occurs.
func (c *limitRanges) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *limitRanges) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("limitranges").
@@ -132,7 +132,7 @@ func (c *limitRanges) Delete(name string, options *meta_v1.DeleteOptions) error
}
// DeleteCollection deletes a collection of objects.
func (c *limitRanges) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *limitRanges) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("limitranges").

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -38,10 +38,10 @@ type NamespaceInterface interface {
Create(*v1.Namespace) (*v1.Namespace, error)
Update(*v1.Namespace) (*v1.Namespace, error)
UpdateStatus(*v1.Namespace) (*v1.Namespace, error)
Delete(name string, options *meta_v1.DeleteOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error)
List(opts meta_v1.ListOptions) (*v1.NamespaceList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
Get(name string, options metav1.GetOptions) (*v1.Namespace, error)
List(opts metav1.ListOptions) (*v1.NamespaceList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error)
NamespaceExpansion
}
@@ -59,7 +59,7 @@ func newNamespaces(c *CoreV1Client) *namespaces {
}
// Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any.
func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Namespace, err error) {
func (c *namespaces) Get(name string, options metav1.GetOptions) (result *v1.Namespace, err error) {
result = &v1.Namespace{}
err = c.client.Get().
Resource("namespaces").
@@ -71,7 +71,7 @@ func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Na
}
// List takes label and field selectors, and returns the list of Namespaces that match those selectors.
func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) {
func (c *namespaces) List(opts metav1.ListOptions) (result *v1.NamespaceList, err error) {
result = &v1.NamespaceList{}
err = c.client.Get().
Resource("namespaces").
@@ -82,7 +82,7 @@ func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, e
}
// Watch returns a watch.Interface that watches the requested namespaces.
func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *namespaces) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Resource("namespaces").
@@ -129,7 +129,7 @@ func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace
}
// Delete takes name of the namespace and deletes it. Returns an error if one occurs.
func (c *namespaces) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *namespaces) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Resource("namespaces").
Name(name).

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -38,11 +38,11 @@ type NodeInterface interface {
Create(*v1.Node) (*v1.Node, error)
Update(*v1.Node) (*v1.Node, error)
UpdateStatus(*v1.Node) (*v1.Node, 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.Node, error)
List(opts meta_v1.ListOptions) (*v1.NodeList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Node, error)
List(opts metav1.ListOptions) (*v1.NodeList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error)
NodeExpansion
}
@@ -60,7 +60,7 @@ func newNodes(c *CoreV1Client) *nodes {
}
// Get takes name of the node, and returns the corresponding node object, and an error if there is any.
func (c *nodes) Get(name string, options meta_v1.GetOptions) (result *v1.Node, err error) {
func (c *nodes) Get(name string, options metav1.GetOptions) (result *v1.Node, err error) {
result = &v1.Node{}
err = c.client.Get().
Resource("nodes").
@@ -72,7 +72,7 @@ func (c *nodes) Get(name string, options meta_v1.GetOptions) (result *v1.Node, e
}
// List takes label and field selectors, and returns the list of Nodes that match those selectors.
func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error) {
func (c *nodes) List(opts metav1.ListOptions) (result *v1.NodeList, err error) {
result = &v1.NodeList{}
err = c.client.Get().
Resource("nodes").
@@ -83,7 +83,7 @@ func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error)
}
// Watch returns a watch.Interface that watches the requested nodes.
func (c *nodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *nodes) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Resource("nodes").
@@ -130,7 +130,7 @@ func (c *nodes) UpdateStatus(node *v1.Node) (result *v1.Node, err error) {
}
// Delete takes name of the node and deletes it. Returns an error if one occurs.
func (c *nodes) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *nodes) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Resource("nodes").
Name(name).
@@ -140,7 +140,7 @@ func (c *nodes) Delete(name string, options *meta_v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *nodes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *nodes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Resource("nodes").
VersionedParams(&listOptions, scheme.ParameterCodec).

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -38,11 +38,11 @@ type PersistentVolumeInterface interface {
Create(*v1.PersistentVolume) (*v1.PersistentVolume, error)
Update(*v1.PersistentVolume) (*v1.PersistentVolume, error)
UpdateStatus(*v1.PersistentVolume) (*v1.PersistentVolume, 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.PersistentVolume, error)
List(opts meta_v1.ListOptions) (*v1.PersistentVolumeList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.PersistentVolume, error)
List(opts metav1.ListOptions) (*v1.PersistentVolumeList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error)
PersistentVolumeExpansion
}
@@ -60,7 +60,7 @@ func newPersistentVolumes(c *CoreV1Client) *persistentVolumes {
}
// Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any.
func (c *persistentVolumes) Get(name string, options meta_v1.GetOptions) (result *v1.PersistentVolume, err error) {
func (c *persistentVolumes) Get(name string, options metav1.GetOptions) (result *v1.PersistentVolume, err error) {
result = &v1.PersistentVolume{}
err = c.client.Get().
Resource("persistentvolumes").
@@ -72,7 +72,7 @@ func (c *persistentVolumes) Get(name string, options meta_v1.GetOptions) (result
}
// List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors.
func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeList, err error) {
func (c *persistentVolumes) List(opts metav1.ListOptions) (result *v1.PersistentVolumeList, err error) {
result = &v1.PersistentVolumeList{}
err = c.client.Get().
Resource("persistentvolumes").
@@ -83,7 +83,7 @@ func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.Persisten
}
// Watch returns a watch.Interface that watches the requested persistentVolumes.
func (c *persistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *persistentVolumes) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Resource("persistentvolumes").
@@ -130,7 +130,7 @@ func (c *persistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume)
}
// Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs.
func (c *persistentVolumes) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *persistentVolumes) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Resource("persistentvolumes").
Name(name).
@@ -140,7 +140,7 @@ func (c *persistentVolumes) Delete(name string, options *meta_v1.DeleteOptions)
}
// DeleteCollection deletes a collection of objects.
func (c *persistentVolumes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *persistentVolumes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Resource("persistentvolumes").
VersionedParams(&listOptions, scheme.ParameterCodec).

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -38,11 +38,11 @@ type PersistentVolumeClaimInterface interface {
Create(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
Update(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error)
UpdateStatus(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, 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.PersistentVolumeClaim, error)
List(opts meta_v1.ListOptions) (*v1.PersistentVolumeClaimList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.PersistentVolumeClaim, error)
List(opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error)
PersistentVolumeClaimExpansion
}
@@ -62,7 +62,7 @@ func newPersistentVolumeClaims(c *CoreV1Client, namespace string) *persistentVol
}
// Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any.
func (c *persistentVolumeClaims) Get(name string, options meta_v1.GetOptions) (result *v1.PersistentVolumeClaim, err error) {
func (c *persistentVolumeClaims) Get(name string, options metav1.GetOptions) (result *v1.PersistentVolumeClaim, err error) {
result = &v1.PersistentVolumeClaim{}
err = c.client.Get().
Namespace(c.ns).
@@ -75,7 +75,7 @@ func (c *persistentVolumeClaims) Get(name string, options meta_v1.GetOptions) (r
}
// List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors.
func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) {
func (c *persistentVolumeClaims) List(opts metav1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) {
result = &v1.PersistentVolumeClaimList{}
err = c.client.Get().
Namespace(c.ns).
@@ -87,7 +87,7 @@ func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.Pers
}
// Watch returns a watch.Interface that watches the requested persistentVolumeClaims.
func (c *persistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *persistentVolumeClaims) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -138,7 +138,7 @@ func (c *persistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.Persiste
}
// Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs.
func (c *persistentVolumeClaims) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *persistentVolumeClaims) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("persistentvolumeclaims").
@@ -149,7 +149,7 @@ func (c *persistentVolumeClaims) Delete(name string, options *meta_v1.DeleteOpti
}
// DeleteCollection deletes a collection of objects.
func (c *persistentVolumeClaims) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *persistentVolumeClaims) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("persistentvolumeclaims").

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -38,11 +38,11 @@ type PodInterface interface {
Create(*v1.Pod) (*v1.Pod, error)
Update(*v1.Pod) (*v1.Pod, error)
UpdateStatus(*v1.Pod) (*v1.Pod, 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.Pod, error)
List(opts meta_v1.ListOptions) (*v1.PodList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Pod, error)
List(opts metav1.ListOptions) (*v1.PodList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error)
PodExpansion
}
@@ -62,7 +62,7 @@ func newPods(c *CoreV1Client, namespace string) *pods {
}
// Get takes name of the pod, and returns the corresponding pod object, and an error if there is any.
func (c *pods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, err error) {
func (c *pods) Get(name string, options metav1.GetOptions) (result *v1.Pod, err error) {
result = &v1.Pod{}
err = c.client.Get().
Namespace(c.ns).
@@ -75,7 +75,7 @@ func (c *pods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, err
}
// List takes label and field selectors, and returns the list of Pods that match those selectors.
func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) {
func (c *pods) List(opts metav1.ListOptions) (result *v1.PodList, err error) {
result = &v1.PodList{}
err = c.client.Get().
Namespace(c.ns).
@@ -87,7 +87,7 @@ func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) {
}
// Watch returns a watch.Interface that watches the requested pods.
func (c *pods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *pods) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -138,7 +138,7 @@ func (c *pods) UpdateStatus(pod *v1.Pod) (result *v1.Pod, err error) {
}
// Delete takes name of the pod and deletes it. Returns an error if one occurs.
func (c *pods) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *pods) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("pods").
@@ -149,7 +149,7 @@ func (c *pods) Delete(name string, options *meta_v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *pods) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *pods) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("pods").

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type PodTemplatesGetter interface {
type PodTemplateInterface interface {
Create(*v1.PodTemplate) (*v1.PodTemplate, error)
Update(*v1.PodTemplate) (*v1.PodTemplate, 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.PodTemplate, error)
List(opts meta_v1.ListOptions) (*v1.PodTemplateList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.PodTemplate, error)
List(opts metav1.ListOptions) (*v1.PodTemplateList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error)
PodTemplateExpansion
}
@@ -61,7 +61,7 @@ func newPodTemplates(c *CoreV1Client, namespace string) *podTemplates {
}
// Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any.
func (c *podTemplates) Get(name string, options meta_v1.GetOptions) (result *v1.PodTemplate, err error) {
func (c *podTemplates) Get(name string, options metav1.GetOptions) (result *v1.PodTemplate, err error) {
result = &v1.PodTemplate{}
err = c.client.Get().
Namespace(c.ns).
@@ -74,7 +74,7 @@ func (c *podTemplates) Get(name string, options meta_v1.GetOptions) (result *v1.
}
// List takes label and field selectors, and returns the list of PodTemplates that match those selectors.
func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateList, err error) {
func (c *podTemplates) List(opts metav1.ListOptions) (result *v1.PodTemplateList, err error) {
result = &v1.PodTemplateList{}
err = c.client.Get().
Namespace(c.ns).
@@ -86,7 +86,7 @@ func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateLis
}
// Watch returns a watch.Interface that watches the requested podTemplates.
func (c *podTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *podTemplates) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -121,7 +121,7 @@ func (c *podTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTempla
}
// Delete takes name of the podTemplate and deletes it. Returns an error if one occurs.
func (c *podTemplates) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *podTemplates) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("podtemplates").
@@ -132,7 +132,7 @@ func (c *podTemplates) Delete(name string, options *meta_v1.DeleteOptions) error
}
// DeleteCollection deletes a collection of objects.
func (c *podTemplates) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *podTemplates) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("podtemplates").

View File

@@ -21,7 +21,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
v1beta1 "k8s.io/api/extensions/v1beta1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -39,13 +39,13 @@ type ReplicationControllerInterface interface {
Create(*v1.ReplicationController) (*v1.ReplicationController, error)
Update(*v1.ReplicationController) (*v1.ReplicationController, error)
UpdateStatus(*v1.ReplicationController) (*v1.ReplicationController, 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.ReplicationController, error)
List(opts meta_v1.ListOptions) (*v1.ReplicationControllerList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ReplicationController, error)
List(opts metav1.ListOptions) (*v1.ReplicationControllerList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error)
GetScale(replicationControllerName string, options meta_v1.GetOptions) (*v1beta1.Scale, error)
GetScale(replicationControllerName string, options metav1.GetOptions) (*v1beta1.Scale, error)
UpdateScale(replicationControllerName string, scale *v1beta1.Scale) (*v1beta1.Scale, error)
ReplicationControllerExpansion
@@ -66,7 +66,7 @@ func newReplicationControllers(c *CoreV1Client, namespace string) *replicationCo
}
// Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any.
func (c *replicationControllers) Get(name string, options meta_v1.GetOptions) (result *v1.ReplicationController, err error) {
func (c *replicationControllers) Get(name string, options metav1.GetOptions) (result *v1.ReplicationController, err error) {
result = &v1.ReplicationController{}
err = c.client.Get().
Namespace(c.ns).
@@ -79,7 +79,7 @@ func (c *replicationControllers) Get(name string, options meta_v1.GetOptions) (r
}
// List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors.
func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.ReplicationControllerList, err error) {
func (c *replicationControllers) List(opts metav1.ListOptions) (result *v1.ReplicationControllerList, err error) {
result = &v1.ReplicationControllerList{}
err = c.client.Get().
Namespace(c.ns).
@@ -91,7 +91,7 @@ func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.Repl
}
// Watch returns a watch.Interface that watches the requested replicationControllers.
func (c *replicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *replicationControllers) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -142,7 +142,7 @@ func (c *replicationControllers) UpdateStatus(replicationController *v1.Replicat
}
// Delete takes name of the replicationController and deletes it. Returns an error if one occurs.
func (c *replicationControllers) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *replicationControllers) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("replicationcontrollers").
@@ -153,7 +153,7 @@ func (c *replicationControllers) Delete(name string, options *meta_v1.DeleteOpti
}
// DeleteCollection deletes a collection of objects.
func (c *replicationControllers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *replicationControllers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("replicationcontrollers").
@@ -178,7 +178,7 @@ func (c *replicationControllers) Patch(name string, pt types.PatchType, data []b
}
// GetScale takes name of the replicationController, and returns the corresponding v1beta1.Scale object, and an error if there is any.
func (c *replicationControllers) GetScale(replicationControllerName string, options meta_v1.GetOptions) (result *v1beta1.Scale, err error) {
func (c *replicationControllers) GetScale(replicationControllerName string, options metav1.GetOptions) (result *v1beta1.Scale, err error) {
result = &v1beta1.Scale{}
err = c.client.Get().
Namespace(c.ns).

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -38,11 +38,11 @@ type ResourceQuotaInterface interface {
Create(*v1.ResourceQuota) (*v1.ResourceQuota, error)
Update(*v1.ResourceQuota) (*v1.ResourceQuota, error)
UpdateStatus(*v1.ResourceQuota) (*v1.ResourceQuota, 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.ResourceQuota, error)
List(opts meta_v1.ListOptions) (*v1.ResourceQuotaList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ResourceQuota, error)
List(opts metav1.ListOptions) (*v1.ResourceQuotaList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error)
ResourceQuotaExpansion
}
@@ -62,7 +62,7 @@ func newResourceQuotas(c *CoreV1Client, namespace string) *resourceQuotas {
}
// Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any.
func (c *resourceQuotas) Get(name string, options meta_v1.GetOptions) (result *v1.ResourceQuota, err error) {
func (c *resourceQuotas) Get(name string, options metav1.GetOptions) (result *v1.ResourceQuota, err error) {
result = &v1.ResourceQuota{}
err = c.client.Get().
Namespace(c.ns).
@@ -75,7 +75,7 @@ func (c *resourceQuotas) Get(name string, options meta_v1.GetOptions) (result *v
}
// List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors.
func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuotaList, err error) {
func (c *resourceQuotas) List(opts metav1.ListOptions) (result *v1.ResourceQuotaList, err error) {
result = &v1.ResourceQuotaList{}
err = c.client.Get().
Namespace(c.ns).
@@ -87,7 +87,7 @@ func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuot
}
// Watch returns a watch.Interface that watches the requested resourceQuotas.
func (c *resourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *resourceQuotas) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -138,7 +138,7 @@ func (c *resourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (result *
}
// Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs.
func (c *resourceQuotas) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *resourceQuotas) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("resourcequotas").
@@ -149,7 +149,7 @@ func (c *resourceQuotas) Delete(name string, options *meta_v1.DeleteOptions) err
}
// DeleteCollection deletes a collection of objects.
func (c *resourceQuotas) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *resourceQuotas) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("resourcequotas").

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type SecretsGetter interface {
type SecretInterface interface {
Create(*v1.Secret) (*v1.Secret, error)
Update(*v1.Secret) (*v1.Secret, 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.Secret, error)
List(opts meta_v1.ListOptions) (*v1.SecretList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Secret, error)
List(opts metav1.ListOptions) (*v1.SecretList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error)
SecretExpansion
}
@@ -61,7 +61,7 @@ func newSecrets(c *CoreV1Client, namespace string) *secrets {
}
// Get takes name of the secret, and returns the corresponding secret object, and an error if there is any.
func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secret, err error) {
func (c *secrets) Get(name string, options metav1.GetOptions) (result *v1.Secret, err error) {
result = &v1.Secret{}
err = c.client.Get().
Namespace(c.ns).
@@ -74,7 +74,7 @@ func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secre
}
// List takes label and field selectors, and returns the list of Secrets that match those selectors.
func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) {
func (c *secrets) List(opts metav1.ListOptions) (result *v1.SecretList, err error) {
result = &v1.SecretList{}
err = c.client.Get().
Namespace(c.ns).
@@ -86,7 +86,7 @@ func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err err
}
// Watch returns a watch.Interface that watches the requested secrets.
func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *secrets) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -121,7 +121,7 @@ func (c *secrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
}
// Delete takes name of the secret and deletes it. Returns an error if one occurs.
func (c *secrets) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *secrets) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("secrets").
@@ -132,7 +132,7 @@ func (c *secrets) Delete(name string, options *meta_v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *secrets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *secrets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("secrets").

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -38,10 +38,10 @@ type ServiceInterface interface {
Create(*v1.Service) (*v1.Service, error)
Update(*v1.Service) (*v1.Service, error)
UpdateStatus(*v1.Service) (*v1.Service, error)
Delete(name string, options *meta_v1.DeleteOptions) error
Get(name string, options meta_v1.GetOptions) (*v1.Service, error)
List(opts meta_v1.ListOptions) (*v1.ServiceList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
Get(name string, options metav1.GetOptions) (*v1.Service, error)
List(opts metav1.ListOptions) (*v1.ServiceList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error)
ServiceExpansion
}
@@ -61,7 +61,7 @@ func newServices(c *CoreV1Client, namespace string) *services {
}
// Get takes name of the service, and returns the corresponding service object, and an error if there is any.
func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Service, err error) {
func (c *services) Get(name string, options metav1.GetOptions) (result *v1.Service, err error) {
result = &v1.Service{}
err = c.client.Get().
Namespace(c.ns).
@@ -74,7 +74,7 @@ func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Serv
}
// List takes label and field selectors, and returns the list of Services that match those selectors.
func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) {
func (c *services) List(opts metav1.ListOptions) (result *v1.ServiceList, err error) {
result = &v1.ServiceList{}
err = c.client.Get().
Namespace(c.ns).
@@ -86,7 +86,7 @@ func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err e
}
// Watch returns a watch.Interface that watches the requested services.
func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *services) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -137,7 +137,7 @@ func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err er
}
// Delete takes name of the service and deletes it. Returns an error if one occurs.
func (c *services) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *services) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("services").

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type ServiceAccountsGetter interface {
type ServiceAccountInterface interface {
Create(*v1.ServiceAccount) (*v1.ServiceAccount, error)
Update(*v1.ServiceAccount) (*v1.ServiceAccount, 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.ServiceAccount, error)
List(opts meta_v1.ListOptions) (*v1.ServiceAccountList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ServiceAccount, error)
List(opts metav1.ListOptions) (*v1.ServiceAccountList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error)
ServiceAccountExpansion
}
@@ -61,7 +61,7 @@ func newServiceAccounts(c *CoreV1Client, namespace string) *serviceAccounts {
}
// Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any.
func (c *serviceAccounts) Get(name string, options meta_v1.GetOptions) (result *v1.ServiceAccount, err error) {
func (c *serviceAccounts) Get(name string, options metav1.GetOptions) (result *v1.ServiceAccount, err error) {
result = &v1.ServiceAccount{}
err = c.client.Get().
Namespace(c.ns).
@@ -74,7 +74,7 @@ func (c *serviceAccounts) Get(name string, options meta_v1.GetOptions) (result *
}
// List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors.
func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAccountList, err error) {
func (c *serviceAccounts) List(opts metav1.ListOptions) (result *v1.ServiceAccountList, err error) {
result = &v1.ServiceAccountList{}
err = c.client.Get().
Namespace(c.ns).
@@ -86,7 +86,7 @@ func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAcco
}
// Watch returns a watch.Interface that watches the requested serviceAccounts.
func (c *serviceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *serviceAccounts) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -121,7 +121,7 @@ func (c *serviceAccounts) Update(serviceAccount *v1.ServiceAccount) (result *v1.
}
// Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs.
func (c *serviceAccounts) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *serviceAccounts) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("serviceaccounts").
@@ -132,7 +132,7 @@ func (c *serviceAccounts) Delete(name string, options *meta_v1.DeleteOptions) er
}
// DeleteCollection deletes a collection of objects.
func (c *serviceAccounts) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *serviceAccounts) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("serviceaccounts").

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
networking_v1 "k8s.io/api/networking/v1"
networkingv1 "k8s.io/api/networking/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var networkpoliciesResource = schema.GroupVersionResource{Group: "networking.k8s
var networkpoliciesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "NetworkPolicy"}
// Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any.
func (c *FakeNetworkPolicies) Get(name string, options v1.GetOptions) (result *networking_v1.NetworkPolicy, err error) {
func (c *FakeNetworkPolicies) Get(name string, options v1.GetOptions) (result *networkingv1.NetworkPolicy, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(networkpoliciesResource, c.ns, name), &networking_v1.NetworkPolicy{})
Invokes(testing.NewGetAction(networkpoliciesResource, c.ns, name), &networkingv1.NetworkPolicy{})
if obj == nil {
return nil, err
}
return obj.(*networking_v1.NetworkPolicy), err
return obj.(*networkingv1.NetworkPolicy), err
}
// List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors.
func (c *FakeNetworkPolicies) List(opts v1.ListOptions) (result *networking_v1.NetworkPolicyList, err error) {
func (c *FakeNetworkPolicies) List(opts v1.ListOptions) (result *networkingv1.NetworkPolicyList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(networkpoliciesResource, networkpoliciesKind, c.ns, opts), &networking_v1.NetworkPolicyList{})
Invokes(testing.NewListAction(networkpoliciesResource, networkpoliciesKind, c.ns, opts), &networkingv1.NetworkPolicyList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeNetworkPolicies) List(opts v1.ListOptions) (result *networking_v1.N
if label == nil {
label = labels.Everything()
}
list := &networking_v1.NetworkPolicyList{ListMeta: obj.(*networking_v1.NetworkPolicyList).ListMeta}
for _, item := range obj.(*networking_v1.NetworkPolicyList).Items {
list := &networkingv1.NetworkPolicyList{ListMeta: obj.(*networkingv1.NetworkPolicyList).ListMeta}
for _, item := range obj.(*networkingv1.NetworkPolicyList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,31 +79,31 @@ func (c *FakeNetworkPolicies) Watch(opts v1.ListOptions) (watch.Interface, error
}
// Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any.
func (c *FakeNetworkPolicies) Create(networkPolicy *networking_v1.NetworkPolicy) (result *networking_v1.NetworkPolicy, err error) {
func (c *FakeNetworkPolicies) Create(networkPolicy *networkingv1.NetworkPolicy) (result *networkingv1.NetworkPolicy, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(networkpoliciesResource, c.ns, networkPolicy), &networking_v1.NetworkPolicy{})
Invokes(testing.NewCreateAction(networkpoliciesResource, c.ns, networkPolicy), &networkingv1.NetworkPolicy{})
if obj == nil {
return nil, err
}
return obj.(*networking_v1.NetworkPolicy), err
return obj.(*networkingv1.NetworkPolicy), err
}
// Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any.
func (c *FakeNetworkPolicies) Update(networkPolicy *networking_v1.NetworkPolicy) (result *networking_v1.NetworkPolicy, err error) {
func (c *FakeNetworkPolicies) Update(networkPolicy *networkingv1.NetworkPolicy) (result *networkingv1.NetworkPolicy, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(networkpoliciesResource, c.ns, networkPolicy), &networking_v1.NetworkPolicy{})
Invokes(testing.NewUpdateAction(networkpoliciesResource, c.ns, networkPolicy), &networkingv1.NetworkPolicy{})
if obj == nil {
return nil, err
}
return obj.(*networking_v1.NetworkPolicy), err
return obj.(*networkingv1.NetworkPolicy), err
}
// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs.
func (c *FakeNetworkPolicies) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(networkpoliciesResource, c.ns, name), &networking_v1.NetworkPolicy{})
Invokes(testing.NewDeleteAction(networkpoliciesResource, c.ns, name), &networkingv1.NetworkPolicy{})
return err
}
@@ -112,17 +112,17 @@ func (c *FakeNetworkPolicies) Delete(name string, options *v1.DeleteOptions) err
func (c *FakeNetworkPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(networkpoliciesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &networking_v1.NetworkPolicyList{})
_, err := c.Fake.Invokes(action, &networkingv1.NetworkPolicyList{})
return err
}
// Patch applies the patch and returns the patched networkPolicy.
func (c *FakeNetworkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *networking_v1.NetworkPolicy, err error) {
func (c *FakeNetworkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *networkingv1.NetworkPolicy, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, data, subresources...), &networking_v1.NetworkPolicy{})
Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, data, subresources...), &networkingv1.NetworkPolicy{})
if obj == nil {
return nil, err
}
return obj.(*networking_v1.NetworkPolicy), err
return obj.(*networkingv1.NetworkPolicy), err
}

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/networking/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type NetworkPoliciesGetter interface {
type NetworkPolicyInterface interface {
Create(*v1.NetworkPolicy) (*v1.NetworkPolicy, error)
Update(*v1.NetworkPolicy) (*v1.NetworkPolicy, 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.NetworkPolicy, error)
List(opts meta_v1.ListOptions) (*v1.NetworkPolicyList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.NetworkPolicy, error)
List(opts metav1.ListOptions) (*v1.NetworkPolicyList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error)
NetworkPolicyExpansion
}
@@ -61,7 +61,7 @@ func newNetworkPolicies(c *NetworkingV1Client, namespace string) *networkPolicie
}
// Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any.
func (c *networkPolicies) Get(name string, options meta_v1.GetOptions) (result *v1.NetworkPolicy, err error) {
func (c *networkPolicies) Get(name string, options metav1.GetOptions) (result *v1.NetworkPolicy, err error) {
result = &v1.NetworkPolicy{}
err = c.client.Get().
Namespace(c.ns).
@@ -74,7 +74,7 @@ func (c *networkPolicies) Get(name string, options meta_v1.GetOptions) (result *
}
// List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors.
func (c *networkPolicies) List(opts meta_v1.ListOptions) (result *v1.NetworkPolicyList, err error) {
func (c *networkPolicies) List(opts metav1.ListOptions) (result *v1.NetworkPolicyList, err error) {
result = &v1.NetworkPolicyList{}
err = c.client.Get().
Namespace(c.ns).
@@ -86,7 +86,7 @@ func (c *networkPolicies) List(opts meta_v1.ListOptions) (result *v1.NetworkPoli
}
// Watch returns a watch.Interface that watches the requested networkPolicies.
func (c *networkPolicies) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *networkPolicies) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -121,7 +121,7 @@ func (c *networkPolicies) Update(networkPolicy *v1.NetworkPolicy) (result *v1.Ne
}
// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs.
func (c *networkPolicies) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *networkPolicies) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("networkpolicies").
@@ -132,7 +132,7 @@ func (c *networkPolicies) Delete(name string, options *meta_v1.DeleteOptions) er
}
// DeleteCollection deletes a collection of objects.
func (c *networkPolicies) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *networkPolicies) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("networkpolicies").

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/rbac/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type ClusterRolesGetter interface {
type ClusterRoleInterface interface {
Create(*v1.ClusterRole) (*v1.ClusterRole, error)
Update(*v1.ClusterRole) (*v1.ClusterRole, 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.ClusterRole, error)
List(opts meta_v1.ListOptions) (*v1.ClusterRoleList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ClusterRole, error)
List(opts metav1.ListOptions) (*v1.ClusterRoleList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRole, err error)
ClusterRoleExpansion
}
@@ -59,7 +59,7 @@ func newClusterRoles(c *RbacV1Client) *clusterRoles {
}
// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any.
func (c *clusterRoles) Get(name string, options meta_v1.GetOptions) (result *v1.ClusterRole, err error) {
func (c *clusterRoles) Get(name string, options metav1.GetOptions) (result *v1.ClusterRole, err error) {
result = &v1.ClusterRole{}
err = c.client.Get().
Resource("clusterroles").
@@ -71,7 +71,7 @@ func (c *clusterRoles) Get(name string, options meta_v1.GetOptions) (result *v1.
}
// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors.
func (c *clusterRoles) List(opts meta_v1.ListOptions) (result *v1.ClusterRoleList, err error) {
func (c *clusterRoles) List(opts metav1.ListOptions) (result *v1.ClusterRoleList, err error) {
result = &v1.ClusterRoleList{}
err = c.client.Get().
Resource("clusterroles").
@@ -82,7 +82,7 @@ func (c *clusterRoles) List(opts meta_v1.ListOptions) (result *v1.ClusterRoleLis
}
// Watch returns a watch.Interface that watches the requested clusterRoles.
func (c *clusterRoles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *clusterRoles) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Resource("clusterroles").
@@ -114,7 +114,7 @@ func (c *clusterRoles) Update(clusterRole *v1.ClusterRole) (result *v1.ClusterRo
}
// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs.
func (c *clusterRoles) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *clusterRoles) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Resource("clusterroles").
Name(name).
@@ -124,7 +124,7 @@ func (c *clusterRoles) Delete(name string, options *meta_v1.DeleteOptions) error
}
// DeleteCollection deletes a collection of objects.
func (c *clusterRoles) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *clusterRoles) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Resource("clusterroles").
VersionedParams(&listOptions, scheme.ParameterCodec).

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/rbac/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type ClusterRoleBindingsGetter interface {
type ClusterRoleBindingInterface interface {
Create(*v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error)
Update(*v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, 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.ClusterRoleBinding, error)
List(opts meta_v1.ListOptions) (*v1.ClusterRoleBindingList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.ClusterRoleBinding, error)
List(opts metav1.ListOptions) (*v1.ClusterRoleBindingList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRoleBinding, err error)
ClusterRoleBindingExpansion
}
@@ -59,7 +59,7 @@ func newClusterRoleBindings(c *RbacV1Client) *clusterRoleBindings {
}
// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any.
func (c *clusterRoleBindings) Get(name string, options meta_v1.GetOptions) (result *v1.ClusterRoleBinding, err error) {
func (c *clusterRoleBindings) Get(name string, options metav1.GetOptions) (result *v1.ClusterRoleBinding, err error) {
result = &v1.ClusterRoleBinding{}
err = c.client.Get().
Resource("clusterrolebindings").
@@ -71,7 +71,7 @@ func (c *clusterRoleBindings) Get(name string, options meta_v1.GetOptions) (resu
}
// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors.
func (c *clusterRoleBindings) List(opts meta_v1.ListOptions) (result *v1.ClusterRoleBindingList, err error) {
func (c *clusterRoleBindings) List(opts metav1.ListOptions) (result *v1.ClusterRoleBindingList, err error) {
result = &v1.ClusterRoleBindingList{}
err = c.client.Get().
Resource("clusterrolebindings").
@@ -82,7 +82,7 @@ func (c *clusterRoleBindings) List(opts meta_v1.ListOptions) (result *v1.Cluster
}
// Watch returns a watch.Interface that watches the requested clusterRoleBindings.
func (c *clusterRoleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *clusterRoleBindings) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Resource("clusterrolebindings").
@@ -114,7 +114,7 @@ func (c *clusterRoleBindings) Update(clusterRoleBinding *v1.ClusterRoleBinding)
}
// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs.
func (c *clusterRoleBindings) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *clusterRoleBindings) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Resource("clusterrolebindings").
Name(name).
@@ -124,7 +124,7 @@ func (c *clusterRoleBindings) Delete(name string, options *meta_v1.DeleteOptions
}
// DeleteCollection deletes a collection of objects.
func (c *clusterRoleBindings) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *clusterRoleBindings) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Resource("clusterrolebindings").
VersionedParams(&listOptions, scheme.ParameterCodec).

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
rbac_v1 "k8s.io/api/rbac/v1"
rbacv1 "k8s.io/api/rbac/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -38,19 +38,19 @@ var clusterrolesResource = schema.GroupVersionResource{Group: "rbac.authorizatio
var clusterrolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRole"}
// Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any.
func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *rbac_v1.ClusterRole, err error) {
func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *rbacv1.ClusterRole, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(clusterrolesResource, name), &rbac_v1.ClusterRole{})
Invokes(testing.NewRootGetAction(clusterrolesResource, name), &rbacv1.ClusterRole{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.ClusterRole), err
return obj.(*rbacv1.ClusterRole), err
}
// List takes label and field selectors, and returns the list of ClusterRoles that match those selectors.
func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *rbac_v1.ClusterRoleList, err error) {
func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *rbacv1.ClusterRoleList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(clusterrolesResource, clusterrolesKind, opts), &rbac_v1.ClusterRoleList{})
Invokes(testing.NewRootListAction(clusterrolesResource, clusterrolesKind, opts), &rbacv1.ClusterRoleList{})
if obj == nil {
return nil, err
}
@@ -59,8 +59,8 @@ func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *rbac_v1.ClusterRol
if label == nil {
label = labels.Everything()
}
list := &rbac_v1.ClusterRoleList{ListMeta: obj.(*rbac_v1.ClusterRoleList).ListMeta}
for _, item := range obj.(*rbac_v1.ClusterRoleList).Items {
list := &rbacv1.ClusterRoleList{ListMeta: obj.(*rbacv1.ClusterRoleList).ListMeta}
for _, item := range obj.(*rbacv1.ClusterRoleList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -75,29 +75,29 @@ func (c *FakeClusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any.
func (c *FakeClusterRoles) Create(clusterRole *rbac_v1.ClusterRole) (result *rbac_v1.ClusterRole, err error) {
func (c *FakeClusterRoles) Create(clusterRole *rbacv1.ClusterRole) (result *rbacv1.ClusterRole, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &rbac_v1.ClusterRole{})
Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &rbacv1.ClusterRole{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.ClusterRole), err
return obj.(*rbacv1.ClusterRole), err
}
// Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any.
func (c *FakeClusterRoles) Update(clusterRole *rbac_v1.ClusterRole) (result *rbac_v1.ClusterRole, err error) {
func (c *FakeClusterRoles) Update(clusterRole *rbacv1.ClusterRole) (result *rbacv1.ClusterRole, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &rbac_v1.ClusterRole{})
Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &rbacv1.ClusterRole{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.ClusterRole), err
return obj.(*rbacv1.ClusterRole), err
}
// Delete takes name of the clusterRole and deletes it. Returns an error if one occurs.
func (c *FakeClusterRoles) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(clusterrolesResource, name), &rbac_v1.ClusterRole{})
Invokes(testing.NewRootDeleteAction(clusterrolesResource, name), &rbacv1.ClusterRole{})
return err
}
@@ -105,16 +105,16 @@ func (c *FakeClusterRoles) Delete(name string, options *v1.DeleteOptions) error
func (c *FakeClusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOptions)
_, err := c.Fake.Invokes(action, &rbac_v1.ClusterRoleList{})
_, err := c.Fake.Invokes(action, &rbacv1.ClusterRoleList{})
return err
}
// Patch applies the patch and returns the patched clusterRole.
func (c *FakeClusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac_v1.ClusterRole, err error) {
func (c *FakeClusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.ClusterRole, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, data, subresources...), &rbac_v1.ClusterRole{})
Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, data, subresources...), &rbacv1.ClusterRole{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.ClusterRole), err
return obj.(*rbacv1.ClusterRole), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
rbac_v1 "k8s.io/api/rbac/v1"
rbacv1 "k8s.io/api/rbac/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -38,19 +38,19 @@ var clusterrolebindingsResource = schema.GroupVersionResource{Group: "rbac.autho
var clusterrolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRoleBinding"}
// Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any.
func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (result *rbac_v1.ClusterRoleBinding, err error) {
func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (result *rbacv1.ClusterRoleBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(clusterrolebindingsResource, name), &rbac_v1.ClusterRoleBinding{})
Invokes(testing.NewRootGetAction(clusterrolebindingsResource, name), &rbacv1.ClusterRoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.ClusterRoleBinding), err
return obj.(*rbacv1.ClusterRoleBinding), err
}
// List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors.
func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *rbac_v1.ClusterRoleBindingList, err error) {
func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *rbacv1.ClusterRoleBindingList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(clusterrolebindingsResource, clusterrolebindingsKind, opts), &rbac_v1.ClusterRoleBindingList{})
Invokes(testing.NewRootListAction(clusterrolebindingsResource, clusterrolebindingsKind, opts), &rbacv1.ClusterRoleBindingList{})
if obj == nil {
return nil, err
}
@@ -59,8 +59,8 @@ func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *rbac_v1.Clu
if label == nil {
label = labels.Everything()
}
list := &rbac_v1.ClusterRoleBindingList{ListMeta: obj.(*rbac_v1.ClusterRoleBindingList).ListMeta}
for _, item := range obj.(*rbac_v1.ClusterRoleBindingList).Items {
list := &rbacv1.ClusterRoleBindingList{ListMeta: obj.(*rbacv1.ClusterRoleBindingList).ListMeta}
for _, item := range obj.(*rbacv1.ClusterRoleBindingList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -75,29 +75,29 @@ func (c *FakeClusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, e
}
// Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *rbac_v1.ClusterRoleBinding) (result *rbac_v1.ClusterRoleBinding, err error) {
func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *rbacv1.ClusterRoleBinding) (result *rbacv1.ClusterRoleBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &rbac_v1.ClusterRoleBinding{})
Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &rbacv1.ClusterRoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.ClusterRoleBinding), err
return obj.(*rbacv1.ClusterRoleBinding), err
}
// Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any.
func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *rbac_v1.ClusterRoleBinding) (result *rbac_v1.ClusterRoleBinding, err error) {
func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *rbacv1.ClusterRoleBinding) (result *rbacv1.ClusterRoleBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &rbac_v1.ClusterRoleBinding{})
Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &rbacv1.ClusterRoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.ClusterRoleBinding), err
return obj.(*rbacv1.ClusterRoleBinding), err
}
// Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs.
func (c *FakeClusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(clusterrolebindingsResource, name), &rbac_v1.ClusterRoleBinding{})
Invokes(testing.NewRootDeleteAction(clusterrolebindingsResource, name), &rbacv1.ClusterRoleBinding{})
return err
}
@@ -105,16 +105,16 @@ func (c *FakeClusterRoleBindings) Delete(name string, options *v1.DeleteOptions)
func (c *FakeClusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOptions)
_, err := c.Fake.Invokes(action, &rbac_v1.ClusterRoleBindingList{})
_, err := c.Fake.Invokes(action, &rbacv1.ClusterRoleBindingList{})
return err
}
// Patch applies the patch and returns the patched clusterRoleBinding.
func (c *FakeClusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac_v1.ClusterRoleBinding, err error) {
func (c *FakeClusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.ClusterRoleBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, data, subresources...), &rbac_v1.ClusterRoleBinding{})
Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, data, subresources...), &rbacv1.ClusterRoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.ClusterRoleBinding), err
return obj.(*rbacv1.ClusterRoleBinding), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
rbac_v1 "k8s.io/api/rbac/v1"
rbacv1 "k8s.io/api/rbac/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var rolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.i
var rolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "Role"}
// Get takes name of the role, and returns the corresponding role object, and an error if there is any.
func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *rbac_v1.Role, err error) {
func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *rbacv1.Role, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(rolesResource, c.ns, name), &rbac_v1.Role{})
Invokes(testing.NewGetAction(rolesResource, c.ns, name), &rbacv1.Role{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.Role), err
return obj.(*rbacv1.Role), err
}
// List takes label and field selectors, and returns the list of Roles that match those selectors.
func (c *FakeRoles) List(opts v1.ListOptions) (result *rbac_v1.RoleList, err error) {
func (c *FakeRoles) List(opts v1.ListOptions) (result *rbacv1.RoleList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(rolesResource, rolesKind, c.ns, opts), &rbac_v1.RoleList{})
Invokes(testing.NewListAction(rolesResource, rolesKind, c.ns, opts), &rbacv1.RoleList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeRoles) List(opts v1.ListOptions) (result *rbac_v1.RoleList, err err
if label == nil {
label = labels.Everything()
}
list := &rbac_v1.RoleList{ListMeta: obj.(*rbac_v1.RoleList).ListMeta}
for _, item := range obj.(*rbac_v1.RoleList).Items {
list := &rbacv1.RoleList{ListMeta: obj.(*rbacv1.RoleList).ListMeta}
for _, item := range obj.(*rbacv1.RoleList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,31 +79,31 @@ func (c *FakeRoles) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any.
func (c *FakeRoles) Create(role *rbac_v1.Role) (result *rbac_v1.Role, err error) {
func (c *FakeRoles) Create(role *rbacv1.Role) (result *rbacv1.Role, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &rbac_v1.Role{})
Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &rbacv1.Role{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.Role), err
return obj.(*rbacv1.Role), err
}
// Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any.
func (c *FakeRoles) Update(role *rbac_v1.Role) (result *rbac_v1.Role, err error) {
func (c *FakeRoles) Update(role *rbacv1.Role) (result *rbacv1.Role, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &rbac_v1.Role{})
Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &rbacv1.Role{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.Role), err
return obj.(*rbacv1.Role), err
}
// Delete takes name of the role and deletes it. Returns an error if one occurs.
func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(rolesResource, c.ns, name), &rbac_v1.Role{})
Invokes(testing.NewDeleteAction(rolesResource, c.ns, name), &rbacv1.Role{})
return err
}
@@ -112,17 +112,17 @@ func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error {
func (c *FakeRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &rbac_v1.RoleList{})
_, err := c.Fake.Invokes(action, &rbacv1.RoleList{})
return err
}
// Patch applies the patch and returns the patched role.
func (c *FakeRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac_v1.Role, err error) {
func (c *FakeRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.Role, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, data, subresources...), &rbac_v1.Role{})
Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, data, subresources...), &rbacv1.Role{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.Role), err
return obj.(*rbacv1.Role), err
}

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
rbac_v1 "k8s.io/api/rbac/v1"
rbacv1 "k8s.io/api/rbac/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -39,20 +39,20 @@ var rolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorizatio
var rolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBinding"}
// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any.
func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *rbac_v1.RoleBinding, err error) {
func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *rbacv1.RoleBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &rbac_v1.RoleBinding{})
Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &rbacv1.RoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.RoleBinding), err
return obj.(*rbacv1.RoleBinding), err
}
// List takes label and field selectors, and returns the list of RoleBindings that match those selectors.
func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *rbac_v1.RoleBindingList, err error) {
func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *rbacv1.RoleBindingList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(rolebindingsResource, rolebindingsKind, c.ns, opts), &rbac_v1.RoleBindingList{})
Invokes(testing.NewListAction(rolebindingsResource, rolebindingsKind, c.ns, opts), &rbacv1.RoleBindingList{})
if obj == nil {
return nil, err
@@ -62,8 +62,8 @@ func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *rbac_v1.RoleBindin
if label == nil {
label = labels.Everything()
}
list := &rbac_v1.RoleBindingList{ListMeta: obj.(*rbac_v1.RoleBindingList).ListMeta}
for _, item := range obj.(*rbac_v1.RoleBindingList).Items {
list := &rbacv1.RoleBindingList{ListMeta: obj.(*rbacv1.RoleBindingList).ListMeta}
for _, item := range obj.(*rbacv1.RoleBindingList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -79,31 +79,31 @@ func (c *FakeRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) {
}
// Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any.
func (c *FakeRoleBindings) Create(roleBinding *rbac_v1.RoleBinding) (result *rbac_v1.RoleBinding, err error) {
func (c *FakeRoleBindings) Create(roleBinding *rbacv1.RoleBinding) (result *rbacv1.RoleBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &rbac_v1.RoleBinding{})
Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &rbacv1.RoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.RoleBinding), err
return obj.(*rbacv1.RoleBinding), err
}
// Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any.
func (c *FakeRoleBindings) Update(roleBinding *rbac_v1.RoleBinding) (result *rbac_v1.RoleBinding, err error) {
func (c *FakeRoleBindings) Update(roleBinding *rbacv1.RoleBinding) (result *rbacv1.RoleBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &rbac_v1.RoleBinding{})
Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &rbacv1.RoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.RoleBinding), err
return obj.(*rbacv1.RoleBinding), err
}
// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs.
func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(rolebindingsResource, c.ns, name), &rbac_v1.RoleBinding{})
Invokes(testing.NewDeleteAction(rolebindingsResource, c.ns, name), &rbacv1.RoleBinding{})
return err
}
@@ -112,17 +112,17 @@ func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error
func (c *FakeRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &rbac_v1.RoleBindingList{})
_, err := c.Fake.Invokes(action, &rbacv1.RoleBindingList{})
return err
}
// Patch applies the patch and returns the patched roleBinding.
func (c *FakeRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac_v1.RoleBinding, err error) {
func (c *FakeRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.RoleBinding, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, data, subresources...), &rbac_v1.RoleBinding{})
Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, data, subresources...), &rbacv1.RoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*rbac_v1.RoleBinding), err
return obj.(*rbacv1.RoleBinding), err
}

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/rbac/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type RolesGetter interface {
type RoleInterface interface {
Create(*v1.Role) (*v1.Role, error)
Update(*v1.Role) (*v1.Role, 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.Role, error)
List(opts meta_v1.ListOptions) (*v1.RoleList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.Role, error)
List(opts metav1.ListOptions) (*v1.RoleList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Role, err error)
RoleExpansion
}
@@ -61,7 +61,7 @@ func newRoles(c *RbacV1Client, namespace string) *roles {
}
// Get takes name of the role, and returns the corresponding role object, and an error if there is any.
func (c *roles) Get(name string, options meta_v1.GetOptions) (result *v1.Role, err error) {
func (c *roles) Get(name string, options metav1.GetOptions) (result *v1.Role, err error) {
result = &v1.Role{}
err = c.client.Get().
Namespace(c.ns).
@@ -74,7 +74,7 @@ func (c *roles) Get(name string, options meta_v1.GetOptions) (result *v1.Role, e
}
// List takes label and field selectors, and returns the list of Roles that match those selectors.
func (c *roles) List(opts meta_v1.ListOptions) (result *v1.RoleList, err error) {
func (c *roles) List(opts metav1.ListOptions) (result *v1.RoleList, err error) {
result = &v1.RoleList{}
err = c.client.Get().
Namespace(c.ns).
@@ -86,7 +86,7 @@ func (c *roles) List(opts meta_v1.ListOptions) (result *v1.RoleList, err error)
}
// Watch returns a watch.Interface that watches the requested roles.
func (c *roles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *roles) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -121,7 +121,7 @@ func (c *roles) Update(role *v1.Role) (result *v1.Role, err error) {
}
// Delete takes name of the role and deletes it. Returns an error if one occurs.
func (c *roles) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *roles) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("roles").
@@ -132,7 +132,7 @@ func (c *roles) Delete(name string, options *meta_v1.DeleteOptions) error {
}
// DeleteCollection deletes a collection of objects.
func (c *roles) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *roles) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("roles").

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/rbac/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type RoleBindingsGetter interface {
type RoleBindingInterface interface {
Create(*v1.RoleBinding) (*v1.RoleBinding, error)
Update(*v1.RoleBinding) (*v1.RoleBinding, 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.RoleBinding, error)
List(opts meta_v1.ListOptions) (*v1.RoleBindingList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.RoleBinding, error)
List(opts metav1.ListOptions) (*v1.RoleBindingList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.RoleBinding, err error)
RoleBindingExpansion
}
@@ -61,7 +61,7 @@ func newRoleBindings(c *RbacV1Client, namespace string) *roleBindings {
}
// Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any.
func (c *roleBindings) Get(name string, options meta_v1.GetOptions) (result *v1.RoleBinding, err error) {
func (c *roleBindings) Get(name string, options metav1.GetOptions) (result *v1.RoleBinding, err error) {
result = &v1.RoleBinding{}
err = c.client.Get().
Namespace(c.ns).
@@ -74,7 +74,7 @@ func (c *roleBindings) Get(name string, options meta_v1.GetOptions) (result *v1.
}
// List takes label and field selectors, and returns the list of RoleBindings that match those selectors.
func (c *roleBindings) List(opts meta_v1.ListOptions) (result *v1.RoleBindingList, err error) {
func (c *roleBindings) List(opts metav1.ListOptions) (result *v1.RoleBindingList, err error) {
result = &v1.RoleBindingList{}
err = c.client.Get().
Namespace(c.ns).
@@ -86,7 +86,7 @@ func (c *roleBindings) List(opts meta_v1.ListOptions) (result *v1.RoleBindingLis
}
// Watch returns a watch.Interface that watches the requested roleBindings.
func (c *roleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *roleBindings) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
@@ -121,7 +121,7 @@ func (c *roleBindings) Update(roleBinding *v1.RoleBinding) (result *v1.RoleBindi
}
// Delete takes name of the roleBinding and deletes it. Returns an error if one occurs.
func (c *roleBindings) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *roleBindings) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("rolebindings").
@@ -132,7 +132,7 @@ func (c *roleBindings) Delete(name string, options *meta_v1.DeleteOptions) error
}
// DeleteCollection deletes a collection of objects.
func (c *roleBindings) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *roleBindings) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("rolebindings").

View File

@@ -19,7 +19,7 @@ limitations under the License.
package fake
import (
storage_v1 "k8s.io/api/storage/v1"
storagev1 "k8s.io/api/storage/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -38,19 +38,19 @@ var storageclassesResource = schema.GroupVersionResource{Group: "storage.k8s.io"
var storageclassesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "StorageClass"}
// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any.
func (c *FakeStorageClasses) Get(name string, options v1.GetOptions) (result *storage_v1.StorageClass, err error) {
func (c *FakeStorageClasses) Get(name string, options v1.GetOptions) (result *storagev1.StorageClass, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(storageclassesResource, name), &storage_v1.StorageClass{})
Invokes(testing.NewRootGetAction(storageclassesResource, name), &storagev1.StorageClass{})
if obj == nil {
return nil, err
}
return obj.(*storage_v1.StorageClass), err
return obj.(*storagev1.StorageClass), err
}
// List takes label and field selectors, and returns the list of StorageClasses that match those selectors.
func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *storage_v1.StorageClassList, err error) {
func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *storagev1.StorageClassList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(storageclassesResource, storageclassesKind, opts), &storage_v1.StorageClassList{})
Invokes(testing.NewRootListAction(storageclassesResource, storageclassesKind, opts), &storagev1.StorageClassList{})
if obj == nil {
return nil, err
}
@@ -59,8 +59,8 @@ func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *storage_v1.Stora
if label == nil {
label = labels.Everything()
}
list := &storage_v1.StorageClassList{ListMeta: obj.(*storage_v1.StorageClassList).ListMeta}
for _, item := range obj.(*storage_v1.StorageClassList).Items {
list := &storagev1.StorageClassList{ListMeta: obj.(*storagev1.StorageClassList).ListMeta}
for _, item := range obj.(*storagev1.StorageClassList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
@@ -75,29 +75,29 @@ func (c *FakeStorageClasses) Watch(opts v1.ListOptions) (watch.Interface, error)
}
// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any.
func (c *FakeStorageClasses) Create(storageClass *storage_v1.StorageClass) (result *storage_v1.StorageClass, err error) {
func (c *FakeStorageClasses) Create(storageClass *storagev1.StorageClass) (result *storagev1.StorageClass, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(storageclassesResource, storageClass), &storage_v1.StorageClass{})
Invokes(testing.NewRootCreateAction(storageclassesResource, storageClass), &storagev1.StorageClass{})
if obj == nil {
return nil, err
}
return obj.(*storage_v1.StorageClass), err
return obj.(*storagev1.StorageClass), err
}
// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any.
func (c *FakeStorageClasses) Update(storageClass *storage_v1.StorageClass) (result *storage_v1.StorageClass, err error) {
func (c *FakeStorageClasses) Update(storageClass *storagev1.StorageClass) (result *storagev1.StorageClass, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &storage_v1.StorageClass{})
Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &storagev1.StorageClass{})
if obj == nil {
return nil, err
}
return obj.(*storage_v1.StorageClass), err
return obj.(*storagev1.StorageClass), err
}
// Delete takes name of the storageClass and deletes it. Returns an error if one occurs.
func (c *FakeStorageClasses) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(storageclassesResource, name), &storage_v1.StorageClass{})
Invokes(testing.NewRootDeleteAction(storageclassesResource, name), &storagev1.StorageClass{})
return err
}
@@ -105,16 +105,16 @@ func (c *FakeStorageClasses) Delete(name string, options *v1.DeleteOptions) erro
func (c *FakeStorageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(storageclassesResource, listOptions)
_, err := c.Fake.Invokes(action, &storage_v1.StorageClassList{})
_, err := c.Fake.Invokes(action, &storagev1.StorageClassList{})
return err
}
// Patch applies the patch and returns the patched storageClass.
func (c *FakeStorageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage_v1.StorageClass, err error) {
func (c *FakeStorageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storagev1.StorageClass, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, data, subresources...), &storage_v1.StorageClass{})
Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, data, subresources...), &storagev1.StorageClass{})
if obj == nil {
return nil, err
}
return obj.(*storage_v1.StorageClass), err
return obj.(*storagev1.StorageClass), err
}

View File

@@ -20,7 +20,7 @@ package v1
import (
v1 "k8s.io/api/storage/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
@@ -37,11 +37,11 @@ type StorageClassesGetter interface {
type StorageClassInterface interface {
Create(*v1.StorageClass) (*v1.StorageClass, error)
Update(*v1.StorageClass) (*v1.StorageClass, 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.StorageClass, error)
List(opts meta_v1.ListOptions) (*v1.StorageClassList, error)
Watch(opts meta_v1.ListOptions) (watch.Interface, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
Get(name string, options metav1.GetOptions) (*v1.StorageClass, error)
List(opts metav1.ListOptions) (*v1.StorageClassList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error)
StorageClassExpansion
}
@@ -59,7 +59,7 @@ func newStorageClasses(c *StorageV1Client) *storageClasses {
}
// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any.
func (c *storageClasses) Get(name string, options meta_v1.GetOptions) (result *v1.StorageClass, err error) {
func (c *storageClasses) Get(name string, options metav1.GetOptions) (result *v1.StorageClass, err error) {
result = &v1.StorageClass{}
err = c.client.Get().
Resource("storageclasses").
@@ -71,7 +71,7 @@ func (c *storageClasses) Get(name string, options meta_v1.GetOptions) (result *v
}
// List takes label and field selectors, and returns the list of StorageClasses that match those selectors.
func (c *storageClasses) List(opts meta_v1.ListOptions) (result *v1.StorageClassList, err error) {
func (c *storageClasses) List(opts metav1.ListOptions) (result *v1.StorageClassList, err error) {
result = &v1.StorageClassList{}
err = c.client.Get().
Resource("storageclasses").
@@ -82,7 +82,7 @@ func (c *storageClasses) List(opts meta_v1.ListOptions) (result *v1.StorageClass
}
// Watch returns a watch.Interface that watches the requested storageClasses.
func (c *storageClasses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) {
func (c *storageClasses) Watch(opts metav1.ListOptions) (watch.Interface, error) {
opts.Watch = true
return c.client.Get().
Resource("storageclasses").
@@ -114,7 +114,7 @@ func (c *storageClasses) Update(storageClass *v1.StorageClass) (result *v1.Stora
}
// Delete takes name of the storageClass and deletes it. Returns an error if one occurs.
func (c *storageClasses) Delete(name string, options *meta_v1.DeleteOptions) error {
func (c *storageClasses) Delete(name string, options *metav1.DeleteOptions) error {
return c.client.Delete().
Resource("storageclasses").
Name(name).
@@ -124,7 +124,7 @@ func (c *storageClasses) Delete(name string, options *meta_v1.DeleteOptions) err
}
// DeleteCollection deletes a collection of objects.
func (c *storageClasses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error {
func (c *storageClasses) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return c.client.Delete().
Resource("storageclasses").
VersionedParams(&listOptions, scheme.ParameterCodec).