Update vendored dependencies

This commit is contained in:
Christian Huffman
2020-07-23 15:19:22 -04:00
parent 547e88e4fb
commit bda8f8c0ae
909 changed files with 119096 additions and 130549 deletions

View File

@@ -27,7 +27,7 @@ import (
"time"
"github.com/golang/protobuf/proto"
openapi_v2 "github.com/googleapis/gnostic/OpenAPIv2"
openapi_v2 "github.com/googleapis/gnostic/openapiv2"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

View File

@@ -19,7 +19,7 @@ package fake
import (
"fmt"
"github.com/googleapis/gnostic/OpenAPIv2"
openapi_v2 "github.com/googleapis/gnostic/openapiv2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"

View File

@@ -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 informer-gen. DO NOT EDIT.
package v1alpha1
import (
"context"
time "time"
auditregistrationv1alpha1 "k8s.io/api/auditregistration/v1alpha1"
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"
v1alpha1 "k8s.io/client-go/listers/auditregistration/v1alpha1"
cache "k8s.io/client-go/tools/cache"
)
// AuditSinkInformer provides access to a shared informer and lister for
// AuditSinks.
type AuditSinkInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.AuditSinkLister
}
type auditSinkInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewAuditSinkInformer constructs a new informer for AuditSink 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 NewAuditSinkInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredAuditSinkInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredAuditSinkInformer constructs a new informer for AuditSink 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 NewFilteredAuditSinkInformer(client kubernetes.Interface, 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.AuditregistrationV1alpha1().AuditSinks().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.AuditregistrationV1alpha1().AuditSinks().Watch(context.TODO(), options)
},
},
&auditregistrationv1alpha1.AuditSink{},
resyncPeriod,
indexers,
)
}
func (f *auditSinkInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredAuditSinkInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *auditSinkInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&auditregistrationv1alpha1.AuditSink{}, f.defaultInformer)
}
func (f *auditSinkInformer) Lister() v1alpha1.AuditSinkLister {
return v1alpha1.NewAuditSinkLister(f.Informer().GetIndexer())
}

View File

@@ -19,12 +19,15 @@ limitations under the License.
package certificates
import (
v1 "k8s.io/client-go/informers/certificates/v1"
v1beta1 "k8s.io/client-go/informers/certificates/v1beta1"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
)
// Interface provides access to each of this group's versions.
type Interface interface {
// V1 provides access to shared informers for resources in V1.
V1() v1.Interface
// V1beta1 provides access to shared informers for resources in V1beta1.
V1beta1() v1beta1.Interface
}
@@ -40,6 +43,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// V1 returns a new v1.Interface.
func (g *group) V1() v1.Interface {
return v1.New(g.factory, g.namespace, g.tweakListOptions)
}
// V1beta1 returns a new v1beta1.Interface.
func (g *group) V1beta1() v1beta1.Interface {
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)

View File

