rebase: update kubernetes to v1.20.0

updated kubernetes packages to latest
release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2020-12-17 17:58:29 +05:30
committed by mergify[bot]
parent 4abe128bd8
commit 83559144b1
1624 changed files with 247222 additions and 160270 deletions

View File

@ -19,12 +19,10 @@ package memory
import (
"errors"
"fmt"
"net"
"net/url"
"sync"
"syscall"
"github.com/googleapis/gnostic/OpenAPIv2"
openapi_v2 "github.com/googleapis/gnostic/openapiv2"
errorsutil "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -64,19 +62,11 @@ var _ discovery.CachedDiscoveryInterface = &memCacheClient{}
// "Connection reset" error which usually means that apiserver is temporarily
// unavailable.
func isTransientConnectionError(err error) bool {
urlError, ok := err.(*url.Error)
if !ok {
return false
var errno syscall.Errno
if errors.As(err, &errno) {
return errno == syscall.ECONNREFUSED || errno == syscall.ECONNRESET
}
opError, ok := urlError.Err.(*net.OpError)
if !ok {
return false
}
errno, ok := opError.Err.(syscall.Errno)
if !ok {
return false
}
return errno == syscall.ECONNREFUSED || errno == syscall.ECONNRESET
return false
}
func isTransientError(err error) bool {

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"
@ -501,7 +501,7 @@ func NewDiscoveryClientForConfigOrDie(c *restclient.Config) *DiscoveryClient {
}
// NewDiscoveryClient returns a new DiscoveryClient for the given RESTClient.
// NewDiscoveryClient returns a new DiscoveryClient for the given RESTClient.
func NewDiscoveryClient(c restclient.Interface) *DiscoveryClient {
return &DiscoveryClient{restClient: c, LegacyPrefix: "/api"}
}

View File

@ -16,10 +16,10 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT.
package auditregistration
package apiserverinternal
import (
v1alpha1 "k8s.io/client-go/informers/auditregistration/v1alpha1"
v1alpha1 "k8s.io/client-go/informers/apiserverinternal/v1alpha1"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
)

View File

@ -24,8 +24,8 @@ import (
// Interface provides access to all the informers in this group version.
type Interface interface {
// PodPresets returns a PodPresetInformer.
PodPresets() PodPresetInformer
// StorageVersions returns a StorageVersionInformer.
StorageVersions() StorageVersionInformer
}
type version struct {
@ -39,7 +39,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// PodPresets returns a PodPresetInformer.
func (v *version) PodPresets() PodPresetInformer {
return &podPresetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
// StorageVersions returns a StorageVersionInformer.
func (v *version) StorageVersions() StorageVersionInformer {
return &storageVersionInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}

View File

@ -22,69 +22,68 @@ import (
"context"
time "time"
settingsv1alpha1 "k8s.io/api/settings/v1alpha1"
apiserverinternalv1alpha1 "k8s.io/api/apiserverinternal/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/settings/v1alpha1"
v1alpha1 "k8s.io/client-go/listers/apiserverinternal/v1alpha1"
cache "k8s.io/client-go/tools/cache"
)
// PodPresetInformer provides access to a shared informer and lister for
// PodPresets.
type PodPresetInformer interface {
// StorageVersionInformer provides access to a shared informer and lister for
// StorageVersions.
type StorageVersionInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.PodPresetLister
Lister() v1alpha1.StorageVersionLister
}
type podPresetInformer struct {
type storageVersionInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewPodPresetInformer constructs a new informer for PodPreset type.
// NewStorageVersionInformer constructs a new informer for StorageVersion 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 NewPodPresetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredPodPresetInformer(client, namespace, resyncPeriod, indexers, nil)
func NewStorageVersionInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredStorageVersionInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredPodPresetInformer constructs a new informer for PodPreset type.
// NewFilteredStorageVersionInformer constructs a new informer for StorageVersion 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 NewFilteredPodPresetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
func NewFilteredStorageVersionInformer(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.SettingsV1alpha1().PodPresets(namespace).List(context.TODO(), options)
return client.InternalV1alpha1().StorageVersions().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.SettingsV1alpha1().PodPresets(namespace).Watch(context.TODO(), options)
return client.InternalV1alpha1().StorageVersions().Watch(context.TODO(), options)
},
},
&settingsv1alpha1.PodPreset{},
&apiserverinternalv1alpha1.StorageVersion{},
resyncPeriod,
indexers,
)
}
func (f *podPresetInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredPodPresetInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
func (f *storageVersionInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredStorageVersionInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *podPresetInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&settingsv1alpha1.PodPreset{}, f.defaultInformer)
func (f *storageVersionInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&apiserverinternalv1alpha1.StorageVersion{}, f.defaultInformer)
}
func (f *podPresetInformer) Lister() v1alpha1.PodPresetLister {
return v1alpha1.NewPodPresetLister(f.Informer().GetIndexer())
func (f *storageVersionInformer) Lister() v1alpha1.StorageVersionLister {
return v1alpha1.NewStorageVersionLister(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

@ -0,0 +1,45 @@
/*
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 (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
)
// Interface provides access to all the informers in this group version.
type Interface interface {
// CertificateSigningRequests returns a CertificateSigningRequestInformer.
CertificateSigningRequests() CertificateSigningRequestInformer
}
type version struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// 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

@ -27,8 +27,8 @@ import (
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
admissionregistration "k8s.io/client-go/informers/admissionregistration"
apiserverinternal "k8s.io/client-go/informers/apiserverinternal"
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"
@ -44,7 +44,6 @@ import (
policy "k8s.io/client-go/informers/policy"
rbac "k8s.io/client-go/informers/rbac"
scheduling "k8s.io/client-go/informers/scheduling"
settings "k8s.io/client-go/informers/settings"
storage "k8s.io/client-go/informers/storage"
kubernetes "k8s.io/client-go/kubernetes"
cache "k8s.io/client-go/tools/cache"
@ -191,8 +190,8 @@ type SharedInformerFactory interface {
WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool
Admissionregistration() admissionregistration.Interface
Internal() apiserverinternal.Interface
Apps() apps.Interface
Auditregistration() auditregistration.Interface
Autoscaling() autoscaling.Interface
Batch() batch.Interface
Certificates() certificates.Interface
@ -207,7 +206,6 @@ type SharedInformerFactory interface {
Policy() policy.Interface
Rbac() rbac.Interface
Scheduling() scheduling.Interface
Settings() settings.Interface
Storage() storage.Interface
}
@ -215,12 +213,12 @@ func (f *sharedInformerFactory) Admissionregistration() admissionregistration.In
return admissionregistration.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Apps() apps.Interface {
return apps.New(f, f.namespace, f.tweakListOptions)
func (f *sharedInformerFactory) Internal() apiserverinternal.Interface {
return apiserverinternal.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Auditregistration() auditregistration.Interface {
return auditregistration.New(f, f.namespace, f.tweakListOptions)
func (f *sharedInformerFactory) Apps() apps.Interface {
return apps.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Autoscaling() autoscaling.Interface {
@ -279,10 +277,6 @@ func (f *sharedInformerFactory) Scheduling() scheduling.Interface {
return scheduling.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Settings() settings.Interface {
return settings.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Storage() storage.Interface {
return storage.New(f, f.namespace, f.tweakListOptions)
}

View File

@ -20,6 +20,7 @@ package flowcontrol
import (
v1alpha1 "k8s.io/client-go/informers/flowcontrol/v1alpha1"
v1beta1 "k8s.io/client-go/informers/flowcontrol/v1beta1"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
)
@ -27,6 +28,8 @@ import (
type Interface interface {
// V1alpha1 provides access to shared informers for resources in V1alpha1.
V1alpha1() v1alpha1.Interface
// V1beta1 provides access to shared informers for resources in V1beta1.
V1beta1() v1beta1.Interface
}
type group struct {
@ -44,3 +47,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
func (g *group) V1alpha1() v1alpha1.Interface {
return v1alpha1.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

@ -16,74 +16,74 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
package v1beta1
import (
"context"
time "time"
auditregistrationv1alpha1 "k8s.io/api/auditregistration/v1alpha1"
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
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"
v1beta1 "k8s.io/client-go/listers/flowcontrol/v1beta1"
cache "k8s.io/client-go/tools/cache"
)
// AuditSinkInformer provides access to a shared informer and lister for
// AuditSinks.
type AuditSinkInformer interface {
// FlowSchemaInformer provides access to a shared informer and lister for
// FlowSchemas.
type FlowSchemaInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.AuditSinkLister
Lister() v1beta1.FlowSchemaLister
}
type auditSinkInformer struct {
type flowSchemaInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewAuditSinkInformer constructs a new informer for AuditSink type.
// NewFlowSchemaInformer constructs a new informer for FlowSchema 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)
func NewFlowSchemaInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredFlowSchemaInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredAuditSinkInformer constructs a new informer for AuditSink type.
// NewFilteredFlowSchemaInformer constructs a new informer for FlowSchema 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 {
func NewFilteredFlowSchemaInformer(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)
return client.FlowcontrolV1beta1().FlowSchemas().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)
return client.FlowcontrolV1beta1().FlowSchemas().Watch(context.TODO(), options)
},
},
&auditregistrationv1alpha1.AuditSink{},
&flowcontrolv1beta1.FlowSchema{},
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 *flowSchemaInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredFlowSchemaInformer(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 *flowSchemaInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&flowcontrolv1beta1.FlowSchema{}, f.defaultInformer)
}
func (f *auditSinkInformer) Lister() v1alpha1.AuditSinkLister {
return v1alpha1.NewAuditSinkLister(f.Informer().GetIndexer())
func (f *flowSchemaInformer) Lister() v1beta1.FlowSchemaLister {
return v1beta1.NewFlowSchemaLister(f.Informer().GetIndexer())
}

View File

@ -0,0 +1,52 @@
/*
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 v1beta1
import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
)
// Interface provides access to all the informers in this group version.
type Interface interface {
// FlowSchemas returns a FlowSchemaInformer.
FlowSchemas() FlowSchemaInformer
// PriorityLevelConfigurations returns a PriorityLevelConfigurationInformer.
PriorityLevelConfigurations() PriorityLevelConfigurationInformer
}
type version struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// FlowSchemas returns a FlowSchemaInformer.
func (v *version) FlowSchemas() FlowSchemaInformer {
return &flowSchemaInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// PriorityLevelConfigurations returns a PriorityLevelConfigurationInformer.
func (v *version) PriorityLevelConfigurations() PriorityLevelConfigurationInformer {
return &priorityLevelConfigurationInformer{factory: v.factory, tweakListOptions: v.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 v1beta1
import (
"context"
time "time"
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
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"
v1beta1 "k8s.io/client-go/listers/flowcontrol/v1beta1"
cache "k8s.io/client-go/tools/cache"
)
// PriorityLevelConfigurationInformer provides access to a shared informer and lister for
// PriorityLevelConfigurations.
type PriorityLevelConfigurationInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1beta1.PriorityLevelConfigurationLister
}
type priorityLevelConfigurationInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewPriorityLevelConfigurationInformer constructs a new informer for PriorityLevelConfiguration 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 NewPriorityLevelConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredPriorityLevelConfigurationInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredPriorityLevelConfigurationInformer constructs a new informer for PriorityLevelConfiguration 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 NewFilteredPriorityLevelConfigurationInformer(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.FlowcontrolV1beta1().PriorityLevelConfigurations().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.FlowcontrolV1beta1().PriorityLevelConfigurations().Watch(context.TODO(), options)
},
},
&flowcontrolv1beta1.PriorityLevelConfiguration{},
resyncPeriod,
indexers,
)
}
func (f *priorityLevelConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredPriorityLevelConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *priorityLevelConfigurationInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&flowcontrolv1beta1.PriorityLevelConfiguration{}, f.defaultInformer)
}
func (f *priorityLevelConfigurationInformer) Lister() v1beta1.PriorityLevelConfigurationLister {
return v1beta1.NewPriorityLevelConfigurationLister(f.Informer().GetIndexer())
}

View File

@ -23,27 +23,31 @@ import (
v1 "k8s.io/api/admissionregistration/v1"
v1beta1 "k8s.io/api/admissionregistration/v1beta1"
apiserverinternalv1alpha1 "k8s.io/api/apiserverinternal/v1alpha1"
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"
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
networkingv1 "k8s.io/api/networking/v1"
networkingv1beta1 "k8s.io/api/networking/v1beta1"
nodev1 "k8s.io/api/node/v1"
nodev1alpha1 "k8s.io/api/node/v1alpha1"
nodev1beta1 "k8s.io/api/node/v1beta1"
policyv1beta1 "k8s.io/api/policy/v1beta1"
@ -53,7 +57,6 @@ import (
schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
settingsv1alpha1 "k8s.io/api/settings/v1alpha1"
storagev1 "k8s.io/api/storage/v1"
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
storagev1beta1 "k8s.io/api/storage/v1beta1"
@ -131,10 +134,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 +158,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 +209,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
@ -237,7 +244,21 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case flowcontrolv1alpha1.SchemeGroupVersion.WithResource("prioritylevelconfigurations"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1alpha1().PriorityLevelConfigurations().Informer()}, nil
// Group=flowcontrol.apiserver.k8s.io, Version=v1beta1
case flowcontrolv1beta1.SchemeGroupVersion.WithResource("flowschemas"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1beta1().FlowSchemas().Informer()}, nil
case flowcontrolv1beta1.SchemeGroupVersion.WithResource("prioritylevelconfigurations"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1beta1().PriorityLevelConfigurations().Informer()}, nil
// Group=internal.apiserver.k8s.io, Version=v1alpha1
case apiserverinternalv1alpha1.SchemeGroupVersion.WithResource("storageversions"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Internal().V1alpha1().StorageVersions().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
@ -247,6 +268,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case networkingv1beta1.SchemeGroupVersion.WithResource("ingressclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().IngressClasses().Informer()}, nil
// Group=node.k8s.io, Version=v1
case nodev1.SchemeGroupVersion.WithResource("runtimeclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Node().V1().RuntimeClasses().Informer()}, nil
// Group=node.k8s.io, Version=v1alpha1
case nodev1alpha1.SchemeGroupVersion.WithResource("runtimeclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Node().V1alpha1().RuntimeClasses().Informer()}, nil
@ -303,10 +328,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case schedulingv1beta1.SchemeGroupVersion.WithResource("priorityclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1beta1().PriorityClasses().Informer()}, nil
// Group=settings.k8s.io, Version=v1alpha1
case settingsv1alpha1.SchemeGroupVersion.WithResource("podpresets"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Settings().V1alpha1().PodPresets().Informer()}, nil
// Group=storage.k8s.io, Version=v1
case storagev1.SchemeGroupVersion.WithResource("csidrivers"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().CSIDrivers().Informer()}, nil
@ -318,6 +339,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

@ -20,12 +20,15 @@ package node
import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
v1 "k8s.io/client-go/informers/node/v1"
v1alpha1 "k8s.io/client-go/informers/node/v1alpha1"
v1beta1 "k8s.io/client-go/informers/node/v1beta1"
)
// 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
// V1alpha1 provides access to shared informers for resources in V1alpha1.
V1alpha1() v1alpha1.Interface
// V1beta1 provides access to shared informers for resources in V1beta1.
@ -43,6 +46,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)
}
// V1alpha1 returns a new v1alpha1.Interface.
func (g *group) V1alpha1() v1alpha1.Interface {
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)

View File

@ -16,20 +16,19 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT.
package settings
package v1
import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
v1alpha1 "k8s.io/client-go/informers/settings/v1alpha1"
)
// 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
// RuntimeClasses returns a RuntimeClassInformer.
RuntimeClasses() RuntimeClassInformer
}
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)
// RuntimeClasses returns a RuntimeClassInformer.
func (v *version) RuntimeClasses() RuntimeClassInformer {
return &runtimeClassInformer{factory: v.factory, tweakListOptions: v.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"
nodev1 "k8s.io/api/node/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/node/v1"
cache "k8s.io/client-go/tools/cache"
)
// RuntimeClassInformer provides access to a shared informer and lister for
// RuntimeClasses.
type RuntimeClassInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1.RuntimeClassLister
}
type runtimeClassInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewRuntimeClassInformer constructs a new informer for RuntimeClass 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 NewRuntimeClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredRuntimeClassInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredRuntimeClassInformer constructs a new informer for RuntimeClass 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 NewFilteredRuntimeClassInformer(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.NodeV1().RuntimeClasses().List(context.TODO(), options)
},
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.NodeV1().RuntimeClasses().Watch(context.TODO(), options)
},
},
&nodev1.RuntimeClass{},
resyncPeriod,
indexers,
)
}
func (f *runtimeClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredRuntimeClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *runtimeClassInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&nodev1.RuntimeClass{}, f.defaultInformer)
}
func (f *runtimeClassInformer) Lister() v1.RuntimeClassLister {
return v1.NewRuntimeClassLister(f.Informer().GetIndexer())
}

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

@ -24,10 +24,10 @@ import (
discovery "k8s.io/client-go/discovery"
admissionregistrationv1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1"
admissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1"
internalv1alpha1 "k8s.io/client-go/kubernetes/typed/apiserverinternal/v1alpha1"
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,17 +38,21 @@ 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"
flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1"
networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1"
networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1"
nodev1 "k8s.io/client-go/kubernetes/typed/node/v1"
nodev1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1"
nodev1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1"
policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
@ -58,7 +62,6 @@ import (
schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1"
schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1"
settingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1"
storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1"
storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1"
storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1"
@ -70,10 +73,10 @@ type Interface interface {
Discovery() discovery.DiscoveryInterface
AdmissionregistrationV1() admissionregistrationv1.AdmissionregistrationV1Interface
AdmissionregistrationV1beta1() admissionregistrationv1beta1.AdmissionregistrationV1beta1Interface
InternalV1alpha1() internalv1alpha1.InternalV1alpha1Interface
AppsV1() appsv1.AppsV1Interface
AppsV1beta1() appsv1beta1.AppsV1beta1Interface
AppsV1beta2() appsv1beta2.AppsV1beta2Interface
AuditregistrationV1alpha1() auditregistrationv1alpha1.AuditregistrationV1alpha1Interface
AuthenticationV1() authenticationv1.AuthenticationV1Interface
AuthenticationV1beta1() authenticationv1beta1.AuthenticationV1beta1Interface
AuthorizationV1() authorizationv1.AuthorizationV1Interface
@ -84,17 +87,21 @@ 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
FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface
NetworkingV1() networkingv1.NetworkingV1Interface
NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface
NodeV1() nodev1.NodeV1Interface
NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface
NodeV1beta1() nodev1beta1.NodeV1beta1Interface
PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface
@ -104,7 +111,6 @@ type Interface interface {
SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface
SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface
SchedulingV1() schedulingv1.SchedulingV1Interface
SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface
StorageV1beta1() storagev1beta1.StorageV1beta1Interface
StorageV1() storagev1.StorageV1Interface
StorageV1alpha1() storagev1alpha1.StorageV1alpha1Interface
@ -116,10 +122,10 @@ type Clientset struct {
*discovery.DiscoveryClient
admissionregistrationV1 *admissionregistrationv1.AdmissionregistrationV1Client
admissionregistrationV1beta1 *admissionregistrationv1beta1.AdmissionregistrationV1beta1Client
internalV1alpha1 *internalv1alpha1.InternalV1alpha1Client
appsV1 *appsv1.AppsV1Client
appsV1beta1 *appsv1beta1.AppsV1beta1Client
appsV1beta2 *appsv1beta2.AppsV1beta2Client
auditregistrationV1alpha1 *auditregistrationv1alpha1.AuditregistrationV1alpha1Client
authenticationV1 *authenticationv1.AuthenticationV1Client
authenticationV1beta1 *authenticationv1beta1.AuthenticationV1beta1Client
authorizationV1 *authorizationv1.AuthorizationV1Client
@ -130,17 +136,21 @@ 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
flowcontrolV1beta1 *flowcontrolv1beta1.FlowcontrolV1beta1Client
networkingV1 *networkingv1.NetworkingV1Client
networkingV1beta1 *networkingv1beta1.NetworkingV1beta1Client
nodeV1 *nodev1.NodeV1Client
nodeV1alpha1 *nodev1alpha1.NodeV1alpha1Client
nodeV1beta1 *nodev1beta1.NodeV1beta1Client
policyV1beta1 *policyv1beta1.PolicyV1beta1Client
@ -150,7 +160,6 @@ type Clientset struct {
schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client
schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client
schedulingV1 *schedulingv1.SchedulingV1Client
settingsV1alpha1 *settingsv1alpha1.SettingsV1alpha1Client
storageV1beta1 *storagev1beta1.StorageV1beta1Client
storageV1 *storagev1.StorageV1Client
storageV1alpha1 *storagev1alpha1.StorageV1alpha1Client
@ -166,6 +175,11 @@ func (c *Clientset) AdmissionregistrationV1beta1() admissionregistrationv1beta1.
return c.admissionregistrationV1beta1
}
// InternalV1alpha1 retrieves the InternalV1alpha1Client
func (c *Clientset) InternalV1alpha1() internalv1alpha1.InternalV1alpha1Interface {
return c.internalV1alpha1
}
// AppsV1 retrieves the AppsV1Client
func (c *Clientset) AppsV1() appsv1.AppsV1Interface {
return c.appsV1
@ -181,11 +195,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 +245,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 +280,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
@ -281,6 +300,11 @@ func (c *Clientset) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha
return c.flowcontrolV1alpha1
}
// FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1Client
func (c *Clientset) FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface {
return c.flowcontrolV1beta1
}
// NetworkingV1 retrieves the NetworkingV1Client
func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface {
return c.networkingV1
@ -291,6 +315,11 @@ func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Inter
return c.networkingV1beta1
}
// NodeV1 retrieves the NodeV1Client
func (c *Clientset) NodeV1() nodev1.NodeV1Interface {
return c.nodeV1
}
// NodeV1alpha1 retrieves the NodeV1alpha1Client
func (c *Clientset) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface {
return c.nodeV1alpha1
@ -336,11 +365,6 @@ func (c *Clientset) SchedulingV1() schedulingv1.SchedulingV1Interface {
return c.schedulingV1
}
// SettingsV1alpha1 retrieves the SettingsV1alpha1Client
func (c *Clientset) SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface {
return c.settingsV1alpha1
}
// StorageV1beta1 retrieves the StorageV1beta1Client
func (c *Clientset) StorageV1beta1() storagev1beta1.StorageV1beta1Interface {
return c.storageV1beta1
@ -385,6 +409,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
cs.internalV1alpha1, err = internalv1alpha1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.appsV1, err = appsv1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@ -397,10 +425,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 +465,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 +493,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
@ -477,6 +509,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
cs.flowcontrolV1beta1, err = flowcontrolv1beta1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.networkingV1, err = networkingv1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@ -485,6 +521,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
cs.nodeV1, err = nodev1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.nodeV1alpha1, err = nodev1alpha1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@ -521,10 +561,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
if err != nil {
return nil, err
}
cs.settingsV1alpha1, err = settingsv1alpha1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.storageV1beta1, err = storagev1beta1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
@ -551,10 +587,10 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
var cs Clientset
cs.admissionregistrationV1 = admissionregistrationv1.NewForConfigOrDie(c)
cs.admissionregistrationV1beta1 = admissionregistrationv1beta1.NewForConfigOrDie(c)
cs.internalV1alpha1 = internalv1alpha1.NewForConfigOrDie(c)
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,17 +601,21 @@ 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)
cs.flowcontrolV1beta1 = flowcontrolv1beta1.NewForConfigOrDie(c)
cs.networkingV1 = networkingv1.NewForConfigOrDie(c)
cs.networkingV1beta1 = networkingv1beta1.NewForConfigOrDie(c)
cs.nodeV1 = nodev1.NewForConfigOrDie(c)
cs.nodeV1alpha1 = nodev1alpha1.NewForConfigOrDie(c)
cs.nodeV1beta1 = nodev1beta1.NewForConfigOrDie(c)
cs.policyV1beta1 = policyv1beta1.NewForConfigOrDie(c)
@ -585,7 +625,6 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
cs.schedulingV1alpha1 = schedulingv1alpha1.NewForConfigOrDie(c)
cs.schedulingV1beta1 = schedulingv1beta1.NewForConfigOrDie(c)
cs.schedulingV1 = schedulingv1.NewForConfigOrDie(c)
cs.settingsV1alpha1 = settingsv1alpha1.NewForConfigOrDie(c)
cs.storageV1beta1 = storagev1beta1.NewForConfigOrDie(c)
cs.storageV1 = storagev1.NewForConfigOrDie(c)
cs.storageV1alpha1 = storagev1alpha1.NewForConfigOrDie(c)
@ -599,10 +638,10 @@ func New(c rest.Interface) *Clientset {
var cs Clientset
cs.admissionregistrationV1 = admissionregistrationv1.New(c)
cs.admissionregistrationV1beta1 = admissionregistrationv1beta1.New(c)
cs.internalV1alpha1 = internalv1alpha1.New(c)
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,17 +652,21 @@ 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)
cs.flowcontrolV1beta1 = flowcontrolv1beta1.New(c)
cs.networkingV1 = networkingv1.New(c)
cs.networkingV1beta1 = networkingv1beta1.New(c)
cs.nodeV1 = nodev1.New(c)
cs.nodeV1alpha1 = nodev1alpha1.New(c)
cs.nodeV1beta1 = nodev1beta1.New(c)
cs.policyV1beta1 = policyv1beta1.New(c)
@ -633,7 +676,6 @@ func New(c rest.Interface) *Clientset {
cs.schedulingV1alpha1 = schedulingv1alpha1.New(c)
cs.schedulingV1beta1 = schedulingv1beta1.New(c)
cs.schedulingV1 = schedulingv1.New(c)
cs.settingsV1alpha1 = settingsv1alpha1.New(c)
cs.storageV1beta1 = storagev1beta1.New(c)
cs.storageV1 = storagev1.New(c)
cs.storageV1alpha1 = storagev1alpha1.New(c)

View File

@ -21,10 +21,10 @@ package scheme
import (
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
internalv1alpha1 "k8s.io/api/apiserverinternal/v1alpha1"
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,17 +35,21 @@ 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"
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
networkingv1 "k8s.io/api/networking/v1"
networkingv1beta1 "k8s.io/api/networking/v1beta1"
nodev1 "k8s.io/api/node/v1"
nodev1alpha1 "k8s.io/api/node/v1alpha1"
nodev1beta1 "k8s.io/api/node/v1beta1"
policyv1beta1 "k8s.io/api/policy/v1beta1"
@ -55,7 +59,6 @@ import (
schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
settingsv1alpha1 "k8s.io/api/settings/v1alpha1"
storagev1 "k8s.io/api/storage/v1"
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
storagev1beta1 "k8s.io/api/storage/v1beta1"
@ -72,10 +75,10 @@ var ParameterCodec = runtime.NewParameterCodec(Scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
admissionregistrationv1.AddToScheme,
admissionregistrationv1beta1.AddToScheme,
internalv1alpha1.AddToScheme,
appsv1.AddToScheme,
appsv1beta1.AddToScheme,
appsv1beta2.AddToScheme,
auditregistrationv1alpha1.AddToScheme,
authenticationv1.AddToScheme,
authenticationv1beta1.AddToScheme,
authorizationv1.AddToScheme,
@ -86,17 +89,21 @@ 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,
flowcontrolv1beta1.AddToScheme,
networkingv1.AddToScheme,
networkingv1beta1.AddToScheme,
nodev1.AddToScheme,
nodev1alpha1.AddToScheme,
nodev1beta1.AddToScheme,
policyv1beta1.AddToScheme,
@ -106,7 +113,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{
schedulingv1alpha1.AddToScheme,
schedulingv1beta1.AddToScheme,
schedulingv1.AddToScheme,
settingsv1alpha1.AddToScheme,
storagev1beta1.AddToScheme,
storagev1.AddToScheme,
storagev1alpha1.AddToScheme,

View File

@ -19,27 +19,27 @@ limitations under the License.
package v1alpha1
import (
v1alpha1 "k8s.io/api/settings/v1alpha1"
v1alpha1 "k8s.io/api/apiserverinternal/v1alpha1"
"k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
type SettingsV1alpha1Interface interface {
type InternalV1alpha1Interface interface {
RESTClient() rest.Interface
PodPresetsGetter
StorageVersionsGetter
}
// SettingsV1alpha1Client is used to interact with features provided by the settings.k8s.io group.
type SettingsV1alpha1Client struct {
// InternalV1alpha1Client is used to interact with features provided by the internal.apiserver.k8s.io group.
type InternalV1alpha1Client struct {
restClient rest.Interface
}
func (c *SettingsV1alpha1Client) PodPresets(namespace string) PodPresetInterface {
return newPodPresets(c, namespace)
func (c *InternalV1alpha1Client) StorageVersions() StorageVersionInterface {
return newStorageVersions(c)
}
// NewForConfig creates a new SettingsV1alpha1Client for the given config.
func NewForConfig(c *rest.Config) (*SettingsV1alpha1Client, error) {
// NewForConfig creates a new InternalV1alpha1Client for the given config.
func NewForConfig(c *rest.Config) (*InternalV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
@ -48,12 +48,12 @@ func NewForConfig(c *rest.Config) (*SettingsV1alpha1Client, error) {
if err != nil {
return nil, err
}
return &SettingsV1alpha1Client{client}, nil
return &InternalV1alpha1Client{client}, nil
}
// NewForConfigOrDie creates a new SettingsV1alpha1Client for the given config and
// NewForConfigOrDie creates a new InternalV1alpha1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *SettingsV1alpha1Client {
func NewForConfigOrDie(c *rest.Config) *InternalV1alpha1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
@ -61,9 +61,9 @@ func NewForConfigOrDie(c *rest.Config) *SettingsV1alpha1Client {
return client
}
// New creates a new SettingsV1alpha1Client for the given RESTClient.
func New(c rest.Interface) *SettingsV1alpha1Client {
return &SettingsV1alpha1Client{c}
// New creates a new InternalV1alpha1Client for the given RESTClient.
func New(c rest.Interface) *InternalV1alpha1Client {
return &InternalV1alpha1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
@ -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 *SettingsV1alpha1Client) RESTClient() rest.Interface {
func (c *InternalV1alpha1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}

View File

@ -18,4 +18,4 @@ limitations under the License.
package v1alpha1
type AuditSinkExpansion interface{}
type StorageVersionExpansion interface{}

View File

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

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

@ -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

@ -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

@ -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

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

View File

@ -0,0 +1,20 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1beta1

View File

@ -0,0 +1,94 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
v1beta1 "k8s.io/api/flowcontrol/v1beta1"
"k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
type FlowcontrolV1beta1Interface interface {
RESTClient() rest.Interface
FlowSchemasGetter
PriorityLevelConfigurationsGetter
}
// FlowcontrolV1beta1Client is used to interact with features provided by the flowcontrol.apiserver.k8s.io group.
type FlowcontrolV1beta1Client struct {
restClient rest.Interface
}
func (c *FlowcontrolV1beta1Client) FlowSchemas() FlowSchemaInterface {
return newFlowSchemas(c)
}
func (c *FlowcontrolV1beta1Client) PriorityLevelConfigurations() PriorityLevelConfigurationInterface {
return newPriorityLevelConfigurations(c)
}
// NewForConfig creates a new FlowcontrolV1beta1Client for the given config.
func NewForConfig(c *rest.Config) (*FlowcontrolV1beta1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &FlowcontrolV1beta1Client{client}, nil
}
// NewForConfigOrDie creates a new FlowcontrolV1beta1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *FlowcontrolV1beta1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new FlowcontrolV1beta1Client for the given RESTClient.
func New(c rest.Interface) *FlowcontrolV1beta1Client {
return &FlowcontrolV1beta1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1beta1.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 *FlowcontrolV1beta1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View File

@ -0,0 +1,184 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
"context"
"time"
v1beta1 "k8s.io/api/flowcontrol/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
// FlowSchemasGetter has a method to return a FlowSchemaInterface.
// A group's client should implement this interface.
type FlowSchemasGetter interface {
FlowSchemas() FlowSchemaInterface
}
// FlowSchemaInterface has methods to work with FlowSchema resources.
type FlowSchemaInterface interface {
Create(ctx context.Context, flowSchema *v1beta1.FlowSchema, opts v1.CreateOptions) (*v1beta1.FlowSchema, error)
Update(ctx context.Context, flowSchema *v1beta1.FlowSchema, opts v1.UpdateOptions) (*v1beta1.FlowSchema, error)
UpdateStatus(ctx context.Context, flowSchema *v1beta1.FlowSchema, opts v1.UpdateOptions) (*v1beta1.FlowSchema, 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) (*v1beta1.FlowSchema, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.FlowSchemaList, 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 *v1beta1.FlowSchema, err error)
FlowSchemaExpansion
}
// flowSchemas implements FlowSchemaInterface
type flowSchemas struct {
client rest.Interface
}
// newFlowSchemas returns a FlowSchemas
func newFlowSchemas(c *FlowcontrolV1beta1Client) *flowSchemas {
return &flowSchemas{
client: c.RESTClient(),
}
}
// Get takes name of the flowSchema, and returns the corresponding flowSchema object, and an error if there is any.
func (c *flowSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.FlowSchema, err error) {
result = &v1beta1.FlowSchema{}
err = c.client.Get().
Resource("flowschemas").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of FlowSchemas that match those selectors.
func (c *flowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.FlowSchemaList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.FlowSchemaList{}
err = c.client.Get().
Resource("flowschemas").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested flowSchemas.
func (c *flowSchemas) 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("flowschemas").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a flowSchema and creates it. Returns the server's representation of the flowSchema, and an error, if there is any.
func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1beta1.FlowSchema, opts v1.CreateOptions) (result *v1beta1.FlowSchema, err error) {
result = &v1beta1.FlowSchema{}
err = c.client.Post().
Resource("flowschemas").
VersionedParams(&opts, scheme.ParameterCodec).
Body(flowSchema).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a flowSchema and updates it. Returns the server's representation of the flowSchema, and an error, if there is any.
func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1beta1.FlowSchema, opts v1.UpdateOptions) (result *v1beta1.FlowSchema, err error) {
result = &v1beta1.FlowSchema{}
err = c.client.Put().
Resource("flowschemas").
Name(flowSchema.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(flowSchema).
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 *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1beta1.FlowSchema, opts v1.UpdateOptions) (result *v1beta1.FlowSchema, err error) {
result = &v1beta1.FlowSchema{}
err = c.client.Put().
Resource("flowschemas").
Name(flowSchema.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(flowSchema).
Do(ctx).
Into(result)
return
}
// Delete takes name of the flowSchema and deletes it. Returns an error if one occurs.
func (c *flowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("flowschemas").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *flowSchemas) 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("flowschemas").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched flowSchema.
func (c *flowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.FlowSchema, err error) {
result = &v1beta1.FlowSchema{}
err = c.client.Patch(pt).
Resource("flowschemas").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -0,0 +1,23 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
type FlowSchemaExpansion interface{}
type PriorityLevelConfigurationExpansion interface{}

View File

@ -0,0 +1,184 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
"context"
"time"
v1beta1 "k8s.io/api/flowcontrol/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
// PriorityLevelConfigurationsGetter has a method to return a PriorityLevelConfigurationInterface.
// A group's client should implement this interface.
type PriorityLevelConfigurationsGetter interface {
PriorityLevelConfigurations() PriorityLevelConfigurationInterface
}
// PriorityLevelConfigurationInterface has methods to work with PriorityLevelConfiguration resources.
type PriorityLevelConfigurationInterface interface {
Create(ctx context.Context, priorityLevelConfiguration *v1beta1.PriorityLevelConfiguration, opts v1.CreateOptions) (*v1beta1.PriorityLevelConfiguration, error)
Update(ctx context.Context, priorityLevelConfiguration *v1beta1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1beta1.PriorityLevelConfiguration, error)
UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1beta1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1beta1.PriorityLevelConfiguration, 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) (*v1beta1.PriorityLevelConfiguration, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PriorityLevelConfigurationList, 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 *v1beta1.PriorityLevelConfiguration, err error)
PriorityLevelConfigurationExpansion
}
// priorityLevelConfigurations implements PriorityLevelConfigurationInterface
type priorityLevelConfigurations struct {
client rest.Interface
}
// newPriorityLevelConfigurations returns a PriorityLevelConfigurations
func newPriorityLevelConfigurations(c *FlowcontrolV1beta1Client) *priorityLevelConfigurations {
return &priorityLevelConfigurations{
client: c.RESTClient(),
}
}
// Get takes name of the priorityLevelConfiguration, and returns the corresponding priorityLevelConfiguration object, and an error if there is any.
func (c *priorityLevelConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PriorityLevelConfiguration, err error) {
result = &v1beta1.PriorityLevelConfiguration{}
err = c.client.Get().
Resource("prioritylevelconfigurations").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors.
func (c *priorityLevelConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PriorityLevelConfigurationList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.PriorityLevelConfigurationList{}
err = c.client.Get().
Resource("prioritylevelconfigurations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested priorityLevelConfigurations.
func (c *priorityLevelConfigurations) 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("prioritylevelconfigurations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a priorityLevelConfiguration and creates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any.
func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1beta1.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1beta1.PriorityLevelConfiguration, err error) {
result = &v1beta1.PriorityLevelConfiguration{}
err = c.client.Post().
Resource("prioritylevelconfigurations").
VersionedParams(&opts, scheme.ParameterCodec).
Body(priorityLevelConfiguration).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a priorityLevelConfiguration and updates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any.
func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1beta1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1beta1.PriorityLevelConfiguration, err error) {
result = &v1beta1.PriorityLevelConfiguration{}
err = c.client.Put().
Resource("prioritylevelconfigurations").
Name(priorityLevelConfiguration.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(priorityLevelConfiguration).
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 *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1beta1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1beta1.PriorityLevelConfiguration, err error) {
result = &v1beta1.PriorityLevelConfiguration{}
err = c.client.Put().
Resource("prioritylevelconfigurations").
Name(priorityLevelConfiguration.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(priorityLevelConfiguration).
Do(ctx).
Into(result)
return
}
// Delete takes name of the priorityLevelConfiguration and deletes it. Returns an error if one occurs.
func (c *priorityLevelConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("prioritylevelconfigurations").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *priorityLevelConfigurations) 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("prioritylevelconfigurations").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched priorityLevelConfiguration.
func (c *priorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PriorityLevelConfiguration, err error) {
result = &v1beta1.PriorityLevelConfiguration{}
err = c.client.Patch(pt).
Resource("prioritylevelconfigurations").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

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,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,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 RuntimeClassExpansion interface{}

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/node/v1"
"k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
type NodeV1Interface interface {
RESTClient() rest.Interface
RuntimeClassesGetter
}
// NodeV1Client is used to interact with features provided by the node.k8s.io group.
type NodeV1Client struct {
restClient rest.Interface
}
func (c *NodeV1Client) RuntimeClasses() RuntimeClassInterface {
return newRuntimeClasses(c)
}
// NewForConfig creates a new NodeV1Client for the given config.
func NewForConfig(c *rest.Config) (*NodeV1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &NodeV1Client{client}, nil
}
// NewForConfigOrDie creates a new NodeV1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *NodeV1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new NodeV1Client for the given RESTClient.
func New(c rest.Interface) *NodeV1Client {
return &NodeV1Client{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 *NodeV1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

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

View File

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

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

@ -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

@ -18,6 +18,6 @@ limitations under the License.
package v1alpha1
// AuditSinkListerExpansion allows custom methods to be added to
// AuditSinkLister.
type AuditSinkListerExpansion interface{}
// StorageVersionListerExpansion allows custom methods to be added to
// StorageVersionLister.
type StorageVersionListerExpansion interface{}

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 v1alpha1
import (
v1alpha1 "k8s.io/api/apiserverinternal/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// StorageVersionLister helps list StorageVersions.
// All objects returned here must be treated as read-only.
type StorageVersionLister interface {
// List lists all StorageVersions in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.StorageVersion, err error)
// Get retrieves the StorageVersion from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.StorageVersion, error)
StorageVersionListerExpansion
}
// storageVersionLister implements the StorageVersionLister interface.
type storageVersionLister struct {
indexer cache.Indexer
}
// NewStorageVersionLister returns a new StorageVersionLister.
func NewStorageVersionLister(indexer cache.Indexer) StorageVersionLister {
return &storageVersionLister{indexer: indexer}
}
// List lists all StorageVersions in the indexer.
func (s *storageVersionLister) List(selector labels.Selector) (ret []*v1alpha1.StorageVersion, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.StorageVersion))
})
return ret, err
}
// Get retrieves the StorageVersion from the index for a given name.
func (s *storageVersionLister) Get(name string) (*v1alpha1.StorageVersion, error) {
obj, exists, err := s.indexer.GetByKey(name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("storageversion"), name)
}
return obj.(*v1alpha1.StorageVersion), nil
}

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

@ -0,0 +1,23 @@
/*
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
// 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
}

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