Skip to content

Commit 992c904

Browse files
mbohloolk8s-publish-robot
authored andcommitted
Update generated files for MutatingWebhookConfiguration
Kubernetes-commit: 4568e0530c53df81d1bbd5e700daca041a1d8439
1 parent f04eada commit 992c904

14 files changed

+443
-0
lines changed

informers/admissionregistration/v1alpha1/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ go_library(
1010
srcs = [
1111
"initializerconfiguration.go",
1212
"interface.go",
13+
"mutatingwebhookconfiguration.go",
1314
"validatingwebhookconfiguration.go",
1415
],
1516
importpath = "k8s.io/client-go/informers/admissionregistration/v1alpha1",

informers/admissionregistration/v1alpha1/interface.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ import (
2626
type Interface interface {
2727
// InitializerConfigurations returns a InitializerConfigurationInformer.
2828
InitializerConfigurations() InitializerConfigurationInformer
29+
// MutatingWebhookConfigurations returns a MutatingWebhookConfigurationInformer.
30+
MutatingWebhookConfigurations() MutatingWebhookConfigurationInformer
2931
// ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer.
3032
ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer
3133
}
@@ -46,6 +48,11 @@ func (v *version) InitializerConfigurations() InitializerConfigurationInformer {
4648
return &initializerConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
4749
}
4850

51+
// MutatingWebhookConfigurations returns a MutatingWebhookConfigurationInformer.
52+
func (v *version) MutatingWebhookConfigurations() MutatingWebhookConfigurationInformer {
53+
return &mutatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
54+
}
55+
4956
// ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationInformer.
5057
func (v *version) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInformer {
5158
return &validatingWebhookConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
Copyright 2017 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// This file was automatically generated by informer-gen
18+
19+
package v1alpha1
20+
21+
import (
22+
admissionregistration_v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
23+
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
24+
runtime "k8s.io/apimachinery/pkg/runtime"
25+
watch "k8s.io/apimachinery/pkg/watch"
26+
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
27+
kubernetes "k8s.io/client-go/kubernetes"
28+
v1alpha1 "k8s.io/client-go/listers/admissionregistration/v1alpha1"
29+
cache "k8s.io/client-go/tools/cache"
30+
time "time"
31+
)
32+
33+
// MutatingWebhookConfigurationInformer provides access to a shared informer and lister for
34+
// MutatingWebhookConfigurations.
35+
type MutatingWebhookConfigurationInformer interface {
36+
Informer() cache.SharedIndexInformer
37+
Lister() v1alpha1.MutatingWebhookConfigurationLister
38+
}
39+
40+
type mutatingWebhookConfigurationInformer struct {
41+
factory internalinterfaces.SharedInformerFactory
42+
tweakListOptions internalinterfaces.TweakListOptionsFunc
43+
}
44+
45+
// NewMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration type.
46+
// Always prefer using an informer factory to get a shared informer instead of getting an independent
47+
// one. This reduces memory footprint and number of connections to the server.
48+
func NewMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
49+
return NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, indexers, nil)
50+
}
51+
52+
// NewFilteredMutatingWebhookConfigurationInformer constructs a new informer for MutatingWebhookConfiguration type.
53+
// Always prefer using an informer factory to get a shared informer instead of getting an independent
54+
// one. This reduces memory footprint and number of connections to the server.
55+
func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
56+
return cache.NewSharedIndexInformer(
57+
&cache.ListWatch{
58+
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
59+
if tweakListOptions != nil {
60+
tweakListOptions(&options)
61+
}
62+
return client.AdmissionregistrationV1alpha1().MutatingWebhookConfigurations().List(options)
63+
},
64+
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
65+
if tweakListOptions != nil {
66+
tweakListOptions(&options)
67+
}
68+
return client.AdmissionregistrationV1alpha1().MutatingWebhookConfigurations().Watch(options)
69+
},
70+
},
71+
&admissionregistration_v1alpha1.MutatingWebhookConfiguration{},
72+
resyncPeriod,
73+
indexers,
74+
)
75+
}
76+
77+
func (f *mutatingWebhookConfigurationInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
78+
return NewFilteredMutatingWebhookConfigurationInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
79+
}
80+
81+
func (f *mutatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer {
82+
return f.factory.InformerFor(&admissionregistration_v1alpha1.MutatingWebhookConfiguration{}, f.defaultInformer)
83+
}
84+
85+
func (f *mutatingWebhookConfigurationInformer) Lister() v1alpha1.MutatingWebhookConfigurationLister {
86+
return v1alpha1.NewMutatingWebhookConfigurationLister(f.Informer().GetIndexer())
87+
}

informers/generic.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
7474
// Group=admissionregistration.k8s.io, Version=v1alpha1
7575
case v1alpha1.SchemeGroupVersion.WithResource("initializerconfigurations"):
7676
return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().InitializerConfigurations().Informer()}, nil
77+
case v1alpha1.SchemeGroupVersion.WithResource("mutatingwebhookconfigurations"):
78+
return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().MutatingWebhookConfigurations().Informer()}, nil
7779
case v1alpha1.SchemeGroupVersion.WithResource("validatingwebhookconfigurations"):
7880
return &genericInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().ValidatingWebhookConfigurations().Informer()}, nil
7981