@@ -0,0 +1,89 @@
/*
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 v1
import (
"context"
time "time"
certificatesv1 "k8s.io/api/certificates/v1"
metav1 "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"
v1 "k8s.io/client-go/listers/certificates/v1"
cache "k8s.io/client-go/tools/cache"
)
// CertificateSigningRequestInformer provides access to a shared informer and lister for
// CertificateSigningRequests.
type CertificateSigningRequestInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1.CertificateSigningRequestLister
}
type certificateSigningRequestInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewCertificateSigningRequestInformer constructs a new informer for CertificateSigningRequest 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 NewCertificateSigningRequestInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredCertificateSigningRequestInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredCertificateSigningRequestInformer constructs a new informer for CertificateSigningRequest 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 NewFilteredCertificateSigningRequestInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CertificatesV1().CertificateSigningRequests().List(context.TODO(), options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.CertificatesV1().CertificateSigningRequests().Watch(context.TODO(), options)
},
},
&certificatesv1.CertificateSigningRequest{},
resyncPeriod,
indexers,
)
}
func (f *certificateSigningRequestInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredCertificateSigningRequestInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *certificateSigningRequestInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&certificatesv1.CertificateSigningRequest{}, f.defaultInformer)
}
func (f *certificateSigningRequestInformer) Lister() v1.CertificateSigningRequestLister {
return v1.NewCertificateSigningRequestLister(f.Informer().GetIndexer())
}

View File

@@ -16,20 +16,19 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT.
package auditregistration
package v1
import (
v1alpha1 "k8s.io/client-go/informers/auditregistration/v1alpha1"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
)
// Interface provides access to each of this group's versions.
// Interface provides access to all the informers in this group version.
type Interface interface {
// V1alpha1 provides access to shared informers for resources in V1alpha1.
V1alpha1() v1alpha1.Interface
// CertificateSigningRequests returns a CertificateSigningRequestInformer.
CertificateSigningRequests() CertificateSigningRequestInformer
}
type group struct {
type version struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
@@ -37,10 +36,10 @@ type group struct {
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// V1alpha1 returns a new v1alpha1.Interface.
func (g *group) V1alpha1() v1alpha1.Interface {
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
// CertificateSigningRequests returns a CertificateSigningRequestInformer.
func (v *version) CertificateSigningRequests() CertificateSigningRequestInformer {
return &certificateSigningRequestInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}

View File

@@ -19,12 +19,15 @@ limitations under the License.
package events
import (
v1 "k8s.io/client-go/informers/events/v1"
v1beta1 "k8s.io/client-go/informers/events/v1beta1"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
)
// Interface provides access to each of this group's versions.
type Interface interface {
// V1 provides access to shared informers for resources in V1.
V1() v1.Interface
// V1beta1 provides access to shared informers for resources in V1beta1.
V1beta1() v1beta1.Interface
}
@@ -40,6 +43,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// V1 returns a new v1.Interface.
func (g *group) V1() v1.Interface {
return v1.New(g.factory, g.namespace, g.tweakListOptions)
}
// V1beta1 returns a new v1beta1.Interface.
func (g *group) V1beta1() v1beta1.Interface {
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)

90
vendor/k8s.io/client-go/informers/events/v1/event.go generated vendored Normal file
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 informer-gen. DO NOT EDIT.
package v1
import (
"context"
time "time"
eventsv1 "k8s.io/api/events/v1"
metav1 "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"
v1 "k8s.io/client-go/listers/events/v1"
cache "k8s.io/client-go/tools/cache"
)
// EventInformer provides access to a shared informer and lister for
// Events.
type EventInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1.EventLister
}
type eventInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewEventInformer constructs a new informer for Event 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 NewEventInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredEventInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredEventInformer constructs a new informer for Event 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 NewFilteredEventInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.EventsV1().Events(namespace).List(context.TODO(), options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.EventsV1().Events(namespace).Watch(context.TODO(), options)
},
},
&eventsv1.Event{},
resyncPeriod,
indexers,
)
}
func (f *eventInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredEventInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *eventInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&eventsv1.Event{}, f.defaultInformer)
}
func (f *eventInformer) Lister() v1.EventLister {
return v1.NewEventLister(f.Informer().GetIndexer())
}

View File

@@ -16,7 +16,7 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
package v1
import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
@@ -24,8 +24,8 @@ import (
// Interface provides access to all the informers in this group version.
type Interface interface {
// AuditSinks returns a AuditSinkInformer.
AuditSinks() AuditSinkInformer
// Events returns a EventInformer.
Events() EventInformer
}
type version struct {
@@ -39,7 +39,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// AuditSinks returns a AuditSinkInformer.
func (v *version) AuditSinks() AuditSinkInformer {
return &auditSinkInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
// Events returns a EventInformer.
func (v *version) Events() EventInformer {
return &eventInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View File

@@ -28,7 +28,6 @@ import (
schema "k8s.io/apimachinery/pkg/runtime/schema"
admissionregistration "k8s.io/client-go/informers/admissionregistration"
apps "k8s.io/client-go/informers/apps"
auditregistration "k8s.io/client-go/informers/auditregistration"
autoscaling "k8s.io/client-go/informers/autoscaling"
batch "k8s.io/client-go/informers/batch"
certificates "k8s.io/client-go/informers/certificates"
@@ -192,7 +191,6 @@ type SharedInformerFactory interface {
Admissionregistration() admissionregistration.Interface
Apps() apps.Interface
Auditregistration() auditregistration.Interface
Autoscaling() autoscaling.Interface
Batch() batch.Interface
Certificates() certificates.Interface
@@ -219,10 +217,6 @@ func (f *sharedInformerFactory) Apps() apps.Interface {
return apps.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Auditregistration() auditregistration.Interface {
return auditregistration.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Autoscaling() autoscaling.Interface {
return autoscaling.New(f, f.namespace, f.tweakListOptions)
}

View File

@@ -26,19 +26,20 @@ import (
appsv1 "k8s.io/api/apps/v1"
appsv1beta1 "k8s.io/api/apps/v1beta1"
v1beta2 "k8s.io/api/apps/v1beta2"
v1alpha1 "k8s.io/api/auditregistration/v1alpha1"
autoscalingv1 "k8s.io/api/autoscaling/v1"
v2beta1 "k8s.io/api/autoscaling/v2beta1"
v2beta2 "k8s.io/api/autoscaling/v2beta2"
batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1"
v2alpha1 "k8s.io/api/batch/v2alpha1"
certificatesv1 "k8s.io/api/certificates/v1"
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
coordinationv1 "k8s.io/api/coordination/v1"
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
corev1 "k8s.io/api/core/v1"
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
v1alpha1 "k8s.io/api/discovery/v1alpha1"
discoveryv1beta1 "k8s.io/api/discovery/v1beta1"
eventsv1 "k8s.io/api/events/v1"
eventsv1beta1 "k8s.io/api/events/v1beta1"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
@@ -131,10 +132,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case v1beta2.SchemeGroupVersion.WithResource("statefulsets"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta2().StatefulSets().Informer()}, nil
// Group=auditregistration.k8s.io, Version=v1alpha1
case v1alpha1.SchemeGroupVersion.WithResource("auditsinks"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Auditregistration().V1alpha1().AuditSinks().Informer()}, nil
// Group=autoscaling, Version=v1
case autoscalingv1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V1().HorizontalPodAutoscalers().Informer()}, nil
@@ -159,6 +156,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case v2alpha1.SchemeGroupVersion.WithResource("cronjobs"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().CronJobs().Informer()}, nil
// Group=certificates.k8s.io, Version=v1
case certificatesv1.SchemeGroupVersion.WithResource("certificatesigningrequests"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1().CertificateSigningRequests().Informer()}, nil
// Group=certificates.k8s.io, Version=v1beta1
case certificatesv1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1beta1().CertificateSigningRequests().Informer()}, nil
@@ -206,13 +207,17 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ServiceAccounts().Informer()}, nil
// Group=discovery.k8s.io, Version=v1alpha1
case discoveryv1alpha1.SchemeGroupVersion.WithResource("endpointslices"):
case v1alpha1.SchemeGroupVersion.WithResource("endpointslices"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Discovery().V1alpha1().EndpointSlices().Informer()}, nil
// Group=discovery.k8s.io, Version=v1beta1
case discoveryv1beta1.SchemeGroupVersion.WithResource("endpointslices"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Discovery().V1beta1().EndpointSlices().Informer()}, nil
// Group=events.k8s.io, Version=v1
case eventsv1.SchemeGroupVersion.WithResource("events"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Events().V1().Events().Informer()}, nil
// Group=events.k8s.io, Version=v1beta1
case eventsv1beta1.SchemeGroupVersion.WithResource("events"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Events().V1beta1().Events().Informer()}, nil
@@ -238,6 +243,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1alpha1().PriorityLevelConfigurations().Informer()}, nil
// Group=networking.k8s.io, Version=v1
case networkingv1.SchemeGroupVersion.WithResource("ingresses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1().Ingresses().Informer()}, nil
case networkingv1.SchemeGroupVersion.WithResource("ingressclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1().IngressClasses().Informer()}, nil
case networkingv1.SchemeGroupVersion.WithResource("networkpolicies"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1().NetworkPolicies().Informer()}, nil
@@ -318,6 +327,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().VolumeAttachments().Informer()}, nil
// Group=storage.k8s.io, Version=v1alpha1
case storagev1alpha1.SchemeGroupVersion.WithResource("csistoragecapacities"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1alpha1().CSIStorageCapacities().Informer()}, nil
case storagev1alpha1.SchemeGroupVersion.WithResource("volumeattachments"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1alpha1().VolumeAttachments().Informer()}, nil

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 informer-gen. DO NOT EDIT.
package v1
import (
"context"
time "time"
networkingv1 "k8s.io/api/networking/v1"
metav1 "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"
v1 "k8s.io/client-go/listers/networking/v1"
cache "k8s.io/client-go/tools/cache"
)
// IngressInformer provides access to a shared informer and lister for
// Ingresses.
type IngressInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1.IngressLister
}
type ingressInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewIngressInformer constructs a new informer for Ingress 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 NewIngressInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredIngressInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredIngressInformer constructs a new informer for Ingress 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 NewFilteredIngressInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NetworkingV1().Ingresses(namespace).List(context.TODO(), options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NetworkingV1().Ingresses(namespace).Watch(context.TODO(), options)
},
},
&networkingv1.Ingress{},
resyncPeriod,
indexers,
)
}
func (f *ingressInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredIngressInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *ingressInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&networkingv1.Ingress{}, f.defaultInformer)
}
func (f *ingressInformer) Lister() v1.IngressLister {
return v1.NewIngressLister(f.Informer().GetIndexer())
}

View File

@@ -0,0 +1,89 @@
/*
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 v1
import (
"context"
time "time"
networkingv1 "k8s.io/api/networking/v1"
metav1 "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"
v1 "k8s.io/client-go/listers/networking/v1"
cache "k8s.io/client-go/tools/cache"
)
// IngressClassInformer provides access to a shared informer and lister for
// IngressClasses.
type IngressClassInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1.IngressClassLister
}
type ingressClassInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewIngressClassInformer constructs a new informer for IngressClass 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 NewIngressClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredIngressClassInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredIngressClassInformer constructs a new informer for IngressClass 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 NewFilteredIngressClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NetworkingV1().IngressClasses().List(context.TODO(), options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NetworkingV1().IngressClasses().Watch(context.TODO(), options)
},
},
&networkingv1.IngressClass{},
resyncPeriod,
indexers,
)
}
func (f *ingressClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredIngressClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *ingressClassInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&networkingv1.IngressClass{}, f.defaultInformer)
}
func (f *ingressClassInformer) Lister() v1.IngressClassLister {
return v1.NewIngressClassLister(f.Informer().GetIndexer())
}

View File

@@ -24,6 +24,10 @@ import (
// Interface provides access to all the informers in this group version.
type Interface interface {
// Ingresses returns a IngressInformer.
Ingresses() IngressInformer
// IngressClasses returns a IngressClassInformer.
IngressClasses() IngressClassInformer
// NetworkPolicies returns a NetworkPolicyInformer.
NetworkPolicies() NetworkPolicyInformer
}
@@ -39,6 +43,16 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// Ingresses returns a IngressInformer.
func (v *version) Ingresses() IngressInformer {
return &ingressInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// IngressClasses returns a IngressClassInformer.
func (v *version) IngressClasses() IngressClassInformer {
return &ingressClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// NetworkPolicies returns a NetworkPolicyInformer.
func (v *version) NetworkPolicies() NetworkPolicyInformer {
return &networkPolicyInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}

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 informer-gen. DO NOT EDIT.
package v1alpha1
import (
"context"
time "time"
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
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"
v1alpha1 "k8s.io/client-go/listers/storage/v1alpha1"
cache "k8s.io/client-go/tools/cache"
)
// CSIStorageCapacityInformer provides access to a shared informer and lister for
// CSIStorageCapacities.
type CSIStorageCapacityInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.CSIStorageCapacityLister
}
type cSIStorageCapacityInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewCSIStorageCapacityInformer constructs a new informer for CSIStorageCapacity 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 NewCSIStorageCapacityInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredCSIStorageCapacityInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredCSIStorageCapacityInformer constructs a new informer for CSIStorageCapacity 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 NewFilteredCSIStorageCapacityInformer(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.StorageV1alpha1().CSIStorageCapacities(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.StorageV1alpha1().CSIStorageCapacities(namespace).Watch(context.TODO(), options)
},
},
&storagev1alpha1.CSIStorageCapacity{},
resyncPeriod,
indexers,
)
}
func (f *cSIStorageCapacityInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredCSIStorageCapacityInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *cSIStorageCapacityInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&storagev1alpha1.CSIStorageCapacity{}, f.defaultInformer)
}
func (f *cSIStorageCapacityInformer) Lister() v1alpha1.CSIStorageCapacityLister {
return v1alpha1.NewCSIStorageCapacityLister(f.Informer().GetIndexer())
}

View File

@@ -24,6 +24,8 @@ import (
// Interface provides access to all the informers in this group version.
type Interface interface {
// CSIStorageCapacities returns a CSIStorageCapacityInformer.
CSIStorageCapacities() CSIStorageCapacityInformer
// VolumeAttachments returns a VolumeAttachmentInformer.
VolumeAttachments() VolumeAttachmentInformer
}
@@ -39,6 +41,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// CSIStorageCapacities returns a CSIStorageCapacityInformer.
func (v *version) CSIStorageCapacities() CSIStorageCapacityInformer {
return &cSIStorageCapacityInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// VolumeAttachments returns a VolumeAttachmentInformer.
func (v *version) VolumeAttachments() VolumeAttachmentInformer {
return &volumeAttachmentInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}

View File

@@ -27,7 +27,6 @@ import (
appsv1 "k8s.io/client-go/kubernetes/typed/apps/v1"
appsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1"
appsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2"
auditregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1"
authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1"
authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
authorizationv1 "k8s.io/client-go/kubernetes/typed/authorization/v1"
@@ -38,12 +37,14 @@ import (
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"
certificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1"
certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1"
coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1"
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
discoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1"
discoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1"
eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1"
eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1"
@@ -73,7 +74,6 @@ type Interface interface {
AppsV1() appsv1.AppsV1Interface
AppsV1beta1() appsv1beta1.AppsV1beta1Interface
AppsV1beta2() appsv1beta2.AppsV1beta2Interface
AuditregistrationV1alpha1() auditregistrationv1alpha1.AuditregistrationV1alpha1Interface
AuthenticationV1() authenticationv1.AuthenticationV1Interface
AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface
AuthorizationV1() authorizationv1.AuthorizationV1Interface
@@ -84,12 +84,14 @@ type Interface interface {
BatchV1() batchv1.BatchV1Interface
BatchV1beta1() batchv1beta1.BatchV1beta1Interface
BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface
CertificatesV1() certificatesv1.CertificatesV1Interface
CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface
CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface
CoordinationV1() coordinationv1.CoordinationV1Interface
CoreV1() corev1.CoreV1Interface
DiscoveryV1alpha1() discoveryv1alpha1.DiscoveryV1alpha1Interface
DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interface
EventsV1() eventsv1.EventsV1Interface
EventsV1beta1() eventsv1beta1.EventsV1beta1Interface
ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface
@@ -119,7 +121,6 @@ type Clientset struct {
appsV1 *appsv1.AppsV1Client
appsV1beta1 *appsv1beta1.AppsV1beta1Client
appsV1beta2 *appsv1beta2.AppsV1beta2Client
auditregistrationV1alpha1 *auditregistrationv1alpha1.AuditregistrationV1alpha1Client
authenticationV1 *authenticationv1.AuthenticationV1Client
authenticationV1beta1 *authenticationv1beta1.AuthenticationV1beta1Client
authorizationV1 *authorizationv1.AuthorizationV1Client
@@ -130,12 +131,14 @@ type Clientset struct {
batchV1 *batchv1.BatchV1Client
batchV1beta1 *batchv1beta1.BatchV1beta1Client
batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client
certificatesV1 *certificatesv1.CertificatesV1Client
certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client
coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client
coordinationV1 *coordinationv1.CoordinationV1Client
coreV1 *corev1.CoreV1Client
discoveryV1alpha1 *discoveryv1alpha1.DiscoveryV1alpha1Client
discoveryV1beta1 *discoveryv1beta1.DiscoveryV1beta1Client
eventsV1 *eventsv1.EventsV1Client
eventsV1beta1 *eventsv1beta1.EventsV1beta1Client
extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
flowcontrolV1alpha1 *flowcontrolv1alpha1.FlowcontrolV1alpha1Client
@@ -181,11 +184,6 @@ func (c *Clientset) AppsV1beta2() appsv1beta2.AppsV1beta2Interface {
return c.appsV1beta2
}
// AuditregistrationV1alpha1 retrieves the AuditregistrationV1alpha1Client
func (c *Clientset) AuditregistrationV1alpha1() auditregistrationv1alpha1.AuditregistrationV1alpha1Interface {
return c.auditregistrationV1alpha1
}
// AuthenticationV1 retrieves the AuthenticationV1Client
func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface {
return c.authenticationV1
@@ -236,6 +234,11 @@ func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
return c.batchV2alpha1
}
// CertificatesV1 retrieves the CertificatesV1Client
func (c *Clientset) CertificatesV1() certificatesv1.CertificatesV1Interface {
return c.certificatesV1
}
// CertificatesV1beta1 retrieves the CertificatesV1beta1Client
func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface {
return c.certificatesV1beta1
@@ -266,6 +269,11 @@ func (c *Clientset) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interfac
return c.discoveryV1beta1
}
// EventsV1 retrieves the EventsV1Client
func (c *Clientset) EventsV1() eventsv1.EventsV1Interface {
return c.eventsV1
}
// EventsV1beta1 retrieves the EventsV1beta1Client
func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface {
return c.eventsV1beta1
@@ -397,10 +405,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
cs.auditregistrationV1alpha1, err = auditregistrationv1alpha1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.authenticationV1, err = authenticationv1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@@ -441,6 +445,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
cs.certificatesV1, err = certificatesv1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.certificatesV1beta1, err = certificatesv1beta1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@@ -465,6 +473,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
cs.eventsV1, err = eventsv1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.eventsV1beta1, err = eventsv1beta1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@@ -554,7 +566,6 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
cs.appsV1 = appsv1.NewForConfigOrDie(c)
cs.appsV1beta1 = appsv1beta1.NewForConfigOrDie(c)
cs.appsV1beta2 = appsv1beta2.NewForConfigOrDie(c)
cs.auditregistrationV1alpha1 = auditregistrationv1alpha1.NewForConfigOrDie(c)
cs.authenticationV1 = authenticationv1.NewForConfigOrDie(c)
cs.authenticationV1beta1 = authenticationv1beta1.NewForConfigOrDie(c)
cs.authorizationV1 = authorizationv1.NewForConfigOrDie(c)
@@ -565,12 +576,14 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
cs.batchV1 = batchv1.NewForConfigOrDie(c)
cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c)
cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c)
cs.certificatesV1 = certificatesv1.NewForConfigOrDie(c)
cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c)
cs.coordinationV1beta1 = coordinationv1beta1.NewForConfigOrDie(c)
cs.coordinationV1 = coordinationv1.NewForConfigOrDie(c)
cs.coreV1 = corev1.NewForConfigOrDie(c)
cs.discoveryV1alpha1 = discoveryv1alpha1.NewForConfigOrDie(c)
cs.discoveryV1beta1 = discoveryv1beta1.NewForConfigOrDie(c)
cs.eventsV1 = eventsv1.NewForConfigOrDie(c)
cs.eventsV1beta1 = eventsv1beta1.NewForConfigOrDie(c)
cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c)
cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.NewForConfigOrDie(c)
@@ -602,7 +615,6 @@ func New(c rest.Interface) *Clientset {
cs.appsV1 = appsv1.New(c)
cs.appsV1beta1 = appsv1beta1.New(c)
cs.appsV1beta2 = appsv1beta2.New(c)
cs.auditregistrationV1alpha1 = auditregistrationv1alpha1.New(c)
cs.authenticationV1 = authenticationv1.New(c)
cs.authenticationV1beta1 = authenticationv1beta1.New(c)
cs.authorizationV1 = authorizationv1.New(c)
@@ -613,12 +625,14 @@ func New(c rest.Interface) *Clientset {
cs.batchV1 = batchv1.New(c)
cs.batchV1beta1 = batchv1beta1.New(c)
cs.batchV2alpha1 = batchv2alpha1.New(c)
cs.certificatesV1 = certificatesv1.New(c)
cs.certificatesV1beta1 = certificatesv1beta1.New(c)
cs.coordinationV1beta1 = coordinationv1beta1.New(c)
cs.coordinationV1 = coordinationv1.New(c)
cs.coreV1 = corev1.New(c)
cs.discoveryV1alpha1 = discoveryv1alpha1.New(c)
cs.discoveryV1beta1 = discoveryv1beta1.New(c)
cs.eventsV1 = eventsv1.New(c)
cs.eventsV1beta1 = eventsv1beta1.New(c)
cs.extensionsV1beta1 = extensionsv1beta1.New(c)
cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.New(c)

View File

@@ -34,8 +34,6 @@ import (
fakeappsv1beta1 "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake"
appsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2"
fakeappsv1beta2 "k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake"
auditregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1"
fakeauditregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1/fake"
authenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1"
fakeauthenticationv1 "k8s.io/client-go/kubernetes/typed/authentication/v1/fake"
authenticationv1beta1 "k8s.io/client-go/kubernetes/typed/authentication/v1beta1"
@@ -56,6 +54,8 @@ import (
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"
fakecertificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1/fake"
certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
fakecertificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake"
coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1"
@@ -68,6 +68,8 @@ import (
fakediscoveryv1alpha1 "k8s.io/client-go/kubernetes/typed/discovery/v1alpha1/fake"
discoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1"
fakediscoveryv1beta1 "k8s.io/client-go/kubernetes/typed/discovery/v1beta1/fake"
eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1"
fakeeventsv1 "k8s.io/client-go/kubernetes/typed/events/v1/fake"
eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
fakeeventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1/fake"
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
@@ -179,11 +181,6 @@ func (c *Clientset) AppsV1beta2() appsv1beta2.AppsV1beta2Interface {
return &fakeappsv1beta2.FakeAppsV1beta2{Fake: &c.Fake}
}
// AuditregistrationV1alpha1 retrieves the AuditregistrationV1alpha1Client
func (c *Clientset) AuditregistrationV1alpha1() auditregistrationv1alpha1.AuditregistrationV1alpha1Interface {
return &fakeauditregistrationv1alpha1.FakeAuditregistrationV1alpha1{Fake: &c.Fake}
}
// AuthenticationV1 retrieves the AuthenticationV1Client
func (c *Clientset) AuthenticationV1() authenticationv1.AuthenticationV1Interface {
return &fakeauthenticationv1.FakeAuthenticationV1{Fake: &c.Fake}
@@ -234,6 +231,11 @@ func (c *Clientset) BatchV2alpha1() batchv2alpha1.BatchV2alpha1Interface {
return &fakebatchv2alpha1.FakeBatchV2alpha1{Fake: &c.Fake}
}
// CertificatesV1 retrieves the CertificatesV1Client
func (c *Clientset) CertificatesV1() certificatesv1.CertificatesV1Interface {
return &fakecertificatesv1.FakeCertificatesV1{Fake: &c.Fake}
}
// CertificatesV1beta1 retrieves the CertificatesV1beta1Client
func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface {
return &fakecertificatesv1beta1.FakeCertificatesV1beta1{Fake: &c.Fake}
@@ -264,6 +266,11 @@ func (c *Clientset) DiscoveryV1beta1() discoveryv1beta1.DiscoveryV1beta1Interfac
return &fakediscoveryv1beta1.FakeDiscoveryV1beta1{Fake: &c.Fake}
}
// EventsV1 retrieves the EventsV1Client
func (c *Clientset) EventsV1() eventsv1.EventsV1Interface {
return &fakeeventsv1.FakeEventsV1{Fake: &c.Fake}
}
// EventsV1beta1 retrieves the EventsV1beta1Client
func (c *Clientset) EventsV1beta1() eventsv1beta1.EventsV1beta1Interface {
return &fakeeventsv1beta1.FakeEventsV1beta1{Fake: &c.Fake}

View File

@@ -24,7 +24,6 @@ import (
appsv1 "k8s.io/api/apps/v1"
appsv1beta1 "k8s.io/api/apps/v1beta1"
appsv1beta2 "k8s.io/api/apps/v1beta2"
auditregistrationv1alpha1 "k8s.io/api/auditregistration/v1alpha1"
authenticationv1 "k8s.io/api/authentication/v1"
authenticationv1beta1 "k8s.io/api/authentication/v1beta1"
authorizationv1 "k8s.io/api/authorization/v1"
@@ -35,12 +34,14 @@ import (
batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1"
batchv2alpha1 "k8s.io/api/batch/v2alpha1"
certificatesv1 "k8s.io/api/certificates/v1"
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
coordinationv1 "k8s.io/api/coordination/v1"
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
corev1 "k8s.io/api/core/v1"
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
discoveryv1beta1 "k8s.io/api/discovery/v1beta1"
eventsv1 "k8s.io/api/events/v1"
eventsv1beta1 "k8s.io/api/events/v1beta1"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
@@ -68,14 +69,13 @@ import (
var scheme = runtime.NewScheme()
var codecs = serializer.NewCodecFactory(scheme)
var parameterCodec = runtime.NewParameterCodec(scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
admissionregistrationv1.AddToScheme,
admissionregistrationv1beta1.AddToScheme,
appsv1.AddToScheme,
appsv1beta1.AddToScheme,
appsv1beta2.AddToScheme,
auditregistrationv1alpha1.AddToScheme,
authenticationv1.AddToScheme,
authenticationv1beta1.AddToScheme,
authorizationv1.AddToScheme,
@@ -86,12 +86,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
batchv1.AddToScheme,
batchv1beta1.AddToScheme,
batchv2alpha1.AddToScheme,
certificatesv1.AddToScheme,
certificatesv1beta1.AddToScheme,
coordinationv1beta1.AddToScheme,
coordinationv1.AddToScheme,
corev1.AddToScheme,
discoveryv1alpha1.AddToScheme,
discoveryv1beta1.AddToScheme,
eventsv1.AddToScheme,
eventsv1beta1.AddToScheme,
extensionsv1beta1.AddToScheme,
flowcontrolv1alpha1.AddToScheme,

View File

@@ -24,7 +24,6 @@ import (
appsv1 "k8s.io/api/apps/v1"
appsv1beta1 "k8s.io/api/apps/v1beta1"
appsv1beta2 "k8s.io/api/apps/v1beta2"
auditregistrationv1alpha1 "k8s.io/api/auditregistration/v1alpha1"
authenticationv1 "k8s.io/api/authentication/v1"
authenticationv1beta1 "k8s.io/api/authentication/v1beta1"
authorizationv1 "k8s.io/api/authorization/v1"
@@ -35,12 +34,14 @@ import (
batchv1 "k8s.io/api/batch/v1"
batchv1beta1 "k8s.io/api/batch/v1beta1"
batchv2alpha1 "k8s.io/api/batch/v2alpha1"
certificatesv1 "k8s.io/api/certificates/v1"
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
coordinationv1 "k8s.io/api/coordination/v1"
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
corev1 "k8s.io/api/core/v1"
discoveryv1alpha1 "k8s.io/api/discovery/v1alpha1"
discoveryv1beta1 "k8s.io/api/discovery/v1beta1"
eventsv1 "k8s.io/api/events/v1"
eventsv1beta1 "k8s.io/api/events/v1beta1"
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
@@ -75,7 +76,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{
appsv1.AddToScheme,
appsv1beta1.AddToScheme,
appsv1beta2.AddToScheme,
auditregistrationv1alpha1.AddToScheme,
authenticationv1.AddToScheme,
authenticationv1beta1.AddToScheme,
authorizationv1.AddToScheme,
@@ -86,12 +86,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
batchv1.AddToScheme,
batchv1beta1.AddToScheme,
batchv2alpha1.AddToScheme,
certificatesv1.AddToScheme,
certificatesv1beta1.AddToScheme,
coordinationv1beta1.AddToScheme,
coordinationv1.AddToScheme,
corev1.AddToScheme,
discoveryv1alpha1.AddToScheme,
discoveryv1beta1.AddToScheme,
eventsv1.AddToScheme,
eventsv1beta1.AddToScheme,
extensionsv1beta1.AddToScheme,
flowcontrolv1alpha1.AddToScheme,

View File

@@ -1,168 +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 v1alpha1
import (
"context"
"time"
v1alpha1 "k8s.io/api/auditregistration/v1alpha1"
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"
)
// AuditSinksGetter has a method to return a AuditSinkInterface.
// A group's client should implement this interface.
type AuditSinksGetter interface {
AuditSinks() AuditSinkInterface
}
// AuditSinkInterface has methods to work with AuditSink resources.
type AuditSinkInterface interface {
Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (*v1alpha1.AuditSink, error)
Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (*v1alpha1.AuditSink, 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) (*v1alpha1.AuditSink, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AuditSinkList, 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 *v1alpha1.AuditSink, err error)
AuditSinkExpansion
}
// auditSinks implements AuditSinkInterface
type auditSinks struct {
client rest.Interface
}
// newAuditSinks returns a AuditSinks
func newAuditSinks(c *AuditregistrationV1alpha1Client) *auditSinks {
return &auditSinks{
client: c.RESTClient(),
}
}
// Get takes name of the auditSink, and returns the corresponding auditSink object, and an error if there is any.
func (c *auditSinks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AuditSink, err error) {
result = &v1alpha1.AuditSink{}
err = c.client.Get().
Resource("auditsinks").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of AuditSinks that match those selectors.
func (c *auditSinks) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.AuditSinkList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.AuditSinkList{}
err = c.client.Get().
Resource("auditsinks").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested auditSinks.
func (c *auditSinks) 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().
Resource("auditsinks").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a auditSink and creates it. Returns the server's representation of the auditSink, and an error, if there is any.
func (c *auditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (result *v1alpha1.AuditSink, err error) {
result = &v1alpha1.AuditSink{}
err = c.client.Post().
Resource("auditsinks").
VersionedParams(&opts, scheme.ParameterCodec).
Body(auditSink).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a auditSink and updates it. Returns the server's representation of the auditSink, and an error, if there is any.
func (c *auditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (result *v1alpha1.AuditSink, err error) {
result = &v1alpha1.AuditSink{}
err = c.client.Put().
Resource("auditsinks").
Name(auditSink.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(auditSink).
Do(ctx).
Into(result)
return
}
// Delete takes name of the auditSink and deletes it. Returns an error if one occurs.
func (c *auditSinks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("auditsinks").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *auditSinks) 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().
Resource("auditsinks").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched auditSink.
func (c *auditSinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AuditSink, err error) {
result = &v1alpha1.AuditSink{}
err = c.client.Patch(pt).
Resource("auditsinks").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@@ -1,122 +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"
v1alpha1 "k8s.io/api/auditregistration/v1alpha1"
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"
)
// FakeAuditSinks implements AuditSinkInterface
type FakeAuditSinks struct {
Fake *FakeAuditregistrationV1alpha1
}
var auditsinksResource = schema.GroupVersionResource{Group: "auditregistration.k8s.io", Version: "v1alpha1", Resource: "auditsinks"}
var auditsinksKind = schema.GroupVersionKind{Group: "auditregistration.k8s.io", Version: "v1alpha1", Kind: "AuditSink"}
// Get takes name of the auditSink, and returns the corresponding auditSink object, and an error if there is any.
func (c *FakeAuditSinks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AuditSink, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(auditsinksResource, name), &v1alpha1.AuditSink{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.AuditSink), err
}
// List takes label and field selectors, and returns the list of AuditSinks that match those selectors.
func (c *FakeAuditSinks) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.AuditSinkList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(auditsinksResource, auditsinksKind, opts), &v1alpha1.AuditSinkList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.AuditSinkList{ListMeta: obj.(*v1alpha1.AuditSinkList).ListMeta}
for _, item := range obj.(*v1alpha1.AuditSinkList).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 auditSinks.
func (c *FakeAuditSinks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(auditsinksResource, opts))
}
// Create takes the representation of a auditSink and creates it. Returns the server's representation of the auditSink, and an error, if there is any.
func (c *FakeAuditSinks) Create(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.CreateOptions) (result *v1alpha1.AuditSink, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(auditsinksResource, auditSink), &v1alpha1.AuditSink{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.AuditSink), err
}
// Update takes the representation of a auditSink and updates it. Returns the server's representation of the auditSink, and an error, if there is any.
func (c *FakeAuditSinks) Update(ctx context.Context, auditSink *v1alpha1.AuditSink, opts v1.UpdateOptions) (result *v1alpha1.AuditSink, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(auditsinksResource, auditSink), &v1alpha1.AuditSink{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.AuditSink), err
}
// Delete takes name of the auditSink and deletes it. Returns an error if one occurs.
func (c *FakeAuditSinks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(auditsinksResource, name), &v1alpha1.AuditSink{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeAuditSinks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(auditsinksResource, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.AuditSinkList{})
return err
}
// Patch applies the patch and returns the patched auditSink.
func (c *FakeAuditSinks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AuditSink, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(auditsinksResource, name, pt, data, subresources...), &v1alpha1.AuditSink{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.AuditSink), err
}

View File

@@ -16,30 +16,30 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
package v1
import (
v1alpha1 "k8s.io/api/auditregistration/v1alpha1"
v1 "k8s.io/api/certificates/v1"
"k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
type AuditregistrationV1alpha1Interface interface {
type CertificatesV1Interface interface {
RESTClient() rest.Interface
AuditSinksGetter
CertificateSigningRequestsGetter
}
// AuditregistrationV1alpha1Client is used to interact with features provided by the auditregistration.k8s.io group.
type AuditregistrationV1alpha1Client struct {
// CertificatesV1Client is used to interact with features provided by the certificates.k8s.io group.
type CertificatesV1Client struct {
restClient rest.Interface
}
func (c *AuditregistrationV1alpha1Client) AuditSinks() AuditSinkInterface {
return newAuditSinks(c)
func (c *CertificatesV1Client) CertificateSigningRequests() CertificateSigningRequestInterface {
return newCertificateSigningRequests(c)
}
// NewForConfig creates a new AuditregistrationV1alpha1Client for the given config.
func NewForConfig(c *rest.Config) (*AuditregistrationV1alpha1Client, error) {
// NewForConfig creates a new CertificatesV1Client for the given config.
func NewForConfig(c *rest.Config) (*CertificatesV1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
@@ -48,12 +48,12 @@ func NewForConfig(c *rest.Config) (*AuditregistrationV1alpha1Client, error) {
if err != nil {
return nil, err
}
return &AuditregistrationV1alpha1Client{client}, nil
return &CertificatesV1Client{client}, nil
}
// NewForConfigOrDie creates a new AuditregistrationV1alpha1Client for the given config and
// NewForConfigOrDie creates a new CertificatesV1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *AuditregistrationV1alpha1Client {
func NewForConfigOrDie(c *rest.Config) *CertificatesV1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
@@ -61,13 +61,13 @@ func NewForConfigOrDie(c *rest.Config) *AuditregistrationV1alpha1Client {
return client
}
// New creates a new AuditregistrationV1alpha1Client for the given RESTClient.
func New(c rest.Interface) *AuditregistrationV1alpha1Client {
return &AuditregistrationV1alpha1Client{c}
// New creates a new CertificatesV1Client for the given RESTClient.
func New(c rest.Interface) *CertificatesV1Client {
return &CertificatesV1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1alpha1.SchemeGroupVersion
gv := v1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
@@ -81,7 +81,7 @@ func setConfigDefaults(config *rest.Config) error {
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *AuditregistrationV1alpha1Client) RESTClient() rest.Interface {
func (c *CertificatesV1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}

View File

@@ -0,0 +1,200 @@
/*
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 v1
import (
"context"
"time"
v1 "k8s.io/api/certificates/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"
rest "k8s.io/client-go/rest"
)
// CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface.
// A group's client should implement this interface.
type CertificateSigningRequestsGetter interface {
CertificateSigningRequests() CertificateSigningRequestInterface
}
// CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources.
type CertificateSigningRequestInterface interface {
Create(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.CreateOptions) (*v1.CertificateSigningRequest, error)
Update(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (*v1.CertificateSigningRequest, error)
UpdateStatus(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (*v1.CertificateSigningRequest, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CertificateSigningRequest, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.CertificateSigningRequestList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CertificateSigningRequest, err error)
UpdateApproval(ctx context.Context, certificateSigningRequestName string, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (*v1.CertificateSigningRequest, error)
CertificateSigningRequestExpansion
}
// certificateSigningRequests implements CertificateSigningRequestInterface
type certificateSigningRequests struct {
client rest.Interface
}
// newCertificateSigningRequests returns a CertificateSigningRequests
func newCertificateSigningRequests(c *CertificatesV1Client) *certificateSigningRequests {
return &certificateSigningRequests{
client: c.RESTClient(),
}
}
// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any.
func (c *certificateSigningRequests) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CertificateSigningRequest, err error) {
result = &v1.CertificateSigningRequest{}
err = c.client.Get().
Resource("certificatesigningrequests").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors.
func (c *certificateSigningRequests) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CertificateSigningRequestList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.CertificateSigningRequestList{}
err = c.client.Get().
Resource("certificatesigningrequests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested certificateSigningRequests.
func (c *certificateSigningRequests) Watch(ctx context.Context, opts metav1.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().
Resource("certificatesigningrequests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
func (c *certificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.CreateOptions) (result *v1.CertificateSigningRequest, err error) {
result = &v1.CertificateSigningRequest{}
err = c.client.Post().
Resource("certificatesigningrequests").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificateSigningRequest).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
func (c *certificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (result *v1.CertificateSigningRequest, err error) {
result = &v1.CertificateSigningRequest{}
err = c.client.Put().
Resource("certificatesigningrequests").
Name(certificateSigningRequest.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificateSigningRequest).
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 *certificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (result *v1.CertificateSigningRequest, err error) {
result = &v1.CertificateSigningRequest{}
err = c.client.Put().
Resource("certificatesigningrequests").
Name(certificateSigningRequest.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificateSigningRequest).
Do(ctx).
Into(result)
return
}
// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs.
func (c *certificateSigningRequests) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Resource("certificatesigningrequests").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *certificateSigningRequests) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("certificatesigningrequests").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched certificateSigningRequest.
func (c *certificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CertificateSigningRequest, err error) {
result = &v1.CertificateSigningRequest{}
err = c.client.Patch(pt).
Resource("certificatesigningrequests").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
// UpdateApproval takes the top resource name and the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
func (c *certificateSigningRequests) UpdateApproval(ctx context.Context, certificateSigningRequestName string, certificateSigningRequest *v1.CertificateSigningRequest, opts metav1.UpdateOptions) (result *v1.CertificateSigningRequest, err error) {
result = &v1.CertificateSigningRequest{}
err = c.client.Put().
Resource("certificatesigningrequests").
Name(certificateSigningRequestName).
SubResource("approval").
VersionedParams(&opts, scheme.ParameterCodec).
Body(certificateSigningRequest).
Do(ctx).
Into(result)
return
}

View File

@@ -17,4 +17,4 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1alpha1
package v1

View File

@@ -19,22 +19,22 @@ limitations under the License.
package fake
import (
v1alpha1 "k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1"
v1 "k8s.io/client-go/kubernetes/typed/certificates/v1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeAuditregistrationV1alpha1 struct {
type FakeCertificatesV1 struct {
*testing.Fake
}
func (c *FakeAuditregistrationV1alpha1) AuditSinks() v1alpha1.AuditSinkInterface {
return &FakeAuditSinks{c}
func (c *FakeCertificatesV1) CertificateSigningRequests() v1.CertificateSigningRequestInterface {
return &FakeCertificateSigningRequests{c}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeAuditregistrationV1alpha1) RESTClient() rest.Interface {
func (c *FakeCertificatesV1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@@ -0,0 +1,143 @@
/*
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"
certificatesv1 "k8s.io/api/certificates/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeCertificateSigningRequests implements CertificateSigningRequestInterface
type FakeCertificateSigningRequests struct {
Fake *FakeCertificatesV1
}
var certificatesigningrequestsResource = schema.GroupVersionResource{Group: "certificates.k8s.io", Version: "v1", Resource: "certificatesigningrequests"}
var certificatesigningrequestsKind = schema.GroupVersionKind{Group: "certificates.k8s.io", Version: "v1", Kind: "CertificateSigningRequest"}
// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any.
func (c *FakeCertificateSigningRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *certificatesv1.CertificateSigningRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(certificatesigningrequestsResource, name), &certificatesv1.CertificateSigningRequest{})
if obj == nil {
return nil, err
}
return obj.(*certificatesv1.CertificateSigningRequest), err
}
// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors.
func (c *FakeCertificateSigningRequests) List(ctx context.Context, opts v1.ListOptions) (result *certificatesv1.CertificateSigningRequestList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(certificatesigningrequestsResource, certificatesigningrequestsKind, opts), &certificatesv1.CertificateSigningRequestList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &certificatesv1.CertificateSigningRequestList{ListMeta: obj.(*certificatesv1.CertificateSigningRequestList).ListMeta}
for _, item := range obj.(*certificatesv1.CertificateSigningRequestList).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 certificateSigningRequests.
func (c *FakeCertificateSigningRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(certificatesigningrequestsResource, opts))
}
// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
func (c *FakeCertificateSigningRequests) Create(ctx context.Context, certificateSigningRequest *certificatesv1.CertificateSigningRequest, opts v1.CreateOptions) (result *certificatesv1.CertificateSigningRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &certificatesv1.CertificateSigningRequest{})
if obj == nil {
return nil, err
}
return obj.(*certificatesv1.CertificateSigningRequest), err
}
// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
func (c *FakeCertificateSigningRequests) Update(ctx context.Context, certificateSigningRequest *certificatesv1.CertificateSigningRequest, opts v1.UpdateOptions) (result *certificatesv1.CertificateSigningRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &certificatesv1.CertificateSigningRequest{})
if obj == nil {
return nil, err
}
return obj.(*certificatesv1.CertificateSigningRequest), 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 *FakeCertificateSigningRequests) UpdateStatus(ctx context.Context, certificateSigningRequest *certificatesv1.CertificateSigningRequest, opts v1.UpdateOptions) (*certificatesv1.CertificateSigningRequest, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &certificatesv1.CertificateSigningRequest{})
if obj == nil {
return nil, err
}
return obj.(*certificatesv1.CertificateSigningRequest), err
}
// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs.
func (c *FakeCertificateSigningRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(certificatesigningrequestsResource, name), &certificatesv1.CertificateSigningRequest{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCertificateSigningRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOpts)
_, err := c.Fake.Invokes(action, &certificatesv1.CertificateSigningRequestList{})
return err
}
// Patch applies the patch and returns the patched certificateSigningRequest.
func (c *FakeCertificateSigningRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *certificatesv1.CertificateSigningRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, pt, data, subresources...), &certificatesv1.CertificateSigningRequest{})
if obj == nil {
return nil, err
}
return obj.(*certificatesv1.CertificateSigningRequest), err
}
// UpdateApproval takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any.
func (c *FakeCertificateSigningRequests) UpdateApproval(ctx context.Context, certificateSigningRequestName string, certificateSigningRequest *certificatesv1.CertificateSigningRequest, opts v1.UpdateOptions) (result *certificatesv1.CertificateSigningRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "approval", certificateSigningRequest), &certificatesv1.CertificateSigningRequest{})
if obj == nil {
return nil, err
}
return obj.(*certificatesv1.CertificateSigningRequest), 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 v1
type CertificateSigningRequestExpansion interface{}

View File

@@ -18,11 +18,17 @@ package fake
import (
"context"
"fmt"
"io/ioutil"
"net/http"
"strings"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
policy "k8s.io/api/policy/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes/scheme"
restclient "k8s.io/client-go/rest"
fakerest "k8s.io/client-go/rest/fake"
core "k8s.io/client-go/testing"
)
@@ -57,7 +63,19 @@ func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Requ
action.Value = opts
_, _ = c.Fake.Invokes(action, &v1.Pod{})
return &restclient.Request{}
fakeClient := &fakerest.RESTClient{
Client: fakerest.CreateHTTPClient(func(request *http.Request) (*http.Response, error) {
resp := &http.Response{
StatusCode: http.StatusOK,
Body: ioutil.NopCloser(strings.NewReader("fake logs")),
}
return resp, nil
}),
NegotiatedSerializer: scheme.Codecs.WithoutConversion(),
GroupVersion: podsKind.GroupVersion(),
VersionedAPIPath: fmt.Sprintf("/api/v1/namespaces/%s/pods/%s/log", c.ns, name),
}
return fakeClient.Request()
}
func (c *FakePods) Evict(ctx context.Context, eviction *policy.Eviction) error {
@@ -71,3 +89,7 @@ func (c *FakePods) Evict(ctx context.Context, eviction *policy.Eviction) error {
_, err := c.Fake.Invokes(action, eviction)
return err
}
func (c *FakePods) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper {
return c.Fake.InvokesProxy(core.NewProxyGetAction(podsResource, c.ns, scheme, name, port, path, params))
}

View File

@@ -22,6 +22,7 @@ import (
v1 "k8s.io/api/core/v1"
policy "k8s.io/api/policy/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/net"
"k8s.io/client-go/kubernetes/scheme"
restclient "k8s.io/client-go/rest"
)
@@ -31,6 +32,7 @@ type PodExpansion interface {
Bind(ctx context.Context, binding *v1.Binding, opts metav1.CreateOptions) error
Evict(ctx context.Context, eviction *policy.Eviction) error
GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request
ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper
}
// Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored).
@@ -46,3 +48,17 @@ func (c *pods) Evict(ctx context.Context, eviction *policy.Eviction) error {
func (c *pods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Request {
return c.client.Get().Namespace(c.ns).Name(name).Resource("pods").SubResource("log").VersionedParams(opts, scheme.ParameterCodec)
}
// ProxyGet returns a response of the pod by calling it through the proxy.
func (c *pods) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper {
request := c.client.Get().
Namespace(c.ns).
Resource("pods").
SubResource("proxy").
Name(net.JoinSchemeNamePort(scheme, name, port)).
Suffix(path)
for k, v := range params {
request = request.Param(k, v)
}
return request
}

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 v1

View File

@@ -0,0 +1,178 @@
/*
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 v1
import (
"context"
"time"
v1 "k8s.io/api/events/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"
rest "k8s.io/client-go/rest"
)
// EventsGetter has a method to return a EventInterface.
// A group's client should implement this interface.
type EventsGetter interface {
Events(namespace string) EventInterface
}
// EventInterface has methods to work with Event resources.
type EventInterface interface {
Create(ctx context.Context, event *v1.Event, opts metav1.CreateOptions) (*v1.Event, error)
Update(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (*v1.Event, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Event, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.EventList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Event, err error)
EventExpansion
}
// events implements EventInterface
type events struct {
client rest.Interface
ns string
}
// newEvents returns a Events
func newEvents(c *EventsV1Client, namespace string) *events {
return &events{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
func (c *events) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Event, err error) {
result = &v1.Event{}
err = c.client.Get().
Namespace(c.ns).
Resource("events").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Events that match those selectors.
func (c *events) List(ctx context.Context, opts metav1.ListOptions) (result *v1.EventList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.EventList{}
err = c.client.Get().
Namespace(c.ns).
Resource("events").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(ctx context.Context, opts metav1.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("events").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// 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 *events) Create(ctx context.Context, event *v1.Event, opts metav1.CreateOptions) (result *v1.Event, err error) {
result = &v1.Event{}
err = c.client.Post().
Namespace(c.ns).
Resource("events").
VersionedParams(&opts, scheme.ParameterCodec).
Body(event).
Do(ctx).
Into(result)
return
}
// 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 *events) Update(ctx context.Context, event *v1.Event, opts metav1.UpdateOptions) (result *v1.Event, err error) {
result = &v1.Event{}
err = c.client.Put().
Namespace(c.ns).
Resource("events").
Name(event.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(event).
Do(ctx).
Into(result)
return
}
// Delete takes name of the event and deletes it. Returns an error if one occurs.
func (c *events) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("events").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *events) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.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("events").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched event.
func (c *events) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Event, err error) {
result = &v1.Event{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("events").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@@ -0,0 +1,89 @@
/*
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 v1
import (
v1 "k8s.io/api/events/v1"
"k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
type EventsV1Interface interface {
RESTClient() rest.Interface
EventsGetter
}
// EventsV1Client is used to interact with features provided by the events.k8s.io group.
type EventsV1Client struct {
restClient rest.Interface
}
func (c *EventsV1Client) Events(namespace string) EventInterface {
return newEvents(c, namespace)
}
// NewForConfig creates a new EventsV1Client for the given config.
func NewForConfig(c *rest.Config) (*EventsV1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &EventsV1Client{client}, nil
}
// NewForConfigOrDie creates a new EventsV1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *EventsV1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new EventsV1Client for the given RESTClient.
func New(c rest.Interface) *EventsV1Client {
return &EventsV1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1.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 *EventsV1Client) 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.
// Package fake has the automatically generated clients.
package fake

View File

@@ -0,0 +1,130 @@
/*
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"
eventsv1 "k8s.io/api/events/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeEvents implements EventInterface
type FakeEvents struct {
Fake *FakeEventsV1
ns string
}
var eventsResource = schema.GroupVersionResource{Group: "events.k8s.io", Version: "v1", Resource: "events"}
var eventsKind = schema.GroupVersionKind{Group: "events.k8s.io", 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(ctx context.Context, name string, options v1.GetOptions) (result *eventsv1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(eventsResource, c.ns, name), &eventsv1.Event{})
if obj == nil {
return nil, err
}
return obj.(*eventsv1.Event), err
}
// List takes label and field selectors, and returns the list of Events that match those selectors.
func (c *FakeEvents) List(ctx context.Context, opts v1.ListOptions) (result *eventsv1.EventList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &eventsv1.EventList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &eventsv1.EventList{ListMeta: obj.(*eventsv1.EventList).ListMeta}
for _, item := range obj.(*eventsv1.EventList).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 events.
func (c *FakeEvents) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(eventsResource, c.ns, opts))
}
// 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(ctx context.Context, event *eventsv1.Event, opts v1.CreateOptions) (result *eventsv1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &eventsv1.Event{})
if obj == nil {
return nil, err
}
return obj.(*eventsv1.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(ctx context.Context, event *eventsv1.Event, opts v1.UpdateOptions) (result *eventsv1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &eventsv1.Event{})
if obj == nil {
return nil, err
}
return obj.(*eventsv1.Event), err
}
// Delete takes name of the event and deletes it. Returns an error if one occurs.
func (c *FakeEvents) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(eventsResource, c.ns, name), &eventsv1.Event{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeEvents) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &eventsv1.EventList{})
return err
}
// Patch applies the patch and returns the patched event.
func (c *FakeEvents) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *eventsv1.Event, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, pt, data, subresources...), &eventsv1.Event{})
if obj == nil {
return nil, err
}
return obj.(*eventsv1.Event), err
}

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 (
v1 "k8s.io/client-go/kubernetes/typed/events/v1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeEventsV1 struct {
*testing.Fake
}
func (c *FakeEventsV1) Events(namespace string) v1.EventInterface {
return &FakeEvents{c, namespace}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeEventsV1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@@ -16,6 +16,6 @@ limitations under the License.
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
package v1
type AuditSinkExpansion interface{}
type EventExpansion interface{}

View File

@@ -0,0 +1,142 @@
/*
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"
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"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeIngresses implements IngressInterface
type FakeIngresses struct {
Fake *FakeNetworkingV1
ns string
}
var ingressesResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1", Resource: "ingresses"}
var ingressesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "Ingress"}
// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any.
func (c *FakeIngresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *networkingv1.Ingress, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(ingressesResource, c.ns, name), &networkingv1.Ingress{})
if obj == nil {
return nil, err
}
return obj.(*networkingv1.Ingress), err
}
// List takes label and field selectors, and returns the list of Ingresses that match those selectors.
func (c *FakeIngresses) List(ctx context.Context, opts v1.ListOptions) (result *networkingv1.IngressList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(ingressesResource, ingressesKind, c.ns, opts), &networkingv1.IngressList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &networkingv1.IngressList{ListMeta: obj.(*networkingv1.IngressList).ListMeta}
for _, item := range obj.(*networkingv1.IngressList).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 ingresses.
func (c *FakeIngresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(ingressesResource, c.ns, opts))
}
// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any.
func (c *FakeIngresses) Create(ctx context.Context, ingress *networkingv1.Ingress, opts v1.CreateOptions) (result *networkingv1.Ingress, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(ingressesResource, c.ns, ingress), &networkingv1.Ingress{})
if obj == nil {
return nil, err
}
return obj.(*networkingv1.Ingress), err
}
// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any.
func (c *FakeIngresses) Update(ctx context.Context, ingress *networkingv1.Ingress, opts v1.UpdateOptions) (result *networkingv1.Ingress, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(ingressesResource, c.ns, ingress), &networkingv1.Ingress{})
if obj == nil {
return nil, err
}
return obj.(*networkingv1.Ingress), 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 *FakeIngresses) UpdateStatus(ctx context.Context, ingress *networkingv1.Ingress, opts v1.UpdateOptions) (*networkingv1.Ingress, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &networkingv1.Ingress{})
if obj == nil {
return nil, err
}
return obj.(*networkingv1.Ingress), err
}
// Delete takes name of the ingress and deletes it. Returns an error if one occurs.
func (c *FakeIngresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(ingressesResource, c.ns, name), &networkingv1.Ingress{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeIngresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(ingressesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &networkingv1.IngressList{})
return err
}
// Patch applies the patch and returns the patched ingress.
func (c *FakeIngresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *networkingv1.Ingress, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(ingressesResource, c.ns, name, pt, data, subresources...), &networkingv1.Ingress{})
if obj == nil {
return nil, err
}
return obj.(*networkingv1.Ingress), err
}

View File

@@ -0,0 +1,122 @@
/*
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"
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"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
)
// FakeIngressClasses implements IngressClassInterface
type FakeIngressClasses struct {
Fake *FakeNetworkingV1
}
var ingressclassesResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1", Resource: "ingressclasses"}
var ingressclassesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "IngressClass"}
// Get takes name of the ingressClass, and returns the corresponding ingressClass object, and an error if there is any.
func (c *FakeIngressClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *networkingv1.IngressClass, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(ingressclassesResource, name), &networkingv1.IngressClass{})
if obj == nil {
return nil, err
}
return obj.(*networkingv1.IngressClass), err
}
// List takes label and field selectors, and returns the list of IngressClasses that match those selectors.
func (c *FakeIngressClasses) List(ctx context.Context, opts v1.ListOptions) (result *networkingv1.IngressClassList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(ingressclassesResource, ingressclassesKind, opts), &networkingv1.IngressClassList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &networkingv1.IngressClassList{ListMeta: obj.(*networkingv1.IngressClassList).ListMeta}
for _, item := range obj.(*networkingv1.IngressClassList).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 ingressClasses.
func (c *FakeIngressClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(ingressclassesResource, opts))
}
// Create takes the representation of a ingressClass and creates it. Returns the server's representation of the ingressClass, and an error, if there is any.
func (c *FakeIngressClasses) Create(ctx context.Context, ingressClass *networkingv1.IngressClass, opts v1.CreateOptions) (result *networkingv1.IngressClass, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(ingressclassesResource, ingressClass), &networkingv1.IngressClass{})
if obj == nil {
return nil, err
}
return obj.(*networkingv1.IngressClass), err
}
// Update takes the representation of a ingressClass and updates it. Returns the server's representation of the ingressClass, and an error, if there is any.
func (c *FakeIngressClasses) Update(ctx context.Context, ingressClass *networkingv1.IngressClass, opts v1.UpdateOptions) (result *networkingv1.IngressClass, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(ingressclassesResource, ingressClass), &networkingv1.IngressClass{})
if obj == nil {
return nil, err
}
return obj.(*networkingv1.IngressClass), err
}
// Delete takes name of the ingressClass and deletes it. Returns an error if one occurs.
func (c *FakeIngressClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteAction(ingressclassesResource, name), &networkingv1.IngressClass{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeIngressClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(ingressclassesResource, listOpts)
_, err := c.Fake.Invokes(action, &networkingv1.IngressClassList{})
return err
}
// Patch applies the patch and returns the patched ingressClass.
func (c *FakeIngressClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *networkingv1.IngressClass, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(ingressclassesResource, name, pt, data, subresources...), &networkingv1.IngressClass{})
if obj == nil {
return nil, err
}
return obj.(*networkingv1.IngressClass), err
}

View File

@@ -28,6 +28,14 @@ type FakeNetworkingV1 struct {
*testing.Fake
}
func (c *FakeNetworkingV1) Ingresses(namespace string) v1.IngressInterface {
return &FakeIngresses{c, namespace}
}
func (c *FakeNetworkingV1) IngressClasses() v1.IngressClassInterface {
return &FakeIngressClasses{c}
}
func (c *FakeNetworkingV1) NetworkPolicies(namespace string) v1.NetworkPolicyInterface {
return &FakeNetworkPolicies{c, namespace}
}

View File

@@ -18,4 +18,8 @@ limitations under the License.
package v1
type IngressExpansion interface{}
type IngressClassExpansion interface{}
type NetworkPolicyExpansion interface{}

View File

@@ -0,0 +1,195 @@
/*
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 v1
import (
"context"
"time"
v1 "k8s.io/api/networking/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"
rest "k8s.io/client-go/rest"
)
// IngressesGetter has a method to return a IngressInterface.
// A group's client should implement this interface.
type IngressesGetter interface {
Ingresses(namespace string) IngressInterface
}
// IngressInterface has methods to work with Ingress resources.
type IngressInterface interface {
Create(ctx context.Context, ingress *v1.Ingress, opts metav1.CreateOptions) (*v1.Ingress, error)
Update(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (*v1.Ingress, error)
UpdateStatus(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (*v1.Ingress, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Ingress, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.IngressList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Ingress, err error)
IngressExpansion
}
// ingresses implements IngressInterface
type ingresses struct {
client rest.Interface
ns string
}
// newIngresses returns a Ingresses
func newIngresses(c *NetworkingV1Client, namespace string) *ingresses {
return &ingresses{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any.
func (c *ingresses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Ingress, err error) {
result = &v1.Ingress{}
err = c.client.Get().
Namespace(c.ns).
Resource("ingresses").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of Ingresses that match those selectors.
func (c *ingresses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IngressList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.IngressList{}
err = c.client.Get().
Namespace(c.ns).
Resource("ingresses").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested ingresses.
func (c *ingresses) Watch(ctx context.Context, opts metav1.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("ingresses").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a ingress and creates it. Returns the server's representation of the ingress, and an error, if there is any.
func (c *ingresses) Create(ctx context.Context, ingress *v1.Ingress, opts metav1.CreateOptions) (result *v1.Ingress, err error) {
result = &v1.Ingress{}
err = c.client.Post().
Namespace(c.ns).
Resource("ingresses").
VersionedParams(&opts, scheme.ParameterCodec).
Body(ingress).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any.
func (c *ingresses) Update(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (result *v1.Ingress, err error) {
result = &v1.Ingress{}
err = c.client.Put().
Namespace(c.ns).
Resource("ingresses").
Name(ingress.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(ingress).
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 *ingresses) UpdateStatus(ctx context.Context, ingress *v1.Ingress, opts metav1.UpdateOptions) (result *v1.Ingress, err error) {
result = &v1.Ingress{}
err = c.client.Put().
Namespace(c.ns).
Resource("ingresses").
Name(ingress.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(ingress).
Do(ctx).
Into(result)
return
}
// Delete takes name of the ingress and deletes it. Returns an error if one occurs.
func (c *ingresses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("ingresses").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *ingresses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.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("ingresses").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched ingress.
func (c *ingresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Ingress, err error) {
result = &v1.Ingress{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("ingresses").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@@ -0,0 +1,168 @@
/*
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 v1
import (
"context"
"time"
v1 "k8s.io/api/networking/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"
rest "k8s.io/client-go/rest"
)
// IngressClassesGetter has a method to return a IngressClassInterface.
// A group's client should implement this interface.
type IngressClassesGetter interface {
IngressClasses() IngressClassInterface
}
// IngressClassInterface has methods to work with IngressClass resources.
type IngressClassInterface interface {
Create(ctx context.Context, ingressClass *v1.IngressClass, opts metav1.CreateOptions) (*v1.IngressClass, error)
Update(ctx context.Context, ingressClass *v1.IngressClass, opts metav1.UpdateOptions) (*v1.IngressClass, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.IngressClass, error)
List(ctx context.Context, opts metav1.ListOptions) (*v1.IngressClassList, error)
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IngressClass, err error)
IngressClassExpansion
}
// ingressClasses implements IngressClassInterface
type ingressClasses struct {
client rest.Interface
}
// newIngressClasses returns a IngressClasses
func newIngressClasses(c *NetworkingV1Client) *ingressClasses {
return &ingressClasses{
client: c.RESTClient(),
}
}
// Get takes name of the ingressClass, and returns the corresponding ingressClass object, and an error if there is any.
func (c *ingressClasses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.IngressClass, err error) {
result = &v1.IngressClass{}
err = c.client.Get().
Resource("ingressclasses").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of IngressClasses that match those selectors.
func (c *ingressClasses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.IngressClassList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.IngressClassList{}
err = c.client.Get().
Resource("ingressclasses").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested ingressClasses.
func (c *ingressClasses) Watch(ctx context.Context, opts metav1.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().
Resource("ingressclasses").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a ingressClass and creates it. Returns the server's representation of the ingressClass, and an error, if there is any.
func (c *ingressClasses) Create(ctx context.Context, ingressClass *v1.IngressClass, opts metav1.CreateOptions) (result *v1.IngressClass, err error) {
result = &v1.IngressClass{}
err = c.client.Post().
Resource("ingressclasses").
VersionedParams(&opts, scheme.ParameterCodec).
Body(ingressClass).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a ingressClass and updates it. Returns the server's representation of the ingressClass, and an error, if there is any.
func (c *ingressClasses) Update(ctx context.Context, ingressClass *v1.IngressClass, opts metav1.UpdateOptions) (result *v1.IngressClass, err error) {
result = &v1.IngressClass{}
err = c.client.Put().
Resource("ingressclasses").
Name(ingressClass.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(ingressClass).
Do(ctx).
Into(result)
return
}
// Delete takes name of the ingressClass and deletes it. Returns an error if one occurs.
func (c *ingressClasses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Resource("ingressclasses").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *ingressClasses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("ingressclasses").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched ingressClass.
func (c *ingressClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.IngressClass, err error) {
result = &v1.IngressClass{}
err = c.client.Patch(pt).
Resource("ingressclasses").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@@ -26,6 +26,8 @@ import (
type NetworkingV1Interface interface {
RESTClient() rest.Interface
IngressesGetter
IngressClassesGetter
NetworkPoliciesGetter
}
@@ -34,6 +36,14 @@ type NetworkingV1Client struct {
restClient rest.Interface
}
func (c *NetworkingV1Client) Ingresses(namespace string) IngressInterface {
return newIngresses(c, namespace)
}
func (c *NetworkingV1Client) IngressClasses() IngressClassInterface {
return newIngressClasses(c)
}
func (c *NetworkingV1Client) NetworkPolicies(namespace string) NetworkPolicyInterface {
return newNetworkPolicies(c, namespace)
}

View File

@@ -0,0 +1,178 @@
/*
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 v1alpha1
import (
"context"
"time"
v1alpha1 "k8s.io/api/storage/v1alpha1"
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"
)
// CSIStorageCapacitiesGetter has a method to return a CSIStorageCapacityInterface.
// A group's client should implement this interface.
type CSIStorageCapacitiesGetter interface {
CSIStorageCapacities(namespace string) CSIStorageCapacityInterface
}
// CSIStorageCapacityInterface has methods to work with CSIStorageCapacity resources.
type CSIStorageCapacityInterface interface {
Create(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.CreateOptions) (*v1alpha1.CSIStorageCapacity, error)
Update(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.UpdateOptions) (*v1alpha1.CSIStorageCapacity, 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) (*v1alpha1.CSIStorageCapacity, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.CSIStorageCapacityList, 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 *v1alpha1.CSIStorageCapacity, err error)
CSIStorageCapacityExpansion
}
// cSIStorageCapacities implements CSIStorageCapacityInterface
type cSIStorageCapacities struct {
client rest.Interface
ns string
}
// newCSIStorageCapacities returns a CSIStorageCapacities
func newCSIStorageCapacities(c *StorageV1alpha1Client, namespace string) *cSIStorageCapacities {
return &cSIStorageCapacities{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the cSIStorageCapacity, and returns the corresponding cSIStorageCapacity object, and an error if there is any.
func (c *cSIStorageCapacities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CSIStorageCapacity, err error) {
result = &v1alpha1.CSIStorageCapacity{}
err = c.client.Get().
Namespace(c.ns).
Resource("csistoragecapacities").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors.
func (c *cSIStorageCapacities) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CSIStorageCapacityList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.CSIStorageCapacityList{}
err = c.client.Get().
Namespace(c.ns).
Resource("csistoragecapacities").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested cSIStorageCapacities.
func (c *cSIStorageCapacities) 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("csistoragecapacities").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a cSIStorageCapacity and creates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any.
func (c *cSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.CreateOptions) (result *v1alpha1.CSIStorageCapacity, err error) {
result = &v1alpha1.CSIStorageCapacity{}
err = c.client.Post().
Namespace(c.ns).
Resource("csistoragecapacities").
VersionedParams(&opts, scheme.ParameterCodec).
Body(cSIStorageCapacity).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a cSIStorageCapacity and updates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any.
func (c *cSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.UpdateOptions) (result *v1alpha1.CSIStorageCapacity, err error) {
result = &v1alpha1.CSIStorageCapacity{}
err = c.client.Put().
Namespace(c.ns).
Resource("csistoragecapacities").
Name(cSIStorageCapacity.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(cSIStorageCapacity).
Do(ctx).
Into(result)
return
}
// Delete takes name of the cSIStorageCapacity and deletes it. Returns an error if one occurs.
func (c *cSIStorageCapacities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("csistoragecapacities").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *cSIStorageCapacities) 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("csistoragecapacities").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched cSIStorageCapacity.
func (c *cSIStorageCapacities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CSIStorageCapacity, err error) {
result = &v1alpha1.CSIStorageCapacity{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("csistoragecapacities").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@@ -0,0 +1,130 @@
/*
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"
v1alpha1 "k8s.io/api/storage/v1alpha1"
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"
)
// FakeCSIStorageCapacities implements CSIStorageCapacityInterface
type FakeCSIStorageCapacities struct {
Fake *FakeStorageV1alpha1
ns string
}
var csistoragecapacitiesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1alpha1", Resource: "csistoragecapacities"}
var csistoragecapacitiesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1alpha1", Kind: "CSIStorageCapacity"}
// Get takes name of the cSIStorageCapacity, and returns the corresponding cSIStorageCapacity object, and an error if there is any.
func (c *FakeCSIStorageCapacities) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CSIStorageCapacity, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(csistoragecapacitiesResource, c.ns, name), &v1alpha1.CSIStorageCapacity{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.CSIStorageCapacity), err
}
// List takes label and field selectors, and returns the list of CSIStorageCapacities that match those selectors.
func (c *FakeCSIStorageCapacities) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CSIStorageCapacityList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(csistoragecapacitiesResource, csistoragecapacitiesKind, c.ns, opts), &v1alpha1.CSIStorageCapacityList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.CSIStorageCapacityList{ListMeta: obj.(*v1alpha1.CSIStorageCapacityList).ListMeta}
for _, item := range obj.(*v1alpha1.CSIStorageCapacityList).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 cSIStorageCapacities.
func (c *FakeCSIStorageCapacities) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(csistoragecapacitiesResource, c.ns, opts))
}
// Create takes the representation of a cSIStorageCapacity and creates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any.
func (c *FakeCSIStorageCapacities) Create(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.CreateOptions) (result *v1alpha1.CSIStorageCapacity, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &v1alpha1.CSIStorageCapacity{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.CSIStorageCapacity), err
}
// Update takes the representation of a cSIStorageCapacity and updates it. Returns the server's representation of the cSIStorageCapacity, and an error, if there is any.
func (c *FakeCSIStorageCapacities) Update(ctx context.Context, cSIStorageCapacity *v1alpha1.CSIStorageCapacity, opts v1.UpdateOptions) (result *v1alpha1.CSIStorageCapacity, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(csistoragecapacitiesResource, c.ns, cSIStorageCapacity), &v1alpha1.CSIStorageCapacity{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.CSIStorageCapacity), err
}
// Delete takes name of the cSIStorageCapacity and deletes it. Returns an error if one occurs.
func (c *FakeCSIStorageCapacities) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteAction(csistoragecapacitiesResource, c.ns, name), &v1alpha1.CSIStorageCapacity{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCSIStorageCapacities) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(csistoragecapacitiesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.CSIStorageCapacityList{})
return err
}
// Patch applies the patch and returns the patched cSIStorageCapacity.
func (c *FakeCSIStorageCapacities) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CSIStorageCapacity, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(csistoragecapacitiesResource, c.ns, name, pt, data, subresources...), &v1alpha1.CSIStorageCapacity{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.CSIStorageCapacity), err
}

View File

@@ -28,6 +28,10 @@ type FakeStorageV1alpha1 struct {
*testing.Fake
}
func (c *FakeStorageV1alpha1) CSIStorageCapacities(namespace string) v1alpha1.CSIStorageCapacityInterface {
return &FakeCSIStorageCapacities{c, namespace}
}
func (c *FakeStorageV1alpha1) VolumeAttachments() v1alpha1.VolumeAttachmentInterface {
return &FakeVolumeAttachments{c}
}

View File

@@ -18,4 +18,6 @@ limitations under the License.
package v1alpha1
type CSIStorageCapacityExpansion interface{}
type VolumeAttachmentExpansion interface{}

View File

@@ -26,6 +26,7 @@ import (
type StorageV1alpha1Interface interface {
RESTClient() rest.Interface
CSIStorageCapacitiesGetter
VolumeAttachmentsGetter
}
@@ -34,6 +35,10 @@ type StorageV1alpha1Client struct {
restClient rest.Interface
}
func (c *StorageV1alpha1Client) CSIStorageCapacities(namespace string) CSIStorageCapacityInterface {
return newCSIStorageCapacities(c, namespace)
}
func (c *StorageV1alpha1Client) VolumeAttachments() VolumeAttachmentInterface {
return newVolumeAttachments(c)
}

View File

@@ -26,10 +26,13 @@ import (
)
// MutatingWebhookConfigurationLister helps list MutatingWebhookConfigurations.
// All objects returned here must be treated as read-only.
type MutatingWebhookConfigurationLister interface {
// List lists all MutatingWebhookConfigurations in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.MutatingWebhookConfiguration, err error)
// Get retrieves the MutatingWebhookConfiguration from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.MutatingWebhookConfiguration, error)
MutatingWebhookConfigurationListerExpansion
}

View File

@@ -26,10 +26,13 @@ import (
)
// ValidatingWebhookConfigurationLister helps list ValidatingWebhookConfigurations.
// All objects returned here must be treated as read-only.
type ValidatingWebhookConfigurationLister interface {
// List lists all ValidatingWebhookConfigurations in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ValidatingWebhookConfiguration, err error)
// Get retrieves the ValidatingWebhookConfiguration from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.ValidatingWebhookConfiguration, error)
ValidatingWebhookConfigurationListerExpansion
}

View File

@@ -26,10 +26,13 @@ import (
)
// MutatingWebhookConfigurationLister helps list MutatingWebhookConfigurations.
// All objects returned here must be treated as read-only.
type MutatingWebhookConfigurationLister interface {
// List lists all MutatingWebhookConfigurations in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.MutatingWebhookConfiguration, err error)
// Get retrieves the MutatingWebhookConfiguration from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta1.MutatingWebhookConfiguration, error)
MutatingWebhookConfigurationListerExpansion
}

View File

@@ -26,10 +26,13 @@ import (
)
// ValidatingWebhookConfigurationLister helps list ValidatingWebhookConfigurations.
// All objects returned here must be treated as read-only.
type ValidatingWebhookConfigurationLister interface {
// List lists all ValidatingWebhookConfigurations in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.ValidatingWebhookConfiguration, err error)
// Get retrieves the ValidatingWebhookConfiguration from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta1.ValidatingWebhookConfiguration, error)
ValidatingWebhookConfigurationListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// ControllerRevisionLister helps list ControllerRevisions.
// All objects returned here must be treated as read-only.
type ControllerRevisionLister interface {
// List lists all ControllerRevisions in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ControllerRevision, err error)
// ControllerRevisions returns an object that can list and get ControllerRevisions.
ControllerRevisions(namespace string) ControllerRevisionNamespaceLister
@@ -58,10 +60,13 @@ func (s *controllerRevisionLister) ControllerRevisions(namespace string) Control
}
// ControllerRevisionNamespaceLister helps list and get ControllerRevisions.
// All objects returned here must be treated as read-only.
type ControllerRevisionNamespaceLister interface {
// List lists all ControllerRevisions in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ControllerRevision, err error)
// Get retrieves the ControllerRevision from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.ControllerRevision, error)
ControllerRevisionNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// DaemonSetLister helps list DaemonSets.
// All objects returned here must be treated as read-only.
type DaemonSetLister interface {
// List lists all DaemonSets in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.DaemonSet, err error)
// DaemonSets returns an object that can list and get DaemonSets.
DaemonSets(namespace string) DaemonSetNamespaceLister
@@ -58,10 +60,13 @@ func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister
}
// DaemonSetNamespaceLister helps list and get DaemonSets.
// All objects returned here must be treated as read-only.
type DaemonSetNamespaceLister interface {
// List lists all DaemonSets in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.DaemonSet, err error)
// Get retrieves the DaemonSet from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.DaemonSet, error)
DaemonSetNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// DeploymentLister helps list Deployments.
// All objects returned here must be treated as read-only.
type DeploymentLister interface {
// List lists all Deployments in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Deployment, err error)
// Deployments returns an object that can list and get Deployments.
Deployments(namespace string) DeploymentNamespaceLister
@@ -58,10 +60,13 @@ func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceList
}
// DeploymentNamespaceLister helps list and get Deployments.
// All objects returned here must be treated as read-only.
type DeploymentNamespaceLister interface {
// List lists all Deployments in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Deployment, err error)
// Get retrieves the Deployment from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.Deployment, error)
DeploymentNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// ReplicaSetLister helps list ReplicaSets.
// All objects returned here must be treated as read-only.
type ReplicaSetLister interface {
// List lists all ReplicaSets in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ReplicaSet, err error)
// ReplicaSets returns an object that can list and get ReplicaSets.
ReplicaSets(namespace string) ReplicaSetNamespaceLister
@@ -58,10 +60,13 @@ func (s *replicaSetLister) ReplicaSets(namespace string) ReplicaSetNamespaceList
}
// ReplicaSetNamespaceLister helps list and get ReplicaSets.
// All objects returned here must be treated as read-only.
type ReplicaSetNamespaceLister interface {
// List lists all ReplicaSets in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ReplicaSet, err error)
// Get retrieves the ReplicaSet from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.ReplicaSet, error)
ReplicaSetNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// StatefulSetLister helps list StatefulSets.
// All objects returned here must be treated as read-only.
type StatefulSetLister interface {
// List lists all StatefulSets in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.StatefulSet, err error)
// StatefulSets returns an object that can list and get StatefulSets.
StatefulSets(namespace string) StatefulSetNamespaceLister
@@ -58,10 +60,13 @@ func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceL
}
// StatefulSetNamespaceLister helps list and get StatefulSets.
// All objects returned here must be treated as read-only.
type StatefulSetNamespaceLister interface {
// List lists all StatefulSets in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.StatefulSet, err error)
// Get retrieves the StatefulSet from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.StatefulSet, error)
StatefulSetNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// ControllerRevisionLister helps list ControllerRevisions.
// All objects returned here must be treated as read-only.
type ControllerRevisionLister interface {
// List lists all ControllerRevisions in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error)
// ControllerRevisions returns an object that can list and get ControllerRevisions.
ControllerRevisions(namespace string) ControllerRevisionNamespaceLister
@@ -58,10 +60,13 @@ func (s *controllerRevisionLister) ControllerRevisions(namespace string) Control
}
// ControllerRevisionNamespaceLister helps list and get ControllerRevisions.
// All objects returned here must be treated as read-only.
type ControllerRevisionNamespaceLister interface {
// List lists all ControllerRevisions in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.ControllerRevision, err error)
// Get retrieves the ControllerRevision from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta1.ControllerRevision, error)
ControllerRevisionNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// DeploymentLister helps list Deployments.
// All objects returned here must be treated as read-only.
type DeploymentLister interface {
// List lists all Deployments in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.Deployment, err error)
// Deployments returns an object that can list and get Deployments.
Deployments(namespace string) DeploymentNamespaceLister
@@ -58,10 +60,13 @@ func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceList
}
// DeploymentNamespaceLister helps list and get Deployments.
// All objects returned here must be treated as read-only.
type DeploymentNamespaceLister interface {
// List lists all Deployments in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.Deployment, err error)
// Get retrieves the Deployment from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta1.Deployment, error)
DeploymentNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// StatefulSetLister helps list StatefulSets.
// All objects returned here must be treated as read-only.
type StatefulSetLister interface {
// List lists all StatefulSets in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error)
// StatefulSets returns an object that can list and get StatefulSets.
StatefulSets(namespace string) StatefulSetNamespaceLister
@@ -58,10 +60,13 @@ func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceL
}
// StatefulSetNamespaceLister helps list and get StatefulSets.
// All objects returned here must be treated as read-only.
type StatefulSetNamespaceLister interface {
// List lists all StatefulSets in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.StatefulSet, err error)
// Get retrieves the StatefulSet from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta1.StatefulSet, error)
StatefulSetNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// ControllerRevisionLister helps list ControllerRevisions.
// All objects returned here must be treated as read-only.
type ControllerRevisionLister interface {
// List lists all ControllerRevisions in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error)
// ControllerRevisions returns an object that can list and get ControllerRevisions.
ControllerRevisions(namespace string) ControllerRevisionNamespaceLister
@@ -58,10 +60,13 @@ func (s *controllerRevisionLister) ControllerRevisions(namespace string) Control
}
// ControllerRevisionNamespaceLister helps list and get ControllerRevisions.
// All objects returned here must be treated as read-only.
type ControllerRevisionNamespaceLister interface {
// List lists all ControllerRevisions in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta2.ControllerRevision, err error)
// Get retrieves the ControllerRevision from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta2.ControllerRevision, error)
ControllerRevisionNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// DaemonSetLister helps list DaemonSets.
// All objects returned here must be treated as read-only.
type DaemonSetLister interface {
// List lists all DaemonSets in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta2.DaemonSet, err error)
// DaemonSets returns an object that can list and get DaemonSets.
DaemonSets(namespace string) DaemonSetNamespaceLister
@@ -58,10 +60,13 @@ func (s *daemonSetLister) DaemonSets(namespace string) DaemonSetNamespaceLister
}
// DaemonSetNamespaceLister helps list and get DaemonSets.
// All objects returned here must be treated as read-only.
type DaemonSetNamespaceLister interface {
// List lists all DaemonSets in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta2.DaemonSet, err error)
// Get retrieves the DaemonSet from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta2.DaemonSet, error)
DaemonSetNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// DeploymentLister helps list Deployments.
// All objects returned here must be treated as read-only.
type DeploymentLister interface {
// List lists all Deployments in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta2.Deployment, err error)
// Deployments returns an object that can list and get Deployments.
Deployments(namespace string) DeploymentNamespaceLister
@@ -58,10 +60,13 @@ func (s *deploymentLister) Deployments(namespace string) DeploymentNamespaceList
}
// DeploymentNamespaceLister helps list and get Deployments.
// All objects returned here must be treated as read-only.
type DeploymentNamespaceLister interface {
// List lists all Deployments in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta2.Deployment, err error)
// Get retrieves the Deployment from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta2.Deployment, error)
DeploymentNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// ReplicaSetLister helps list ReplicaSets.
// All objects returned here must be treated as read-only.
type ReplicaSetLister interface {
// List lists all ReplicaSets in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error)
// ReplicaSets returns an object that can list and get ReplicaSets.
ReplicaSets(namespace string) ReplicaSetNamespaceLister
@@ -58,10 +60,13 @@ func (s *replicaSetLister) ReplicaSets(namespace string) ReplicaSetNamespaceList
}
// ReplicaSetNamespaceLister helps list and get ReplicaSets.
// All objects returned here must be treated as read-only.
type ReplicaSetNamespaceLister interface {
// List lists all ReplicaSets in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta2.ReplicaSet, err error)
// Get retrieves the ReplicaSet from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta2.ReplicaSet, error)
ReplicaSetNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// StatefulSetLister helps list StatefulSets.
// All objects returned here must be treated as read-only.
type StatefulSetLister interface {
// List lists all StatefulSets in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta2.StatefulSet, err error)
// StatefulSets returns an object that can list and get StatefulSets.
StatefulSets(namespace string) StatefulSetNamespaceLister
@@ -58,10 +60,13 @@ func (s *statefulSetLister) StatefulSets(namespace string) StatefulSetNamespaceL
}
// StatefulSetNamespaceLister helps list and get StatefulSets.
// All objects returned here must be treated as read-only.
type StatefulSetNamespaceLister interface {
// List lists all StatefulSets in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta2.StatefulSet, err error)
// Get retrieves the StatefulSet from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta2.StatefulSet, error)
StatefulSetNamespaceListerExpansion
}

View File

@@ -1,65 +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 v1alpha1
import (
v1alpha1 "k8s.io/api/auditregistration/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// AuditSinkLister helps list AuditSinks.
type AuditSinkLister interface {
// List lists all AuditSinks in the indexer.
List(selector labels.Selector) (ret []*v1alpha1.AuditSink, err error)
// Get retrieves the AuditSink from the index for a given name.
Get(name string) (*v1alpha1.AuditSink, error)
AuditSinkListerExpansion
}
// auditSinkLister implements the AuditSinkLister interface.
type auditSinkLister struct {
indexer cache.Indexer
}
// NewAuditSinkLister returns a new AuditSinkLister.
func NewAuditSinkLister(indexer cache.Indexer) AuditSinkLister {
return &auditSinkLister{indexer: indexer}
}
// List lists all AuditSinks in the indexer.
func (s *auditSinkLister) List(selector labels.Selector) (ret []*v1alpha1.AuditSink, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.AuditSink))
})
return ret, err
}
// Get retrieves the AuditSink from the index for a given name.
func (s *auditSinkLister) Get(name string) (*v1alpha1.AuditSink, error) {
obj, exists, err := s.indexer.GetByKey(name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("auditsink"), name)
}
return obj.(*v1alpha1.AuditSink), nil
}

View File

@@ -26,8 +26,10 @@ import (
)
// HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers.
// All objects returned here must be treated as read-only.
type HorizontalPodAutoscalerLister interface {
// List lists all HorizontalPodAutoscalers in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error)
// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister
@@ -58,10 +60,13 @@ func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace strin
}
// HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers.
// All objects returned here must be treated as read-only.
type HorizontalPodAutoscalerNamespaceLister interface {
// List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.HorizontalPodAutoscaler, err error)
// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.HorizontalPodAutoscaler, error)
HorizontalPodAutoscalerNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers.
// All objects returned here must be treated as read-only.
type HorizontalPodAutoscalerLister interface {
// List lists all HorizontalPodAutoscalers in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error)
// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister
@@ -58,10 +60,13 @@ func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace strin
}
// HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers.
// All objects returned here must be treated as read-only.
type HorizontalPodAutoscalerNamespaceLister interface {
// List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v2beta1.HorizontalPodAutoscaler, err error)
// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v2beta1.HorizontalPodAutoscaler, error)
HorizontalPodAutoscalerNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// HorizontalPodAutoscalerLister helps list HorizontalPodAutoscalers.
// All objects returned here must be treated as read-only.
type HorizontalPodAutoscalerLister interface {
// List lists all HorizontalPodAutoscalers in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error)
// HorizontalPodAutoscalers returns an object that can list and get HorizontalPodAutoscalers.
HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerNamespaceLister
@@ -58,10 +60,13 @@ func (s *horizontalPodAutoscalerLister) HorizontalPodAutoscalers(namespace strin
}
// HorizontalPodAutoscalerNamespaceLister helps list and get HorizontalPodAutoscalers.
// All objects returned here must be treated as read-only.
type HorizontalPodAutoscalerNamespaceLister interface {
// List lists all HorizontalPodAutoscalers in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v2beta2.HorizontalPodAutoscaler, err error)
// Get retrieves the HorizontalPodAutoscaler from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v2beta2.HorizontalPodAutoscaler, error)
HorizontalPodAutoscalerNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// JobLister helps list Jobs.
// All objects returned here must be treated as read-only.
type JobLister interface {
// List lists all Jobs in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Job, err error)
// Jobs returns an object that can list and get Jobs.
Jobs(namespace string) JobNamespaceLister
@@ -58,10 +60,13 @@ func (s *jobLister) Jobs(namespace string) JobNamespaceLister {
}
// JobNamespaceLister helps list and get Jobs.
// All objects returned here must be treated as read-only.
type JobNamespaceLister interface {
// List lists all Jobs in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Job, err error)
// Get retrieves the Job from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.Job, error)
JobNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// 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 []*v1beta1.CronJob, err error)
// CronJobs returns an object that can list and get CronJobs.
CronJobs(namespace string) CronJobNamespaceLister
@@ -58,10 +60,13 @@ func (s *cronJobLister) CronJobs(namespace string) CronJobNamespaceLister {
}
// 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 []*v1beta1.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) (*v1beta1.CronJob, error)
CronJobNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// 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
@@ -58,10 +60,13 @@ func (s *cronJobLister) CronJobs(namespace string) CronJobNamespaceLister {
}
// 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
}

View File

@@ -0,0 +1,68 @@
/*
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 v1
import (
v1 "k8s.io/api/certificates/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// CertificateSigningRequestLister helps list CertificateSigningRequests.
// All objects returned here must be treated as read-only.
type CertificateSigningRequestLister interface {
// List lists all CertificateSigningRequests in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.CertificateSigningRequest, err error)
// Get retrieves the CertificateSigningRequest from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.CertificateSigningRequest, error)
CertificateSigningRequestListerExpansion
}
// certificateSigningRequestLister implements the CertificateSigningRequestLister interface.
type certificateSigningRequestLister struct {
indexer cache.Indexer
}
// NewCertificateSigningRequestLister returns a new CertificateSigningRequestLister.
func NewCertificateSigningRequestLister(indexer cache.Indexer) CertificateSigningRequestLister {
return &certificateSigningRequestLister{indexer: indexer}
}
// List lists all CertificateSigningRequests in the indexer.
func (s *certificateSigningRequestLister) List(selector labels.Selector) (ret []*v1.CertificateSigningRequest, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1.CertificateSigningRequest))
})
return ret, err
}
// Get retrieves the CertificateSigningRequest from the index for a given name.
func (s *certificateSigningRequestLister) Get(name string) (*v1.CertificateSigningRequest, error) {
obj, exists, err := s.indexer.GetByKey(name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1.Resource("certificatesigningrequest"), name)
}
return obj.(*v1.CertificateSigningRequest), nil
}

View File

@@ -16,8 +16,8 @@ limitations under the License.
// Code generated by lister-gen. DO NOT EDIT.
package v1alpha1
package v1
// AuditSinkListerExpansion allows custom methods to be added to
// AuditSinkLister.
type AuditSinkListerExpansion interface{}
// CertificateSigningRequestListerExpansion allows custom methods to be added to
// CertificateSigningRequestLister.
type CertificateSigningRequestListerExpansion interface{}

View File

@@ -26,10 +26,13 @@ import (
)
// CertificateSigningRequestLister helps list CertificateSigningRequests.
// All objects returned here must be treated as read-only.
type CertificateSigningRequestLister interface {
// List lists all CertificateSigningRequests in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.CertificateSigningRequest, err error)
// Get retrieves the CertificateSigningRequest from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta1.CertificateSigningRequest, error)
CertificateSigningRequestListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// LeaseLister helps list Leases.
// All objects returned here must be treated as read-only.
type LeaseLister interface {
// List lists all Leases in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Lease, err error)
// Leases returns an object that can list and get Leases.
Leases(namespace string) LeaseNamespaceLister
@@ -58,10 +60,13 @@ func (s *leaseLister) Leases(namespace string) LeaseNamespaceLister {
}
// LeaseNamespaceLister helps list and get Leases.
// All objects returned here must be treated as read-only.
type LeaseNamespaceLister interface {
// List lists all Leases in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Lease, err error)
// Get retrieves the Lease from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.Lease, error)
LeaseNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// LeaseLister helps list Leases.
// All objects returned here must be treated as read-only.
type LeaseLister interface {
// List lists all Leases in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.Lease, err error)
// Leases returns an object that can list and get Leases.
Leases(namespace string) LeaseNamespaceLister
@@ -58,10 +60,13 @@ func (s *leaseLister) Leases(namespace string) LeaseNamespaceLister {
}
// LeaseNamespaceLister helps list and get Leases.
// All objects returned here must be treated as read-only.
type LeaseNamespaceLister interface {
// List lists all Leases in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.Lease, err error)
// Get retrieves the Lease from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta1.Lease, error)
LeaseNamespaceListerExpansion
}

View File

@@ -26,10 +26,13 @@ import (
)
// ComponentStatusLister helps list ComponentStatuses.
// All objects returned here must be treated as read-only.
type ComponentStatusLister interface {
// List lists all ComponentStatuses in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ComponentStatus, err error)
// Get retrieves the ComponentStatus from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.ComponentStatus, error)
ComponentStatusListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// ConfigMapLister helps list ConfigMaps.
// All objects returned here must be treated as read-only.
type ConfigMapLister interface {
// List lists all ConfigMaps in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ConfigMap, err error)
// ConfigMaps returns an object that can list and get ConfigMaps.
ConfigMaps(namespace string) ConfigMapNamespaceLister
@@ -58,10 +60,13 @@ func (s *configMapLister) ConfigMaps(namespace string) ConfigMapNamespaceLister
}
// ConfigMapNamespaceLister helps list and get ConfigMaps.
// All objects returned here must be treated as read-only.
type ConfigMapNamespaceLister interface {
// List lists all ConfigMaps in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ConfigMap, err error)
// Get retrieves the ConfigMap from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.ConfigMap, error)
ConfigMapNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// EndpointsLister helps list Endpoints.
// All objects returned here must be treated as read-only.
type EndpointsLister interface {
// List lists all Endpoints in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Endpoints, err error)
// Endpoints returns an object that can list and get Endpoints.
Endpoints(namespace string) EndpointsNamespaceLister
@@ -58,10 +60,13 @@ func (s *endpointsLister) Endpoints(namespace string) EndpointsNamespaceLister {
}
// EndpointsNamespaceLister helps list and get Endpoints.
// All objects returned here must be treated as read-only.
type EndpointsNamespaceLister interface {
// List lists all Endpoints in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Endpoints, err error)
// Get retrieves the Endpoints from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.Endpoints, error)
EndpointsNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// EventLister helps list Events.
// All objects returned here must be treated as read-only.
type EventLister interface {
// List lists all Events in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Event, err error)
// Events returns an object that can list and get Events.
Events(namespace string) EventNamespaceLister
@@ -58,10 +60,13 @@ func (s *eventLister) Events(namespace string) EventNamespaceLister {
}
// EventNamespaceLister helps list and get Events.
// All objects returned here must be treated as read-only.
type EventNamespaceLister interface {
// List lists all Events in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Event, err error)
// Get retrieves the Event from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.Event, error)
EventNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// LimitRangeLister helps list LimitRanges.
// All objects returned here must be treated as read-only.
type LimitRangeLister interface {
// List lists all LimitRanges in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.LimitRange, err error)
// LimitRanges returns an object that can list and get LimitRanges.
LimitRanges(namespace string) LimitRangeNamespaceLister
@@ -58,10 +60,13 @@ func (s *limitRangeLister) LimitRanges(namespace string) LimitRangeNamespaceList
}
// LimitRangeNamespaceLister helps list and get LimitRanges.
// All objects returned here must be treated as read-only.
type LimitRangeNamespaceLister interface {
// List lists all LimitRanges in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.LimitRange, err error)
// Get retrieves the LimitRange from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.LimitRange, error)
LimitRangeNamespaceListerExpansion
}

View File

@@ -26,10 +26,13 @@ import (
)
// NamespaceLister helps list Namespaces.
// All objects returned here must be treated as read-only.
type NamespaceLister interface {
// List lists all Namespaces in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Namespace, err error)
// Get retrieves the Namespace from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.Namespace, error)
NamespaceListerExpansion
}

View File

@@ -26,10 +26,13 @@ import (
)
// NodeLister helps list Nodes.
// All objects returned here must be treated as read-only.
type NodeLister interface {
// List lists all Nodes in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Node, err error)
// Get retrieves the Node from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.Node, error)
NodeListerExpansion
}

View File

@@ -26,10 +26,13 @@ import (
)
// PersistentVolumeLister helps list PersistentVolumes.
// All objects returned here must be treated as read-only.
type PersistentVolumeLister interface {
// List lists all PersistentVolumes in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.PersistentVolume, err error)
// Get retrieves the PersistentVolume from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.PersistentVolume, error)
PersistentVolumeListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// PersistentVolumeClaimLister helps list PersistentVolumeClaims.
// All objects returned here must be treated as read-only.
type PersistentVolumeClaimLister interface {
// List lists all PersistentVolumeClaims in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error)
// PersistentVolumeClaims returns an object that can list and get PersistentVolumeClaims.
PersistentVolumeClaims(namespace string) PersistentVolumeClaimNamespaceLister
@@ -58,10 +60,13 @@ func (s *persistentVolumeClaimLister) PersistentVolumeClaims(namespace string) P
}
// PersistentVolumeClaimNamespaceLister helps list and get PersistentVolumeClaims.
// All objects returned here must be treated as read-only.
type PersistentVolumeClaimNamespaceLister interface {
// List lists all PersistentVolumeClaims in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error)
// Get retrieves the PersistentVolumeClaim from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.PersistentVolumeClaim, error)
PersistentVolumeClaimNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// PodLister helps list Pods.
// All objects returned here must be treated as read-only.
type PodLister interface {
// List lists all Pods in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Pod, err error)
// Pods returns an object that can list and get Pods.
Pods(namespace string) PodNamespaceLister
@@ -58,10 +60,13 @@ func (s *podLister) Pods(namespace string) PodNamespaceLister {
}
// PodNamespaceLister helps list and get Pods.
// All objects returned here must be treated as read-only.
type PodNamespaceLister interface {
// List lists all Pods in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Pod, err error)
// Get retrieves the Pod from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.Pod, error)
PodNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// PodTemplateLister helps list PodTemplates.
// All objects returned here must be treated as read-only.
type PodTemplateLister interface {
// List lists all PodTemplates in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.PodTemplate, err error)
// PodTemplates returns an object that can list and get PodTemplates.
PodTemplates(namespace string) PodTemplateNamespaceLister
@@ -58,10 +60,13 @@ func (s *podTemplateLister) PodTemplates(namespace string) PodTemplateNamespaceL
}
// PodTemplateNamespaceLister helps list and get PodTemplates.
// All objects returned here must be treated as read-only.
type PodTemplateNamespaceLister interface {
// List lists all PodTemplates in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.PodTemplate, err error)
// Get retrieves the PodTemplate from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.PodTemplate, error)
PodTemplateNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// ReplicationControllerLister helps list ReplicationControllers.
// All objects returned here must be treated as read-only.
type ReplicationControllerLister interface {
// List lists all ReplicationControllers in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ReplicationController, err error)
// ReplicationControllers returns an object that can list and get ReplicationControllers.
ReplicationControllers(namespace string) ReplicationControllerNamespaceLister
@@ -58,10 +60,13 @@ func (s *replicationControllerLister) ReplicationControllers(namespace string) R
}
// ReplicationControllerNamespaceLister helps list and get ReplicationControllers.
// All objects returned here must be treated as read-only.
type ReplicationControllerNamespaceLister interface {
// List lists all ReplicationControllers in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ReplicationController, err error)
// Get retrieves the ReplicationController from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.ReplicationController, error)
ReplicationControllerNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// ResourceQuotaLister helps list ResourceQuotas.
// All objects returned here must be treated as read-only.
type ResourceQuotaLister interface {
// List lists all ResourceQuotas in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ResourceQuota, err error)
// ResourceQuotas returns an object that can list and get ResourceQuotas.
ResourceQuotas(namespace string) ResourceQuotaNamespaceLister
@@ -58,10 +60,13 @@ func (s *resourceQuotaLister) ResourceQuotas(namespace string) ResourceQuotaName
}
// ResourceQuotaNamespaceLister helps list and get ResourceQuotas.
// All objects returned here must be treated as read-only.
type ResourceQuotaNamespaceLister interface {
// List lists all ResourceQuotas in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ResourceQuota, err error)
// Get retrieves the ResourceQuota from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.ResourceQuota, error)
ResourceQuotaNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// SecretLister helps list Secrets.
// All objects returned here must be treated as read-only.
type SecretLister interface {
// List lists all Secrets in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Secret, err error)
// Secrets returns an object that can list and get Secrets.
Secrets(namespace string) SecretNamespaceLister
@@ -58,10 +60,13 @@ func (s *secretLister) Secrets(namespace string) SecretNamespaceLister {
}
// SecretNamespaceLister helps list and get Secrets.
// All objects returned here must be treated as read-only.
type SecretNamespaceLister interface {
// List lists all Secrets in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Secret, err error)
// Get retrieves the Secret from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.Secret, error)
SecretNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// ServiceLister helps list Services.
// All objects returned here must be treated as read-only.
type ServiceLister interface {
// List lists all Services in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Service, err error)
// Services returns an object that can list and get Services.
Services(namespace string) ServiceNamespaceLister
@@ -58,10 +60,13 @@ func (s *serviceLister) Services(namespace string) ServiceNamespaceLister {
}
// ServiceNamespaceLister helps list and get Services.
// All objects returned here must be treated as read-only.
type ServiceNamespaceLister interface {
// List lists all Services in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Service, err error)
// Get retrieves the Service from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.Service, error)
ServiceNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// ServiceAccountLister helps list ServiceAccounts.
// All objects returned here must be treated as read-only.
type ServiceAccountLister interface {
// List lists all ServiceAccounts in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ServiceAccount, err error)
// ServiceAccounts returns an object that can list and get ServiceAccounts.
ServiceAccounts(namespace string) ServiceAccountNamespaceLister
@@ -58,10 +60,13 @@ func (s *serviceAccountLister) ServiceAccounts(namespace string) ServiceAccountN
}
// ServiceAccountNamespaceLister helps list and get ServiceAccounts.
// All objects returned here must be treated as read-only.
type ServiceAccountNamespaceLister interface {
// List lists all ServiceAccounts in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.ServiceAccount, err error)
// Get retrieves the ServiceAccount from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.ServiceAccount, error)
ServiceAccountNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// EndpointSliceLister helps list EndpointSlices.
// All objects returned here must be treated as read-only.
type EndpointSliceLister interface {
// List lists all EndpointSlices in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error)
// EndpointSlices returns an object that can list and get EndpointSlices.
EndpointSlices(namespace string) EndpointSliceNamespaceLister
@@ -58,10 +60,13 @@ func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceName
}
// EndpointSliceNamespaceLister helps list and get EndpointSlices.
// All objects returned here must be treated as read-only.
type EndpointSliceNamespaceLister interface {
// List lists all EndpointSlices in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.EndpointSlice, err error)
// Get retrieves the EndpointSlice from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.EndpointSlice, error)
EndpointSliceNamespaceListerExpansion
}

View File

@@ -26,8 +26,10 @@ import (
)
// EndpointSliceLister helps list EndpointSlices.
// All objects returned here must be treated as read-only.
type EndpointSliceLister interface {
// List lists all EndpointSlices in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error)
// EndpointSlices returns an object that can list and get EndpointSlices.
EndpointSlices(namespace string) EndpointSliceNamespaceLister
@@ -58,10 +60,13 @@ func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceName
}
// EndpointSliceNamespaceLister helps list and get EndpointSlices.
// All objects returned here must be treated as read-only.
type EndpointSliceNamespaceLister interface {
// List lists all EndpointSlices in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error)
// Get retrieves the EndpointSlice from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta1.EndpointSlice, error)
EndpointSliceNamespaceListerExpansion
}

99
vendor/k8s.io/client-go/listers/events/v1/event.go generated vendored Normal file
View File

@@ -0,0 +1,99 @@
/*
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 v1
import (
v1 "k8s.io/api/events/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// EventLister helps list Events.
// All objects returned here must be treated as read-only.
type EventLister interface {
// List lists all Events in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Event, err error)
// Events returns an object that can list and get Events.
Events(namespace string) EventNamespaceLister
EventListerExpansion
}
// eventLister implements the EventLister interface.
type eventLister struct {
indexer cache.Indexer
}
// NewEventLister returns a new EventLister.
func NewEventLister(indexer cache.Indexer) EventLister {
return &eventLister{indexer: indexer}
}
// List lists all Events in the indexer.
func (s *eventLister) List(selector labels.Selector) (ret []*v1.Event, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1.Event))
})
return ret, err
}
// Events returns an object that can list and get Events.
func (s *eventLister) Events(namespace string) EventNamespaceLister {
return eventNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// EventNamespaceLister helps list and get Events.
// All objects returned here must be treated as read-only.
type EventNamespaceLister interface {
// List lists all Events in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1.Event, err error)
// Get retrieves the Event from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1.Event, error)
EventNamespaceListerExpansion
}
// eventNamespaceLister implements the EventNamespaceLister
// interface.
type eventNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all Events in the indexer for a given namespace.
func (s eventNamespaceLister) List(selector labels.Selector) (ret []*v1.Event, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1.Event))
})
return ret, err
}
// Get retrieves the Event from the indexer for a given namespace and name.
func (s eventNamespaceLister) Get(name string) (*v1.Event, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1.Resource("event"), name)
}
return obj.(*v1.Event), nil
}

View File

@@ -0,0 +1,27 @@
/*
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 v1
// EventListerExpansion allows custom methods to be added to
// EventLister.
type EventListerExpansion interface{}
// EventNamespaceListerExpansion allows custom methods to be added to
// EventNamespaceLister.
type EventNamespaceListerExpansion interface{}

View File

@@ -26,8 +26,10 @@ import (
)
// EventLister helps list Events.
// All objects returned here must be treated as read-only.
type EventLister interface {
// List lists all Events in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.Event, err error)
// Events returns an object that can list and get Events.
Events(namespace string) EventNamespaceLister
@@ -58,10 +60,13 @@ func (s *eventLister) Events(namespace string) EventNamespaceLister {
}
// EventNamespaceLister helps list and get Events.
// All objects returned here must be treated as read-only.
type EventNamespaceLister interface {
// List lists all Events in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1beta1.Event, err error)
// Get retrieves the Event from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1beta1.Event, error)
EventNamespaceListerExpansion
}

Some files were not shown because too many files have changed in this diff Show More