mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-25 22:51:40 +00:00
Drop batch/v2alpha1 API
Kubernetes-commit: 3dab7462d1ff6e20f7efe38249dd9958e4e32c89
This commit is contained in:
parent
df50762b9f
commit
d6cefbd7a0
@ -21,7 +21,6 @@ package batch
|
|||||||
import (
|
import (
|
||||||
v1 "k8s.io/client-go/informers/batch/v1"
|
v1 "k8s.io/client-go/informers/batch/v1"
|
||||||
v1beta1 "k8s.io/client-go/informers/batch/v1beta1"
|
v1beta1 "k8s.io/client-go/informers/batch/v1beta1"
|
||||||
v2alpha1 "k8s.io/client-go/informers/batch/v2alpha1"
|
|
||||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -31,8 +30,6 @@ type Interface interface {
|
|||||||
V1() v1.Interface
|
V1() v1.Interface
|
||||||
// V1beta1 provides access to shared informers for resources in V1beta1.
|
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||||
V1beta1() v1beta1.Interface
|
V1beta1() v1beta1.Interface
|
||||||
// V2alpha1 provides access to shared informers for resources in V2alpha1.
|
|
||||||
V2alpha1() v2alpha1.Interface
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type group struct {
|
type group struct {
|
||||||
@ -55,8 +52,3 @@ func (g *group) V1() v1.Interface {
|
|||||||
func (g *group) V1beta1() v1beta1.Interface {
|
func (g *group) V1beta1() v1beta1.Interface {
|
||||||
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
|
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
// V2alpha1 returns a new v2alpha1.Interface.
|
|
||||||
func (g *group) V2alpha1() v2alpha1.Interface {
|
|
||||||
return v2alpha1.New(g.factory, g.namespace, g.tweakListOptions)
|
|
||||||
}
|
|
||||||
|
@ -1,90 +0,0 @@
|
|||||||
/*
|
|
||||||
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 informer-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v2alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
time "time"
|
|
||||||
|
|
||||||
batchv2alpha1 "k8s.io/api/batch/v2alpha1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
|
||||||
kubernetes "k8s.io/client-go/kubernetes"
|
|
||||||
v2alpha1 "k8s.io/client-go/listers/batch/v2alpha1"
|
|
||||||
cache "k8s.io/client-go/tools/cache"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CronJobInformer provides access to a shared informer and lister for
|
|
||||||
// CronJobs.
|
|
||||||
type CronJobInformer interface {
|
|
||||||
Informer() cache.SharedIndexInformer
|
|
||||||
Lister() v2alpha1.CronJobLister
|
|
||||||
}
|
|
||||||
|
|
||||||
type cronJobInformer struct {
|
|
||||||
factory internalinterfaces.SharedInformerFactory
|
|
||||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
|
||||||
namespace string
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewCronJobInformer constructs a new informer for CronJob type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewCronJobInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredCronJobInformer(client, namespace, resyncPeriod, indexers, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewFilteredCronJobInformer constructs a new informer for CronJob type.
|
|
||||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
|
||||||
// one. This reduces memory footprint and number of connections to the server.
|
|
||||||
func NewFilteredCronJobInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
|
||||||
return cache.NewSharedIndexInformer(
|
|
||||||
&cache.ListWatch{
|
|
||||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.BatchV2alpha1().CronJobs(namespace).List(context.TODO(), options)
|
|
||||||
},
|
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.BatchV2alpha1().CronJobs(namespace).Watch(context.TODO(), options)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
&batchv2alpha1.CronJob{},
|
|
||||||
resyncPeriod,
|
|
||||||
indexers,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *cronJobInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredCronJobInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *cronJobInformer) Informer() cache.SharedIndexInformer {
|
|
||||||
return f.factory.InformerFor(&batchv2alpha1.CronJob{}, f.defaultInformer)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *cronJobInformer) Lister() v2alpha1.CronJobLister {
|
|
||||||
return v2alpha1.NewCronJobLister(f.Informer().GetIndexer())
|
|
||||||
}
|
|
@ -1,45 +0,0 @@
|
|||||||
/*
|
|
||||||
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 informer-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v2alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Interface provides access to all the informers in this group version.
|
|
||||||
type Interface interface {
|
|
||||||
// CronJobs returns a CronJobInformer.
|
|
||||||
CronJobs() CronJobInformer
|
|
||||||
}
|
|
||||||
|
|
||||||
type version struct {
|
|
||||||
factory internalinterfaces.SharedInformerFactory
|
|
||||||
namespace string
|
|
||||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
|
||||||
}
|
|
||||||
|
|
||||||
// New returns a new Interface.
|
|
||||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
|
||||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
|
||||||
}
|
|
||||||
|
|
||||||
// CronJobs returns a CronJobInformer.
|
|
||||||
func (v *version) CronJobs() CronJobInformer {
|
|
||||||
return &cronJobInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
|
||||||
}
|
|
@ -32,7 +32,6 @@ import (
|
|||||||
v2beta2 "k8s.io/api/autoscaling/v2beta2"
|
v2beta2 "k8s.io/api/autoscaling/v2beta2"
|
||||||
batchv1 "k8s.io/api/batch/v1"
|
batchv1 "k8s.io/api/batch/v1"
|
||||||
batchv1beta1 "k8s.io/api/batch/v1beta1"
|
batchv1beta1 "k8s.io/api/batch/v1beta1"
|
||||||
v2alpha1 "k8s.io/api/batch/v2alpha1"
|
|
||||||
certificatesv1 "k8s.io/api/certificates/v1"
|
certificatesv1 "k8s.io/api/certificates/v1"
|
||||||
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||||
coordinationv1 "k8s.io/api/coordination/v1"
|
coordinationv1 "k8s.io/api/coordination/v1"
|
||||||
@ -154,10 +153,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||||||
case batchv1beta1.SchemeGroupVersion.WithResource("cronjobs"):
|
case batchv1beta1.SchemeGroupVersion.WithResource("cronjobs"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1beta1().CronJobs().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1beta1().CronJobs().Informer()}, nil
|
||||||
|
|
||||||
// Group=batch, Version=v2alpha1
|
|
||||||
case v2alpha1.SchemeGroupVersion.WithResource("cronjobs"):
|
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().CronJobs().Informer()}, nil
|
|
||||||
|
|
||||||
// Group=certificates.k8s.io, Version=v1
|
// Group=certificates.k8s.io, Version=v1
|
||||||
case certificatesv1.SchemeGroupVersion.WithResource("certificatesigningrequests"):
|
case certificatesv1.SchemeGroupVersion.WithResource("certificatesigningrequests"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1().CertificateSigningRequests().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1().CertificateSigningRequests().Informer()}, nil
|
||||||
|
@ -37,7 +37,6 @@ import (
|
|||||||
autoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2"
|
autoscalingv2beta2 "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2"
|
||||||
batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
|
batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
|
||||||
batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
|
batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
|
||||||
batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
|
|
||||||
certificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1"
|
certificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1"
|
||||||
certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
|
certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
|
||||||
coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1"
|
coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1"
|
||||||
@ -86,7 +85,6 @@ type Interface interface {
|
|||||||
AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface
|
AutoscalingV2beta2() autoscalingv2beta2.AutoscalingV2beta2Interface
|
||||||
BatchV1() batchv1.BatchV1Interface
|
BatchV1() batchv1.BatchV1Interface
|
||||||
BatchV1beta1() batchv1beta1.BatchV1beta1Interface
|
BatchV1beta1() batchv1beta1.BatchV1beta1Interface
|
||||||
BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface
|
|
||||||
CertificatesV1() certificatesv1.CertificatesV1Interface
|
CertificatesV1() certificatesv1.CertificatesV1Interface
|
||||||
CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface
|
CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface
|
||||||
CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface
|
CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface
|
||||||
@ -135,7 +133,6 @@ type Clientset struct {
|
|||||||
autoscalingV2beta2 *autoscalingv2beta2.AutoscalingV2beta2Client
|
autoscalingV2beta2 *autoscalingv2beta2.AutoscalingV2beta2Client
|
||||||
batchV1 *batchv1.BatchV1Client
|
batchV1 *batchv1.BatchV1Client
|
||||||
batchV1beta1 *batchv1beta1.BatchV1beta1Client
|
batchV1beta1 *batchv1beta1.BatchV1beta1Client
|
||||||
batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client
|
|
||||||
certificatesV1 *certificatesv1.CertificatesV1Client
|
certificatesV1 *certificatesv1.CertificatesV1Client
|
||||||
certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client
|
certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client
|
||||||
coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client
|
coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client
|
||||||
@ -240,11 +237,6 @@ func (c *Clientset) BatchV1beta1() batchv1beta1.BatchV1beta1Interface {
|
|||||||
return c.batchV1beta1
|
return c.batchV1beta1
|
||||||
}
|
}
|
||||||
|
|
||||||
// BatchV2alpha1 retrieves the BatchV2alpha1Client
|
|
||||||
func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
|
|
||||||
return c.batchV2alpha1
|
|
||||||
}
|
|
||||||
|
|
||||||
// CertificatesV1 retrieves the CertificatesV1Client
|
// CertificatesV1 retrieves the CertificatesV1Client
|
||||||
func (c *Clientset) CertificatesV1() certificatesv1.CertificatesV1Interface {
|
func (c *Clientset) CertificatesV1() certificatesv1.CertificatesV1Interface {
|
||||||
return c.certificatesV1
|
return c.certificatesV1
|
||||||
@ -461,10 +453,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
cs.batchV2alpha1, err = batchv2alpha1.NewForConfig(&configShallowCopy)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
cs.certificatesV1, err = certificatesv1.NewForConfig(&configShallowCopy)
|
cs.certificatesV1, err = certificatesv1.NewForConfig(&configShallowCopy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -600,7 +588,6 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
|||||||
cs.autoscalingV2beta2 = autoscalingv2beta2.NewForConfigOrDie(c)
|
cs.autoscalingV2beta2 = autoscalingv2beta2.NewForConfigOrDie(c)
|
||||||
cs.batchV1 = batchv1.NewForConfigOrDie(c)
|
cs.batchV1 = batchv1.NewForConfigOrDie(c)
|
||||||
cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c)
|
cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c)
|
||||||
cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c)
|
|
||||||
cs.certificatesV1 = certificatesv1.NewForConfigOrDie(c)
|
cs.certificatesV1 = certificatesv1.NewForConfigOrDie(c)
|
||||||
cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c)
|
cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c)
|
||||||
cs.coordinationV1beta1 = coordinationv1beta1.NewForConfigOrDie(c)
|
cs.coordinationV1beta1 = coordinationv1beta1.NewForConfigOrDie(c)
|
||||||
@ -651,7 +638,6 @@ func New(c rest.Interface) *Clientset {
|
|||||||
cs.autoscalingV2beta2 = autoscalingv2beta2.New(c)
|
cs.autoscalingV2beta2 = autoscalingv2beta2.New(c)
|
||||||
cs.batchV1 = batchv1.New(c)
|
cs.batchV1 = batchv1.New(c)
|
||||||
cs.batchV1beta1 = batchv1beta1.New(c)
|
cs.batchV1beta1 = batchv1beta1.New(c)
|
||||||
cs.batchV2alpha1 = batchv2alpha1.New(c)
|
|
||||||
cs.certificatesV1 = certificatesv1.New(c)
|
cs.certificatesV1 = certificatesv1.New(c)
|
||||||
cs.certificatesV1beta1 = certificatesv1beta1.New(c)
|
cs.certificatesV1beta1 = certificatesv1beta1.New(c)
|
||||||
cs.coordinationV1beta1 = coordinationv1beta1.New(c)
|
cs.coordinationV1beta1 = coordinationv1beta1.New(c)
|
||||||
|
@ -54,8 +54,6 @@ import (
|
|||||||
fakebatchv1 "k8s.io/client-go/kubernetes/typed/batch/v1/fake"
|
fakebatchv1 "k8s.io/client-go/kubernetes/typed/batch/v1/fake"
|
||||||
batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
|
batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
|
||||||
fakebatchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake"
|
fakebatchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake"
|
||||||
batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
|
|
||||||
fakebatchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake"
|
|
||||||
certificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1"
|
certificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1"
|
||||||
fakecertificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1/fake"
|
fakecertificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1/fake"
|
||||||
certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
|
certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
|
||||||
@ -235,11 +233,6 @@ func (c *Clientset) BatchV1beta1() batchv1beta1.BatchV1beta1Interface {
|
|||||||
return &fakebatchv1beta1.FakeBatchV1beta1{Fake: &c.Fake}
|
return &fakebatchv1beta1.FakeBatchV1beta1{Fake: &c.Fake}
|
||||||
}
|
}
|
||||||
|
|
||||||
// BatchV2alpha1 retrieves the BatchV2alpha1Client
|
|
||||||
func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
|
|
||||||
return &fakebatchv2alpha1.FakeBatchV2alpha1{Fake: &c.Fake}
|
|
||||||
}
|
|
||||||
|
|
||||||
// CertificatesV1 retrieves the CertificatesV1Client
|
// CertificatesV1 retrieves the CertificatesV1Client
|
||||||
func (c *Clientset) CertificatesV1() certificatesv1.CertificatesV1Interface {
|
func (c *Clientset) CertificatesV1() certificatesv1.CertificatesV1Interface {
|
||||||
return &fakecertificatesv1.FakeCertificatesV1{Fake: &c.Fake}
|
return &fakecertificatesv1.FakeCertificatesV1{Fake: &c.Fake}
|
||||||
|
@ -34,7 +34,6 @@ import (
|
|||||||
autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
|
autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
|
||||||
batchv1 "k8s.io/api/batch/v1"
|
batchv1 "k8s.io/api/batch/v1"
|
||||||
batchv1beta1 "k8s.io/api/batch/v1beta1"
|
batchv1beta1 "k8s.io/api/batch/v1beta1"
|
||||||
batchv2alpha1 "k8s.io/api/batch/v2alpha1"
|
|
||||||
certificatesv1 "k8s.io/api/certificates/v1"
|
certificatesv1 "k8s.io/api/certificates/v1"
|
||||||
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||||
coordinationv1 "k8s.io/api/coordination/v1"
|
coordinationv1 "k8s.io/api/coordination/v1"
|
||||||
@ -88,7 +87,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
|||||||
autoscalingv2beta2.AddToScheme,
|
autoscalingv2beta2.AddToScheme,
|
||||||
batchv1.AddToScheme,
|
batchv1.AddToScheme,
|
||||||
batchv1beta1.AddToScheme,
|
batchv1beta1.AddToScheme,
|
||||||
batchv2alpha1.AddToScheme,
|
|
||||||
certificatesv1.AddToScheme,
|
certificatesv1.AddToScheme,
|
||||||
certificatesv1beta1.AddToScheme,
|
certificatesv1beta1.AddToScheme,
|
||||||
coordinationv1beta1.AddToScheme,
|
coordinationv1beta1.AddToScheme,
|
||||||
|
@ -34,7 +34,6 @@ import (
|
|||||||
autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
|
autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
|
||||||
batchv1 "k8s.io/api/batch/v1"
|
batchv1 "k8s.io/api/batch/v1"
|
||||||
batchv1beta1 "k8s.io/api/batch/v1beta1"
|
batchv1beta1 "k8s.io/api/batch/v1beta1"
|
||||||
batchv2alpha1 "k8s.io/api/batch/v2alpha1"
|
|
||||||
certificatesv1 "k8s.io/api/certificates/v1"
|
certificatesv1 "k8s.io/api/certificates/v1"
|
||||||
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||||
coordinationv1 "k8s.io/api/coordination/v1"
|
coordinationv1 "k8s.io/api/coordination/v1"
|
||||||
@ -88,7 +87,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
|||||||
autoscalingv2beta2.AddToScheme,
|
autoscalingv2beta2.AddToScheme,
|
||||||
batchv1.AddToScheme,
|
batchv1.AddToScheme,
|
||||||
batchv1beta1.AddToScheme,
|
batchv1beta1.AddToScheme,
|
||||||
batchv2alpha1.AddToScheme,
|
|
||||||
certificatesv1.AddToScheme,
|
certificatesv1.AddToScheme,
|
||||||
certificatesv1beta1.AddToScheme,
|
certificatesv1beta1.AddToScheme,
|
||||||
coordinationv1beta1.AddToScheme,
|
coordinationv1beta1.AddToScheme,
|
||||||
|
@ -1,89 +0,0 @@
|
|||||||
/*
|
|
||||||
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 v2alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v2alpha1 "k8s.io/api/batch/v2alpha1"
|
|
||||||
"k8s.io/client-go/kubernetes/scheme"
|
|
||||||
rest "k8s.io/client-go/rest"
|
|
||||||
)
|
|
||||||
|
|
||||||
type BatchV2alpha1Interface interface {
|
|
||||||
RESTClient() rest.Interface
|
|
||||||
CronJobsGetter
|
|
||||||
}
|
|
||||||
|
|
||||||
// BatchV2alpha1Client is used to interact with features provided by the batch group.
|
|
||||||
type BatchV2alpha1Client struct {
|
|
||||||
restClient rest.Interface
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *BatchV2alpha1Client) CronJobs(namespace string) CronJobInterface {
|
|
||||||
return newCronJobs(c, namespace)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewForConfig creates a new BatchV2alpha1Client for the given config.
|
|
||||||
func NewForConfig(c *rest.Config) (*BatchV2alpha1Client, error) {
|
|
||||||
config := *c
|
|
||||||
if err := setConfigDefaults(&config); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
client, err := rest.RESTClientFor(&config)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return &BatchV2alpha1Client{client}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewForConfigOrDie creates a new BatchV2alpha1Client for the given config and
|
|
||||||
// panics if there is an error in the config.
|
|
||||||
func NewForConfigOrDie(c *rest.Config) *BatchV2alpha1Client {
|
|
||||||
client, err := NewForConfig(c)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
return client
|
|
||||||
}
|
|
||||||
|
|
||||||
// New creates a new BatchV2alpha1Client for the given RESTClient.
|
|
||||||
func New(c rest.Interface) *BatchV2alpha1Client {
|
|
||||||
return &BatchV2alpha1Client{c}
|
|
||||||
}
|
|
||||||
|
|
||||||
func setConfigDefaults(config *rest.Config) error {
|
|
||||||
gv := v2alpha1.SchemeGroupVersion
|
|
||||||
config.GroupVersion = &gv
|
|
||||||
config.APIPath = "/apis"
|
|
||||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
|
||||||
|
|
||||||
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 *BatchV2alpha1Client) RESTClient() rest.Interface {
|
|
||||||
if c == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return c.restClient
|
|
||||||
}
|
|
@ -1,195 +0,0 @@
|
|||||||
/*
|
|
||||||
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 v2alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
v2alpha1 "k8s.io/api/batch/v2alpha1"
|
|
||||||
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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CronJobsGetter has a method to return a CronJobInterface.
|
|
||||||
// A group's client should implement this interface.
|
|
||||||
type CronJobsGetter interface {
|
|
||||||
CronJobs(namespace string) CronJobInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
// CronJobInterface has methods to work with CronJob resources.
|
|
||||||
type CronJobInterface interface {
|
|
||||||
Create(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.CreateOptions) (*v2alpha1.CronJob, error)
|
|
||||||
Update(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, error)
|
|
||||||
UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, error)
|
|
||||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
|
||||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
|
||||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CronJob, error)
|
|
||||||
List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CronJobList, error)
|
|
||||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
|
||||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CronJob, err error)
|
|
||||||
CronJobExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// cronJobs implements CronJobInterface
|
|
||||||
type cronJobs struct {
|
|
||||||
client rest.Interface
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
// newCronJobs returns a CronJobs
|
|
||||||
func newCronJobs(c *BatchV2alpha1Client, namespace string) *cronJobs {
|
|
||||||
return &cronJobs{
|
|
||||||
client: c.RESTClient(),
|
|
||||||
ns: namespace,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
|
|
||||||
func (c *cronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) {
|
|
||||||
result = &v2alpha1.CronJob{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("cronjobs").
|
|
||||||
Name(name).
|
|
||||||
VersionedParams(&options, scheme.ParameterCodec).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
|
|
||||||
func (c *cronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
|
|
||||||
var timeout time.Duration
|
|
||||||
if opts.TimeoutSeconds != nil {
|
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
|
||||||
}
|
|
||||||
result = &v2alpha1.CronJobList{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("cronjobs").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested cronJobs.
|
|
||||||
func (c *cronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
|
||||||
var timeout time.Duration
|
|
||||||
if opts.TimeoutSeconds != nil {
|
|
||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
|
||||||
}
|
|
||||||
opts.Watch = true
|
|
||||||
return c.client.Get().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("cronjobs").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Watch(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any.
|
|
||||||
func (c *cronJobs) Create(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.CreateOptions) (result *v2alpha1.CronJob, err error) {
|
|
||||||
result = &v2alpha1.CronJob{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("cronjobs").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(cronJob).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
|
|
||||||
func (c *cronJobs) Update(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (result *v2alpha1.CronJob, err error) {
|
|
||||||
result = &v2alpha1.CronJob{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("cronjobs").
|
|
||||||
Name(cronJob.Name).
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(cronJob).
|
|
||||||
Do(ctx).
|
|
||||||
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 *cronJobs) UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (result *v2alpha1.CronJob, err error) {
|
|
||||||
result = &v2alpha1.CronJob{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("cronjobs").
|
|
||||||
Name(cronJob.Name).
|
|
||||||
SubResource("status").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(cronJob).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *cronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
|
||||||
return c.client.Delete().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("cronjobs").
|
|
||||||
Name(name).
|
|
||||||
Body(&opts).
|
|
||||||
Do(ctx).
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *cronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
|
||||||
var timeout time.Duration
|
|
||||||
if listOpts.TimeoutSeconds != nil {
|
|
||||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
|
||||||
}
|
|
||||||
return c.client.Delete().
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("cronjobs").
|
|
||||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
|
||||||
Timeout(timeout).
|
|
||||||
Body(&opts).
|
|
||||||
Do(ctx).
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched cronJob.
|
|
||||||
func (c *cronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CronJob, err error) {
|
|
||||||
result = &v2alpha1.CronJob{}
|
|
||||||
err = c.client.Patch(pt).
|
|
||||||
Namespace(c.ns).
|
|
||||||
Resource("cronjobs").
|
|
||||||
Name(name).
|
|
||||||
SubResource(subresources...).
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Body(data).
|
|
||||||
Do(ctx).
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
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 v2alpha1
|
|
@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
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
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
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 (
|
|
||||||
v2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1"
|
|
||||||
rest "k8s.io/client-go/rest"
|
|
||||||
testing "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
type FakeBatchV2alpha1 struct {
|
|
||||||
*testing.Fake
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeBatchV2alpha1) CronJobs(namespace string) v2alpha1.CronJobInterface {
|
|
||||||
return &FakeCronJobs{c, namespace}
|
|
||||||
}
|
|
||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
|
||||||
// with API server by this client implementation.
|
|
||||||
func (c *FakeBatchV2alpha1) RESTClient() rest.Interface {
|
|
||||||
var ret *rest.RESTClient
|
|
||||||
return ret
|
|
||||||
}
|
|
@ -1,142 +0,0 @@
|
|||||||
/*
|
|
||||||
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 (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
v2alpha1 "k8s.io/api/batch/v2alpha1"
|
|
||||||
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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakeCronJobs implements CronJobInterface
|
|
||||||
type FakeCronJobs struct {
|
|
||||||
Fake *FakeBatchV2alpha1
|
|
||||||
ns string
|
|
||||||
}
|
|
||||||
|
|
||||||
var cronjobsResource = schema.GroupVersionResource{Group: "batch", Version: "v2alpha1", Resource: "cronjobs"}
|
|
||||||
|
|
||||||
var cronjobsKind = schema.GroupVersionKind{Group: "batch", Version: "v2alpha1", Kind: "CronJob"}
|
|
||||||
|
|
||||||
// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
|
|
||||||
func (c *FakeCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.CronJob, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewGetAction(cronjobsResource, c.ns, name), &v2alpha1.CronJob{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v2alpha1.CronJob), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
|
|
||||||
func (c *FakeCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.CronJobList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewListAction(cronjobsResource, cronjobsKind, c.ns, opts), &v2alpha1.CronJobList{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &v2alpha1.CronJobList{ListMeta: obj.(*v2alpha1.CronJobList).ListMeta}
|
|
||||||
for _, item := range obj.(*v2alpha1.CronJobList).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 cronJobs.
|
|
||||||
func (c *FakeCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(testing.NewWatchAction(cronjobsResource, c.ns, opts))
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any.
|
|
||||||
func (c *FakeCronJobs) Create(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.CreateOptions) (result *v2alpha1.CronJob, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewCreateAction(cronjobsResource, c.ns, cronJob), &v2alpha1.CronJob{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v2alpha1.CronJob), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
|
|
||||||
func (c *FakeCronJobs) Update(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (result *v2alpha1.CronJob, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateAction(cronjobsResource, c.ns, cronJob), &v2alpha1.CronJob{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v2alpha1.CronJob), 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 *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v2alpha1.CronJob, opts v1.UpdateOptions) (*v2alpha1.CronJob, error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), &v2alpha1.CronJob{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v2alpha1.CronJob), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the cronJob and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *FakeCronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(testing.NewDeleteAction(cronjobsResource, c.ns, name), &v2alpha1.CronJob{})
|
|
||||||
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *FakeCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
|
||||||
action := testing.NewDeleteCollectionAction(cronjobsResource, c.ns, listOpts)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v2alpha1.CronJobList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched cronJob.
|
|
||||||
func (c *FakeCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CronJob, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, pt, data, subresources...), &v2alpha1.CronJob{})
|
|
||||||
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v2alpha1.CronJob), err
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
/*
|
|
||||||
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 v2alpha1
|
|
||||||
|
|
||||||
type CronJobExpansion interface{}
|
|
@ -1,99 +0,0 @@
|
|||||||
/*
|
|
||||||
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 lister-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v2alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v2alpha1 "k8s.io/api/batch/v2alpha1"
|
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
|
||||||
"k8s.io/client-go/tools/cache"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CronJobLister helps list CronJobs.
|
|
||||||
// All objects returned here must be treated as read-only.
|
|
||||||
type CronJobLister interface {
|
|
||||||
// List lists all CronJobs in the indexer.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error)
|
|
||||||
// CronJobs returns an object that can list and get CronJobs.
|
|
||||||
CronJobs(namespace string) CronJobNamespaceLister
|
|
||||||
CronJobListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// cronJobLister implements the CronJobLister interface.
|
|
||||||
type cronJobLister struct {
|
|
||||||
indexer cache.Indexer
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewCronJobLister returns a new CronJobLister.
|
|
||||||
func NewCronJobLister(indexer cache.Indexer) CronJobLister {
|
|
||||||
return &cronJobLister{indexer: indexer}
|
|
||||||
}
|
|
||||||
|
|
||||||
// List lists all CronJobs in the indexer.
|
|
||||||
func (s *cronJobLister) List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error) {
|
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
|
||||||
ret = append(ret, m.(*v2alpha1.CronJob))
|
|
||||||
})
|
|
||||||
return ret, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// CronJobs returns an object that can list and get CronJobs.
|
|
||||||
func (s *cronJobLister) CronJobs(namespace string) CronJobNamespaceLister {
|
|
||||||
return cronJobNamespaceLister{indexer: s.indexer, namespace: namespace}
|
|
||||||
}
|
|
||||||
|
|
||||||
// CronJobNamespaceLister helps list and get CronJobs.
|
|
||||||
// All objects returned here must be treated as read-only.
|
|
||||||
type CronJobNamespaceLister interface {
|
|
||||||
// List lists all CronJobs in the indexer for a given namespace.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error)
|
|
||||||
// Get retrieves the CronJob from the indexer for a given namespace and name.
|
|
||||||
// Objects returned here must be treated as read-only.
|
|
||||||
Get(name string) (*v2alpha1.CronJob, error)
|
|
||||||
CronJobNamespaceListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// cronJobNamespaceLister implements the CronJobNamespaceLister
|
|
||||||
// interface.
|
|
||||||
type cronJobNamespaceLister struct {
|
|
||||||
indexer cache.Indexer
|
|
||||||
namespace string
|
|
||||||
}
|
|
||||||
|
|
||||||
// List lists all CronJobs in the indexer for a given namespace.
|
|
||||||
func (s cronJobNamespaceLister) List(selector labels.Selector) (ret []*v2alpha1.CronJob, err error) {
|
|
||||||
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
|
|
||||||
ret = append(ret, m.(*v2alpha1.CronJob))
|
|
||||||
})
|
|
||||||
return ret, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get retrieves the CronJob from the indexer for a given namespace and name.
|
|
||||||
func (s cronJobNamespaceLister) Get(name string) (*v2alpha1.CronJob, error) {
|
|
||||||
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if !exists {
|
|
||||||
return nil, errors.NewNotFound(v2alpha1.Resource("cronjob"), name)
|
|
||||||
}
|
|
||||||
return obj.(*v2alpha1.CronJob), nil
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
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 lister-gen. DO NOT EDIT.
|
|
||||||
|
|
||||||
package v2alpha1
|
|
||||||
|
|
||||||
// CronJobListerExpansion allows custom methods to be added to
|
|
||||||
// CronJobLister.
|
|
||||||
type CronJobListerExpansion interface{}
|
|
||||||
|
|
||||||
// CronJobNamespaceListerExpansion allows custom methods to be added to
|
|
||||||
// CronJobNamespaceLister.
|
|
||||||
type CronJobNamespaceListerExpansion interface{}
|
|
Loading…
Reference in New Issue
Block a user