kubernetes/typed/admissionregistration/v1alpha1/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ go_library(
1212
"doc.go",
1313
"generated_expansion.go",
1414
"initializerconfiguration.go",
15+
"mutatingwebhookconfiguration.go",
1516
"validatingwebhookconfiguration.go",
1617
],
1718
importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1",

kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
type AdmissionregistrationV1alpha1Interface interface {
2727
RESTClient() rest.Interface
2828
InitializerConfigurationsGetter
29+
MutatingWebhookConfigurationsGetter
2930
ValidatingWebhookConfigurationsGetter
3031
}
3132

@@ -38,6 +39,10 @@ func (c *AdmissionregistrationV1alpha1Client) InitializerConfigurations() Initia
3839
return newInitializerConfigurations(c)
3940
}
4041

42+
func (c *AdmissionregistrationV1alpha1Client) MutatingWebhookConfigurations() MutatingWebhookConfigurationInterface {
43+
return newMutatingWebhookConfigurations(c)
44+
}
45+
4146
func (c *AdmissionregistrationV1alpha1Client) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface {
4247
return newValidatingWebhookConfigurations(c)
4348
}

kubernetes/typed/admissionregistration/v1alpha1/fake/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ go_library(
1111
"doc.go",
1212
"fake_admissionregistration_client.go",
1313
"fake_initializerconfiguration.go",
14+
"fake_mutatingwebhookconfiguration.go",
1415
"fake_validatingwebhookconfiguration.go",
1516
],
1617
importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake",

kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ func (c *FakeAdmissionregistrationV1alpha1) InitializerConfigurations() v1alpha1
3030
return &FakeInitializerConfigurations{c}
3131
}
3232

