mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: update all k8s packages to 0.27.2
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
07b05616a0
commit
2551a0b05f
8
vendor/k8s.io/client-go/informers/certificates/interface.go
generated
vendored
8
vendor/k8s.io/client-go/informers/certificates/interface.go
generated
vendored
@ -20,6 +20,7 @@ package certificates
|
||||
|
||||
import (
|
||||
v1 "k8s.io/client-go/informers/certificates/v1"
|
||||
v1alpha1 "k8s.io/client-go/informers/certificates/v1alpha1"
|
||||
v1beta1 "k8s.io/client-go/informers/certificates/v1beta1"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
)
|
||||
@ -28,6 +29,8 @@ import (
|
||||
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.
|
||||
V1beta1() v1beta1.Interface
|
||||
}
|
||||
@ -48,6 +51,11 @@ 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)
|
||||
}
|
||||
|
||||
// V1beta1 returns a new v1beta1.Interface.
|
||||
func (g *group) V1beta1() v1beta1.Interface {
|
||||
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
|
@ -22,69 +22,68 @@ import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
certificatesv1alpha1 "k8s.io/api/certificates/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/resource/v1alpha1"
|
||||
v1alpha1 "k8s.io/client-go/listers/certificates/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// PodSchedulingInformer provides access to a shared informer and lister for
|
||||
// PodSchedulings.
|
||||
type PodSchedulingInformer interface {
|
||||
// ClusterTrustBundleInformer provides access to a shared informer and lister for
|
||||
// ClusterTrustBundles.
|
||||
type ClusterTrustBundleInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.PodSchedulingLister
|
||||
Lister() v1alpha1.ClusterTrustBundleLister
|
||||
}
|
||||
|
||||
type podSchedulingInformer struct {
|
||||
type clusterTrustBundleInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewPodSchedulingInformer constructs a new informer for PodScheduling type.
|
||||
// NewClusterTrustBundleInformer constructs a new informer for ClusterTrustBundle 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 NewPodSchedulingInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredPodSchedulingInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
func NewClusterTrustBundleInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredClusterTrustBundleInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredPodSchedulingInformer constructs a new informer for PodScheduling type.
|
||||
// NewFilteredClusterTrustBundleInformer constructs a new informer for ClusterTrustBundle 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 NewFilteredPodSchedulingInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
func NewFilteredClusterTrustBundleInformer(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.ResourceV1alpha1().PodSchedulings(namespace).List(context.TODO(), options)
|
||||
return client.CertificatesV1alpha1().ClusterTrustBundles().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha1().PodSchedulings(namespace).Watch(context.TODO(), options)
|
||||
return client.CertificatesV1alpha1().ClusterTrustBundles().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&resourcev1alpha1.PodScheduling{},
|
||||
&certificatesv1alpha1.ClusterTrustBundle{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *podSchedulingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredPodSchedulingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
func (f *clusterTrustBundleInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredClusterTrustBundleInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *podSchedulingInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&resourcev1alpha1.PodScheduling{}, f.defaultInformer)
|
||||
func (f *clusterTrustBundleInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&certificatesv1alpha1.ClusterTrustBundle{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *podSchedulingInformer) Lister() v1alpha1.PodSchedulingLister {
|
||||
return v1alpha1.NewPodSchedulingLister(f.Informer().GetIndexer())
|
||||
func (f *clusterTrustBundleInformer) Lister() v1alpha1.ClusterTrustBundleLister {
|
||||
return v1alpha1.NewClusterTrustBundleLister(f.Informer().GetIndexer())
|
||||
}
|
45
vendor/k8s.io/client-go/informers/certificates/v1alpha1/interface.go
generated
vendored
Normal file
45
vendor/k8s.io/client-go/informers/certificates/v1alpha1/interface.go
generated
vendored
Normal 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 v1alpha1
|
||||
|
||||
import (
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// ClusterTrustBundles returns a ClusterTrustBundleInformer.
|
||||
ClusterTrustBundles() ClusterTrustBundleInformer
|
||||
}
|
||||
|
||||
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}
|
||||
}
|
||||
|
||||
// ClusterTrustBundles returns a ClusterTrustBundleInformer.
|
||||
func (v *version) ClusterTrustBundles() ClusterTrustBundleInformer {
|
||||
return &clusterTrustBundleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
18
vendor/k8s.io/client-go/informers/doc.go
generated
vendored
Normal file
18
vendor/k8s.io/client-go/informers/doc.go
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
Copyright 2023 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.
|
||||
*/
|
||||
|
||||
// Package informers provides generated informers for Kubernetes APIs.
|
||||
package informers
|
7
vendor/k8s.io/client-go/informers/extensions/v1beta1/interface.go
generated
vendored
7
vendor/k8s.io/client-go/informers/extensions/v1beta1/interface.go
generated
vendored
@ -32,8 +32,6 @@ type Interface interface {
|
||||
Ingresses() IngressInformer
|
||||
// NetworkPolicies returns a NetworkPolicyInformer.
|
||||
NetworkPolicies() NetworkPolicyInformer
|
||||
// PodSecurityPolicies returns a PodSecurityPolicyInformer.
|
||||
PodSecurityPolicies() PodSecurityPolicyInformer
|
||||
// ReplicaSets returns a ReplicaSetInformer.
|
||||
ReplicaSets() ReplicaSetInformer
|
||||
}
|
||||
@ -69,11 +67,6 @@ func (v *version) NetworkPolicies() NetworkPolicyInformer {
|
||||
return &networkPolicyInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// PodSecurityPolicies returns a PodSecurityPolicyInformer.
|
||||
func (v *version) PodSecurityPolicies() PodSecurityPolicyInformer {
|
||||
return &podSecurityPolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ReplicaSets returns a ReplicaSetInformer.
|
||||
func (v *version) ReplicaSets() ReplicaSetInformer {
|
||||
return &replicaSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
|
29
vendor/k8s.io/client-go/informers/generic.go
generated
vendored
29
vendor/k8s.io/client-go/informers/generic.go
generated
vendored
@ -35,6 +35,7 @@ import (
|
||||
batchv1 "k8s.io/api/batch/v1"
|
||||
batchv1beta1 "k8s.io/api/batch/v1beta1"
|
||||
certificatesv1 "k8s.io/api/certificates/v1"
|
||||
certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
|
||||
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||
coordinationv1 "k8s.io/api/coordination/v1"
|
||||
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
|
||||
@ -59,7 +60,7 @@ import (
|
||||
rbacv1 "k8s.io/api/rbac/v1"
|
||||
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
|
||||
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
schedulingv1 "k8s.io/api/scheduling/v1"
|
||||
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
|
||||
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
|
||||
@ -176,6 +177,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
case certificatesv1.SchemeGroupVersion.WithResource("certificatesigningrequests"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1().CertificateSigningRequests().Informer()}, nil
|
||||
|
||||
// Group=certificates.k8s.io, Version=v1alpha1
|
||||
case certificatesv1alpha1.SchemeGroupVersion.WithResource("clustertrustbundles"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1alpha1().ClusterTrustBundles().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
|
||||
@ -247,8 +252,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().Ingresses().Informer()}, nil
|
||||
case extensionsv1beta1.SchemeGroupVersion.WithResource("networkpolicies"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().NetworkPolicies().Informer()}, nil
|
||||
case extensionsv1beta1.SchemeGroupVersion.WithResource("podsecuritypolicies"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().PodSecurityPolicies().Informer()}, nil
|
||||
case extensionsv1beta1.SchemeGroupVersion.WithResource("replicasets"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ReplicaSets().Informer()}, nil
|
||||
|
||||
@ -291,6 +294,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
// Group=networking.k8s.io, Version=v1alpha1
|
||||
case networkingv1alpha1.SchemeGroupVersion.WithResource("clustercidrs"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha1().ClusterCIDRs().Informer()}, nil
|
||||
case networkingv1alpha1.SchemeGroupVersion.WithResource("ipaddresses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha1().IPAddresses().Informer()}, nil
|
||||
|
||||
// Group=networking.k8s.io, Version=v1beta1
|
||||
case networkingv1beta1.SchemeGroupVersion.WithResource("ingresses"):
|
||||
@ -350,15 +355,15 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
case rbacv1beta1.SchemeGroupVersion.WithResource("rolebindings"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
|
||||
|
||||
// Group=resource.k8s.io, Version=v1alpha1
|
||||
case resourcev1alpha1.SchemeGroupVersion.WithResource("podschedulings"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().PodSchedulings().Informer()}, nil
|
||||
case resourcev1alpha1.SchemeGroupVersion.WithResource("resourceclaims"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().ResourceClaims().Informer()}, nil
|
||||
case resourcev1alpha1.SchemeGroupVersion.WithResource("resourceclaimtemplates"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().ResourceClaimTemplates().Informer()}, nil
|
||||
case resourcev1alpha1.SchemeGroupVersion.WithResource("resourceclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().ResourceClasses().Informer()}, nil
|
||||
// Group=resource.k8s.io, Version=v1alpha2
|
||||
case v1alpha2.SchemeGroupVersion.WithResource("podschedulingcontexts"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().PodSchedulingContexts().Informer()}, nil
|
||||
case v1alpha2.SchemeGroupVersion.WithResource("resourceclaims"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaims().Informer()}, nil
|
||||
case v1alpha2.SchemeGroupVersion.WithResource("resourceclaimtemplates"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaimTemplates().Informer()}, nil
|
||||
case v1alpha2.SchemeGroupVersion.WithResource("resourceclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClasses().Informer()}, nil
|
||||
|
||||
// Group=scheduling.k8s.io, Version=v1
|
||||
case schedulingv1.SchemeGroupVersion.WithResource("priorityclasses"):
|
||||
|
7
vendor/k8s.io/client-go/informers/networking/v1alpha1/interface.go
generated
vendored
7
vendor/k8s.io/client-go/informers/networking/v1alpha1/interface.go
generated
vendored
@ -26,6 +26,8 @@ import (
|
||||
type Interface interface {
|
||||
// ClusterCIDRs returns a ClusterCIDRInformer.
|
||||
ClusterCIDRs() ClusterCIDRInformer
|
||||
// IPAddresses returns a IPAddressInformer.
|
||||
IPAddresses() IPAddressInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
@ -43,3 +45,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
func (v *version) ClusterCIDRs() ClusterCIDRInformer {
|
||||
return &clusterCIDRInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// IPAddresses returns a IPAddressInformer.
|
||||
func (v *version) IPAddresses() IPAddressInformer {
|
||||
return &iPAddressInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
@ -16,74 +16,74 @@ limitations under the License.
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
networkingv1alpha1 "k8s.io/api/networking/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"
|
||||
v1beta1 "k8s.io/client-go/listers/extensions/v1beta1"
|
||||
v1alpha1 "k8s.io/client-go/listers/networking/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// PodSecurityPolicyInformer provides access to a shared informer and lister for
|
||||
// PodSecurityPolicies.
|
||||
type PodSecurityPolicyInformer interface {
|
||||
// IPAddressInformer provides access to a shared informer and lister for
|
||||
// IPAddresses.
|
||||
type IPAddressInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.PodSecurityPolicyLister
|
||||
Lister() v1alpha1.IPAddressLister
|
||||
}
|
||||
|
||||
type podSecurityPolicyInformer struct {
|
||||
type iPAddressInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewPodSecurityPolicyInformer constructs a new informer for PodSecurityPolicy type.
|
||||
// NewIPAddressInformer constructs a new informer for IPAddress 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 NewPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredPodSecurityPolicyInformer(client, resyncPeriod, indexers, nil)
|
||||
func NewIPAddressInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredIPAddressInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredPodSecurityPolicyInformer constructs a new informer for PodSecurityPolicy type.
|
||||
// NewFilteredIPAddressInformer constructs a new informer for IPAddress 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 NewFilteredPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
func NewFilteredIPAddressInformer(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.ExtensionsV1beta1().PodSecurityPolicies().List(context.TODO(), options)
|
||||
return client.NetworkingV1alpha1().IPAddresses().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ExtensionsV1beta1().PodSecurityPolicies().Watch(context.TODO(), options)
|
||||
return client.NetworkingV1alpha1().IPAddresses().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&extensionsv1beta1.PodSecurityPolicy{},
|
||||
&networkingv1alpha1.IPAddress{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *podSecurityPolicyInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredPodSecurityPolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
func (f *iPAddressInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredIPAddressInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *podSecurityPolicyInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&extensionsv1beta1.PodSecurityPolicy{}, f.defaultInformer)
|
||||
func (f *iPAddressInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&networkingv1alpha1.IPAddress{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *podSecurityPolicyInformer) Lister() v1beta1.PodSecurityPolicyLister {
|
||||
return v1beta1.NewPodSecurityPolicyLister(f.Informer().GetIndexer())
|
||||
func (f *iPAddressInformer) Lister() v1alpha1.IPAddressLister {
|
||||
return v1alpha1.NewIPAddressLister(f.Informer().GetIndexer())
|
||||
}
|
12
vendor/k8s.io/client-go/informers/resource/interface.go
generated
vendored
12
vendor/k8s.io/client-go/informers/resource/interface.go
generated
vendored
@ -20,13 +20,13 @@ package resource
|
||||
|
||||
import (
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
v1alpha1 "k8s.io/client-go/informers/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/client-go/informers/resource/v1alpha2"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
||||
V1alpha1() v1alpha1.Interface
|
||||
// V1alpha2 provides access to shared informers for resources in V1alpha2.
|
||||
V1alpha2() v1alpha2.Interface
|
||||
}
|
||||
|
||||
type group struct {
|
||||
@ -40,7 +40,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
return &group{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)
|
||||
// V1alpha2 returns a new v1alpha2.Interface.
|
||||
func (g *group) V1alpha2() v1alpha2.Interface {
|
||||
return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1alpha2
|
||||
|
||||
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 {
|
||||
// PodSchedulings returns a PodSchedulingInformer.
|
||||
PodSchedulings() PodSchedulingInformer
|
||||
// PodSchedulingContexts returns a PodSchedulingContextInformer.
|
||||
PodSchedulingContexts() PodSchedulingContextInformer
|
||||
// ResourceClaims returns a ResourceClaimInformer.
|
||||
ResourceClaims() ResourceClaimInformer
|
||||
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
|
||||
@ -45,9 +45,9 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// PodSchedulings returns a PodSchedulingInformer.
|
||||
func (v *version) PodSchedulings() PodSchedulingInformer {
|
||||
return &podSchedulingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
// PodSchedulingContexts returns a PodSchedulingContextInformer.
|
||||
func (v *version) PodSchedulingContexts() PodSchedulingContextInformer {
|
||||
return &podSchedulingContextInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
|
||||
}
|
||||
|
||||
// ResourceClaims returns a ResourceClaimInformer.
|
90
vendor/k8s.io/client-go/informers/resource/v1alpha2/podschedulingcontext.go
generated
vendored
Normal file
90
vendor/k8s.io/client-go/informers/resource/v1alpha2/podschedulingcontext.go
generated
vendored
Normal 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 v1alpha2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
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"
|
||||
v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// PodSchedulingContextInformer provides access to a shared informer and lister for
|
||||
// PodSchedulingContexts.
|
||||
type PodSchedulingContextInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha2.PodSchedulingContextLister
|
||||
}
|
||||
|
||||
type podSchedulingContextInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
namespace string
|
||||
}
|
||||
|
||||
// NewPodSchedulingContextInformer constructs a new informer for PodSchedulingContext 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 NewPodSchedulingContextInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredPodSchedulingContextInformer(client, namespace, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredPodSchedulingContextInformer constructs a new informer for PodSchedulingContext 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 NewFilteredPodSchedulingContextInformer(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.ResourceV1alpha2().PodSchedulingContexts(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha2().PodSchedulingContexts(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&resourcev1alpha2.PodSchedulingContext{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *podSchedulingContextInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredPodSchedulingContextInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *podSchedulingContextInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&resourcev1alpha2.PodSchedulingContext{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *podSchedulingContextInformer) Lister() v1alpha2.PodSchedulingContextLister {
|
||||
return v1alpha2.NewPodSchedulingContextLister(f.Informer().GetIndexer())
|
||||
}
|
@ -16,19 +16,19 @@ limitations under the License.
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
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/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
@ -36,7 +36,7 @@ import (
|
||||
// ResourceClaims.
|
||||
type ResourceClaimInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.ResourceClaimLister
|
||||
Lister() v1alpha2.ResourceClaimLister
|
||||
}
|
||||
|
||||
type resourceClaimInformer struct {
|
||||
@ -62,16 +62,16 @@ func NewFilteredResourceClaimInformer(client kubernetes.Interface, namespace str
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha1().ResourceClaims(namespace).List(context.TODO(), options)
|
||||
return client.ResourceV1alpha2().ResourceClaims(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha1().ResourceClaims(namespace).Watch(context.TODO(), options)
|
||||
return client.ResourceV1alpha2().ResourceClaims(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&resourcev1alpha1.ResourceClaim{},
|
||||
&resourcev1alpha2.ResourceClaim{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@ -82,9 +82,9 @@ func (f *resourceClaimInformer) defaultInformer(client kubernetes.Interface, res
|
||||
}
|
||||
|
||||
func (f *resourceClaimInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&resourcev1alpha1.ResourceClaim{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&resourcev1alpha2.ResourceClaim{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *resourceClaimInformer) Lister() v1alpha1.ResourceClaimLister {
|
||||
return v1alpha1.NewResourceClaimLister(f.Informer().GetIndexer())
|
||||
func (f *resourceClaimInformer) Lister() v1alpha2.ResourceClaimLister {
|
||||
return v1alpha2.NewResourceClaimLister(f.Informer().GetIndexer())
|
||||
}
|
@ -16,19 +16,19 @@ limitations under the License.
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
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/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
@ -36,7 +36,7 @@ import (
|
||||
// ResourceClaimTemplates.
|
||||
type ResourceClaimTemplateInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.ResourceClaimTemplateLister
|
||||
Lister() v1alpha2.ResourceClaimTemplateLister
|
||||
}
|
||||
|
||||
type resourceClaimTemplateInformer struct {
|
||||
@ -62,16 +62,16 @@ func NewFilteredResourceClaimTemplateInformer(client kubernetes.Interface, names
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha1().ResourceClaimTemplates(namespace).List(context.TODO(), options)
|
||||
return client.ResourceV1alpha2().ResourceClaimTemplates(namespace).List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha1().ResourceClaimTemplates(namespace).Watch(context.TODO(), options)
|
||||
return client.ResourceV1alpha2().ResourceClaimTemplates(namespace).Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&resourcev1alpha1.ResourceClaimTemplate{},
|
||||
&resourcev1alpha2.ResourceClaimTemplate{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@ -82,9 +82,9 @@ func (f *resourceClaimTemplateInformer) defaultInformer(client kubernetes.Interf
|
||||
}
|
||||
|
||||
func (f *resourceClaimTemplateInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&resourcev1alpha1.ResourceClaimTemplate{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&resourcev1alpha2.ResourceClaimTemplate{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *resourceClaimTemplateInformer) Lister() v1alpha1.ResourceClaimTemplateLister {
|
||||
return v1alpha1.NewResourceClaimTemplateLister(f.Informer().GetIndexer())
|
||||
func (f *resourceClaimTemplateInformer) Lister() v1alpha2.ResourceClaimTemplateLister {
|
||||
return v1alpha2.NewResourceClaimTemplateLister(f.Informer().GetIndexer())
|
||||
}
|
@ -16,19 +16,19 @@ limitations under the License.
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"context"
|
||||
time "time"
|
||||
|
||||
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
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/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
@ -36,7 +36,7 @@ import (
|
||||
// ResourceClasses.
|
||||
type ResourceClassInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.ResourceClassLister
|
||||
Lister() v1alpha2.ResourceClassLister
|
||||
}
|
||||
|
||||
type resourceClassInformer struct {
|
||||
@ -61,16 +61,16 @@ func NewFilteredResourceClassInformer(client kubernetes.Interface, resyncPeriod
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha1().ResourceClasses().List(context.TODO(), options)
|
||||
return client.ResourceV1alpha2().ResourceClasses().List(context.TODO(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ResourceV1alpha1().ResourceClasses().Watch(context.TODO(), options)
|
||||
return client.ResourceV1alpha2().ResourceClasses().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&resourcev1alpha1.ResourceClass{},
|
||||
&resourcev1alpha2.ResourceClass{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@ -81,9 +81,9 @@ func (f *resourceClassInformer) defaultInformer(client kubernetes.Interface, res
|
||||
}
|
||||
|
||||
func (f *resourceClassInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&resourcev1alpha1.ResourceClass{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&resourcev1alpha2.ResourceClass{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *resourceClassInformer) Lister() v1alpha1.ResourceClassLister {
|
||||
return v1alpha1.NewResourceClassLister(f.Informer().GetIndexer())
|
||||
func (f *resourceClassInformer) Lister() v1alpha2.ResourceClassLister {
|
||||
return v1alpha2.NewResourceClassLister(f.Informer().GetIndexer())
|
||||
}
|
Reference in New Issue
Block a user