mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-13 15:04:07 +00:00
Update generated files
Kubernetes-commit: cb43840492b383f4e1b87d7108d51c6439e1dad5
This commit is contained in:
parent
20fe48113a
commit
a455af0fbf
@ -8,9 +8,9 @@ load(
|
|||||||
go_library(
|
go_library(
|
||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = [
|
||||||
"externaladmissionhookconfiguration.go",
|
|
||||||
"initializerconfiguration.go",
|
"initializerconfiguration.go",
|
||||||
"interface.go",
|
"interface.go",
|
||||||
|
"validatingwebhookconfiguration.go",
|
||||||
],
|
],
|
||||||
importpath = "k8s.io/client-go/informers/admissionregistration/v1alpha1",
|
importpath = "k8s.io/client-go/informers/admissionregistration/v1alpha1",
|
||||||
deps = [
|
deps = [
|
||||||
|
@ -1,87 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// This file was automatically generated by informer-gen
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
admissionregistration_v1alpha1 "k8s.io/api/admissionregistration/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/admissionregistration/v1alpha1"
|
|
||||||
cache "k8s.io/client-go/tools/cache"
|
|
||||||
time "time"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ExternalAdmissionHookConfigurationInformer provides access to a shared informer and lister for
|
|
||||||
// ExternalAdmissionHookConfigurations.
|
|
||||||
type ExternalAdmissionHookConfigurationInformer interface {
|
|
||||||
Informer() cache.SharedIndexInformer
|
|
||||||
Lister() v1alpha1.ExternalAdmissionHookConfigurationLister
|
|
||||||
}
|
|
||||||
|
|
||||||
type externalAdmissionHookConfigurationInformer struct {
|
|
||||||
factory internalinterfaces.SharedInformerFactory
|
|
||||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewExternalAdmissionHookConfigurationInformer constructs a new informer for ExternalAdmissionHookConfiguration 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 NewExternalAdmissionHookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredExternalAdmissionHookConfigurationInformer(client, resyncPeriod, indexers, nil)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewFilteredExternalAdmissionHookConfigurationInformer constructs a new informer for ExternalAdmissionHookConfiguration 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 NewFilteredExternalAdmissionHookConfigurationInformer(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.AdmissionregistrationV1alpha1().ExternalAdmissionHookConfigurations().List(options)
|
|
||||||
},
|
|
||||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
|
||||||
if tweakListOptions != nil {
|
|
||||||
tweakListOptions(&options)
|
|
||||||
}
|
|
||||||
return client.AdmissionregistrationV1alpha1().ExternalAdmissionHookConfigurations().Watch(options)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
&admissionregistration_v1alpha1.ExternalAdmissionHookConfiguration{},
|
|
||||||
resyncPeriod,
|
|
||||||
indexers,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *externalAdmissionHookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
|
||||||
return NewFilteredExternalAdmissionHookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *externalAdmissionHookConfigurationInformer) Informer() cache.SharedIndexInformer {
|
|
||||||
return f.factory.InformerFor(&admissionregistration_v1alpha1.ExternalAdmissionHookConfiguration{}, f.defaultInformer)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *externalAdmissionHookConfigurationInformer) Lister() v1alpha1.ExternalAdmissionHookConfigurationLister {
|
|
||||||
return v1alpha1.NewExternalAdmissionHookConfigurationLister(f.Informer().GetIndexer())
|
|
||||||
}
|
|
@ -24,10 +24,10 @@ import (
|
|||||||
|
|
||||||
// Interface provides access to all the informers in this group version.
|
// Interface provides access to all the informers in this group version.
|
||||||
type Interface interface {
|
type Interface interface {
|
||||||
// ExternalAdmissionHookConfigurations returns a ExternalAdmissionHookConfigurationInformer.
|
|
||||||
ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInformer
|
|
||||||
// InitializerConfigurations returns a InitializerConfigurationInformer.
|
// InitializerConfigurations returns a InitializerConfigurationInformer.
|
||||||
InitializerConfigurations() InitializerConfigurationInformer
|
InitializerConfigurations() InitializerConfigurationInformer
|
||||||
|
// ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer.
|
||||||
|
ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer
|
||||||
}
|
}
|
||||||
|
|
||||||
type version struct {
|
type version struct {
|
||||||
@ -41,12 +41,12 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
|
|||||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExternalAdmissionHookConfigurations returns a ExternalAdmissionHookConfigurationInformer.
|
|
||||||
func (v *version) ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInformer {
|
|
||||||
return &externalAdmissionHookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
|
||||||
}
|
|
||||||
|
|
||||||
// InitializerConfigurations returns a InitializerConfigurationInformer.
|
// InitializerConfigurations returns a InitializerConfigurationInformer.
|
||||||
func (v *version) InitializerConfigurations() InitializerConfigurationInformer {
|
func (v *version) InitializerConfigurations() InitializerConfigurationInformer {
|
||||||
return &initializerConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
return &initializerConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer.
|
||||||
|
func (v *version) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer {
|
||||||
|
return &validatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||||
|
}
|
||||||
|
@ -0,0 +1,87 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by informer-gen
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
admissionregistration_v1alpha1 "k8s.io/api/admissionregistration/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/admissionregistration/v1alpha1"
|
||||||
|
cache "k8s.io/client-go/tools/cache"
|
||||||
|
time "time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ValidatingWebhookConfigurationInformer provides access to a shared informer and lister for
|
||||||
|
// ValidatingWebhookConfigurations.
|
||||||
|
type ValidatingWebhookConfigurationInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1alpha1.ValidatingWebhookConfigurationLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type validatingWebhookConfigurationInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewValidatingWebhookConfigurationInformer constructs a new informer for ValidatingWebhookConfiguration 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 NewValidatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||||
|
return NewFilteredValidatingWebhookConfigurationInformer(client, resyncPeriod, indexers, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewFilteredValidatingWebhookConfigurationInformer constructs a new informer for ValidatingWebhookConfiguration 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 NewFilteredValidatingWebhookConfigurationInformer(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.AdmissionregistrationV1alpha1().ValidatingWebhookConfigurations().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.AdmissionregistrationV1alpha1().ValidatingWebhookConfigurations().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&admissionregistration_v1alpha1.ValidatingWebhookConfiguration{},
|
||||||
|
resyncPeriod,
|
||||||
|
indexers,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *validatingWebhookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
return NewFilteredValidatingWebhookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *validatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&admissionregistration_v1alpha1.ValidatingWebhookConfiguration{}, f.defaultInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *validatingWebhookConfigurationInformer) Lister() v1alpha1.ValidatingWebhookConfigurationLister {
|
||||||
|
return v1alpha1.NewValidatingWebhookConfigurationLister(f.Informer().GetIndexer())
|
||||||
|
}
|
@ -72,10 +72,10 @@ func (f *genericInformer) Lister() cache.GenericLister {
|
|||||||
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
|
||||||
switch resource {
|
switch resource {
|
||||||
// Group=admissionregistration.k8s.io, Version=v1alpha1
|
// Group=admissionregistration.k8s.io, Version=v1alpha1
|
||||||
case v1alpha1.SchemeGroupVersion.WithResource("externaladmissionhookconfigurations"):
|
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().ExternalAdmissionHookConfigurations().Informer()}, nil
|
|
||||||
case v1alpha1.SchemeGroupVersion.WithResource("initializerconfigurations"):
|
case v1alpha1.SchemeGroupVersion.WithResource("initializerconfigurations"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().InitializerConfigurations().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().InitializerConfigurations().Informer()}, nil
|
||||||
|
case v1alpha1.SchemeGroupVersion.WithResource("validatingwebhookconfigurations"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().ValidatingWebhookConfigurations().Informer()}, nil
|
||||||
|
|
||||||
// Group=apps, Version=v1
|
// Group=apps, Version=v1
|
||||||
case v1.SchemeGroupVersion.WithResource("controllerrevisions"):
|
case v1.SchemeGroupVersion.WithResource("controllerrevisions"):
|
||||||
|
@ -10,9 +10,9 @@ go_library(
|
|||||||
srcs = [
|
srcs = [
|
||||||
"admissionregistration_client.go",
|
"admissionregistration_client.go",
|
||||||
"doc.go",
|
"doc.go",
|
||||||
"externaladmissionhookconfiguration.go",
|
|
||||||
"generated_expansion.go",
|
"generated_expansion.go",
|
||||||
"initializerconfiguration.go",
|
"initializerconfiguration.go",
|
||||||
|
"validatingwebhookconfiguration.go",
|
||||||
],
|
],
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1",
|
importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1",
|
||||||
deps = [
|
deps = [
|
||||||
|
@ -25,8 +25,8 @@ import (
|
|||||||
|
|
||||||
type AdmissionregistrationV1alpha1Interface interface {
|
type AdmissionregistrationV1alpha1Interface interface {
|
||||||
RESTClient() rest.Interface
|
RESTClient() rest.Interface
|
||||||
ExternalAdmissionHookConfigurationsGetter
|
|
||||||
InitializerConfigurationsGetter
|
InitializerConfigurationsGetter
|
||||||
|
ValidatingWebhookConfigurationsGetter
|
||||||
}
|
}
|
||||||
|
|
||||||
// AdmissionregistrationV1alpha1Client is used to interact with features provided by the admissionregistration.k8s.io group.
|
// AdmissionregistrationV1alpha1Client is used to interact with features provided by the admissionregistration.k8s.io group.
|
||||||
@ -34,14 +34,14 @@ type AdmissionregistrationV1alpha1Client struct {
|
|||||||
restClient rest.Interface
|
restClient rest.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *AdmissionregistrationV1alpha1Client) ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInterface {
|
|
||||||
return newExternalAdmissionHookConfigurations(c)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *AdmissionregistrationV1alpha1Client) InitializerConfigurations() InitializerConfigurationInterface {
|
func (c *AdmissionregistrationV1alpha1Client) InitializerConfigurations() InitializerConfigurationInterface {
|
||||||
return newInitializerConfigurations(c)
|
return newInitializerConfigurations(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *AdmissionregistrationV1alpha1Client) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface {
|
||||||
|
return newValidatingWebhookConfigurations(c)
|
||||||
|
}
|
||||||
|
|
||||||
// NewForConfig creates a new AdmissionregistrationV1alpha1Client for the given config.
|
// NewForConfig creates a new AdmissionregistrationV1alpha1Client for the given config.
|
||||||
func NewForConfig(c *rest.Config) (*AdmissionregistrationV1alpha1Client, error) {
|
func NewForConfig(c *rest.Config) (*AdmissionregistrationV1alpha1Client, error) {
|
||||||
config := *c
|
config := *c
|
||||||
|
@ -1,145 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 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 v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1alpha1 "k8s.io/api/admissionregistration/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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ExternalAdmissionHookConfigurationsGetter has a method to return a ExternalAdmissionHookConfigurationInterface.
|
|
||||||
// A group's client should implement this interface.
|
|
||||||
type ExternalAdmissionHookConfigurationsGetter interface {
|
|
||||||
ExternalAdmissionHookConfigurations() ExternalAdmissionHookConfigurationInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
// ExternalAdmissionHookConfigurationInterface has methods to work with ExternalAdmissionHookConfiguration resources.
|
|
||||||
type ExternalAdmissionHookConfigurationInterface interface {
|
|
||||||
Create(*v1alpha1.ExternalAdmissionHookConfiguration) (*v1alpha1.ExternalAdmissionHookConfiguration, error)
|
|
||||||
Update(*v1alpha1.ExternalAdmissionHookConfiguration) (*v1alpha1.ExternalAdmissionHookConfiguration, error)
|
|
||||||
Delete(name string, options *v1.DeleteOptions) error
|
|
||||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
|
||||||
Get(name string, options v1.GetOptions) (*v1alpha1.ExternalAdmissionHookConfiguration, error)
|
|
||||||
List(opts v1.ListOptions) (*v1alpha1.ExternalAdmissionHookConfigurationList, error)
|
|
||||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
|
||||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error)
|
|
||||||
ExternalAdmissionHookConfigurationExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// externalAdmissionHookConfigurations implements ExternalAdmissionHookConfigurationInterface
|
|
||||||
type externalAdmissionHookConfigurations struct {
|
|
||||||
client rest.Interface
|
|
||||||
}
|
|
||||||
|
|
||||||
// newExternalAdmissionHookConfigurations returns a ExternalAdmissionHookConfigurations
|
|
||||||
func newExternalAdmissionHookConfigurations(c *AdmissionregistrationV1alpha1Client) *externalAdmissionHookConfigurations {
|
|
||||||
return &externalAdmissionHookConfigurations{
|
|
||||||
client: c.RESTClient(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get takes name of the externalAdmissionHookConfiguration, and returns the corresponding externalAdmissionHookConfiguration object, and an error if there is any.
|
|
||||||
func (c *externalAdmissionHookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
|
|
||||||
result = &v1alpha1.ExternalAdmissionHookConfiguration{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Resource("externaladmissionhookconfigurations").
|
|
||||||
Name(name).
|
|
||||||
VersionedParams(&options, scheme.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of ExternalAdmissionHookConfigurations that match those selectors.
|
|
||||||
func (c *externalAdmissionHookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.ExternalAdmissionHookConfigurationList, err error) {
|
|
||||||
result = &v1alpha1.ExternalAdmissionHookConfigurationList{}
|
|
||||||
err = c.client.Get().
|
|
||||||
Resource("externaladmissionhookconfigurations").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested externalAdmissionHookConfigurations.
|
|
||||||
func (c *externalAdmissionHookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|
||||||
opts.Watch = true
|
|
||||||
return c.client.Get().
|
|
||||||
Resource("externaladmissionhookconfigurations").
|
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
|
||||||
Watch()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a externalAdmissionHookConfiguration and creates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any.
|
|
||||||
func (c *externalAdmissionHookConfigurations) Create(externalAdmissionHookConfiguration *v1alpha1.ExternalAdmissionHookConfiguration) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
|
|
||||||
result = &v1alpha1.ExternalAdmissionHookConfiguration{}
|
|
||||||
err = c.client.Post().
|
|
||||||
Resource("externaladmissionhookconfigurations").
|
|
||||||
Body(externalAdmissionHookConfiguration).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a externalAdmissionHookConfiguration and updates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any.
|
|
||||||
func (c *externalAdmissionHookConfigurations) Update(externalAdmissionHookConfiguration *v1alpha1.ExternalAdmissionHookConfiguration) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
|
|
||||||
result = &v1alpha1.ExternalAdmissionHookConfiguration{}
|
|
||||||
err = c.client.Put().
|
|
||||||
Resource("externaladmissionhookconfigurations").
|
|
||||||
Name(externalAdmissionHookConfiguration.Name).
|
|
||||||
Body(externalAdmissionHookConfiguration).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the externalAdmissionHookConfiguration and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *externalAdmissionHookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
|
|
||||||
return c.client.Delete().
|
|
||||||
Resource("externaladmissionhookconfigurations").
|
|
||||||
Name(name).
|
|
||||||
Body(options).
|
|
||||||
Do().
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *externalAdmissionHookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
|
||||||
return c.client.Delete().
|
|
||||||
Resource("externaladmissionhookconfigurations").
|
|
||||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
|
||||||
Body(options).
|
|
||||||
Do().
|
|
||||||
Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched externalAdmissionHookConfiguration.
|
|
||||||
func (c *externalAdmissionHookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
|
|
||||||
result = &v1alpha1.ExternalAdmissionHookConfiguration{}
|
|
||||||
err = c.client.Patch(pt).
|
|
||||||
Resource("externaladmissionhookconfigurations").
|
|
||||||
SubResource(subresources...).
|
|
||||||
Name(name).
|
|
||||||
Body(data).
|
|
||||||
Do().
|
|
||||||
Into(result)
|
|
||||||
return
|
|
||||||
}
|
|
@ -10,8 +10,8 @@ go_library(
|
|||||||
srcs = [
|
srcs = [
|
||||||
"doc.go",
|
"doc.go",
|
||||||
"fake_admissionregistration_client.go",
|
"fake_admissionregistration_client.go",
|
||||||
"fake_externaladmissionhookconfiguration.go",
|
|
||||||
"fake_initializerconfiguration.go",
|
"fake_initializerconfiguration.go",
|
||||||
|
"fake_validatingwebhookconfiguration.go",
|
||||||
],
|
],
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake",
|
importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake",
|
||||||
deps = [
|
deps = [
|
||||||
|
@ -26,14 +26,14 @@ type FakeAdmissionregistrationV1alpha1 struct {
|
|||||||
*testing.Fake
|
*testing.Fake
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *FakeAdmissionregistrationV1alpha1) ExternalAdmissionHookConfigurations() v1alpha1.ExternalAdmissionHookConfigurationInterface {
|
|
||||||
return &FakeExternalAdmissionHookConfigurations{c}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *FakeAdmissionregistrationV1alpha1) InitializerConfigurations() v1alpha1.InitializerConfigurationInterface {
|
func (c *FakeAdmissionregistrationV1alpha1) InitializerConfigurations() v1alpha1.InitializerConfigurationInterface {
|
||||||
return &FakeInitializerConfigurations{c}
|
return &FakeInitializerConfigurations{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *FakeAdmissionregistrationV1alpha1) ValidatingWebhookConfigurations() v1alpha1.ValidatingWebhookConfigurationInterface {
|
||||||
|
return &FakeValidatingWebhookConfigurations{c}
|
||||||
|
}
|
||||||
|
|
||||||
// RESTClient returns a RESTClient that is used to communicate
|
// RESTClient returns a RESTClient that is used to communicate
|
||||||
// with API server by this client implementation.
|
// with API server by this client implementation.
|
||||||
func (c *FakeAdmissionregistrationV1alpha1) RESTClient() rest.Interface {
|
func (c *FakeAdmissionregistrationV1alpha1) RESTClient() rest.Interface {
|
||||||
|
@ -1,118 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 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 fake
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
|
|
||||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
labels "k8s.io/apimachinery/pkg/labels"
|
|
||||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
|
||||||
watch "k8s.io/apimachinery/pkg/watch"
|
|
||||||
testing "k8s.io/client-go/testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
// FakeExternalAdmissionHookConfigurations implements ExternalAdmissionHookConfigurationInterface
|
|
||||||
type FakeExternalAdmissionHookConfigurations struct {
|
|
||||||
Fake *FakeAdmissionregistrationV1alpha1
|
|
||||||
}
|
|
||||||
|
|
||||||
var externaladmissionhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Resource: "externaladmissionhookconfigurations"}
|
|
||||||
|
|
||||||
var externaladmissionhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ExternalAdmissionHookConfiguration"}
|
|
||||||
|
|
||||||
// Get takes name of the externalAdmissionHookConfiguration, and returns the corresponding externalAdmissionHookConfiguration object, and an error if there is any.
|
|
||||||
func (c *FakeExternalAdmissionHookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootGetAction(externaladmissionhookconfigurationsResource, name), &v1alpha1.ExternalAdmissionHookConfiguration{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.ExternalAdmissionHookConfiguration), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// List takes label and field selectors, and returns the list of ExternalAdmissionHookConfigurations that match those selectors.
|
|
||||||
func (c *FakeExternalAdmissionHookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.ExternalAdmissionHookConfigurationList, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootListAction(externaladmissionhookconfigurationsResource, externaladmissionhookconfigurationsKind, opts), &v1alpha1.ExternalAdmissionHookConfigurationList{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
|
||||||
if label == nil {
|
|
||||||
label = labels.Everything()
|
|
||||||
}
|
|
||||||
list := &v1alpha1.ExternalAdmissionHookConfigurationList{}
|
|
||||||
for _, item := range obj.(*v1alpha1.ExternalAdmissionHookConfigurationList).Items {
|
|
||||||
if label.Matches(labels.Set(item.Labels)) {
|
|
||||||
list.Items = append(list.Items, item)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Watch returns a watch.Interface that watches the requested externalAdmissionHookConfigurations.
|
|
||||||
func (c *FakeExternalAdmissionHookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
|
||||||
return c.Fake.
|
|
||||||
InvokesWatch(testing.NewRootWatchAction(externaladmissionhookconfigurationsResource, opts))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create takes the representation of a externalAdmissionHookConfiguration and creates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any.
|
|
||||||
func (c *FakeExternalAdmissionHookConfigurations) Create(externalAdmissionHookConfiguration *v1alpha1.ExternalAdmissionHookConfiguration) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootCreateAction(externaladmissionhookconfigurationsResource, externalAdmissionHookConfiguration), &v1alpha1.ExternalAdmissionHookConfiguration{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.ExternalAdmissionHookConfiguration), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update takes the representation of a externalAdmissionHookConfiguration and updates it. Returns the server's representation of the externalAdmissionHookConfiguration, and an error, if there is any.
|
|
||||||
func (c *FakeExternalAdmissionHookConfigurations) Update(externalAdmissionHookConfiguration *v1alpha1.ExternalAdmissionHookConfiguration) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootUpdateAction(externaladmissionhookconfigurationsResource, externalAdmissionHookConfiguration), &v1alpha1.ExternalAdmissionHookConfiguration{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.ExternalAdmissionHookConfiguration), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete takes name of the externalAdmissionHookConfiguration and deletes it. Returns an error if one occurs.
|
|
||||||
func (c *FakeExternalAdmissionHookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
|
|
||||||
_, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootDeleteAction(externaladmissionhookconfigurationsResource, name), &v1alpha1.ExternalAdmissionHookConfiguration{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteCollection deletes a collection of objects.
|
|
||||||
func (c *FakeExternalAdmissionHookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
|
||||||
action := testing.NewRootDeleteCollectionAction(externaladmissionhookconfigurationsResource, listOptions)
|
|
||||||
|
|
||||||
_, err := c.Fake.Invokes(action, &v1alpha1.ExternalAdmissionHookConfigurationList{})
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch applies the patch and returns the patched externalAdmissionHookConfiguration.
|
|
||||||
func (c *FakeExternalAdmissionHookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ExternalAdmissionHookConfiguration, err error) {
|
|
||||||
obj, err := c.Fake.
|
|
||||||
Invokes(testing.NewRootPatchSubresourceAction(externaladmissionhookconfigurationsResource, name, data, subresources...), &v1alpha1.ExternalAdmissionHookConfiguration{})
|
|
||||||
if obj == nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.ExternalAdmissionHookConfiguration), err
|
|
||||||
}
|
|
@ -0,0 +1,118 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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 fake
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
|
||||||
|
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
|
labels "k8s.io/apimachinery/pkg/labels"
|
||||||
|
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
|
watch "k8s.io/apimachinery/pkg/watch"
|
||||||
|
testing "k8s.io/client-go/testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeValidatingWebhookConfigurations implements ValidatingWebhookConfigurationInterface
|
||||||
|
type FakeValidatingWebhookConfigurations struct {
|
||||||
|
Fake *FakeAdmissionregistrationV1alpha1
|
||||||
|
}
|
||||||
|
|
||||||
|
var validatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Resource: "validatingwebhookconfigurations"}
|
||||||
|
|
||||||
|
var validatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingWebhookConfiguration"}
|
||||||
|
|
||||||
|
// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any.
|
||||||
|
func (c *FakeValidatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.ValidatingWebhookConfiguration, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), &v1alpha1.ValidatingWebhookConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.ValidatingWebhookConfiguration), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors.
|
||||||
|
func (c *FakeValidatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.ValidatingWebhookConfigurationList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), &v1alpha1.ValidatingWebhookConfigurationList{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &v1alpha1.ValidatingWebhookConfigurationList{}
|
||||||
|
for _, item := range obj.(*v1alpha1.ValidatingWebhookConfigurationList).Items {
|
||||||
|
if label.Matches(labels.Set(item.Labels)) {
|
||||||
|
list.Items = append(list.Items, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations.
|
||||||
|
func (c *FakeValidatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewRootWatchAction(validatingwebhookconfigurationsResource, opts))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
|
||||||
|
func (c *FakeValidatingWebhookConfigurations) Create(validatingWebhookConfiguration *v1alpha1.ValidatingWebhookConfiguration) (result *v1alpha1.ValidatingWebhookConfiguration, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1alpha1.ValidatingWebhookConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.ValidatingWebhookConfiguration), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
|
||||||
|
func (c *FakeValidatingWebhookConfigurations) Update(validatingWebhookConfiguration *v1alpha1.ValidatingWebhookConfiguration) (result *v1alpha1.ValidatingWebhookConfiguration, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1alpha1.ValidatingWebhookConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.ValidatingWebhookConfiguration), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeValidatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootDeleteAction(validatingwebhookconfigurationsResource, name), &v1alpha1.ValidatingWebhookConfiguration{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeValidatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewRootDeleteCollectionAction(validatingwebhookconfigurationsResource, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &v1alpha1.ValidatingWebhookConfigurationList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched validatingWebhookConfiguration.
|
||||||
|
func (c *FakeValidatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ValidatingWebhookConfiguration, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, data, subresources...), &v1alpha1.ValidatingWebhookConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.ValidatingWebhookConfiguration), err
|
||||||
|
}
|
@ -16,6 +16,6 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1alpha1
|
package v1alpha1
|
||||||
|
|
||||||
type ExternalAdmissionHookConfigurationExpansion interface{}
|
|
||||||
|
|
||||||
type InitializerConfigurationExpansion interface{}
|
type InitializerConfigurationExpansion interface{}
|
||||||
|
|
||||||
|
type ValidatingWebhookConfigurationExpansion interface{}
|
||||||
|
@ -0,0 +1,145 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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 v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1alpha1 "k8s.io/api/admissionregistration/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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ValidatingWebhookConfigurationsGetter has a method to return a ValidatingWebhookConfigurationInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type ValidatingWebhookConfigurationsGetter interface {
|
||||||
|
ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// ValidatingWebhookConfigurationInterface has methods to work with ValidatingWebhookConfiguration resources.
|
||||||
|
type ValidatingWebhookConfigurationInterface interface {
|
||||||
|
Create(*v1alpha1.ValidatingWebhookConfiguration) (*v1alpha1.ValidatingWebhookConfiguration, error)
|
||||||
|
Update(*v1alpha1.ValidatingWebhookConfiguration) (*v1alpha1.ValidatingWebhookConfiguration, error)
|
||||||
|
Delete(name string, options *v1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||||
|
Get(name string, options v1.GetOptions) (*v1alpha1.ValidatingWebhookConfiguration, error)
|
||||||
|
List(opts v1.ListOptions) (*v1alpha1.ValidatingWebhookConfigurationList, error)
|
||||||
|
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ValidatingWebhookConfiguration, err error)
|
||||||
|
ValidatingWebhookConfigurationExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// validatingWebhookConfigurations implements ValidatingWebhookConfigurationInterface
|
||||||
|
type validatingWebhookConfigurations struct {
|
||||||
|
client rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
// newValidatingWebhookConfigurations returns a ValidatingWebhookConfigurations
|
||||||
|
func newValidatingWebhookConfigurations(c *AdmissionregistrationV1alpha1Client) *validatingWebhookConfigurations {
|
||||||
|
return &validatingWebhookConfigurations{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any.
|
||||||
|
func (c *validatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.ValidatingWebhookConfiguration, err error) {
|
||||||
|
result = &v1alpha1.ValidatingWebhookConfiguration{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Resource("validatingwebhookconfigurations").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors.
|
||||||
|
func (c *validatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.ValidatingWebhookConfigurationList, err error) {
|
||||||
|
result = &v1alpha1.ValidatingWebhookConfigurationList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Resource("validatingwebhookconfigurations").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations.
|
||||||
|
func (c *validatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Resource("validatingwebhookconfigurations").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
|
||||||
|
func (c *validatingWebhookConfigurations) Create(validatingWebhookConfiguration *v1alpha1.ValidatingWebhookConfiguration) (result *v1alpha1.ValidatingWebhookConfiguration, err error) {
|
||||||
|
result = &v1alpha1.ValidatingWebhookConfiguration{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("validatingwebhookconfigurations").
|
||||||
|
Body(validatingWebhookConfiguration).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
|
||||||
|
func (c *validatingWebhookConfigurations) Update(validatingWebhookConfiguration *v1alpha1.ValidatingWebhookConfiguration) (result *v1alpha1.ValidatingWebhookConfiguration, err error) {
|
||||||
|
result = &v1alpha1.ValidatingWebhookConfiguration{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Resource("validatingwebhookconfigurations").
|
||||||
|
Name(validatingWebhookConfiguration.Name).
|
||||||
|
Body(validatingWebhookConfiguration).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the validatingWebhookConfiguration and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *validatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Resource("validatingwebhookconfigurations").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *validatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Resource("validatingwebhookconfigurations").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched validatingWebhookConfiguration.
|
||||||
|
func (c *validatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ValidatingWebhookConfiguration, err error) {
|
||||||
|
result = &v1alpha1.ValidatingWebhookConfiguration{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Resource("validatingwebhookconfigurations").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
@ -9,8 +9,8 @@ go_library(
|
|||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = [
|
||||||
"expansion_generated.go",
|
"expansion_generated.go",
|
||||||
"externaladmissionhookconfiguration.go",
|
|
||||||
"initializerconfiguration.go",
|
"initializerconfiguration.go",
|
||||||
|
"validatingwebhookconfiguration.go",
|
||||||
],
|
],
|
||||||
importpath = "k8s.io/client-go/listers/admissionregistration/v1alpha1",
|
importpath = "k8s.io/client-go/listers/admissionregistration/v1alpha1",
|
||||||
deps = [
|
deps = [
|
||||||
|
@ -18,10 +18,10 @@ limitations under the License.
|
|||||||
|
|
||||||
package v1alpha1
|
package v1alpha1
|
||||||
|
|
||||||
// ExternalAdmissionHookConfigurationListerExpansion allows custom methods to be added to
|
|
||||||
// ExternalAdmissionHookConfigurationLister.
|
|
||||||
type ExternalAdmissionHookConfigurationListerExpansion interface{}
|
|
||||||
|
|
||||||
// InitializerConfigurationListerExpansion allows custom methods to be added to
|
// InitializerConfigurationListerExpansion allows custom methods to be added to
|
||||||
// InitializerConfigurationLister.
|
// InitializerConfigurationLister.
|
||||||
type InitializerConfigurationListerExpansion interface{}
|
type InitializerConfigurationListerExpansion interface{}
|
||||||
|
|
||||||
|
// ValidatingWebhookConfigurationListerExpansion allows custom methods to be added to
|
||||||
|
// ValidatingWebhookConfigurationLister.
|
||||||
|
type ValidatingWebhookConfigurationListerExpansion interface{}
|
||||||
|
@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2017 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// This file was automatically generated by lister-gen
|
|
||||||
|
|
||||||
package v1alpha1
|
|
||||||
|
|
||||||
import (
|
|
||||||
v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
|
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
|
||||||
"k8s.io/apimachinery/pkg/labels"
|
|
||||||
"k8s.io/client-go/tools/cache"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ExternalAdmissionHookConfigurationLister helps list ExternalAdmissionHookConfigurations.
|
|
||||||
type ExternalAdmissionHookConfigurationLister interface {
|
|
||||||
// List lists all ExternalAdmissionHookConfigurations in the indexer.
|
|
||||||
List(selector labels.Selector) (ret []*v1alpha1.ExternalAdmissionHookConfiguration, err error)
|
|
||||||
// Get retrieves the ExternalAdmissionHookConfiguration from the index for a given name.
|
|
||||||
Get(name string) (*v1alpha1.ExternalAdmissionHookConfiguration, error)
|
|
||||||
ExternalAdmissionHookConfigurationListerExpansion
|
|
||||||
}
|
|
||||||
|
|
||||||
// externalAdmissionHookConfigurationLister implements the ExternalAdmissionHookConfigurationLister interface.
|
|
||||||
type externalAdmissionHookConfigurationLister struct {
|
|
||||||
indexer cache.Indexer
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewExternalAdmissionHookConfigurationLister returns a new ExternalAdmissionHookConfigurationLister.
|
|
||||||
func NewExternalAdmissionHookConfigurationLister(indexer cache.Indexer) ExternalAdmissionHookConfigurationLister {
|
|
||||||
return &externalAdmissionHookConfigurationLister{indexer: indexer}
|
|
||||||
}
|
|
||||||
|
|
||||||
// List lists all ExternalAdmissionHookConfigurations in the indexer.
|
|
||||||
func (s *externalAdmissionHookConfigurationLister) List(selector labels.Selector) (ret []*v1alpha1.ExternalAdmissionHookConfiguration, err error) {
|
|
||||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
|
||||||
ret = append(ret, m.(*v1alpha1.ExternalAdmissionHookConfiguration))
|
|
||||||
})
|
|
||||||
return ret, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get retrieves the ExternalAdmissionHookConfiguration from the index for a given name.
|
|
||||||
func (s *externalAdmissionHookConfigurationLister) Get(name string) (*v1alpha1.ExternalAdmissionHookConfiguration, error) {
|
|
||||||
obj, exists, err := s.indexer.GetByKey(name)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if !exists {
|
|
||||||
return nil, errors.NewNotFound(v1alpha1.Resource("externaladmissionhookconfiguration"), name)
|
|
||||||
}
|
|
||||||
return obj.(*v1alpha1.ExternalAdmissionHookConfiguration), nil
|
|
||||||
}
|
|
@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// This file was automatically generated by lister-gen
|
||||||
|
|
||||||
|
package v1alpha1
|
||||||
|
|
||||||
|
import (
|
||||||
|
v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
|
||||||
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
|
"k8s.io/apimachinery/pkg/labels"
|
||||||
|
"k8s.io/client-go/tools/cache"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ValidatingWebhookConfigurationLister helps list ValidatingWebhookConfigurations.
|
||||||
|
type ValidatingWebhookConfigurationLister interface {
|
||||||
|
// List lists all ValidatingWebhookConfigurations in the indexer.
|
||||||
|
List(selector labels.Selector) (ret []*v1alpha1.ValidatingWebhookConfiguration, err error)
|
||||||
|
// Get retrieves the ValidatingWebhookConfiguration from the index for a given name.
|
||||||
|
Get(name string) (*v1alpha1.ValidatingWebhookConfiguration, error)
|
||||||
|
ValidatingWebhookConfigurationListerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// validatingWebhookConfigurationLister implements the ValidatingWebhookConfigurationLister interface.
|
||||||
|
type validatingWebhookConfigurationLister struct {
|
||||||
|
indexer cache.Indexer
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewValidatingWebhookConfigurationLister returns a new ValidatingWebhookConfigurationLister.
|
||||||
|
func NewValidatingWebhookConfigurationLister(indexer cache.Indexer) ValidatingWebhookConfigurationLister {
|
||||||
|
return &validatingWebhookConfigurationLister{indexer: indexer}
|
||||||
|
}
|
||||||
|
|
||||||
|
// List lists all ValidatingWebhookConfigurations in the indexer.
|
||||||
|
func (s *validatingWebhookConfigurationLister) List(selector labels.Selector) (ret []*v1alpha1.ValidatingWebhookConfiguration, err error) {
|
||||||
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
|
ret = append(ret, m.(*v1alpha1.ValidatingWebhookConfiguration))
|
||||||
|
})
|
||||||
|
return ret, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get retrieves the ValidatingWebhookConfiguration from the index for a given name.
|
||||||
|
func (s *validatingWebhookConfigurationLister) Get(name string) (*v1alpha1.ValidatingWebhookConfiguration, error) {
|
||||||
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !exists {
|
||||||
|
return nil, errors.NewNotFound(v1alpha1.Resource("validatingwebhookconfiguration"), name)
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.ValidatingWebhookConfiguration), nil
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user