mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-05 19:26:23 +00:00
Update generated files for MutatingWebhookConfiguration
Kubernetes-commit: 4568e0530c53df81d1bbd5e700daca041a1d8439
This commit is contained in:
parent
a455af0fbf
commit
80e12d1632
@ -10,6 +10,7 @@ go_library(
|
|||||||
srcs = [
|
srcs = [
|
||||||
"initializerconfiguration.go",
|
"initializerconfiguration.go",
|
||||||
"interface.go",
|
"interface.go",
|
||||||
|
"mutatingwebhookconfiguration.go",
|
||||||
"validatingwebhookconfiguration.go",
|
"validatingwebhookconfiguration.go",
|
||||||
],
|
],
|
||||||
importpath = "k8s.io/client-go/informers/admissionregistration/v1alpha1",
|
importpath = "k8s.io/client-go/informers/admissionregistration/v1alpha1",
|
||||||
|
@ -26,6 +26,8 @@ import (
|
|||||||
type Interface interface {
|
type Interface interface {
|
||||||
// InitializerConfigurations returns a InitializerConfigurationInformer.
|
// InitializerConfigurations returns a InitializerConfigurationInformer.
|
||||||
InitializerConfigurations() InitializerConfigurationInformer
|
InitializerConfigurations() InitializerConfigurationInformer
|
||||||
|
// MutatingWebhookConfigurations returns a MutatingWebhookConfigurationInformer.
|
||||||
|
MutatingWebhookConfigurations() MutatingWebhookConfigurationInformer
|
||||||
// ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer.
|
// ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer.
|
||||||
ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer
|
ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer
|
||||||
}
|
}
|
||||||
@ -46,6 +48,11 @@ func (v *version) InitializerConfigurations() InitializerConfigurationInformer {
|
|||||||
return &initializerConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
return &initializerConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MutatingWebhookConfigurations returns a MutatingWebhookConfigurationInformer.
|
||||||
|
func (v *version) MutatingWebhookConfigurations() MutatingWebhookConfigurationInformer {
|
||||||
|
return &mutatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||||
|
}
|
||||||
|
|
||||||
// ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer.
|
// ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer.
|
||||||
func (v *version) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer {
|
func (v *version) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer {
|
||||||
return &validatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MutatingWebhookConfigurationInformer provides access to a shared informer and lister for
|
||||||
|
// MutatingWebhookConfigurations.
|
||||||
|
type MutatingWebhookConfigurationInformer interface {
|
||||||
|
Informer() cache.SharedIndexInformer
|
||||||
|
Lister() v1alpha1.MutatingWebhookConfigurationLister
|
||||||
|
}
|
||||||
|
|
||||||
|
type mutatingWebhookConfigurationInformer struct {
|
||||||
|
factory internalinterfaces.SharedInformerFactory
|
||||||
|
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration 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 NewMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||||
|
return NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, indexers, nil)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewFilteredMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration 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 NewFilteredMutatingWebhookConfigurationInformer(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().MutatingWebhookConfigurations().List(options)
|
||||||
|
},
|
||||||
|
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||||
|
if tweakListOptions != nil {
|
||||||
|
tweakListOptions(&options)
|
||||||
|
}
|
||||||
|
return client.AdmissionregistrationV1alpha1().MutatingWebhookConfigurations().Watch(options)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
&admissionregistration_v1alpha1.MutatingWebhookConfiguration{},
|
||||||
|
resyncPeriod,
|
||||||
|
indexers,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *mutatingWebhookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||||
|
return NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *mutatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer {
|
||||||
|
return f.factory.InformerFor(&admissionregistration_v1alpha1.MutatingWebhookConfiguration{}, f.defaultInformer)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *mutatingWebhookConfigurationInformer) Lister() v1alpha1.MutatingWebhookConfigurationLister {
|
||||||
|
return v1alpha1.NewMutatingWebhookConfigurationLister(f.Informer().GetIndexer())
|
||||||
|
}
|
@ -74,6 +74,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
|||||||
// Group=admissionregistration.k8s.io, Version=v1alpha1
|
// Group=admissionregistration.k8s.io, Version=v1alpha1
|
||||||
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("mutatingwebhookconfigurations"):
|
||||||
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().MutatingWebhookConfigurations().Informer()}, nil
|
||||||
case v1alpha1.SchemeGroupVersion.WithResource("validatingwebhookconfigurations"):
|
case v1alpha1.SchemeGroupVersion.WithResource("validatingwebhookconfigurations"):
|
||||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().ValidatingWebhookConfigurations().Informer()}, nil
|
return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().ValidatingWebhookConfigurations().Informer()}, nil
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ go_library(
|
|||||||
"doc.go",
|
"doc.go",
|
||||||
"generated_expansion.go",
|
"generated_expansion.go",
|
||||||
"initializerconfiguration.go",
|
"initializerconfiguration.go",
|
||||||
|
"mutatingwebhookconfiguration.go",
|
||||||
"validatingwebhookconfiguration.go",
|
"validatingwebhookconfiguration.go",
|
||||||
],
|
],
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1",
|
importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1",
|
||||||
|
@ -26,6 +26,7 @@ import (
|
|||||||
type AdmissionregistrationV1alpha1Interface interface {
|
type AdmissionregistrationV1alpha1Interface interface {
|
||||||
RESTClient() rest.Interface
|
RESTClient() rest.Interface
|
||||||
InitializerConfigurationsGetter
|
InitializerConfigurationsGetter
|
||||||
|
MutatingWebhookConfigurationsGetter
|
||||||
ValidatingWebhookConfigurationsGetter
|
ValidatingWebhookConfigurationsGetter
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,6 +39,10 @@ func (c *AdmissionregistrationV1alpha1Client) InitializerConfigurations() Initia
|
|||||||
return newInitializerConfigurations(c)
|
return newInitializerConfigurations(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *AdmissionregistrationV1alpha1Client) MutatingWebhookConfigurations() MutatingWebhookConfigurationInterface {
|
||||||
|
return newMutatingWebhookConfigurations(c)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *AdmissionregistrationV1alpha1Client) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface {
|
func (c *AdmissionregistrationV1alpha1Client) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface {
|
||||||
return newValidatingWebhookConfigurations(c)
|
return newValidatingWebhookConfigurations(c)
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ go_library(
|
|||||||
"doc.go",
|
"doc.go",
|
||||||
"fake_admissionregistration_client.go",
|
"fake_admissionregistration_client.go",
|
||||||
"fake_initializerconfiguration.go",
|
"fake_initializerconfiguration.go",
|
||||||
|
"fake_mutatingwebhookconfiguration.go",
|
||||||
"fake_validatingwebhookconfiguration.go",
|
"fake_validatingwebhookconfiguration.go",
|
||||||
],
|
],
|
||||||
importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake",
|
importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake",
|
||||||
|
@ -30,6 +30,10 @@ func (c *FakeAdmissionregistrationV1alpha1) InitializerConfigurations() v1alpha1
|
|||||||
return &FakeInitializerConfigurations{c}
|
return &FakeInitializerConfigurations{c}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *FakeAdmissionregistrationV1alpha1) MutatingWebhookConfigurations() v1alpha1.MutatingWebhookConfigurationInterface {
|
||||||
|
return &FakeMutatingWebhookConfigurations{c}
|
||||||
|
}
|
||||||
|
|
||||||
func (c *FakeAdmissionregistrationV1alpha1) ValidatingWebhookConfigurations() v1alpha1.ValidatingWebhookConfigurationInterface {
|
func (c *FakeAdmissionregistrationV1alpha1) ValidatingWebhookConfigurations() v1alpha1.ValidatingWebhookConfigurationInterface {
|
||||||
return &FakeValidatingWebhookConfigurations{c}
|
return &FakeValidatingWebhookConfigurations{c}
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// FakeMutatingWebhookConfigurations implements MutatingWebhookConfigurationInterface
|
||||||
|
type FakeMutatingWebhookConfigurations struct {
|
||||||
|
Fake *FakeAdmissionregistrationV1alpha1
|
||||||
|
}
|
||||||
|
|
||||||
|
var mutatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Resource: "mutatingwebhookconfigurations"}
|
||||||
|
|
||||||
|
var mutatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "MutatingWebhookConfiguration"}
|
||||||
|
|
||||||
|
// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any.
|
||||||
|
func (c *FakeMutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.MutatingWebhookConfiguration, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), &v1alpha1.MutatingWebhookConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.MutatingWebhookConfiguration), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
|
||||||
|
func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.MutatingWebhookConfigurationList, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &v1alpha1.MutatingWebhookConfigurationList{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||||
|
if label == nil {
|
||||||
|
label = labels.Everything()
|
||||||
|
}
|
||||||
|
list := &v1alpha1.MutatingWebhookConfigurationList{}
|
||||||
|
for _, item := range obj.(*v1alpha1.MutatingWebhookConfigurationList).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 mutatingWebhookConfigurations.
|
||||||
|
func (c *FakeMutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
return c.Fake.
|
||||||
|
InvokesWatch(testing.NewRootWatchAction(mutatingwebhookconfigurationsResource, opts))
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
|
||||||
|
func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1alpha1.MutatingWebhookConfiguration) (result *v1alpha1.MutatingWebhookConfiguration, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1alpha1.MutatingWebhookConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.MutatingWebhookConfiguration), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
|
||||||
|
func (c *FakeMutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1alpha1.MutatingWebhookConfiguration) (result *v1alpha1.MutatingWebhookConfiguration, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1alpha1.MutatingWebhookConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.MutatingWebhookConfiguration), err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *FakeMutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
_, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &v1alpha1.MutatingWebhookConfiguration{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions)
|
||||||
|
|
||||||
|
_, err := c.Fake.Invokes(action, &v1alpha1.MutatingWebhookConfigurationList{})
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched mutatingWebhookConfiguration.
|
||||||
|
func (c *FakeMutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.MutatingWebhookConfiguration, err error) {
|
||||||
|
obj, err := c.Fake.
|
||||||
|
Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, data, subresources...), &v1alpha1.MutatingWebhookConfiguration{})
|
||||||
|
if obj == nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.MutatingWebhookConfiguration), err
|
||||||
|
}
|
@ -18,4 +18,6 @@ package v1alpha1
|
|||||||
|
|
||||||
type InitializerConfigurationExpansion interface{}
|
type InitializerConfigurationExpansion interface{}
|
||||||
|
|
||||||
|
type MutatingWebhookConfigurationExpansion interface{}
|
||||||
|
|
||||||
type ValidatingWebhookConfigurationExpansion 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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MutatingWebhookConfigurationsGetter has a method to return a MutatingWebhookConfigurationInterface.
|
||||||
|
// A group's client should implement this interface.
|
||||||
|
type MutatingWebhookConfigurationsGetter interface {
|
||||||
|
MutatingWebhookConfigurations() MutatingWebhookConfigurationInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
// MutatingWebhookConfigurationInterface has methods to work with MutatingWebhookConfiguration resources.
|
||||||
|
type MutatingWebhookConfigurationInterface interface {
|
||||||
|
Create(*v1alpha1.MutatingWebhookConfiguration) (*v1alpha1.MutatingWebhookConfiguration, error)
|
||||||
|
Update(*v1alpha1.MutatingWebhookConfiguration) (*v1alpha1.MutatingWebhookConfiguration, error)
|
||||||
|
Delete(name string, options *v1.DeleteOptions) error
|
||||||
|
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||||
|
Get(name string, options v1.GetOptions) (*v1alpha1.MutatingWebhookConfiguration, error)
|
||||||
|
List(opts v1.ListOptions) (*v1alpha1.MutatingWebhookConfigurationList, error)
|
||||||
|
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||||
|
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.MutatingWebhookConfiguration, err error)
|
||||||
|
MutatingWebhookConfigurationExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// mutatingWebhookConfigurations implements MutatingWebhookConfigurationInterface
|
||||||
|
type mutatingWebhookConfigurations struct {
|
||||||
|
client rest.Interface
|
||||||
|
}
|
||||||
|
|
||||||
|
// newMutatingWebhookConfigurations returns a MutatingWebhookConfigurations
|
||||||
|
func newMutatingWebhookConfigurations(c *AdmissionregistrationV1alpha1Client) *mutatingWebhookConfigurations {
|
||||||
|
return &mutatingWebhookConfigurations{
|
||||||
|
client: c.RESTClient(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any.
|
||||||
|
func (c *mutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.MutatingWebhookConfiguration, err error) {
|
||||||
|
result = &v1alpha1.MutatingWebhookConfiguration{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Resource("mutatingwebhookconfigurations").
|
||||||
|
Name(name).
|
||||||
|
VersionedParams(&options, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
|
||||||
|
func (c *mutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.MutatingWebhookConfigurationList, err error) {
|
||||||
|
result = &v1alpha1.MutatingWebhookConfigurationList{}
|
||||||
|
err = c.client.Get().
|
||||||
|
Resource("mutatingwebhookconfigurations").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations.
|
||||||
|
func (c *mutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||||
|
opts.Watch = true
|
||||||
|
return c.client.Get().
|
||||||
|
Resource("mutatingwebhookconfigurations").
|
||||||
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
|
Watch()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
|
||||||
|
func (c *mutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1alpha1.MutatingWebhookConfiguration) (result *v1alpha1.MutatingWebhookConfiguration, err error) {
|
||||||
|
result = &v1alpha1.MutatingWebhookConfiguration{}
|
||||||
|
err = c.client.Post().
|
||||||
|
Resource("mutatingwebhookconfigurations").
|
||||||
|
Body(mutatingWebhookConfiguration).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
|
||||||
|
func (c *mutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1alpha1.MutatingWebhookConfiguration) (result *v1alpha1.MutatingWebhookConfiguration, err error) {
|
||||||
|
result = &v1alpha1.MutatingWebhookConfiguration{}
|
||||||
|
err = c.client.Put().
|
||||||
|
Resource("mutatingwebhookconfigurations").
|
||||||
|
Name(mutatingWebhookConfiguration.Name).
|
||||||
|
Body(mutatingWebhookConfiguration).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs.
|
||||||
|
func (c *mutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Resource("mutatingwebhookconfigurations").
|
||||||
|
Name(name).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// DeleteCollection deletes a collection of objects.
|
||||||
|
func (c *mutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||||
|
return c.client.Delete().
|
||||||
|
Resource("mutatingwebhookconfigurations").
|
||||||
|
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||||
|
Body(options).
|
||||||
|
Do().
|
||||||
|
Error()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Patch applies the patch and returns the patched mutatingWebhookConfiguration.
|
||||||
|
func (c *mutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.MutatingWebhookConfiguration, err error) {
|
||||||
|
result = &v1alpha1.MutatingWebhookConfiguration{}
|
||||||
|
err = c.client.Patch(pt).
|
||||||
|
Resource("mutatingwebhookconfigurations").
|
||||||
|
SubResource(subresources...).
|
||||||
|
Name(name).
|
||||||
|
Body(data).
|
||||||
|
Do().
|
||||||
|
Into(result)
|
||||||
|
return
|
||||||
|
}
|
@ -10,6 +10,7 @@ go_library(
|
|||||||
srcs = [
|
srcs = [
|
||||||
"expansion_generated.go",
|
"expansion_generated.go",
|
||||||
"initializerconfiguration.go",
|
"initializerconfiguration.go",
|
||||||
|
"mutatingwebhookconfiguration.go",
|
||||||
"validatingwebhookconfiguration.go",
|
"validatingwebhookconfiguration.go",
|
||||||
],
|
],
|
||||||
importpath = "k8s.io/client-go/listers/admissionregistration/v1alpha1",
|
importpath = "k8s.io/client-go/listers/admissionregistration/v1alpha1",
|
||||||
|
@ -22,6 +22,10 @@ package v1alpha1
|
|||||||
// InitializerConfigurationLister.
|
// InitializerConfigurationLister.
|
||||||
type InitializerConfigurationListerExpansion interface{}
|
type InitializerConfigurationListerExpansion interface{}
|
||||||
|
|
||||||
|
// MutatingWebhookConfigurationListerExpansion allows custom methods to be added to
|
||||||
|
// MutatingWebhookConfigurationLister.
|
||||||
|
type MutatingWebhookConfigurationListerExpansion interface{}
|
||||||
|
|
||||||
// ValidatingWebhookConfigurationListerExpansion allows custom methods to be added to
|
// ValidatingWebhookConfigurationListerExpansion allows custom methods to be added to
|
||||||
// ValidatingWebhookConfigurationLister.
|
// ValidatingWebhookConfigurationLister.
|
||||||
type ValidatingWebhookConfigurationListerExpansion interface{}
|
type ValidatingWebhookConfigurationListerExpansion interface{}
|
||||||
|
@ -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"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MutatingWebhookConfigurationLister helps list MutatingWebhookConfigurations.
|
||||||
|
type MutatingWebhookConfigurationLister interface {
|
||||||
|
// List lists all MutatingWebhookConfigurations in the indexer.
|
||||||
|
List(selector labels.Selector) (ret []*v1alpha1.MutatingWebhookConfiguration, err error)
|
||||||
|
// Get retrieves the MutatingWebhookConfiguration from the index for a given name.
|
||||||
|
Get(name string) (*v1alpha1.MutatingWebhookConfiguration, error)
|
||||||
|
MutatingWebhookConfigurationListerExpansion
|
||||||
|
}
|
||||||
|
|
||||||
|
// mutatingWebhookConfigurationLister implements the MutatingWebhookConfigurationLister interface.
|
||||||
|
type mutatingWebhookConfigurationLister struct {
|
||||||
|
indexer cache.Indexer
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewMutatingWebhookConfigurationLister returns a new MutatingWebhookConfigurationLister.
|
||||||
|
func NewMutatingWebhookConfigurationLister(indexer cache.Indexer) MutatingWebhookConfigurationLister {
|
||||||
|
return &mutatingWebhookConfigurationLister{indexer: indexer}
|
||||||
|
}
|
||||||
|
|
||||||
|
// List lists all MutatingWebhookConfigurations in the indexer.
|
||||||
|
func (s *mutatingWebhookConfigurationLister) List(selector labels.Selector) (ret []*v1alpha1.MutatingWebhookConfiguration, err error) {
|
||||||
|
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||||
|
ret = append(ret, m.(*v1alpha1.MutatingWebhookConfiguration))
|
||||||
|
})
|
||||||
|
return ret, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get retrieves the MutatingWebhookConfiguration from the index for a given name.
|
||||||
|
func (s *mutatingWebhookConfigurationLister) Get(name string) (*v1alpha1.MutatingWebhookConfiguration, error) {
|
||||||
|
obj, exists, err := s.indexer.GetByKey(name)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !exists {
|
||||||
|
return nil, errors.NewNotFound(v1alpha1.Resource("mutatingwebhookconfiguration"), name)
|
||||||
|
}
|
||||||
|
return obj.(*v1alpha1.MutatingWebhookConfiguration), nil
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user