33+
func (c *FakeAdmissionregistrationV1alpha1) MutatingWebhookConfigurations() v1alpha1.MutatingWebhookConfigurationInterface {
34+
return &FakeMutatingWebhookConfigurations{c}
35+
}
36+
3337
func (c *FakeAdmissionregistrationV1alpha1) ValidatingWebhookConfigurations() v1alpha1.ValidatingWebhookConfigurationInterface {
3438
return &FakeValidatingWebhookConfigurations{c}
3539
}
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
/*
2+
Copyright 2017 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package fake
18+
19+
import (
20+
v1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
21+
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22+
labels "k8s.io/apimachinery/pkg/labels"
23+
schema "k8s.io/apimachinery/pkg/runtime/schema"
24+
types "k8s.io/apimachinery/pkg/types"
25+
watch "k8s.io/apimachinery/pkg/watch"
26+
testing "k8s.io/client-go/testing"
27+
)
28+
29+
// FakeMutatingWebhookConfigurations implements MutatingWebhookConfigurationInterface
30+
type FakeMutatingWebhookConfigurations struct {
31+
Fake *FakeAdmissionregistrationV1alpha1
32+
}
33+
34+
var mutatingwebhookconfigurationsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Resource: "mutatingwebhookconfigurations"}
35+
36+
var mutatingwebhookconfigurationsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "MutatingWebhookConfiguration"}
37+
38+
// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any.
39+
func (c *FakeMutatingWebhookConfigurations) Get(name string, options v1.GetOptions) (result *v1alpha1.MutatingWebhookConfiguration, err error) {
40+
obj, err := c.Fake.
41+
Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), &v1alpha1.MutatingWebhookConfiguration{})
42+
if obj == nil {
43+
return nil, err
44+
}
45+
return obj.(*v1alpha1.MutatingWebhookConfiguration), err
46+
}
47+
48+
// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
49+
func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v1alpha1.MutatingWebhookConfigurationList, err error) {
50+
obj, err := c.Fake.
51+
Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &v1alpha1.MutatingWebhookConfigurationList{})
52+
if obj == nil {
53+
return nil, err
54+
}
55+
56+
label, _, _ := testing.ExtractFromListOptions(opts)
57+
if label == nil {
58+
label = labels.Everything()
59+
}
60+
list := &v1alpha1.MutatingWebhookConfigurationList{}
61+
for _, item := range obj.(*v1alpha1.MutatingWebhookConfigurationList).Items {
62+
if label.Matches(labels.Set(item.Labels)) {
63+
list.Items = append(list.Items, item)
64+
}
65+
}
66+
return list, err
67+
}
68+
69+
// Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations.
70+
func (c *FakeMutatingWebhookConfigurations) Watch(opts v1.ListOptions) (watch.Interface, error) {
71+
return c.Fake.
72+
InvokesWatch(testing.NewRootWatchAction(mutatingwebhookconfigurationsResource, opts))
73+
}
74+
75+
// 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.
76+
func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1alpha1.MutatingWebhookConfiguration) (result *v1alpha1.MutatingWebhookConfiguration, err error) {
77+
obj, err := c.Fake.
78+
Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1alpha1.MutatingWebhookConfiguration{})
79+
if obj == nil {
80+
return nil, err
81+
}
82+
return obj.(*v1alpha1.MutatingWebhookConfiguration), err
83+
}
84+
85+
// 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.
86+
func (c *FakeMutatingWebhookConfigurations) Update(mutatingWebhookConfiguration *v1alpha1.MutatingWebhookConfiguration) (result *v1alpha1.MutatingWebhookConfiguration, err error) {
87+
obj, err := c.Fake.
88+
Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1alpha1.MutatingWebhookConfiguration{})
89+
if obj == nil {
90+
return nil, err
91+
}
92+
return obj.(*v1alpha1.MutatingWebhookConfiguration), err
93+
}
94+
95+
// Delete takes name of the mutatingWebhookConfiguration and deletes it. Returns an error if one occurs.
96+
func (c *FakeMutatingWebhookConfigurations) Delete(name string, options *v1.DeleteOptions) error {
97+
_, err := c.Fake.
98+
Invokes(testing.NewRootDeleteAction(mutatingwebhookconfigurationsResource, name), &v1alpha1.MutatingWebhookConfiguration{})
99+
return err
100+
}
101+
102+
// DeleteCollection deletes a collection of objects.
103+
func (c *FakeMutatingWebhookConfigurations) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
104+
action := testing.NewRootDeleteCollectionAction(mutatingwebhookconfigurationsResource, listOptions)
105+
106+
_, err := c.Fake.Invokes(action, &v1alpha1.MutatingWebhookConfigurationList{})
107+
return err
108+
}
109+
110+
// Patch applies the patch and returns the patched mutatingWebhookConfiguration.
111+
func (c *FakeMutatingWebhookConfigurations) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.MutatingWebhookConfiguration, err error) {
112+
obj, err := c.Fake.
113+
Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, data, subresources...), &v1alpha1.MutatingWebhookConfiguration{})
114+
if obj == nil {
115+
return nil, err
116+
}
117+
return obj.(*v1alpha1.MutatingWebhookConfiguration), err
118+
}

kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ package v1alpha1
1818

1919
type InitializerConfigurationExpansion interface{}
2020

21+
type MutatingWebhookConfigurationExpansion interface{}
22+
2123
type ValidatingWebhookConfigurationExpansion interface{}

0 commit comments

Comments
 (0)