diff --git a/config/clientset/versioned/typed/config/v1/config_client.go b/config/clientset/versioned/typed/config/v1/config_client.go index cf870c8e5..cd28c36e2 100644 --- a/config/clientset/versioned/typed/config/v1/config_client.go +++ b/config/clientset/versioned/typed/config/v1/config_client.go @@ -18,7 +18,7 @@ type ConfigV1Interface interface { ClusterVersionsGetter ConsolesGetter DNSesGetter - FeaturesGetter + FeatureGatesGetter ImagesGetter InfrastructuresGetter IngressesGetter @@ -62,8 +62,8 @@ func (c *ConfigV1Client) DNSes() DNSInterface { return newDNSes(c) } -func (c *ConfigV1Client) Features() FeaturesInterface { - return newFeatures(c) +func (c *ConfigV1Client) FeatureGates() FeatureGateInterface { + return newFeatureGates(c) } func (c *ConfigV1Client) Images() ImageInterface { diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_config_client.go b/config/clientset/versioned/typed/config/v1/fake/fake_config_client.go index 76419cc39..45a6a4b91 100644 --- a/config/clientset/versioned/typed/config/v1/fake/fake_config_client.go +++ b/config/clientset/versioned/typed/config/v1/fake/fake_config_client.go @@ -40,8 +40,8 @@ func (c *FakeConfigV1) DNSes() v1.DNSInterface { return &FakeDNSes{c} } -func (c *FakeConfigV1) Features() v1.FeaturesInterface { - return &FakeFeatures{c} +func (c *FakeConfigV1) FeatureGates() v1.FeatureGateInterface { + return &FakeFeatureGates{c} } func (c *FakeConfigV1) Images() v1.ImageInterface { diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_featuregate.go b/config/clientset/versioned/typed/config/v1/fake/fake_featuregate.go new file mode 100644 index 000000000..dc0a0a096 --- /dev/null +++ b/config/clientset/versioned/typed/config/v1/fake/fake_featuregate.go @@ -0,0 +1,115 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + config_v1 "github.com/openshift/api/config/v1" + 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" +) + +// FakeFeatureGates implements FeatureGateInterface +type FakeFeatureGates struct { + Fake *FakeConfigV1 +} + +var featuregatesResource = schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "featuregates"} + +var featuregatesKind = schema.GroupVersionKind{Group: "config.openshift.io", Version: "v1", Kind: "FeatureGate"} + +// Get takes name of the featureGate, and returns the corresponding featureGate object, and an error if there is any. +func (c *FakeFeatureGates) Get(name string, options v1.GetOptions) (result *config_v1.FeatureGate, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(featuregatesResource, name), &config_v1.FeatureGate{}) + if obj == nil { + return nil, err + } + return obj.(*config_v1.FeatureGate), err +} + +// List takes label and field selectors, and returns the list of FeatureGates that match those selectors. +func (c *FakeFeatureGates) List(opts v1.ListOptions) (result *config_v1.FeatureGateList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(featuregatesResource, featuregatesKind, opts), &config_v1.FeatureGateList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &config_v1.FeatureGateList{ListMeta: obj.(*config_v1.FeatureGateList).ListMeta} + for _, item := range obj.(*config_v1.FeatureGateList).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 featureGates. +func (c *FakeFeatureGates) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(featuregatesResource, opts)) +} + +// Create takes the representation of a featureGate and creates it. Returns the server's representation of the featureGate, and an error, if there is any. +func (c *FakeFeatureGates) Create(featureGate *config_v1.FeatureGate) (result *config_v1.FeatureGate, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(featuregatesResource, featureGate), &config_v1.FeatureGate{}) + if obj == nil { + return nil, err + } + return obj.(*config_v1.FeatureGate), err +} + +// Update takes the representation of a featureGate and updates it. Returns the server's representation of the featureGate, and an error, if there is any. +func (c *FakeFeatureGates) Update(featureGate *config_v1.FeatureGate) (result *config_v1.FeatureGate, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(featuregatesResource, featureGate), &config_v1.FeatureGate{}) + if obj == nil { + return nil, err + } + return obj.(*config_v1.FeatureGate), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeFeatureGates) UpdateStatus(featureGate *config_v1.FeatureGate) (*config_v1.FeatureGate, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(featuregatesResource, "status", featureGate), &config_v1.FeatureGate{}) + if obj == nil { + return nil, err + } + return obj.(*config_v1.FeatureGate), err +} + +// Delete takes name of the featureGate and deletes it. Returns an error if one occurs. +func (c *FakeFeatureGates) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(featuregatesResource, name), &config_v1.FeatureGate{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeFeatureGates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(featuregatesResource, listOptions) + + _, err := c.Fake.Invokes(action, &config_v1.FeatureGateList{}) + return err +} + +// Patch applies the patch and returns the patched featureGate. +func (c *FakeFeatureGates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *config_v1.FeatureGate, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(featuregatesResource, name, data, subresources...), &config_v1.FeatureGate{}) + if obj == nil { + return nil, err + } + return obj.(*config_v1.FeatureGate), err +} diff --git a/config/clientset/versioned/typed/config/v1/fake/fake_features.go b/config/clientset/versioned/typed/config/v1/fake/fake_features.go deleted file mode 100644 index 6952af793..000000000 --- a/config/clientset/versioned/typed/config/v1/fake/fake_features.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - config_v1 "github.com/openshift/api/config/v1" - 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" -) - -// FakeFeatures implements FeaturesInterface -type FakeFeatures struct { - Fake *FakeConfigV1 -} - -var featuresResource = schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "features"} - -var featuresKind = schema.GroupVersionKind{Group: "config.openshift.io", Version: "v1", Kind: "Features"} - -// Get takes name of the features, and returns the corresponding features object, and an error if there is any. -func (c *FakeFeatures) Get(name string, options v1.GetOptions) (result *config_v1.Features, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootGetAction(featuresResource, name), &config_v1.Features{}) - if obj == nil { - return nil, err - } - return obj.(*config_v1.Features), err -} - -// List takes label and field selectors, and returns the list of Features that match those selectors. -func (c *FakeFeatures) List(opts v1.ListOptions) (result *config_v1.FeaturesList, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootListAction(featuresResource, featuresKind, opts), &config_v1.FeaturesList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &config_v1.FeaturesList{ListMeta: obj.(*config_v1.FeaturesList).ListMeta} - for _, item := range obj.(*config_v1.FeaturesList).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 features. -func (c *FakeFeatures) Watch(opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchAction(featuresResource, opts)) -} - -// Create takes the representation of a features and creates it. Returns the server's representation of the features, and an error, if there is any. -func (c *FakeFeatures) Create(features *config_v1.Features) (result *config_v1.Features, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(featuresResource, features), &config_v1.Features{}) - if obj == nil { - return nil, err - } - return obj.(*config_v1.Features), err -} - -// Update takes the representation of a features and updates it. Returns the server's representation of the features, and an error, if there is any. -func (c *FakeFeatures) Update(features *config_v1.Features) (result *config_v1.Features, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(featuresResource, features), &config_v1.Features{}) - if obj == nil { - return nil, err - } - return obj.(*config_v1.Features), err -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeFeatures) UpdateStatus(features *config_v1.Features) (*config_v1.Features, error) { - obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(featuresResource, "status", features), &config_v1.Features{}) - if obj == nil { - return nil, err - } - return obj.(*config_v1.Features), err -} - -// Delete takes name of the features and deletes it. Returns an error if one occurs. -func (c *FakeFeatures) Delete(name string, options *v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(featuresResource, name), &config_v1.Features{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeFeatures) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(featuresResource, listOptions) - - _, err := c.Fake.Invokes(action, &config_v1.FeaturesList{}) - return err -} - -// Patch applies the patch and returns the patched features. -func (c *FakeFeatures) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *config_v1.Features, err error) { - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(featuresResource, name, data, subresources...), &config_v1.Features{}) - if obj == nil { - return nil, err - } - return obj.(*config_v1.Features), err -} diff --git a/config/clientset/versioned/typed/config/v1/featuregate.go b/config/clientset/versioned/typed/config/v1/featuregate.go new file mode 100644 index 000000000..72da006b1 --- /dev/null +++ b/config/clientset/versioned/typed/config/v1/featuregate.go @@ -0,0 +1,147 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/config/v1" + scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// FeatureGatesGetter has a method to return a FeatureGateInterface. +// A group's client should implement this interface. +type FeatureGatesGetter interface { + FeatureGates() FeatureGateInterface +} + +// FeatureGateInterface has methods to work with FeatureGate resources. +type FeatureGateInterface interface { + Create(*v1.FeatureGate) (*v1.FeatureGate, error) + Update(*v1.FeatureGate) (*v1.FeatureGate, error) + UpdateStatus(*v1.FeatureGate) (*v1.FeatureGate, error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.FeatureGate, error) + List(opts meta_v1.ListOptions) (*v1.FeatureGateList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.FeatureGate, err error) + FeatureGateExpansion +} + +// featureGates implements FeatureGateInterface +type featureGates struct { + client rest.Interface +} + +// newFeatureGates returns a FeatureGates +func newFeatureGates(c *ConfigV1Client) *featureGates { + return &featureGates{ + client: c.RESTClient(), + } +} + +// Get takes name of the featureGate, and returns the corresponding featureGate object, and an error if there is any. +func (c *featureGates) Get(name string, options meta_v1.GetOptions) (result *v1.FeatureGate, err error) { + result = &v1.FeatureGate{} + err = c.client.Get(). + Resource("featuregates"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of FeatureGates that match those selectors. +func (c *featureGates) List(opts meta_v1.ListOptions) (result *v1.FeatureGateList, err error) { + result = &v1.FeatureGateList{} + err = c.client.Get(). + Resource("featuregates"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested featureGates. +func (c *featureGates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("featuregates"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a featureGate and creates it. Returns the server's representation of the featureGate, and an error, if there is any. +func (c *featureGates) Create(featureGate *v1.FeatureGate) (result *v1.FeatureGate, err error) { + result = &v1.FeatureGate{} + err = c.client.Post(). + Resource("featuregates"). + Body(featureGate). + Do(). + Into(result) + return +} + +// Update takes the representation of a featureGate and updates it. Returns the server's representation of the featureGate, and an error, if there is any. +func (c *featureGates) Update(featureGate *v1.FeatureGate) (result *v1.FeatureGate, err error) { + result = &v1.FeatureGate{} + err = c.client.Put(). + Resource("featuregates"). + Name(featureGate.Name). + Body(featureGate). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *featureGates) UpdateStatus(featureGate *v1.FeatureGate) (result *v1.FeatureGate, err error) { + result = &v1.FeatureGate{} + err = c.client.Put(). + Resource("featuregates"). + Name(featureGate.Name). + SubResource("status"). + Body(featureGate). + Do(). + Into(result) + return +} + +// Delete takes name of the featureGate and deletes it. Returns an error if one occurs. +func (c *featureGates) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("featuregates"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *featureGates) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("featuregates"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched featureGate. +func (c *featureGates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.FeatureGate, err error) { + result = &v1.FeatureGate{} + err = c.client.Patch(pt). + Resource("featuregates"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/config/clientset/versioned/typed/config/v1/features.go b/config/clientset/versioned/typed/config/v1/features.go deleted file mode 100644 index a6eb5983a..000000000 --- a/config/clientset/versioned/typed/config/v1/features.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/openshift/api/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// FeaturesGetter has a method to return a FeaturesInterface. -// A group's client should implement this interface. -type FeaturesGetter interface { - Features() FeaturesInterface -} - -// FeaturesInterface has methods to work with Features resources. -type FeaturesInterface interface { - Create(*v1.Features) (*v1.Features, error) - Update(*v1.Features) (*v1.Features, error) - UpdateStatus(*v1.Features) (*v1.Features, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.Features, error) - List(opts meta_v1.ListOptions) (*v1.FeaturesList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) - Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Features, err error) - FeaturesExpansion -} - -// features implements FeaturesInterface -type features struct { - client rest.Interface -} - -// newFeatures returns a Features -func newFeatures(c *ConfigV1Client) *features { - return &features{ - client: c.RESTClient(), - } -} - -// Get takes name of the features, and returns the corresponding features object, and an error if there is any. -func (c *features) Get(name string, options meta_v1.GetOptions) (result *v1.Features, err error) { - result = &v1.Features{} - err = c.client.Get(). - Resource("features"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of Features that match those selectors. -func (c *features) List(opts meta_v1.ListOptions) (result *v1.FeaturesList, err error) { - result = &v1.FeaturesList{} - err = c.client.Get(). - Resource("features"). - VersionedParams(&opts, scheme.ParameterCodec). - Do(). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested features. -func (c *features) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { - opts.Watch = true - return c.client.Get(). - Resource("features"). - VersionedParams(&opts, scheme.ParameterCodec). - Watch() -} - -// Create takes the representation of a features and creates it. Returns the server's representation of the features, and an error, if there is any. -func (c *features) Create(features *v1.Features) (result *v1.Features, err error) { - result = &v1.Features{} - err = c.client.Post(). - Resource("features"). - Body(features). - Do(). - Into(result) - return -} - -// Update takes the representation of a features and updates it. Returns the server's representation of the features, and an error, if there is any. -func (c *features) Update(features *v1.Features) (result *v1.Features, err error) { - result = &v1.Features{} - err = c.client.Put(). - Resource("features"). - Name(features.Name). - Body(features). - Do(). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - -func (c *features) UpdateStatus(features *v1.Features) (result *v1.Features, err error) { - result = &v1.Features{} - err = c.client.Put(). - Resource("features"). - Name(features.Name). - SubResource("status"). - Body(features). - Do(). - Into(result) - return -} - -// Delete takes name of the features and deletes it. Returns an error if one occurs. -func (c *features) Delete(name string, options *meta_v1.DeleteOptions) error { - return c.client.Delete(). - Resource("features"). - Name(name). - Body(options). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *features) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { - return c.client.Delete(). - Resource("features"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Body(options). - Do(). - Error() -} - -// Patch applies the patch and returns the patched features. -func (c *features) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Features, err error) { - result = &v1.Features{} - err = c.client.Patch(pt). - Resource("features"). - SubResource(subresources...). - Name(name). - Body(data). - Do(). - Into(result) - return -} diff --git a/config/clientset/versioned/typed/config/v1/generated_expansion.go b/config/clientset/versioned/typed/config/v1/generated_expansion.go index 822a30c35..ad1005fb7 100644 --- a/config/clientset/versioned/typed/config/v1/generated_expansion.go +++ b/config/clientset/versioned/typed/config/v1/generated_expansion.go @@ -16,7 +16,7 @@ type ConsoleExpansion interface{} type DNSExpansion interface{} -type FeaturesExpansion interface{} +type FeatureGateExpansion interface{} type ImageExpansion interface{} diff --git a/config/informers/externalversions/config/v1/features.go b/config/informers/externalversions/config/v1/featuregate.go similarity index 50% rename from config/informers/externalversions/config/v1/features.go rename to config/informers/externalversions/config/v1/featuregate.go index e336b68a8..6641138bc 100644 --- a/config/informers/externalversions/config/v1/features.go +++ b/config/informers/externalversions/config/v1/featuregate.go @@ -15,58 +15,58 @@ import ( cache "k8s.io/client-go/tools/cache" ) -// FeaturesInformer provides access to a shared informer and lister for -// Features. -type FeaturesInformer interface { +// FeatureGateInformer provides access to a shared informer and lister for +// FeatureGates. +type FeatureGateInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.FeaturesLister + Lister() v1.FeatureGateLister } -type featuresInformer struct { +type featureGateInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } -// NewFeaturesInformer constructs a new informer for Features type. +// NewFeatureGateInformer constructs a new informer for FeatureGate 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 NewFeaturesInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredFeaturesInformer(client, resyncPeriod, indexers, nil) +func NewFeatureGateInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredFeatureGateInformer(client, resyncPeriod, indexers, nil) } -// NewFilteredFeaturesInformer constructs a new informer for Features type. +// NewFilteredFeatureGateInformer constructs a new informer for FeatureGate 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 NewFilteredFeaturesInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +func NewFilteredFeatureGateInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ConfigV1().Features().List(options) + return client.ConfigV1().FeatureGates().List(options) }, WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ConfigV1().Features().Watch(options) + return client.ConfigV1().FeatureGates().Watch(options) }, }, - &config_v1.Features{}, + &config_v1.FeatureGate{}, resyncPeriod, indexers, ) } -func (f *featuresInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredFeaturesInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +func (f *featureGateInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredFeatureGateInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } -func (f *featuresInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&config_v1.Features{}, f.defaultInformer) +func (f *featureGateInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&config_v1.FeatureGate{}, f.defaultInformer) } -func (f *featuresInformer) Lister() v1.FeaturesLister { - return v1.NewFeaturesLister(f.Informer().GetIndexer()) +func (f *featureGateInformer) Lister() v1.FeatureGateLister { + return v1.NewFeatureGateLister(f.Informer().GetIndexer()) } diff --git a/config/informers/externalversions/config/v1/interface.go b/config/informers/externalversions/config/v1/interface.go index 3c30aef6f..3b6b8a38a 100644 --- a/config/informers/externalversions/config/v1/interface.go +++ b/config/informers/externalversions/config/v1/interface.go @@ -22,8 +22,8 @@ type Interface interface { Consoles() ConsoleInformer // DNSes returns a DNSInformer. DNSes() DNSInformer - // Features returns a FeaturesInformer. - Features() FeaturesInformer + // FeatureGates returns a FeatureGateInformer. + FeatureGates() FeatureGateInformer // Images returns a ImageInformer. Images() ImageInformer // Infrastructures returns a InfrastructureInformer. @@ -88,9 +88,9 @@ func (v *version) DNSes() DNSInformer { return &dNSInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// Features returns a FeaturesInformer. -func (v *version) Features() FeaturesInformer { - return &featuresInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +// FeatureGates returns a FeatureGateInformer. +func (v *version) FeatureGates() FeatureGateInformer { + return &featureGateInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } // Images returns a ImageInformer. diff --git a/config/informers/externalversions/generic.go b/config/informers/externalversions/generic.go index 50ce23d8e..248b39101 100644 --- a/config/informers/externalversions/generic.go +++ b/config/informers/externalversions/generic.go @@ -51,8 +51,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Consoles().Informer()}, nil case v1.SchemeGroupVersion.WithResource("dnses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().DNSes().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("features"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Features().Informer()}, nil + case v1.SchemeGroupVersion.WithResource("featuregates"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().FeatureGates().Informer()}, nil case v1.SchemeGroupVersion.WithResource("images"): return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Images().Informer()}, nil case v1.SchemeGroupVersion.WithResource("infrastructures"): diff --git a/config/listers/config/v1/expansion_generated.go b/config/listers/config/v1/expansion_generated.go index 99c2acbda..94d309605 100644 --- a/config/listers/config/v1/expansion_generated.go +++ b/config/listers/config/v1/expansion_generated.go @@ -30,9 +30,9 @@ type ConsoleListerExpansion interface{} // DNSLister. type DNSListerExpansion interface{} -// FeaturesListerExpansion allows custom methods to be added to -// FeaturesLister. -type FeaturesListerExpansion interface{} +// FeatureGateListerExpansion allows custom methods to be added to +// FeatureGateLister. +type FeatureGateListerExpansion interface{} // ImageListerExpansion allows custom methods to be added to // ImageLister. diff --git a/config/listers/config/v1/featuregate.go b/config/listers/config/v1/featuregate.go new file mode 100644 index 000000000..cb2b6cf16 --- /dev/null +++ b/config/listers/config/v1/featuregate.go @@ -0,0 +1,49 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/config/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// FeatureGateLister helps list FeatureGates. +type FeatureGateLister interface { + // List lists all FeatureGates in the indexer. + List(selector labels.Selector) (ret []*v1.FeatureGate, err error) + // Get retrieves the FeatureGate from the index for a given name. + Get(name string) (*v1.FeatureGate, error) + FeatureGateListerExpansion +} + +// featureGateLister implements the FeatureGateLister interface. +type featureGateLister struct { + indexer cache.Indexer +} + +// NewFeatureGateLister returns a new FeatureGateLister. +func NewFeatureGateLister(indexer cache.Indexer) FeatureGateLister { + return &featureGateLister{indexer: indexer} +} + +// List lists all FeatureGates in the indexer. +func (s *featureGateLister) List(selector labels.Selector) (ret []*v1.FeatureGate, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.FeatureGate)) + }) + return ret, err +} + +// Get retrieves the FeatureGate from the index for a given name. +func (s *featureGateLister) Get(name string) (*v1.FeatureGate, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("featuregate"), name) + } + return obj.(*v1.FeatureGate), nil +} diff --git a/config/listers/config/v1/features.go b/config/listers/config/v1/features.go deleted file mode 100644 index 1b2dd33bc..000000000 --- a/config/listers/config/v1/features.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" -) - -// FeaturesLister helps list Features. -type FeaturesLister interface { - // List lists all Features in the indexer. - List(selector labels.Selector) (ret []*v1.Features, err error) - // Get retrieves the Features from the index for a given name. - Get(name string) (*v1.Features, error) - FeaturesListerExpansion -} - -// featuresLister implements the FeaturesLister interface. -type featuresLister struct { - indexer cache.Indexer -} - -// NewFeaturesLister returns a new FeaturesLister. -func NewFeaturesLister(indexer cache.Indexer) FeaturesLister { - return &featuresLister{indexer: indexer} -} - -// List lists all Features in the indexer. -func (s *featuresLister) List(selector labels.Selector) (ret []*v1.Features, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1.Features)) - }) - return ret, err -} - -// Get retrieves the Features from the index for a given name. -func (s *featuresLister) Get(name string) (*v1.Features, error) { - obj, exists, err := s.indexer.GetByKey(name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1.Resource("features"), name) - } - return obj.(*v1.Features), nil -} diff --git a/glide.lock b/glide.lock index f05b9defa..fd4570ba9 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ hash: 2bc7f2365f88b3af5dd5bc4bc234144b18e67928f8169661cd2fa2b48c389650 -updated: 2019-03-01T14:01:27.246783073-05:00 +updated: 2019-03-13T15:57:18.934454257-05:00 imports: - name: github.com/davecgh/go-spew version: 782f4967f2dc4564575ca782fe2d04090b5faca8 @@ -49,7 +49,7 @@ imports: - name: github.com/modern-go/reflect2 version: 05fbef0ca5da472bbf96c9322b84a53edc03c9fd - name: github.com/openshift/api - version: b75f8002d9873eb84986b824850058977e116e5b + version: 5e45fff0f89ec1edff19e0ee00a21ecbeb08d787 subpackages: - apps/v1 - authorization/v1 @@ -238,7 +238,7 @@ imports: - util/integer - util/retry - name: k8s.io/code-generator - version: 1bdf8e8a8fde675de375d9d0a8fa77c4034be0a0 + version: 13d81ee386d3d039027dd42e7b3d1d30d8d788f2 repo: https://github.com/openshift/kubernetes-code-generator.git - name: k8s.io/gengo version: 01a732e01d00cb9a81bb0ca050d3e6d2b947927b diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go new file mode 100644 index 000000000..378859738 --- /dev/null +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_ingresscontroller.go @@ -0,0 +1,124 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + operator_v1 "github.com/openshift/api/operator/v1" + 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" +) + +// FakeIngressControllers implements IngressControllerInterface +type FakeIngressControllers struct { + Fake *FakeOperatorV1 + ns string +} + +var ingresscontrollersResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "ingresscontrollers"} + +var ingresscontrollersKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "IngressController"} + +// Get takes name of the ingressController, and returns the corresponding ingressController object, and an error if there is any. +func (c *FakeIngressControllers) Get(name string, options v1.GetOptions) (result *operator_v1.IngressController, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(ingresscontrollersResource, c.ns, name), &operator_v1.IngressController{}) + + if obj == nil { + return nil, err + } + return obj.(*operator_v1.IngressController), err +} + +// List takes label and field selectors, and returns the list of IngressControllers that match those selectors. +func (c *FakeIngressControllers) List(opts v1.ListOptions) (result *operator_v1.IngressControllerList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(ingresscontrollersResource, ingresscontrollersKind, c.ns, opts), &operator_v1.IngressControllerList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &operator_v1.IngressControllerList{ListMeta: obj.(*operator_v1.IngressControllerList).ListMeta} + for _, item := range obj.(*operator_v1.IngressControllerList).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 ingressControllers. +func (c *FakeIngressControllers) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(ingresscontrollersResource, c.ns, opts)) + +} + +// Create takes the representation of a ingressController and creates it. Returns the server's representation of the ingressController, and an error, if there is any. +func (c *FakeIngressControllers) Create(ingressController *operator_v1.IngressController) (result *operator_v1.IngressController, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(ingresscontrollersResource, c.ns, ingressController), &operator_v1.IngressController{}) + + if obj == nil { + return nil, err + } + return obj.(*operator_v1.IngressController), err +} + +// Update takes the representation of a ingressController and updates it. Returns the server's representation of the ingressController, and an error, if there is any. +func (c *FakeIngressControllers) Update(ingressController *operator_v1.IngressController) (result *operator_v1.IngressController, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(ingresscontrollersResource, c.ns, ingressController), &operator_v1.IngressController{}) + + if obj == nil { + return nil, err + } + return obj.(*operator_v1.IngressController), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeIngressControllers) UpdateStatus(ingressController *operator_v1.IngressController) (*operator_v1.IngressController, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(ingresscontrollersResource, "status", c.ns, ingressController), &operator_v1.IngressController{}) + + if obj == nil { + return nil, err + } + return obj.(*operator_v1.IngressController), err +} + +// Delete takes name of the ingressController and deletes it. Returns an error if one occurs. +func (c *FakeIngressControllers) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(ingresscontrollersResource, c.ns, name), &operator_v1.IngressController{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeIngressControllers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(ingresscontrollersResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &operator_v1.IngressControllerList{}) + return err +} + +// Patch applies the patch and returns the patched ingressController. +func (c *FakeIngressControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *operator_v1.IngressController, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(ingresscontrollersResource, c.ns, name, data, subresources...), &operator_v1.IngressController{}) + + if obj == nil { + return nil, err + } + return obj.(*operator_v1.IngressController), err +} diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go new file mode 100644 index 000000000..a0822dcb9 --- /dev/null +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_network.go @@ -0,0 +1,115 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + operator_v1 "github.com/openshift/api/operator/v1" + 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" +) + +// FakeNetworks implements NetworkInterface +type FakeNetworks struct { + Fake *FakeOperatorV1 +} + +var networksResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1", Resource: "networks"} + +var networksKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1", Kind: "Network"} + +// Get takes name of the network, and returns the corresponding network object, and an error if there is any. +func (c *FakeNetworks) Get(name string, options v1.GetOptions) (result *operator_v1.Network, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(networksResource, name), &operator_v1.Network{}) + if obj == nil { + return nil, err + } + return obj.(*operator_v1.Network), err +} + +// List takes label and field selectors, and returns the list of Networks that match those selectors. +func (c *FakeNetworks) List(opts v1.ListOptions) (result *operator_v1.NetworkList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(networksResource, networksKind, opts), &operator_v1.NetworkList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &operator_v1.NetworkList{ListMeta: obj.(*operator_v1.NetworkList).ListMeta} + for _, item := range obj.(*operator_v1.NetworkList).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 networks. +func (c *FakeNetworks) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(networksResource, opts)) +} + +// Create takes the representation of a network and creates it. Returns the server's representation of the network, and an error, if there is any. +func (c *FakeNetworks) Create(network *operator_v1.Network) (result *operator_v1.Network, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(networksResource, network), &operator_v1.Network{}) + if obj == nil { + return nil, err + } + return obj.(*operator_v1.Network), err +} + +// Update takes the representation of a network and updates it. Returns the server's representation of the network, and an error, if there is any. +func (c *FakeNetworks) Update(network *operator_v1.Network) (result *operator_v1.Network, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(networksResource, network), &operator_v1.Network{}) + if obj == nil { + return nil, err + } + return obj.(*operator_v1.Network), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeNetworks) UpdateStatus(network *operator_v1.Network) (*operator_v1.Network, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(networksResource, "status", network), &operator_v1.Network{}) + if obj == nil { + return nil, err + } + return obj.(*operator_v1.Network), err +} + +// Delete takes name of the network and deletes it. Returns an error if one occurs. +func (c *FakeNetworks) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(networksResource, name), &operator_v1.Network{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeNetworks) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(networksResource, listOptions) + + _, err := c.Fake.Invokes(action, &operator_v1.NetworkList{}) + return err +} + +// Patch applies the patch and returns the patched network. +func (c *FakeNetworks) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *operator_v1.Network, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(networksResource, name, data, subresources...), &operator_v1.Network{}) + if obj == nil { + return nil, err + } + return obj.(*operator_v1.Network), err +} diff --git a/operator/clientset/versioned/typed/operator/v1/fake/fake_operator_client.go b/operator/clientset/versioned/typed/operator/v1/fake/fake_operator_client.go index e9c56582a..0c7e3a3d9 100644 --- a/operator/clientset/versioned/typed/operator/v1/fake/fake_operator_client.go +++ b/operator/clientset/versioned/typed/operator/v1/fake/fake_operator_client.go @@ -24,6 +24,10 @@ func (c *FakeOperatorV1) Etcds() v1.EtcdInterface { return &FakeEtcds{c} } +func (c *FakeOperatorV1) IngressControllers(namespace string) v1.IngressControllerInterface { + return &FakeIngressControllers{c, namespace} +} + func (c *FakeOperatorV1) KubeAPIServers() v1.KubeAPIServerInterface { return &FakeKubeAPIServers{c} } @@ -36,6 +40,10 @@ func (c *FakeOperatorV1) KubeSchedulers() v1.KubeSchedulerInterface { return &FakeKubeSchedulers{c} } +func (c *FakeOperatorV1) Networks() v1.NetworkInterface { + return &FakeNetworks{c} +} + func (c *FakeOperatorV1) OpenShiftAPIServers() v1.OpenShiftAPIServerInterface { return &FakeOpenShiftAPIServers{c} } diff --git a/operator/clientset/versioned/typed/operator/v1/generated_expansion.go b/operator/clientset/versioned/typed/operator/v1/generated_expansion.go index 358e3f0b8..b20aca4be 100644 --- a/operator/clientset/versioned/typed/operator/v1/generated_expansion.go +++ b/operator/clientset/versioned/typed/operator/v1/generated_expansion.go @@ -8,12 +8,16 @@ type ConsoleExpansion interface{} type EtcdExpansion interface{} +type IngressControllerExpansion interface{} + type KubeAPIServerExpansion interface{} type KubeControllerManagerExpansion interface{} type KubeSchedulerExpansion interface{} +type NetworkExpansion interface{} + type OpenShiftAPIServerExpansion interface{} type OpenShiftControllerManagerExpansion interface{} diff --git a/operator/clientset/versioned/typed/operator/v1/ingresscontroller.go b/operator/clientset/versioned/typed/operator/v1/ingresscontroller.go new file mode 100644 index 000000000..d1d492253 --- /dev/null +++ b/operator/clientset/versioned/typed/operator/v1/ingresscontroller.go @@ -0,0 +1,158 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/operator/v1" + scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// IngressControllersGetter has a method to return a IngressControllerInterface. +// A group's client should implement this interface. +type IngressControllersGetter interface { + IngressControllers(namespace string) IngressControllerInterface +} + +// IngressControllerInterface has methods to work with IngressController resources. +type IngressControllerInterface interface { + Create(*v1.IngressController) (*v1.IngressController, error) + Update(*v1.IngressController) (*v1.IngressController, error) + UpdateStatus(*v1.IngressController) (*v1.IngressController, error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.IngressController, error) + List(opts meta_v1.ListOptions) (*v1.IngressControllerList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.IngressController, err error) + IngressControllerExpansion +} + +// ingressControllers implements IngressControllerInterface +type ingressControllers struct { + client rest.Interface + ns string +} + +// newIngressControllers returns a IngressControllers +func newIngressControllers(c *OperatorV1Client, namespace string) *ingressControllers { + return &ingressControllers{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the ingressController, and returns the corresponding ingressController object, and an error if there is any. +func (c *ingressControllers) Get(name string, options meta_v1.GetOptions) (result *v1.IngressController, err error) { + result = &v1.IngressController{} + err = c.client.Get(). + Namespace(c.ns). + Resource("ingresscontrollers"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of IngressControllers that match those selectors. +func (c *ingressControllers) List(opts meta_v1.ListOptions) (result *v1.IngressControllerList, err error) { + result = &v1.IngressControllerList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("ingresscontrollers"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested ingressControllers. +func (c *ingressControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("ingresscontrollers"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a ingressController and creates it. Returns the server's representation of the ingressController, and an error, if there is any. +func (c *ingressControllers) Create(ingressController *v1.IngressController) (result *v1.IngressController, err error) { + result = &v1.IngressController{} + err = c.client.Post(). + Namespace(c.ns). + Resource("ingresscontrollers"). + Body(ingressController). + Do(). + Into(result) + return +} + +// Update takes the representation of a ingressController and updates it. Returns the server's representation of the ingressController, and an error, if there is any. +func (c *ingressControllers) Update(ingressController *v1.IngressController) (result *v1.IngressController, err error) { + result = &v1.IngressController{} + err = c.client.Put(). + Namespace(c.ns). + Resource("ingresscontrollers"). + Name(ingressController.Name). + Body(ingressController). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *ingressControllers) UpdateStatus(ingressController *v1.IngressController) (result *v1.IngressController, err error) { + result = &v1.IngressController{} + err = c.client.Put(). + Namespace(c.ns). + Resource("ingresscontrollers"). + Name(ingressController.Name). + SubResource("status"). + Body(ingressController). + Do(). + Into(result) + return +} + +// Delete takes name of the ingressController and deletes it. Returns an error if one occurs. +func (c *ingressControllers) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("ingresscontrollers"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *ingressControllers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("ingresscontrollers"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched ingressController. +func (c *ingressControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.IngressController, err error) { + result = &v1.IngressController{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("ingresscontrollers"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/operator/clientset/versioned/typed/operator/v1/network.go b/operator/clientset/versioned/typed/operator/v1/network.go new file mode 100644 index 000000000..598efe7b8 --- /dev/null +++ b/operator/clientset/versioned/typed/operator/v1/network.go @@ -0,0 +1,147 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/operator/v1" + scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// NetworksGetter has a method to return a NetworkInterface. +// A group's client should implement this interface. +type NetworksGetter interface { + Networks() NetworkInterface +} + +// NetworkInterface has methods to work with Network resources. +type NetworkInterface interface { + Create(*v1.Network) (*v1.Network, error) + Update(*v1.Network) (*v1.Network, error) + UpdateStatus(*v1.Network) (*v1.Network, error) + Delete(name string, options *meta_v1.DeleteOptions) error + DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error + Get(name string, options meta_v1.GetOptions) (*v1.Network, error) + List(opts meta_v1.ListOptions) (*v1.NetworkList, error) + Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Network, err error) + NetworkExpansion +} + +// networks implements NetworkInterface +type networks struct { + client rest.Interface +} + +// newNetworks returns a Networks +func newNetworks(c *OperatorV1Client) *networks { + return &networks{ + client: c.RESTClient(), + } +} + +// Get takes name of the network, and returns the corresponding network object, and an error if there is any. +func (c *networks) Get(name string, options meta_v1.GetOptions) (result *v1.Network, err error) { + result = &v1.Network{} + err = c.client.Get(). + Resource("networks"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Networks that match those selectors. +func (c *networks) List(opts meta_v1.ListOptions) (result *v1.NetworkList, err error) { + result = &v1.NetworkList{} + err = c.client.Get(). + Resource("networks"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested networks. +func (c *networks) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("networks"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a network and creates it. Returns the server's representation of the network, and an error, if there is any. +func (c *networks) Create(network *v1.Network) (result *v1.Network, err error) { + result = &v1.Network{} + err = c.client.Post(). + Resource("networks"). + Body(network). + Do(). + Into(result) + return +} + +// Update takes the representation of a network and updates it. Returns the server's representation of the network, and an error, if there is any. +func (c *networks) Update(network *v1.Network) (result *v1.Network, err error) { + result = &v1.Network{} + err = c.client.Put(). + Resource("networks"). + Name(network.Name). + Body(network). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *networks) UpdateStatus(network *v1.Network) (result *v1.Network, err error) { + result = &v1.Network{} + err = c.client.Put(). + Resource("networks"). + Name(network.Name). + SubResource("status"). + Body(network). + Do(). + Into(result) + return +} + +// Delete takes name of the network and deletes it. Returns an error if one occurs. +func (c *networks) Delete(name string, options *meta_v1.DeleteOptions) error { + return c.client.Delete(). + Resource("networks"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *networks) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { + return c.client.Delete(). + Resource("networks"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched network. +func (c *networks) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Network, err error) { + result = &v1.Network{} + err = c.client.Patch(pt). + Resource("networks"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/operator/clientset/versioned/typed/operator/v1/operator_client.go b/operator/clientset/versioned/typed/operator/v1/operator_client.go index b466d17d5..fddbd3bc3 100644 --- a/operator/clientset/versioned/typed/operator/v1/operator_client.go +++ b/operator/clientset/versioned/typed/operator/v1/operator_client.go @@ -14,9 +14,11 @@ type OperatorV1Interface interface { AuthenticationsGetter ConsolesGetter EtcdsGetter + IngressControllersGetter KubeAPIServersGetter KubeControllerManagersGetter KubeSchedulersGetter + NetworksGetter OpenShiftAPIServersGetter OpenShiftControllerManagersGetter ServiceCAsGetter @@ -41,6 +43,10 @@ func (c *OperatorV1Client) Etcds() EtcdInterface { return newEtcds(c) } +func (c *OperatorV1Client) IngressControllers(namespace string) IngressControllerInterface { + return newIngressControllers(c, namespace) +} + func (c *OperatorV1Client) KubeAPIServers() KubeAPIServerInterface { return newKubeAPIServers(c) } @@ -53,6 +59,10 @@ func (c *OperatorV1Client) KubeSchedulers() KubeSchedulerInterface { return newKubeSchedulers(c) } +func (c *OperatorV1Client) Networks() NetworkInterface { + return newNetworks(c) +} + func (c *OperatorV1Client) OpenShiftAPIServers() OpenShiftAPIServerInterface { return newOpenShiftAPIServers(c) } diff --git a/operator/informers/externalversions/generic.go b/operator/informers/externalversions/generic.go index 41cda065f..0321bbd36 100644 --- a/operator/informers/externalversions/generic.go +++ b/operator/informers/externalversions/generic.go @@ -43,12 +43,16 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().Consoles().Informer()}, nil case v1.SchemeGroupVersion.WithResource("etcds"): return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().Etcds().Informer()}, nil + case v1.SchemeGroupVersion.WithResource("ingresscontrollers"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().IngressControllers().Informer()}, nil case v1.SchemeGroupVersion.WithResource("kubeapiservers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().KubeAPIServers().Informer()}, nil case v1.SchemeGroupVersion.WithResource("kubecontrollermanagers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().KubeControllerManagers().Informer()}, nil case v1.SchemeGroupVersion.WithResource("kubeschedulers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().KubeSchedulers().Informer()}, nil + case v1.SchemeGroupVersion.WithResource("networks"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().Networks().Informer()}, nil case v1.SchemeGroupVersion.WithResource("openshiftapiservers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().OpenShiftAPIServers().Informer()}, nil case v1.SchemeGroupVersion.WithResource("openshiftcontrollermanagers"): diff --git a/operator/informers/externalversions/operator/v1/ingresscontroller.go b/operator/informers/externalversions/operator/v1/ingresscontroller.go new file mode 100644 index 000000000..6b6570d29 --- /dev/null +++ b/operator/informers/externalversions/operator/v1/ingresscontroller.go @@ -0,0 +1,73 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1 + +import ( + time "time" + + operator_v1 "github.com/openshift/api/operator/v1" + versioned "github.com/openshift/client-go/operator/clientset/versioned" + internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" + v1 "github.com/openshift/client-go/operator/listers/operator/v1" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// IngressControllerInformer provides access to a shared informer and lister for +// IngressControllers. +type IngressControllerInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.IngressControllerLister +} + +type ingressControllerInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewIngressControllerInformer constructs a new informer for IngressController 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 NewIngressControllerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredIngressControllerInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredIngressControllerInformer constructs a new informer for IngressController 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 NewFilteredIngressControllerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.OperatorV1().IngressControllers(namespace).List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.OperatorV1().IngressControllers(namespace).Watch(options) + }, + }, + &operator_v1.IngressController{}, + resyncPeriod, + indexers, + ) +} + +func (f *ingressControllerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredIngressControllerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *ingressControllerInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&operator_v1.IngressController{}, f.defaultInformer) +} + +func (f *ingressControllerInformer) Lister() v1.IngressControllerLister { + return v1.NewIngressControllerLister(f.Informer().GetIndexer()) +} diff --git a/operator/informers/externalversions/operator/v1/interface.go b/operator/informers/externalversions/operator/v1/interface.go index 4cb3b98bf..7c8f3daf1 100644 --- a/operator/informers/externalversions/operator/v1/interface.go +++ b/operator/informers/externalversions/operator/v1/interface.go @@ -14,12 +14,16 @@ type Interface interface { Consoles() ConsoleInformer // Etcds returns a EtcdInformer. Etcds() EtcdInformer + // IngressControllers returns a IngressControllerInformer. + IngressControllers() IngressControllerInformer // KubeAPIServers returns a KubeAPIServerInformer. KubeAPIServers() KubeAPIServerInformer // KubeControllerManagers returns a KubeControllerManagerInformer. KubeControllerManagers() KubeControllerManagerInformer // KubeSchedulers returns a KubeSchedulerInformer. KubeSchedulers() KubeSchedulerInformer + // Networks returns a NetworkInformer. + Networks() NetworkInformer // OpenShiftAPIServers returns a OpenShiftAPIServerInformer. OpenShiftAPIServers() OpenShiftAPIServerInformer // OpenShiftControllerManagers returns a OpenShiftControllerManagerInformer. @@ -58,6 +62,11 @@ func (v *version) Etcds() EtcdInformer { return &etcdInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } +// IngressControllers returns a IngressControllerInformer. +func (v *version) IngressControllers() IngressControllerInformer { + return &ingressControllerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + // KubeAPIServers returns a KubeAPIServerInformer. func (v *version) KubeAPIServers() KubeAPIServerInformer { return &kubeAPIServerInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} @@ -73,6 +82,11 @@ func (v *version) KubeSchedulers() KubeSchedulerInformer { return &kubeSchedulerInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } +// Networks returns a NetworkInformer. +func (v *version) Networks() NetworkInformer { + return &networkInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + // OpenShiftAPIServers returns a OpenShiftAPIServerInformer. func (v *version) OpenShiftAPIServers() OpenShiftAPIServerInformer { return &openShiftAPIServerInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} diff --git a/operator/informers/externalversions/operator/v1/network.go b/operator/informers/externalversions/operator/v1/network.go new file mode 100644 index 000000000..0507cce1f --- /dev/null +++ b/operator/informers/externalversions/operator/v1/network.go @@ -0,0 +1,72 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1 + +import ( + time "time" + + operator_v1 "github.com/openshift/api/operator/v1" + versioned "github.com/openshift/client-go/operator/clientset/versioned" + internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" + v1 "github.com/openshift/client-go/operator/listers/operator/v1" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// NetworkInformer provides access to a shared informer and lister for +// Networks. +type NetworkInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.NetworkLister +} + +type networkInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewNetworkInformer constructs a new informer for Network 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 NewNetworkInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredNetworkInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredNetworkInformer constructs a new informer for Network 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 NewFilteredNetworkInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.OperatorV1().Networks().List(options) + }, + WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.OperatorV1().Networks().Watch(options) + }, + }, + &operator_v1.Network{}, + resyncPeriod, + indexers, + ) +} + +func (f *networkInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredNetworkInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *networkInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&operator_v1.Network{}, f.defaultInformer) +} + +func (f *networkInformer) Lister() v1.NetworkLister { + return v1.NewNetworkLister(f.Informer().GetIndexer()) +} diff --git a/operator/listers/operator/v1/expansion_generated.go b/operator/listers/operator/v1/expansion_generated.go index 4aef92ccd..c0ae4f640 100644 --- a/operator/listers/operator/v1/expansion_generated.go +++ b/operator/listers/operator/v1/expansion_generated.go @@ -14,6 +14,14 @@ type ConsoleListerExpansion interface{} // EtcdLister. type EtcdListerExpansion interface{} +// IngressControllerListerExpansion allows custom methods to be added to +// IngressControllerLister. +type IngressControllerListerExpansion interface{} + +// IngressControllerNamespaceListerExpansion allows custom methods to be added to +// IngressControllerNamespaceLister. +type IngressControllerNamespaceListerExpansion interface{} + // KubeAPIServerListerExpansion allows custom methods to be added to // KubeAPIServerLister. type KubeAPIServerListerExpansion interface{} @@ -26,6 +34,10 @@ type KubeControllerManagerListerExpansion interface{} // KubeSchedulerLister. type KubeSchedulerListerExpansion interface{} +// NetworkListerExpansion allows custom methods to be added to +// NetworkLister. +type NetworkListerExpansion interface{} + // OpenShiftAPIServerListerExpansion allows custom methods to be added to // OpenShiftAPIServerLister. type OpenShiftAPIServerListerExpansion interface{} diff --git a/operator/listers/operator/v1/ingresscontroller.go b/operator/listers/operator/v1/ingresscontroller.go new file mode 100644 index 000000000..51c79227d --- /dev/null +++ b/operator/listers/operator/v1/ingresscontroller.go @@ -0,0 +1,78 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/operator/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// IngressControllerLister helps list IngressControllers. +type IngressControllerLister interface { + // List lists all IngressControllers in the indexer. + List(selector labels.Selector) (ret []*v1.IngressController, err error) + // IngressControllers returns an object that can list and get IngressControllers. + IngressControllers(namespace string) IngressControllerNamespaceLister + IngressControllerListerExpansion +} + +// ingressControllerLister implements the IngressControllerLister interface. +type ingressControllerLister struct { + indexer cache.Indexer +} + +// NewIngressControllerLister returns a new IngressControllerLister. +func NewIngressControllerLister(indexer cache.Indexer) IngressControllerLister { + return &ingressControllerLister{indexer: indexer} +} + +// List lists all IngressControllers in the indexer. +func (s *ingressControllerLister) List(selector labels.Selector) (ret []*v1.IngressController, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.IngressController)) + }) + return ret, err +} + +// IngressControllers returns an object that can list and get IngressControllers. +func (s *ingressControllerLister) IngressControllers(namespace string) IngressControllerNamespaceLister { + return ingressControllerNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// IngressControllerNamespaceLister helps list and get IngressControllers. +type IngressControllerNamespaceLister interface { + // List lists all IngressControllers in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1.IngressController, err error) + // Get retrieves the IngressController from the indexer for a given namespace and name. + Get(name string) (*v1.IngressController, error) + IngressControllerNamespaceListerExpansion +} + +// ingressControllerNamespaceLister implements the IngressControllerNamespaceLister +// interface. +type ingressControllerNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all IngressControllers in the indexer for a given namespace. +func (s ingressControllerNamespaceLister) List(selector labels.Selector) (ret []*v1.IngressController, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1.IngressController)) + }) + return ret, err +} + +// Get retrieves the IngressController from the indexer for a given namespace and name. +func (s ingressControllerNamespaceLister) Get(name string) (*v1.IngressController, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("ingresscontroller"), name) + } + return obj.(*v1.IngressController), nil +} diff --git a/operator/listers/operator/v1/network.go b/operator/listers/operator/v1/network.go new file mode 100644 index 000000000..735fef9b7 --- /dev/null +++ b/operator/listers/operator/v1/network.go @@ -0,0 +1,49 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +import ( + v1 "github.com/openshift/api/operator/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// NetworkLister helps list Networks. +type NetworkLister interface { + // List lists all Networks in the indexer. + List(selector labels.Selector) (ret []*v1.Network, err error) + // Get retrieves the Network from the index for a given name. + Get(name string) (*v1.Network, error) + NetworkListerExpansion +} + +// networkLister implements the NetworkLister interface. +type networkLister struct { + indexer cache.Indexer +} + +// NewNetworkLister returns a new NetworkLister. +func NewNetworkLister(indexer cache.Indexer) NetworkLister { + return &networkLister{indexer: indexer} +} + +// List lists all Networks in the indexer. +func (s *networkLister) List(selector labels.Selector) (ret []*v1.Network, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.Network)) + }) + return ret, err +} + +// Get retrieves the Network from the index for a given name. +func (s *networkLister) Get(name string) (*v1.Network, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("network"), name) + } + return obj.(*v1.Network), nil +} diff --git a/vendor/github.com/openshift/api/config/v1/register.go b/vendor/github.com/openshift/api/config/v1/register.go index e096d9e31..66c342569 100644 --- a/vendor/github.com/openshift/api/config/v1/register.go +++ b/vendor/github.com/openshift/api/config/v1/register.go @@ -44,8 +44,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ConsoleList{}, &DNS{}, &DNSList{}, - &Features{}, - &FeaturesList{}, + &FeatureGate{}, + &FeatureGateList{}, &Image{}, &ImageList{}, &Infrastructure{}, diff --git a/vendor/github.com/openshift/api/config/v1/types.go b/vendor/github.com/openshift/api/config/v1/types.go index 675cbcece..13d008d42 100644 --- a/vendor/github.com/openshift/api/config/v1/types.go +++ b/vendor/github.com/openshift/api/config/v1/types.go @@ -49,7 +49,8 @@ type ServingInfo struct { // this is anonymous so that we can inline it for serialization CertInfo `json:",inline"` // ClientCA is the certificate bundle for all the signers that you'll recognize for incoming client certificates - ClientCA string `json:"clientCA"` + // +optional + ClientCA string `json:"clientCA,omitempty"` // NamedCertificates is a list of certificates to use to secure requests to specific hostnames NamedCertificates []NamedCertificate `json:"namedCertificates,omitempty"` // MinTLSVersion is the minimum TLS version supported. diff --git a/vendor/github.com/openshift/api/config/v1/types_apiserver.go b/vendor/github.com/openshift/api/config/v1/types_apiserver.go index dc56deef4..9a13b8527 100644 --- a/vendor/github.com/openshift/api/config/v1/types_apiserver.go +++ b/vendor/github.com/openshift/api/config/v1/types_apiserver.go @@ -12,8 +12,10 @@ import ( type APIServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec APIServerSpec `json:"spec"` - Status APIServerStatus `json:"status"` + // +required + Spec APIServerSpec `json:"spec"` + // +optional + Status APIServerStatus `json:"status"` } type APIServerSpec struct { diff --git a/vendor/github.com/openshift/api/config/v1/types_authentication.go b/vendor/github.com/openshift/api/config/v1/types_authentication.go index a67a0a40a..d712b920f 100644 --- a/vendor/github.com/openshift/api/config/v1/types_authentication.go +++ b/vendor/github.com/openshift/api/config/v1/types_authentication.go @@ -13,8 +13,10 @@ type Authentication struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +required Spec AuthenticationSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. + // +optional Status AuthenticationStatus `json:"status"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_build.go b/vendor/github.com/openshift/api/config/v1/types_build.go index 68ecf4614..ca65b3ba3 100644 --- a/vendor/github.com/openshift/api/config/v1/types_build.go +++ b/vendor/github.com/openshift/api/config/v1/types_build.go @@ -14,8 +14,8 @@ type Build struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds user-settable values for the build controller configuration - // +optional - Spec BuildSpec `json:"spec,omitempty"` + // +required + Spec BuildSpec `json:"spec"` } type BuildSpec struct { @@ -23,13 +23,13 @@ type BuildSpec struct { // should be trusted for image pushes and pulls during builds. // The namespace for this config map is openshift-config. // +optional - AdditionalTrustedCA ConfigMapNameReference `json:"additionalTrustedCA,omitempty"` + AdditionalTrustedCA ConfigMapNameReference `json:"additionalTrustedCA"` // BuildDefaults controls the default information for Builds // +optional - BuildDefaults BuildDefaults `json:"buildDefaults,omitempty"` + BuildDefaults BuildDefaults `json:"buildDefaults"` // BuildOverrides controls override settings for builds // +optional - BuildOverrides BuildOverrides `json:"buildOverrides,omitempty"` + BuildOverrides BuildOverrides `json:"buildOverrides"` } type BuildDefaults struct { @@ -61,7 +61,7 @@ type BuildDefaults struct { // Resources defines resource requirements to execute the build. // +optional - Resources corev1.ResourceRequirements `json:"resources,omitempty"` + Resources corev1.ResourceRequirements `json:"resources"` } type ImageLabel struct { diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go b/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go index 67178c4e2..b5cbd222e 100644 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go +++ b/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go @@ -17,10 +17,12 @@ type ClusterOperator struct { metav1.ObjectMeta `json:"metadata"` // spec hold the intent of how this operator should behave. + // +required Spec ClusterOperatorSpec `json:"spec"` // status holds the information about the state of an operator. It is consistent with status information across // the kube ecosystem. + // +optional Status ClusterOperatorStatus `json:"status"` } @@ -34,22 +36,27 @@ type ClusterOperatorStatus struct { // conditions describes the state of the operator's reconciliation functionality. // +patchMergeKey=type // +patchStrategy=merge - Conditions []ClusterOperatorStatusCondition `json:"conditions" patchStrategy:"merge" patchMergeKey:"type"` + // +optional + Conditions []ClusterOperatorStatusCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` // versions is a slice of operand version tuples. Operators which manage multiple operands will have multiple // entries in the array. If an operator is Available, it must have at least one entry. You must report the version of // the operator itself with the name "operator". - Versions []OperandVersion `json:"versions"` + // +optional + Versions []OperandVersion `json:"versions,omitempty"` // relatedObjects is a list of objects that are "interesting" or related to this operator. Common uses are: // 1. the detailed resource driving the operator // 2. operator namespaces // 3. operand namespaces - RelatedObjects []ObjectReference `json:"relatedObjects"` + // +optional + RelatedObjects []ObjectReference `json:"relatedObjects,omitempty"` // extension contains any additional status information specific to the // operator which owns this status object. - Extension runtime.RawExtension `json:"extension,omitempty"` + // +nullable + // +optional + Extension runtime.RawExtension `json:"extension"` } type OperandVersion struct { diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go index 3f808ba92..8d4cb7776 100644 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go +++ b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go @@ -16,9 +16,11 @@ type ClusterVersion struct { // spec is the desired state of the cluster version - the operator will work // to ensure that the desired version is applied to the cluster. + // +required Spec ClusterVersionSpec `json:"spec"` // status contains information about the available updates and any in-progress // updates. + // +optional Status ClusterVersionStatus `json:"status"` } @@ -46,19 +48,19 @@ type ClusterVersionSpec struct { // rollbacks will succeed. // // +optional - DesiredUpdate *Update `json:"desiredUpdate"` + DesiredUpdate *Update `json:"desiredUpdate,omitempty"` // upstream may be used to specify the preferred update server. By default // it will use the appropriate update server for the cluster and region. // // +optional - Upstream URL `json:"upstream"` + Upstream URL `json:"upstream,omitempty"` // channel is an identifier for explicitly requesting that a non-default // set of updates be applied to this cluster. The default channel will be // contain stable updates that are appropriate for production clusters. // // +optional - Channel string `json:"channel"` + Channel string `json:"channel,omitempty"` // overrides is list of overides for components that are managed by // cluster version operator. Marking a component unmanaged will prevent @@ -86,7 +88,8 @@ type ClusterVersionStatus struct { // Completed if the rollout completed - if an update was failing or halfway // applied the state will be Partial. Only a limited amount of update history // is preserved. - History []UpdateHistory `json:"history"` + // +optional + History []UpdateHistory `json:"history,omitempty"` // observedGeneration reports which version of the spec is being synced. // If this value is not equal to metadata.generation, then the desired @@ -105,12 +108,14 @@ type ClusterVersionStatus struct { // by a temporary or permanent error. Conditions are only valid for the // current desiredUpdate when metadata.generation is equal to // status.generation. - Conditions []ClusterOperatorStatusCondition `json:"conditions"` + // +optional + Conditions []ClusterOperatorStatusCondition `json:"conditions,omitempty"` // availableUpdates contains the list of updates that are appropriate // for this cluster. This list may be empty if no updates are recommended, // if the update service is unavailable, or if an invalid channel has // been specified. + // +nullable AvailableUpdates []Update `json:"availableUpdates"` } @@ -141,6 +146,7 @@ type UpdateHistory struct { // that is currently being applied will have a null completion time. // Completion time will always be set for entries that are not the current // update (usually to the started time of the next update). + // +nullable CompletionTime *metav1.Time `json:"completionTime"` // version is a semantic versioning identifying the update version. If the diff --git a/vendor/github.com/openshift/api/config/v1/types_console.go b/vendor/github.com/openshift/api/config/v1/types_console.go index cff471ef4..b1dea9cdf 100644 --- a/vendor/github.com/openshift/api/config/v1/types_console.go +++ b/vendor/github.com/openshift/api/config/v1/types_console.go @@ -13,14 +13,16 @@ type Console struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +required Spec ConsoleSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. + // +optional Status ConsoleStatus `json:"status"` } type ConsoleSpec struct { // +optional - Authentication ConsoleAuthentication `json:"authentication,omitempty"` + Authentication ConsoleAuthentication `json:"authentication"` } type ConsoleStatus struct { diff --git a/vendor/github.com/openshift/api/config/v1/types_dns.go b/vendor/github.com/openshift/api/config/v1/types_dns.go index 0d51efcc6..c1fa82042 100644 --- a/vendor/github.com/openshift/api/config/v1/types_dns.go +++ b/vendor/github.com/openshift/api/config/v1/types_dns.go @@ -14,8 +14,10 @@ type DNS struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +required Spec DNSSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. + // +optional Status DNSStatus `json:"status"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_features.go b/vendor/github.com/openshift/api/config/v1/types_feature.go similarity index 55% rename from vendor/github.com/openshift/api/config/v1/types_features.go rename to vendor/github.com/openshift/api/config/v1/types_feature.go index 6d01b2c3b..df4e6a615 100644 --- a/vendor/github.com/openshift/api/config/v1/types_features.go +++ b/vendor/github.com/openshift/api/config/v1/types_feature.go @@ -6,16 +6,18 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// Features holds cluster-wide information about feature gates. The canonical name is `cluster` -type Features struct { +// Feature holds cluster-wide information about feature gates. The canonical name is `cluster` +type FeatureGate struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - Spec FeaturesSpec `json:"spec"` + // +required + Spec FeatureGateSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. - Status FeaturesStatus `json:"status"` + // +optional + Status FeatureGateStatus `json:"status"` } type FeatureSet string @@ -29,30 +31,30 @@ var ( TechPreviewNoUpgrade FeatureSet = "TechPreviewNoUpgrade" ) -type FeaturesSpec struct { +type FeatureGateSpec struct { // featureSet changes the list of features in the cluster. The default is empty. Be very careful adjusting this setting. // Turning on or off features may cause irreversible changes in your cluster which cannot be undone. FeatureSet FeatureSet `json:"featureSet,omitempty"` } -type FeaturesStatus struct { +type FeatureGateStatus struct { } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type FeaturesList struct { +type FeatureGateList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. metav1.ListMeta `json:"metadata"` - Items []Features `json:"items"` + Items []FeatureGate `json:"items"` } -type FeatureEnabledDisabled struct { +type FeatureGateEnabledDisabled struct { Enabled []string Disabled []string } -// FeatureSets Contains a map of Feature names to Enabled/Disabled Features. +// FeatureSets Contains a map of Feature names to Enabled/Disabled Feature. // // NOTE: The caller needs to make sure to check for the existence of the value // using golang's existence field. A possible scenario is an upgrade where new @@ -60,15 +62,28 @@ type FeatureEnabledDisabled struct { // version of this file. In this upgrade scenario the map could return nil. // // example: -// if featureSet, ok := FeaturesSets["SomeNewFeature"]; ok { } +// if featureSet, ok := FeatureSets["SomeNewFeature"]; ok { } // -var FeatureSets = map[FeatureSet]*FeatureEnabledDisabled{ - Default: &FeatureEnabledDisabled{ - Enabled: []string{}, - Disabled: []string{"PersistentLocalVolumes"}, +// If you put an item in either of these lists, put your area and name on it so we can find owners. +var FeatureSets = map[FeatureSet]*FeatureGateEnabledDisabled{ + Default: &FeatureGateEnabledDisabled{ + Enabled: []string{ + "ExperimentalCriticalPodAnnotation", // sig-pod, sjenning + "RotateKubeletServerCertificate", // sig-pod, sjenning + }, + Disabled: []string{ + "LocalStorageCapacityIsolation", // sig-pod, sjenning + "PersistentLocalVolumes", // sig-storage, hekumar@redhat.com + }, }, - TechPreviewNoUpgrade: &FeatureEnabledDisabled{ - Enabled: []string{}, - Disabled: []string{}, + TechPreviewNoUpgrade: &FeatureGateEnabledDisabled{ + Enabled: []string{ + "ExperimentalCriticalPodAnnotation", // sig-pod, sjenning + "RotateKubeletServerCertificate", // sig-pod, sjenning + }, + Disabled: []string{ + "LocalStorageCapacityIsolation", // sig-pod, sjenning + "PersistentLocalVolumes", // sig-storage, hekumar@redhat.com + }, }, } diff --git a/vendor/github.com/openshift/api/config/v1/types_image.go b/vendor/github.com/openshift/api/config/v1/types_image.go index ccbd62dc8..ca51f1637 100644 --- a/vendor/github.com/openshift/api/config/v1/types_image.go +++ b/vendor/github.com/openshift/api/config/v1/types_image.go @@ -13,8 +13,10 @@ type Image struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +required Spec ImageSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. + // +optional Status ImageStatus `json:"status"` } @@ -25,25 +27,29 @@ type ImageSpec struct { // permission to create Images or ImageStreamMappings via the API are not affected by // this policy - typically only administrators or system integrations will have those // permissions. + // +optional AllowedRegistriesForImport []RegistryLocation `json:"allowedRegistriesForImport,omitempty"` // externalRegistryHostnames provides the hostnames for the default external image // registry. The external hostname should be set only when the image registry // is exposed externally. The first value is used in 'publicDockerImageRepository' // field in ImageStreams. The value must be in "hostname[:port]" format. + // +optional ExternalRegistryHostnames []string `json:"externalRegistryHostnames,omitempty"` // AdditionalTrustedCA is a reference to a ConfigMap containing additional CAs that // should be trusted during imagestream import, pod image pull, and imageregistry // pullthrough. // The namespace for this config map is openshift-config. - AdditionalTrustedCA ConfigMapNameReference `json:"additionalTrustedCA,omitempty"` + // +optional + AdditionalTrustedCA ConfigMapNameReference `json:"additionalTrustedCA"` // RegistrySources contains configuration that determines how the container runtime // should treat individual registries when accessing images for builds+pods. (e.g. // whether or not to allow insecure access). It does not contain configuration for the // internal cluster registry. - RegistrySources RegistrySources `json:"registrySources,omitempty"` + // +optional + RegistrySources RegistrySources `json:"registrySources"` } type ImageStatus struct { @@ -53,12 +59,14 @@ type ImageStatus struct { // registry. The value must be in "hostname[:port]" format. // For backward compatibility, users can still use OPENSHIFT_DEFAULT_REGISTRY // environment variable but this setting overrides the environment variable. + // +optional InternalRegistryHostname string `json:"internalRegistryHostname,omitempty"` // externalRegistryHostnames provides the hostnames for the default external image // registry. The external hostname should be set only when the image registry // is exposed externally. The first value is used in 'publicDockerImageRepository' // field in ImageStreams. The value must be in "hostname[:port]" format. + // +optional ExternalRegistryHostnames []string `json:"externalRegistryHostnames,omitempty"` } @@ -80,6 +88,7 @@ type RegistryLocation struct { DomainName string `json:"domainName"` // Insecure indicates whether the registry is secure (https) or insecure (http) // By default (if not specified) the registry is assumed as secure. + // +optional Insecure bool `json:"insecure,omitempty"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go index 033d63200..7993f57cf 100644 --- a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go +++ b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go @@ -13,8 +13,10 @@ type Infrastructure struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +required Spec InfrastructureSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. + // +optional Status InfrastructureStatus `json:"status"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_ingress.go b/vendor/github.com/openshift/api/config/v1/types_ingress.go index 151a3789e..4cbefc91b 100644 --- a/vendor/github.com/openshift/api/config/v1/types_ingress.go +++ b/vendor/github.com/openshift/api/config/v1/types_ingress.go @@ -14,8 +14,10 @@ type Ingress struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +required Spec IngressSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. + // +optional Status IngressStatus `json:"status"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_network.go b/vendor/github.com/openshift/api/config/v1/types_network.go index a878e100c..5b5ab1929 100644 --- a/vendor/github.com/openshift/api/config/v1/types_network.go +++ b/vendor/github.com/openshift/api/config/v1/types_network.go @@ -14,8 +14,10 @@ type Network struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration. + // +required Spec NetworkSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. + // +optional Status NetworkStatus `json:"status"` } @@ -42,17 +44,17 @@ type NetworkSpec struct { // NetworkStatus is the current network configuration. type NetworkStatus struct { // IP address pool to use for pod IPs. - ClusterNetwork []ClusterNetworkEntry `json:"clusterNetwork"` + ClusterNetwork []ClusterNetworkEntry `json:"clusterNetwork,omitempty"` // IP address pool for services. // Currently, we only support a single entry here. - ServiceNetwork []string `json:"serviceNetwork"` + ServiceNetwork []string `json:"serviceNetwork,omitempty"` // NetworkType is the plugin that is deployed (e.g. OpenShiftSDN). - NetworkType string `json:"networkType"` + NetworkType string `json:"networkType,omitempty"` // ClusterNetworkMTU is the MTU for inter-pod networking. - ClusterNetworkMTU int `json:"clusterNetworkMTU"` + ClusterNetworkMTU int `json:"clusterNetworkMTU,omitempty"` } // ClusterNetworkEntry is a contiguous block of IP addresses from which pod IPs diff --git a/vendor/github.com/openshift/api/config/v1/types_oauth.go b/vendor/github.com/openshift/api/config/v1/types_oauth.go index 9e6fd1688..6e4ed1ca1 100644 --- a/vendor/github.com/openshift/api/config/v1/types_oauth.go +++ b/vendor/github.com/openshift/api/config/v1/types_oauth.go @@ -15,8 +15,9 @@ type OAuth struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +required Spec OAuthSpec `json:"spec"` - + // +optional Status OAuthStatus `json:"status"` } @@ -89,7 +90,7 @@ type OAuthTemplates struct { // If unspecified, the default login page is used. // The namespace for this secret is openshift-config. // +optional - Login SecretNameReference `json:"login,omitempty"` + Login SecretNameReference `json:"login"` // providerSelection is the name of a secret that specifies a go template to use to render // the provider selection page. @@ -99,7 +100,7 @@ type OAuthTemplates struct { // If unspecified, the default provider selection page is used. // The namespace for this secret is openshift-config. // +optional - ProviderSelection SecretNameReference `json:"providerSelection,omitempty"` + ProviderSelection SecretNameReference `json:"providerSelection"` // error is the name of a secret that specifies a go template to use to render error pages // during the authentication or grant flow. @@ -109,7 +110,7 @@ type OAuthTemplates struct { // If unspecified, the default error page is used. // The namespace for this secret is openshift-config. // +optional - Error SecretNameReference `json:"error,omitempty"` + Error SecretNameReference `json:"error"` } // IdentityProvider provides identities for users authenticating using credentials @@ -129,7 +130,7 @@ type IdentityProvider struct { // mappingMethod determines how identities from this provider are mapped to users // Defaults to "claim" // +optional - MappingMethod MappingMethodType `json:"mappingMethod"` + MappingMethod MappingMethodType `json:"mappingMethod,omitempty"` IdentityProviderConfig `json:",inline"` } @@ -332,18 +333,18 @@ type LDAPAttributeMapping struct { // preferredUsername is the list of attributes whose values should be used as the preferred username. // LDAP standard login attribute is "uid" // +optional - PreferredUsername []string `json:"preferredUsername"` + PreferredUsername []string `json:"preferredUsername,omitempty"` // name is the list of attributes whose values should be used as the display name. Optional. // If unspecified, no display name is set for the identity // LDAP standard display name attribute is "cn" // +optional - Name []string `json:"name"` + Name []string `json:"name,omitempty"` // email is the list of attributes whose values should be used as the email address. Optional. // If unspecified, no email is set for the identity // +optional - Email []string `json:"email"` + Email []string `json:"email,omitempty"` } // KeystonePasswordIdentityProvider provides identities for users authenticating using keystone password credentials @@ -394,7 +395,7 @@ type RequestHeaderIdentityProvider struct { // clientCommonNames is an optional list of common names to require a match from. If empty, any // client certificate validated against the clientCA bundle is considered authoritative. // +optional - ClientCommonNames []string `json:"clientCommonNames"` + ClientCommonNames []string `json:"clientCommonNames,omitempty"` // headers is the set of headers to check for identity information Headers []string `json:"headers"` @@ -422,11 +423,11 @@ type GitHubIdentityProvider struct { // organizations optionally restricts which organizations are allowed to log in // +optional - Organizations []string `json:"organizations"` + Organizations []string `json:"organizations,omitempty"` // teams optionally restricts which teams are allowed to log in. Format is /. // +optional - Teams []string `json:"teams"` + Teams []string `json:"teams,omitempty"` // hostname is the optional domain (e.g. "mycompany.com") for use with a hosted instance of // GitHub Enterprise. @@ -510,11 +511,11 @@ type OpenIDIdentityProvider struct { // extraScopes are any scopes to request in addition to the standard "openid" scope. // +optional - ExtraScopes []string `json:"extraScopes"` + ExtraScopes []string `json:"extraScopes,omitempty"` // extraAuthorizeParameters are any custom parameters to add to the authorize request. // +optional - ExtraAuthorizeParameters map[string]string `json:"extraAuthorizeParameters"` + ExtraAuthorizeParameters map[string]string `json:"extraAuthorizeParameters,omitempty"` // urls to use to authenticate URLs OpenIDURLs `json:"urls"` @@ -552,17 +553,17 @@ type OpenIDClaims struct { // preferredUsername is the list of claims whose values should be used as the preferred username. // If unspecified, the preferred username is determined from the value of the sub claim // +optional - PreferredUsername []string `json:"preferredUsername"` + PreferredUsername []string `json:"preferredUsername,omitempty"` // name is the list of claims whose values should be used as the display name. Optional. // If unspecified, no display name is set for the identity // +optional - Name []string `json:"name"` + Name []string `json:"name,omitempty"` // email is the list of claims whose values should be used as the email address. Optional. // If unspecified, no email is set for the identity // +optional - Email []string `json:"email"` + Email []string `json:"email,omitempty"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/github.com/openshift/api/config/v1/types_project.go b/vendor/github.com/openshift/api/config/v1/types_project.go index 4ba21fa4a..e64808459 100644 --- a/vendor/github.com/openshift/api/config/v1/types_project.go +++ b/vendor/github.com/openshift/api/config/v1/types_project.go @@ -13,8 +13,10 @@ type Project struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +required Spec ProjectSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. + // +optional Status ProjectStatus `json:"status"` } @@ -35,7 +37,7 @@ type ProjectSpec struct { // If it is not specified, a default template is used. // // +optional - ProjectRequestTemplate TemplateReference `json:"projectRequestTemplate,omitempty"` + ProjectRequestTemplate TemplateReference `json:"projectRequestTemplate"` } type ProjectStatus struct { diff --git a/vendor/github.com/openshift/api/config/v1/types_proxy.go b/vendor/github.com/openshift/api/config/v1/types_proxy.go index 8717cdce6..4004ace8b 100644 --- a/vendor/github.com/openshift/api/config/v1/types_proxy.go +++ b/vendor/github.com/openshift/api/config/v1/types_proxy.go @@ -13,17 +13,21 @@ type Proxy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds user-settable values for the proxy configuration + // +required Spec ProxySpec `json:"spec"` } type ProxySpec struct { // httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var. + // +optional HTTPProxy string `json:"httpProxy,omitempty"` // httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var. + // +optional HTTPSProxy string `json:"httpsProxy,omitempty"` // noProxy is the list of domains for which the proxy should not be used. Empty means unset and will not result in an env var. + // +optional NoProxy string `json:"noProxy,omitempty"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_scheduling.go b/vendor/github.com/openshift/api/config/v1/types_scheduling.go index 384b3d453..f07e7b083 100644 --- a/vendor/github.com/openshift/api/config/v1/types_scheduling.go +++ b/vendor/github.com/openshift/api/config/v1/types_scheduling.go @@ -13,8 +13,10 @@ type Scheduler struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration + // +required Spec SchedulerSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. + // +optional Status SchedulerStatus `json:"status"` } @@ -24,7 +26,7 @@ type SchedulerSpec struct { // scheduler will default to use DefaultAlgorithmProvider. // The namespace for this configmap is openshift-config. // +optional - Policy ConfigMapNameReference `json:"policy,omitempty"` + Policy ConfigMapNameReference `json:"policy"` } type SchedulerStatus struct { diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go index a3be0e654..54f6273ef 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go @@ -1164,67 +1164,67 @@ func (in *EtcdStorageConfig) DeepCopy() *EtcdStorageConfig { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureEnabledDisabled) DeepCopyInto(out *FeatureEnabledDisabled) { +func (in *FeatureGate) DeepCopyInto(out *FeatureGate) { *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = make([]string, len(*in)) - copy(*out, *in) - } + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureEnabledDisabled. -func (in *FeatureEnabledDisabled) DeepCopy() *FeatureEnabledDisabled { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGate. +func (in *FeatureGate) DeepCopy() *FeatureGate { if in == nil { return nil } - out := new(FeatureEnabledDisabled) + out := new(FeatureGate) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FeatureGate) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Features) DeepCopyInto(out *Features) { +func (in *FeatureGateEnabledDisabled) DeepCopyInto(out *FeatureGateEnabledDisabled) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Disabled != nil { + in, out := &in.Disabled, &out.Disabled + *out = make([]string, len(*in)) + copy(*out, *in) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Features. -func (in *Features) DeepCopy() *Features { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateEnabledDisabled. +func (in *FeatureGateEnabledDisabled) DeepCopy() *FeatureGateEnabledDisabled { if in == nil { return nil } - out := new(Features) + out := new(FeatureGateEnabledDisabled) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Features) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeaturesList) DeepCopyInto(out *FeaturesList) { +func (in *FeatureGateList) DeepCopyInto(out *FeatureGateList) { *out = *in out.TypeMeta = in.TypeMeta out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Features, len(*in)) + *out = make([]FeatureGate, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -1232,18 +1232,18 @@ func (in *FeaturesList) DeepCopyInto(out *FeaturesList) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeaturesList. -func (in *FeaturesList) DeepCopy() *FeaturesList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateList. +func (in *FeatureGateList) DeepCopy() *FeatureGateList { if in == nil { return nil } - out := new(FeaturesList) + out := new(FeatureGateList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *FeaturesList) DeepCopyObject() runtime.Object { +func (in *FeatureGateList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1251,33 +1251,33 @@ func (in *FeaturesList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeaturesSpec) DeepCopyInto(out *FeaturesSpec) { +func (in *FeatureGateSpec) DeepCopyInto(out *FeatureGateSpec) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeaturesSpec. -func (in *FeaturesSpec) DeepCopy() *FeaturesSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateSpec. +func (in *FeatureGateSpec) DeepCopy() *FeatureGateSpec { if in == nil { return nil } - out := new(FeaturesSpec) + out := new(FeatureGateSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeaturesStatus) DeepCopyInto(out *FeaturesStatus) { +func (in *FeatureGateStatus) DeepCopyInto(out *FeatureGateStatus) { *out = *in return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeaturesStatus. -func (in *FeaturesStatus) DeepCopy() *FeaturesStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateStatus. +func (in *FeatureGateStatus) DeepCopy() *FeatureGateStatus { if in == nil { return nil } - out := new(FeaturesStatus) + out := new(FeatureGateStatus) in.DeepCopyInto(out) return out } diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go index 1545e4e2b..27613f37f 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go @@ -610,31 +610,31 @@ func (DNSZone) SwaggerDoc() map[string]string { return map_DNSZone } -var map_Features = map[string]string{ - "": "Features holds cluster-wide information about feature gates. The canonical name is `cluster`", +var map_FeatureGate = map[string]string{ + "": "Feature holds cluster-wide information about feature gates. The canonical name is `cluster`", "metadata": "Standard object's metadata.", "spec": "spec holds user settable values for configuration", "status": "status holds observed values from the cluster. They may not be overridden.", } -func (Features) SwaggerDoc() map[string]string { - return map_Features +func (FeatureGate) SwaggerDoc() map[string]string { + return map_FeatureGate } -var map_FeaturesList = map[string]string{ +var map_FeatureGateList = map[string]string{ "metadata": "Standard object's metadata.", } -func (FeaturesList) SwaggerDoc() map[string]string { - return map_FeaturesList +func (FeatureGateList) SwaggerDoc() map[string]string { + return map_FeatureGateList } -var map_FeaturesSpec = map[string]string{ +var map_FeatureGateSpec = map[string]string{ "featureSet": "featureSet changes the list of features in the cluster. The default is empty. Be very careful adjusting this setting. Turning on or off features may cause irreversible changes in your cluster which cannot be undone.", } -func (FeaturesSpec) SwaggerDoc() map[string]string { - return map_FeaturesSpec +func (FeatureGateSpec) SwaggerDoc() map[string]string { + return map_FeatureGateSpec } var map_Image = map[string]string{ diff --git a/vendor/github.com/openshift/api/operator/v1/register.go b/vendor/github.com/openshift/api/operator/v1/register.go index 2cee2d65d..1d4a93399 100644 --- a/vendor/github.com/openshift/api/operator/v1/register.go +++ b/vendor/github.com/openshift/api/operator/v1/register.go @@ -44,6 +44,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &KubeControllerManagerList{}, &KubeScheduler{}, &KubeSchedulerList{}, + &Network{}, + &NetworkList{}, &OpenShiftAPIServer{}, &OpenShiftAPIServerList{}, &OpenShiftControllerManager{}, @@ -54,6 +56,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ServiceCatalogAPIServerList{}, &ServiceCatalogControllerManager{}, &ServiceCatalogControllerManagerList{}, + &IngressController{}, + &IngressControllerList{}, ) return nil diff --git a/vendor/github.com/openshift/api/operator/v1/types.go b/vendor/github.com/openshift/api/operator/v1/types.go index 3c85ebf35..1e7509fca 100644 --- a/vendor/github.com/openshift/api/operator/v1/types.go +++ b/vendor/github.com/openshift/api/operator/v1/types.go @@ -11,6 +11,7 @@ type MyOperatorResource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +required Spec MyOperatorResourceSpec `json:"spec"` Status MyOperatorResourceStatus `json:"status"` } @@ -33,8 +34,11 @@ var ( // It will only upgrade the component if it is safe to do so Managed ManagementState = "Managed" // Unmanaged means that the operator will not take any action related to the component + // Some operators might not support this management state as it might damage the cluster and lead to manual recovery. Unmanaged ManagementState = "Unmanaged" // Removed means that the operator is actively managing its resources and trying to remove all traces of the component + // Some operators (like kube-apiserver-operator) might not support this management state as removing the API server will + // brick the cluster. Removed ManagementState = "Removed" ) @@ -42,7 +46,7 @@ var ( // inside of the Spec struct for your particular operator. type OperatorSpec struct { // managementState indicates whether and how the operator should manage the component - // +optional + // +kubebuilder:validation:Pattern=^Managed|Unmanaged|Force|Removed$ ManagementState ManagementState `json:"managementState"` // logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a diff --git a/vendor/github.com/openshift/api/operator/v1/types_authentication.go b/vendor/github.com/openshift/api/operator/v1/types_authentication.go index fbe59955b..d697cf8f1 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_authentication.go +++ b/vendor/github.com/openshift/api/operator/v1/types_authentication.go @@ -13,7 +13,9 @@ type Authentication struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` + // +required Spec AuthenticationSpec `json:"spec,omitempty"` + // +optional Status AuthenticationStatus `json:"status,omitempty"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_console.go b/vendor/github.com/openshift/api/operator/v1/types_console.go index c5cd16d41..6aa8edfc1 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_console.go +++ b/vendor/github.com/openshift/api/operator/v1/types_console.go @@ -10,7 +10,9 @@ type Console struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` + // +required Spec ConsoleSpec `json:"spec,omitempty"` + // +optional Status ConsoleStatus `json:"status,omitempty"` } @@ -18,7 +20,8 @@ type ConsoleSpec struct { OperatorSpec `json:",inline"` // customization is used to optionally provide a small set of // customization options to the web console. - Customization ConsoleCustomization `json:"customization,omitempty"` + // +optional + Customization ConsoleCustomization `json:"customization"` } type ConsoleStatus struct { @@ -45,13 +48,15 @@ const ( // Branding for OpenShift BrandOpenShift Brand = "openshift" // Branding for The Origin Community Distribution of Kubernetes - BrandOKD Brand = "okd" + BrandOKD Brand = "okd" // Branding for OpenShift Online - BrandOnline Brand = "online" + BrandOnline Brand = "online" // Branding for OpenShift Container Platform - BrandOCP Brand = "ocp" + BrandOCP Brand = "ocp" // Branding for OpenShift Dedicated BrandDedicated Brand = "dedicated" + // Branding for Azure Red Hat OpenShift + BrandAzure Brand = "azure" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/vendor/github.com/openshift/api/operator/v1/types_etcd.go b/vendor/github.com/openshift/api/operator/v1/types_etcd.go index 1d2fcb98c..a3135120f 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_etcd.go +++ b/vendor/github.com/openshift/api/operator/v1/types_etcd.go @@ -13,7 +13,9 @@ type Etcd struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +required Spec EtcdSpec `json:"spec"` + // +optional Status EtcdStatus `json:"status"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_ingress.go b/vendor/github.com/openshift/api/operator/v1/types_ingress.go new file mode 100644 index 000000000..5562d20a7 --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1/types_ingress.go @@ -0,0 +1,274 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + corev1 "k8s.io/api/core/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IngressController describes a managed ingress controller for the cluster. The +// controller can service OpenShift Route and Kubernetes Ingress resources. +// +// When an IngressController is created, a new ingress controller deployment is +// created to allow external traffic to reach the services that expose Ingress +// or Route resources. Updating this resource may lead to disruption for public +// facing network connections as a new ingress controller revision may be rolled +// out. +// +// https://kubernetes.io/docs/concepts/services-networking/ingress-controllers +// +// Whenever possible, sensible defaults for the platform are used. See each +// field for more details. +type IngressController struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec is the specification of the desired behavior of the IngressController. + Spec IngressControllerSpec `json:"spec,omitempty"` + // status is the most recently observed status of the IngressController. + Status IngressControllerStatus `json:"status,omitempty"` +} + +// IngressControllerSpec is the specification of the desired behavior of the +// IngressController. +type IngressControllerSpec struct { + // domain is a DNS name serviced by the ingress controller and is used to + // configure multiple features: + // + // * For the LoadBalancerService endpoint publishing strategy, domain is + // used to configure DNS records. See endpointPublishingStrategy. + // + // * When using a generated default certificate, the certificate will be valid + // for domain and its subdomains. See defaultCertificate. + // + // * The value is published to individual Route statuses so that end-users + // know where to target external DNS records. + // + // domain must be unique among all IngressControllers, and cannot be + // updated. + // + // If empty, defaults to ingress.config.openshift.io/cluster .spec.domain. + // + // +optional + Domain string `json:"domain,omitempty"` + + // replicas is the desired number of ingress controller replicas. If unset, + // defaults to 2. + // + // +optional + Replicas *int32 `json:"replicas,omitempty"` + + // endpointPublishingStrategy is used to publish the ingress controller + // endpoints to other networks, enable load balancer integrations, etc. + // + // If unset, the default is based on + // infrastructure.config.openshift.io/cluster .status.platform: + // + // AWS: LoadBalancerService + // All other platform types: Private + // + // endpointPublishingStrategy cannot be updated. + // + // +optional + EndpointPublishingStrategy *EndpointPublishingStrategy `json:"endpointPublishingStrategy,omitempty"` + + // defaultCertificate is a reference to a secret containing the default + // certificate served by the ingress controller. When Routes don't specify + // their own certificate, defaultCertificate is used. + // + // The secret must contain the following keys and data: + // + // tls.crt: certificate file contents + // tls.key: key file contents + // + // If unset, a wildcard certificate is automatically generated and used. The + // certificate is valid for the ingress controller domain (and subdomains) and + // the generated certificate's CA will be automatically integrated with the + // cluster's trust store. + // + // The in-use certificate (whether generated or user-specified) will be + // automatically integrated with OpenShift's built-in OAuth server. + // + // +optional + DefaultCertificate *corev1.LocalObjectReference `json:"defaultCertificate,omitempty"` + + // namespaceSelector is used to filter the set of namespaces serviced by the + // ingress controller. This is useful for implementing shards. + // + // If unset, the default is no filtering. + // + // +optional + NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` + + // routeSelector is used to filter the set of Routes serviced by the ingress + // controller. This is useful for implementing shards. + // + // If unset, the default is no filtering. + // + // +optional + RouteSelector *metav1.LabelSelector `json:"routeSelector,omitempty"` + + // nodePlacement enables explicit control over the scheduling of the ingress + // controller. + // + // If unset, defaults are used. See NodePlacement for more details. + // + // +optional + NodePlacement *NodePlacement `json:"nodePlacement,omitempty"` +} + +// NodePlacement describes node scheduling configuration for an ingress +// controller. +type NodePlacement struct { + // nodeSelector is the node selector applied to ingress controller + // deployments. + // + // If unset, the default is: + // + // beta.kubernetes.io/os: linux + // node-role.kubernetes.io/worker: '' + // + // If set, the specified selector is used and replaces the default. + // + // +optional + NodeSelector *metav1.LabelSelector `json:"nodeSelector,omitempty"` +} + +// EndpointPublishingStrategyType is a way to publish ingress controller endpoints. +type EndpointPublishingStrategyType string + +const ( + // LoadBalancerService publishes the ingress controller using a Kubernetes + // LoadBalancer Service. + LoadBalancerServiceStrategyType EndpointPublishingStrategyType = "LoadBalancerService" + + // HostNetwork publishes the ingress controller on node ports where the + // ingress controller is deployed. + HostNetworkStrategyType EndpointPublishingStrategyType = "HostNetwork" + + // Private does not publish the ingress controller. + PrivateStrategyType EndpointPublishingStrategyType = "Private" +) + +// EndpointPublishingStrategy is a way to publish the endpoints of an +// IngressController, and represents the type and any additional configuration +// for a specific type. +type EndpointPublishingStrategy struct { + // type is the publishing strategy to use. Valid values are: + // + // * LoadBalancerService + // + // Publishes the ingress controller using a Kubernetes LoadBalancer Service. + // + // In this configuration, the ingress controller deployment uses container + // networking. A LoadBalancer Service is created to publish the deployment. + // + // See: https://kubernetes.io/docs/concepts/services-networking/#loadbalancer + // + // If domain is set, a wildcard DNS record will be managed to point at the + // LoadBalancer Service's external name. DNS records are managed only in DNS + // zones defined by dns.config.openshift.io/cluster .spec.publicZone and + // .spec.privateZone. + // + // Wildcard DNS management is currently supported only on the AWS platform. + // + // * HostNetwork + // + // Publishes the ingress controller on node ports where the ingress controller + // is deployed. + // + // In this configuration, the ingress controller deployment uses host + // networking, bound to node ports 80 and 443. The user is responsible for + // configuring an external load balancer to publish the ingress controller via + // the node ports. + // + // * Private + // + // Does not publish the ingress controller. + // + // In this configuration, the ingress controller deployment uses container + // networking, and is not explicitly published. The user must manually publish + // the ingress controller. + Type EndpointPublishingStrategyType `json:"type"` +} + +var ( + // Available indicates the ingress controller deployment is available. + IngressControllerAvailableConditionType = "Available" + // LoadBalancerManaged indicates the management status of any load balancer + // service associated with an ingress controller. + LoadBalancerManagedIngressConditionType = "LoadBalancerManaged" + // LoadBalancerReady indicates the ready state of any load balancer service + // associated with an ingress controller. + LoadBalancerReadyIngressConditionType = "LoadBalancerReady" + // DNSManaged indicates the management status of any DNS records for the + // ingress controller. + DNSManagedIngressConditionType = "DNSManaged" + // DNSReady indicates the ready state of any DNS records for the ingress + // controller. + DNSReadyIngressConditionType = "DNSReady" +) + +// IngressControllerStatus defines the observed status of the IngressController. +type IngressControllerStatus struct { + // availableReplicas is number of observed available replicas according to the + // ingress controller deployment. + AvailableReplicas int32 `json:"availableReplicas"` + + // selector is a label selector, in string format, for ingress controller pods + // corresponding to the IngressController. The number of matching pods should + // equal the value of availableReplicas. + Selector string `json:"selector"` + + // domain is the actual domain in use. + Domain string `json:"domain"` + + // endpointPublishingStrategy is the actual strategy in use. + EndpointPublishingStrategy *EndpointPublishingStrategy `json:"endpointPublishingStrategy,omitempty"` + + // conditions is a list of conditions and their status. + // + // Available means the ingress controller deployment is available and + // servicing route and ingress resources (i.e, .status.availableReplicas + // equals .spec.replicas) + // + // There are additional conditions which indicate the status of other + // ingress controller features and capabilities. + // + // * LoadBalancerManaged + // - True if the following conditions are met: + // * The endpoint publishing strategy requires a service load balancer. + // - False if any of those conditions are unsatisfied. + // + // * LoadBalancerReady + // - True if the following conditions are met: + // * A load balancer is managed. + // * The load balancer is ready. + // - False if any of those conditions are unsatisfied. + // + // * DNSManaged + // - True if the following conditions are met: + // * The endpoint publishing strategy and platform support DNS. + // * The ingress controller domain is set. + // * dns.config.openshift.io/cluster configures DNS zones. + // - False if any of those conditions are unsatisfied. + // + // * DNSReady + // - True if the following conditions are met: + // * DNS is managed. + // * DNS records have been successfully created. + // - False if any of those conditions are unsatisfied. + Conditions []OperatorCondition `json:"conditions,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// IngressControllerList contains a list of IngressControllers. +type IngressControllerList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []IngressController `json:"items"` +} diff --git a/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go index 84350da0a..d0d14f3cc 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go +++ b/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go @@ -13,7 +13,9 @@ type KubeAPIServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +required Spec KubeAPIServerSpec `json:"spec"` + // +optional Status KubeAPIServerStatus `json:"status"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go index a94c1b10c..564be1ac0 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go +++ b/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go @@ -13,7 +13,9 @@ type KubeControllerManager struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +required Spec KubeControllerManagerSpec `json:"spec"` + // +optional Status KubeControllerManagerStatus `json:"status"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_network.go b/vendor/github.com/openshift/api/operator/v1/types_network.go new file mode 100644 index 000000000..53052e8b2 --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1/types_network.go @@ -0,0 +1,189 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Network describes the cluster's desired network configuration. It is +// consumed by the cluster-network-operator. +// +k8s:openapi-gen=true +type Network struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec NetworkSpec `json:"spec,omitempty"` + Status NetworkStatus `json:"status,omitempty"` +} + +// NetworkStatus is currently unused. Instead, status +// is reported in the Network.config.openshift.io object. +type NetworkStatus struct { +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// NetworkList contains a list of Network configurations +type NetworkList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Network `json:"items"` +} + +// NetworkSpec is the top-level network configuration object. +type NetworkSpec struct { + // clusterNetwork is the IP address pool to use for pod IPs. + // Some network providers, e.g. OpenShift SDN, support multiple ClusterNetworks. + // Others only support one. This is equivalent to the cluster-cidr. + ClusterNetwork []ClusterNetworkEntry `json:"clusterNetwork"` + + // serviceNetwork is the ip address pool to use for Service IPs + // Currently, all existing network providers only support a single value + // here, but this is an array to allow for growth. + ServiceNetwork []string `json:"serviceNetwork"` + + // defaultNetwork is the "default" network that all pods will receive + DefaultNetwork DefaultNetworkDefinition `json:"defaultNetwork"` + + // additionalNetworks is a list of extra networks to make available to pods + // when multiple networks are enabled. + AdditionalNetworks []AdditionalNetworkDefinition `json:"additionalNetworks,omitempty"` + + // disableMultiNetwork specifies whether or not multiple pod network + // support should be disabled. If unset, this property defaults to + // 'false' and multiple network support is enabled. + DisableMultiNetwork *bool `json:"disableMultiNetwork,omitempty"` + + // deployKubeProxy specifies whether or not a standalone kube-proxy should + // be deployed by the operator. Some network providers include kube-proxy + // or similar functionality. If unset, the plugin will attempt to select + // the correct value, which is false when OpenShift SDN and ovn-kubernetes are + // used and true otherwise. + // +optional + DeployKubeProxy *bool `json:"deployKubeProxy,omitempty"` + + // kubeProxyConfig lets us configure desired proxy configuration. + // If not specified, sensible defaults will be chosen by OpenShift directly. + // Not consumed by all network providers - currently only openshift-sdn. + KubeProxyConfig *ProxyConfig `json:"kubeProxyConfig,omitempty"` +} + +// ClusterNetworkEntry is a subnet from which to allocate PodIPs. A network of size +// HostPrefix (in CIDR notation) will be allocated when nodes join the cluster. +// Not all network providers support multiple ClusterNetworks +type ClusterNetworkEntry struct { + CIDR string `json:"cidr"` + HostPrefix uint32 `json:"hostPrefix"` +} + +// DefaultNetworkDefinition represents a single network plugin's configuration. +// type must be specified, along with exactly one "Config" that matches the type. +type DefaultNetworkDefinition struct { + // type is the type of network + // All NetworkTypes are supported except for NetworkTypeRaw + Type NetworkType `json:"type"` + + // openShiftSDNConfig configures the openshift-sdn plugin + // +optional + OpenShiftSDNConfig *OpenShiftSDNConfig `json:"openshiftSDNConfig,omitempty"` + + // oVNKubernetesConfig configures the ovn-kubernetes plugin. This is currently + // not implemented. + // +optional + OVNKubernetesConfig *OVNKubernetesConfig `json:"ovnKubernetesConfig,omitempty"` +} + +// AdditionalNetworkDefinition configures an extra network that is available but not +// created by default. Instead, pods must request them by name. +// type must be specified, along with exactly one "Config" that matches the type. +type AdditionalNetworkDefinition struct { + // type is the type of network + // The only supported value is NetworkTypeRaw + Type NetworkType `json:"type"` + + // name is the name of the network. This will be populated in the resulting CRD + // This must be unique. + Name string `json:"name"` + + // rawCNIConfig is the raw CNI configuration json to create in the + // NetworkAttachmentDefinition CRD + RawCNIConfig string `json:"rawCNIConfig"` +} + +// OpenShiftSDNConfig configures the three openshift-sdn plugins +type OpenShiftSDNConfig struct { + // mode is one of "Multitenant", "Subnet", or "NetworkPolicy" + Mode SDNMode `json:"mode"` + + // vxlanPort is the port to use for all vxlan packets. The default is 4789. + // +optional + VXLANPort *uint32 `json:"vxlanPort,omitempty"` + + // mtu is the mtu to use for the tunnel interface. Defaults to 1450 if unset. + // This must be 50 bytes smaller than the machine's uplink. + // +optional + MTU *uint32 `json:"mtu,omitempty"` + + // useExternalOpenvswitch tells the operator not to install openvswitch, because + // it will be provided separately. If set, you must provide it yourself. + // +optional + UseExternalOpenvswitch *bool `json:"useExternalOpenvswitch,omitempty"` +} + +// ovnKubernetesConfig is the proposed configuration parameters for networks +// using the ovn-kubernetes network project +type OVNKubernetesConfig struct { + // mtu is the MTU to use for the tunnel interface. This must be 100 + // bytes smaller than the uplink mtu. + // Default is 1400 + MTU *uint32 `json:"mtu,omitempty"` +} + +// NetworkType describes the network plugin type to configure +type NetworkType string + +// ProxyConfig defines the configuration knobs for kubeproxy +// All of these are optional and have sensible defaults +type ProxyConfig struct { + // The period that iptables rules are refreshed. + // Default: 30s + IptablesSyncPeriod string `json:"iptablesSyncPeriod,omitempty"` + + // The address to "bind" on + // Defaults to 0.0.0.0 + BindAddress string `json:"bindAddress,omitempty"` + + // Any additional arguments to pass to the kubeproxy process + ProxyArguments map[string][]string `json:"proxyArguments,omitempty"` +} + +const ( + // NetworkTypeOpenShiftSDN means the openshift-sdn plugin will be configured + NetworkTypeOpenShiftSDN NetworkType = "OpenShiftSDN" + + // NetworkTypeOVNKubernetes means the ovn-kubernetes project will be configured. + // This is currently not implemented. + NetworkTypeOVNKubernetes NetworkType = "OVNKubernetes" + + // NetworkTypeRaw + NetworkTypeRaw NetworkType = "Raw" +) + +// SDNMode is the Mode the openshift-sdn plugin is in +type SDNMode string + +const ( + // SDNModeSubnet is a simple mode that offers no isolation between pods + SDNModeSubnet SDNMode = "Subnet" + + // SDNModeMultitenant is a special "multitenant" mode that offers limited + // isolation configuration between namespaces + SDNModeMultitenant SDNMode = "Multitenant" + + // SDNModeNetworkPolicy is a full NetworkPolicy implementation that allows + // for sophisticated network isolation and segmenting. This is the default. + SDNModeNetworkPolicy SDNMode = "NetworkPolicy" +) diff --git a/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go index 590c3fc31..e26ee9c13 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go +++ b/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go @@ -13,7 +13,9 @@ type OpenShiftAPIServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +required Spec OpenShiftAPIServerSpec `json:"spec"` + // +optional Status OpenShiftAPIServerStatus `json:"status"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go index 62bd45cd1..bad14acbe 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go +++ b/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go @@ -13,7 +13,9 @@ type OpenShiftControllerManager struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +required Spec OpenShiftControllerManagerSpec `json:"spec"` + // +optional Status OpenShiftControllerManagerStatus `json:"status"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_scheduler.go b/vendor/github.com/openshift/api/operator/v1/types_scheduler.go index d5433261b..0d08b8044 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_scheduler.go +++ b/vendor/github.com/openshift/api/operator/v1/types_scheduler.go @@ -13,7 +13,9 @@ type KubeScheduler struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +required Spec KubeSchedulerSpec `json:"spec"` + // +optional Status KubeSchedulerStatus `json:"status"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_serviceca.go b/vendor/github.com/openshift/api/operator/v1/types_serviceca.go index 8997e0c36..42a51dbc9 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_serviceca.go +++ b/vendor/github.com/openshift/api/operator/v1/types_serviceca.go @@ -13,7 +13,9 @@ type ServiceCA struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` + // +required Spec ServiceCASpec `json:"spec"` + // +optional Status ServiceCAStatus `json:"status"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go index 717508fdc..92e009854 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go +++ b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go @@ -13,8 +13,10 @@ type ServiceCatalogAPIServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec ServiceCatalogAPIServerSpec `json:"spec,omitempty"` - Status ServiceCatalogAPIServerStatus `json:"status,omitempty"` + // +required + Spec ServiceCatalogAPIServerSpec `json:"spec"` + // +optional + Status ServiceCatalogAPIServerStatus `json:"status"` } type ServiceCatalogAPIServerSpec struct { diff --git a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go index b1db372f5..b57e2d6e8 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go +++ b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go @@ -11,10 +11,12 @@ import ( // ServiceCatalogControllerManager provides information to configure an operator to manage Service Catalog Controller Manager type ServiceCatalogControllerManager struct { metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` + metav1.ObjectMeta `json:"metadata"` - Spec ServiceCatalogControllerManagerSpec `json:"spec,omitempty"` - Status ServiceCatalogControllerManagerStatus `json:"status,omitempty"` + // +required + Spec ServiceCatalogControllerManagerSpec `json:"spec"` + // +optional + Status ServiceCatalogControllerManagerStatus `json:"status"` } type ServiceCatalogControllerManagerSpec struct { diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go index 623142c04..105519ea8 100644 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go @@ -6,9 +6,26 @@ package v1 import ( core_v1 "k8s.io/api/core/v1" + meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AdditionalNetworkDefinition) DeepCopyInto(out *AdditionalNetworkDefinition) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalNetworkDefinition. +func (in *AdditionalNetworkDefinition) DeepCopy() *AdditionalNetworkDefinition { + if in == nil { + return nil + } + out := new(AdditionalNetworkDefinition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Authentication) DeepCopyInto(out *Authentication) { *out = *in @@ -104,6 +121,22 @@ func (in *AuthenticationStatus) DeepCopy() *AuthenticationStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterNetworkEntry) DeepCopyInto(out *ClusterNetworkEntry) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNetworkEntry. +func (in *ClusterNetworkEntry) DeepCopy() *ClusterNetworkEntry { + if in == nil { + return nil + } + out := new(ClusterNetworkEntry) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Console) DeepCopyInto(out *Console) { *out = *in @@ -216,6 +249,56 @@ func (in *ConsoleStatus) DeepCopy() *ConsoleStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DefaultNetworkDefinition) DeepCopyInto(out *DefaultNetworkDefinition) { + *out = *in + if in.OpenShiftSDNConfig != nil { + in, out := &in.OpenShiftSDNConfig, &out.OpenShiftSDNConfig + if *in == nil { + *out = nil + } else { + *out = new(OpenShiftSDNConfig) + (*in).DeepCopyInto(*out) + } + } + if in.OVNKubernetesConfig != nil { + in, out := &in.OVNKubernetesConfig, &out.OVNKubernetesConfig + if *in == nil { + *out = nil + } else { + *out = new(OVNKubernetesConfig) + (*in).DeepCopyInto(*out) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultNetworkDefinition. +func (in *DefaultNetworkDefinition) DeepCopy() *DefaultNetworkDefinition { + if in == nil { + return nil + } + out := new(DefaultNetworkDefinition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointPublishingStrategy) DeepCopyInto(out *EndpointPublishingStrategy) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPublishingStrategy. +func (in *EndpointPublishingStrategy) DeepCopy() *EndpointPublishingStrategy { + if in == nil { + return nil + } + out := new(EndpointPublishingStrategy) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Etcd) DeepCopyInto(out *Etcd) { *out = *in @@ -327,6 +410,169 @@ func (in *GenerationStatus) DeepCopy() *GenerationStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressController) DeepCopyInto(out *IngressController) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressController. +func (in *IngressController) DeepCopy() *IngressController { + if in == nil { + return nil + } + out := new(IngressController) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IngressController) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressControllerList) DeepCopyInto(out *IngressControllerList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]IngressController, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerList. +func (in *IngressControllerList) DeepCopy() *IngressControllerList { + if in == nil { + return nil + } + out := new(IngressControllerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *IngressControllerList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressControllerSpec) DeepCopyInto(out *IngressControllerSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + if *in == nil { + *out = nil + } else { + *out = new(int32) + **out = **in + } + } + if in.EndpointPublishingStrategy != nil { + in, out := &in.EndpointPublishingStrategy, &out.EndpointPublishingStrategy + if *in == nil { + *out = nil + } else { + *out = new(EndpointPublishingStrategy) + **out = **in + } + } + if in.DefaultCertificate != nil { + in, out := &in.DefaultCertificate, &out.DefaultCertificate + if *in == nil { + *out = nil + } else { + *out = new(core_v1.LocalObjectReference) + **out = **in + } + } + if in.NamespaceSelector != nil { + in, out := &in.NamespaceSelector, &out.NamespaceSelector + if *in == nil { + *out = nil + } else { + *out = new(meta_v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + } + if in.RouteSelector != nil { + in, out := &in.RouteSelector, &out.RouteSelector + if *in == nil { + *out = nil + } else { + *out = new(meta_v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + } + if in.NodePlacement != nil { + in, out := &in.NodePlacement, &out.NodePlacement + if *in == nil { + *out = nil + } else { + *out = new(NodePlacement) + (*in).DeepCopyInto(*out) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerSpec. +func (in *IngressControllerSpec) DeepCopy() *IngressControllerSpec { + if in == nil { + return nil + } + out := new(IngressControllerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressControllerStatus) DeepCopyInto(out *IngressControllerStatus) { + *out = *in + if in.EndpointPublishingStrategy != nil { + in, out := &in.EndpointPublishingStrategy, &out.EndpointPublishingStrategy + if *in == nil { + *out = nil + } else { + *out = new(EndpointPublishingStrategy) + **out = **in + } + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]OperatorCondition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerStatus. +func (in *IngressControllerStatus) DeepCopy() *IngressControllerStatus { + if in == nil { + return nil + } + out := new(IngressControllerStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubeAPIServer) DeepCopyInto(out *KubeAPIServer) { *out = *in @@ -666,6 +912,167 @@ func (in *MyOperatorResourceStatus) DeepCopy() *MyOperatorResourceStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Network) DeepCopyInto(out *Network) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network. +func (in *Network) DeepCopy() *Network { + if in == nil { + return nil + } + out := new(Network) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Network) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkList) DeepCopyInto(out *NetworkList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Network, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkList. +func (in *NetworkList) DeepCopy() *NetworkList { + if in == nil { + return nil + } + out := new(NetworkList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *NetworkList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) { + *out = *in + if in.ClusterNetwork != nil { + in, out := &in.ClusterNetwork, &out.ClusterNetwork + *out = make([]ClusterNetworkEntry, len(*in)) + copy(*out, *in) + } + if in.ServiceNetwork != nil { + in, out := &in.ServiceNetwork, &out.ServiceNetwork + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.DefaultNetwork.DeepCopyInto(&out.DefaultNetwork) + if in.AdditionalNetworks != nil { + in, out := &in.AdditionalNetworks, &out.AdditionalNetworks + *out = make([]AdditionalNetworkDefinition, len(*in)) + copy(*out, *in) + } + if in.DisableMultiNetwork != nil { + in, out := &in.DisableMultiNetwork, &out.DisableMultiNetwork + if *in == nil { + *out = nil + } else { + *out = new(bool) + **out = **in + } + } + if in.DeployKubeProxy != nil { + in, out := &in.DeployKubeProxy, &out.DeployKubeProxy + if *in == nil { + *out = nil + } else { + *out = new(bool) + **out = **in + } + } + if in.KubeProxyConfig != nil { + in, out := &in.KubeProxyConfig, &out.KubeProxyConfig + if *in == nil { + *out = nil + } else { + *out = new(ProxyConfig) + (*in).DeepCopyInto(*out) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec. +func (in *NetworkSpec) DeepCopy() *NetworkSpec { + if in == nil { + return nil + } + out := new(NetworkSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkStatus. +func (in *NetworkStatus) DeepCopy() *NetworkStatus { + if in == nil { + return nil + } + out := new(NetworkStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodePlacement) DeepCopyInto(out *NodePlacement) { + *out = *in + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + if *in == nil { + *out = nil + } else { + *out = new(meta_v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePlacement. +func (in *NodePlacement) DeepCopy() *NodePlacement { + if in == nil { + return nil + } + out := new(NodePlacement) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { *out = *in @@ -687,6 +1094,31 @@ func (in *NodeStatus) DeepCopy() *NodeStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OVNKubernetesConfig) DeepCopyInto(out *OVNKubernetesConfig) { + *out = *in + if in.MTU != nil { + in, out := &in.MTU, &out.MTU + if *in == nil { + *out = nil + } else { + *out = new(uint32) + **out = **in + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OVNKubernetesConfig. +func (in *OVNKubernetesConfig) DeepCopy() *OVNKubernetesConfig { + if in == nil { + return nil + } + out := new(OVNKubernetesConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OpenShiftAPIServer) DeepCopyInto(out *OpenShiftAPIServer) { *out = *in @@ -877,6 +1309,49 @@ func (in *OpenShiftControllerManagerStatus) DeepCopy() *OpenShiftControllerManag return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenShiftSDNConfig) DeepCopyInto(out *OpenShiftSDNConfig) { + *out = *in + if in.VXLANPort != nil { + in, out := &in.VXLANPort, &out.VXLANPort + if *in == nil { + *out = nil + } else { + *out = new(uint32) + **out = **in + } + } + if in.MTU != nil { + in, out := &in.MTU, &out.MTU + if *in == nil { + *out = nil + } else { + *out = new(uint32) + **out = **in + } + } + if in.UseExternalOpenvswitch != nil { + in, out := &in.UseExternalOpenvswitch, &out.UseExternalOpenvswitch + if *in == nil { + *out = nil + } else { + *out = new(bool) + **out = **in + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftSDNConfig. +func (in *OpenShiftSDNConfig) DeepCopy() *OpenShiftSDNConfig { + if in == nil { + return nil + } + out := new(OpenShiftSDNConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OperandContainerSpec) DeepCopyInto(out *OperandContainerSpec) { *out = *in @@ -1000,6 +1475,34 @@ func (in *OperatorStatus) DeepCopy() *OperatorStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig) { + *out = *in + if in.ProxyArguments != nil { + in, out := &in.ProxyArguments, &out.ProxyArguments + *out = make(map[string][]string, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + (*out)[key] = make([]string, len(val)) + copy((*out)[key], val) + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfig. +func (in *ProxyConfig) DeepCopy() *ProxyConfig { + if in == nil { + return nil + } + out := new(ProxyConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourcePatch) DeepCopyInto(out *ResourcePatch) { *out = *in diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go index 22d026ac9..d106095e3 100644 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go @@ -188,6 +188,70 @@ func (EtcdSpec) SwaggerDoc() map[string]string { return map_EtcdSpec } +var map_EndpointPublishingStrategy = map[string]string{ + "": "EndpointPublishingStrategy is a way to publish the endpoints of an IngressController, and represents the type and any additional configuration for a specific type.", + "type": "type is the publishing strategy to use. Valid values are:\n\n* LoadBalancerService\n\nPublishes the ingress controller using a Kubernetes LoadBalancer Service.\n\nIn this configuration, the ingress controller deployment uses container networking. A LoadBalancer Service is created to publish the deployment.\n\nSee: https://kubernetes.io/docs/concepts/services-networking/#loadbalancer\n\nIf domain is set, a wildcard DNS record will be managed to point at the LoadBalancer Service's external name. DNS records are managed only in DNS zones defined by dns.config.openshift.io/cluster .spec.publicZone and .spec.privateZone.\n\nWildcard DNS management is currently supported only on the AWS platform.\n\n* HostNetwork\n\nPublishes the ingress controller on node ports where the ingress controller is deployed.\n\nIn this configuration, the ingress controller deployment uses host networking, bound to node ports 80 and 443. The user is responsible for configuring an external load balancer to publish the ingress controller via the node ports.\n\n* Private\n\nDoes not publish the ingress controller.\n\nIn this configuration, the ingress controller deployment uses container networking, and is not explicitly published. The user must manually publish the ingress controller.", +} + +func (EndpointPublishingStrategy) SwaggerDoc() map[string]string { + return map_EndpointPublishingStrategy +} + +var map_IngressController = map[string]string{ + "": "IngressController describes a managed ingress controller for the cluster. The controller can service OpenShift Route and Kubernetes Ingress resources.\n\nWhen an IngressController is created, a new ingress controller deployment is created to allow external traffic to reach the services that expose Ingress or Route resources. Updating this resource may lead to disruption for public facing network connections as a new ingress controller revision may be rolled out.\n\nhttps://kubernetes.io/docs/concepts/services-networking/ingress-controllers\n\nWhenever possible, sensible defaults for the platform are used. See each field for more details.", + "spec": "spec is the specification of the desired behavior of the IngressController.", + "status": "status is the most recently observed status of the IngressController.", +} + +func (IngressController) SwaggerDoc() map[string]string { + return map_IngressController +} + +var map_IngressControllerList = map[string]string{ + "": "IngressControllerList contains a list of IngressControllers.", +} + +func (IngressControllerList) SwaggerDoc() map[string]string { + return map_IngressControllerList +} + +var map_IngressControllerSpec = map[string]string{ + "": "IngressControllerSpec is the specification of the desired behavior of the IngressController.", + "domain": "domain is a DNS name serviced by the ingress controller and is used to configure multiple features:\n\n* For the LoadBalancerService endpoint publishing strategy, domain is\n used to configure DNS records. See endpointPublishingStrategy.\n\n* When using a generated default certificate, the certificate will be valid\n for domain and its subdomains. See defaultCertificate.\n\n* The value is published to individual Route statuses so that end-users\n know where to target external DNS records.\n\ndomain must be unique among all IngressControllers, and cannot be updated.\n\nIf empty, defaults to ingress.config.openshift.io/cluster .spec.domain.", + "replicas": "replicas is the desired number of ingress controller replicas. If unset, defaults to 2.", + "endpointPublishingStrategy": "endpointPublishingStrategy is used to publish the ingress controller endpoints to other networks, enable load balancer integrations, etc.\n\nIf unset, the default is based on infrastructure.config.openshift.io/cluster .status.platform:\n\n AWS: LoadBalancerService\n All other platform types: Private\n\nendpointPublishingStrategy cannot be updated.", + "defaultCertificate": "defaultCertificate is a reference to a secret containing the default certificate served by the ingress controller. When Routes don't specify their own certificate, defaultCertificate is used.\n\nThe secret must contain the following keys and data:\n\n tls.crt: certificate file contents\n tls.key: key file contents\n\nIf unset, a wildcard certificate is automatically generated and used. The certificate is valid for the ingress controller domain (and subdomains) and the generated certificate's CA will be automatically integrated with the cluster's trust store.\n\nThe in-use certificate (whether generated or user-specified) will be automatically integrated with OpenShift's built-in OAuth server.", + "namespaceSelector": "namespaceSelector is used to filter the set of namespaces serviced by the ingress controller. This is useful for implementing shards.\n\nIf unset, the default is no filtering.", + "routeSelector": "routeSelector is used to filter the set of Routes serviced by the ingress controller. This is useful for implementing shards.\n\nIf unset, the default is no filtering.", + "nodePlacement": "nodePlacement enables explicit control over the scheduling of the ingress controller.\n\nIf unset, defaults are used. See NodePlacement for more details.", +} + +func (IngressControllerSpec) SwaggerDoc() map[string]string { + return map_IngressControllerSpec +} + +var map_IngressControllerStatus = map[string]string{ + "": "IngressControllerStatus defines the observed status of the IngressController.", + "availableReplicas": "availableReplicas is number of observed available replicas according to the ingress controller deployment.", + "selector": "selector is a label selector, in string format, for ingress controller pods corresponding to the IngressController. The number of matching pods should equal the value of availableReplicas.", + "domain": "domain is the actual domain in use.", + "endpointPublishingStrategy": "endpointPublishingStrategy is the actual strategy in use.", + "conditions": "conditions is a list of conditions and their status.\n\nAvailable means the ingress controller deployment is available and servicing route and ingress resources (i.e, .status.availableReplicas equals .spec.replicas)\n\nThere are additional conditions which indicate the status of other ingress controller features and capabilities.\n\n * LoadBalancerManaged\n - True if the following conditions are met:\n * The endpoint publishing strategy requires a service load balancer.\n - False if any of those conditions are unsatisfied.\n\n * LoadBalancerReady\n - True if the following conditions are met:\n * A load balancer is managed.\n * The load balancer is ready.\n - False if any of those conditions are unsatisfied.\n\n * DNSManaged\n - True if the following conditions are met:\n * The endpoint publishing strategy and platform support DNS.\n * The ingress controller domain is set.\n * dns.config.openshift.io/cluster configures DNS zones.\n - False if any of those conditions are unsatisfied.\n\n * DNSReady\n - True if the following conditions are met:\n * DNS is managed.\n * DNS records have been successfully created.\n - False if any of those conditions are unsatisfied.", +} + +func (IngressControllerStatus) SwaggerDoc() map[string]string { + return map_IngressControllerStatus +} + +var map_NodePlacement = map[string]string{ + "": "NodePlacement describes node scheduling configuration for an ingress controller.", + "nodeSelector": "nodeSelector is the node selector applied to ingress controller deployments.\n\nIf unset, the default is:\n\n beta.kubernetes.io/os: linux\n node-role.kubernetes.io/worker: ''\n\nIf set, the specified selector is used and replaces the default.", +} + +func (NodePlacement) SwaggerDoc() map[string]string { + return map_NodePlacement +} + var map_KubeAPIServer = map[string]string{ "": "KubeAPIServer provides information to configure an operator to manage kube-apiserver.", } @@ -240,6 +304,107 @@ func (KubeControllerManagerSpec) SwaggerDoc() map[string]string { return map_KubeControllerManagerSpec } +var map_AdditionalNetworkDefinition = map[string]string{ + "": "AdditionalNetworkDefinition configures an extra network that is available but not created by default. Instead, pods must request them by name. type must be specified, along with exactly one \"Config\" that matches the type.", + "type": "type is the type of network The only supported value is NetworkTypeRaw", + "name": "name is the name of the network. This will be populated in the resulting CRD This must be unique.", + "rawCNIConfig": "rawCNIConfig is the raw CNI configuration json to create in the NetworkAttachmentDefinition CRD", +} + +func (AdditionalNetworkDefinition) SwaggerDoc() map[string]string { + return map_AdditionalNetworkDefinition +} + +var map_ClusterNetworkEntry = map[string]string{ + "": "ClusterNetworkEntry is a subnet from which to allocate PodIPs. A network of size HostPrefix (in CIDR notation) will be allocated when nodes join the cluster. Not all network providers support multiple ClusterNetworks", +} + +func (ClusterNetworkEntry) SwaggerDoc() map[string]string { + return map_ClusterNetworkEntry +} + +var map_DefaultNetworkDefinition = map[string]string{ + "": "DefaultNetworkDefinition represents a single network plugin's configuration. type must be specified, along with exactly one \"Config\" that matches the type.", + "type": "type is the type of network All NetworkTypes are supported except for NetworkTypeRaw", + "openshiftSDNConfig": "openShiftSDNConfig configures the openshift-sdn plugin", + "ovnKubernetesConfig": "oVNKubernetesConfig configures the ovn-kubernetes plugin. This is currently not implemented.", +} + +func (DefaultNetworkDefinition) SwaggerDoc() map[string]string { + return map_DefaultNetworkDefinition +} + +var map_Network = map[string]string{ + "": "Network describes the cluster's desired network configuration. It is consumed by the cluster-network-operator.", +} + +func (Network) SwaggerDoc() map[string]string { + return map_Network +} + +var map_NetworkList = map[string]string{ + "": "NetworkList contains a list of Network configurations", +} + +func (NetworkList) SwaggerDoc() map[string]string { + return map_NetworkList +} + +var map_NetworkSpec = map[string]string{ + "": "NetworkSpec is the top-level network configuration object.", + "clusterNetwork": "clusterNetwork is the IP address pool to use for pod IPs. Some network providers, e.g. OpenShift SDN, support multiple ClusterNetworks. Others only support one. This is equivalent to the cluster-cidr.", + "serviceNetwork": "serviceNetwork is the ip address pool to use for Service IPs Currently, all existing network providers only support a single value here, but this is an array to allow for growth.", + "defaultNetwork": "defaultNetwork is the \"default\" network that all pods will receive", + "additionalNetworks": "additionalNetworks is a list of extra networks to make available to pods when multiple networks are enabled.", + "disableMultiNetwork": "disableMultiNetwork specifies whether or not multiple pod network support should be disabled. If unset, this property defaults to 'false' and multiple network support is enabled.", + "deployKubeProxy": "deployKubeProxy specifies whether or not a standalone kube-proxy should be deployed by the operator. Some network providers include kube-proxy or similar functionality. If unset, the plugin will attempt to select the correct value, which is false when OpenShift SDN and ovn-kubernetes are used and true otherwise.", + "kubeProxyConfig": "kubeProxyConfig lets us configure desired proxy configuration. If not specified, sensible defaults will be chosen by OpenShift directly. Not consumed by all network providers - currently only openshift-sdn.", +} + +func (NetworkSpec) SwaggerDoc() map[string]string { + return map_NetworkSpec +} + +var map_NetworkStatus = map[string]string{ + "": "NetworkStatus is currently unused. Instead, status is reported in the Network.config.openshift.io object.", +} + +func (NetworkStatus) SwaggerDoc() map[string]string { + return map_NetworkStatus +} + +var map_OVNKubernetesConfig = map[string]string{ + "": "ovnKubernetesConfig is the proposed configuration parameters for networks using the ovn-kubernetes network project", + "mtu": "mtu is the MTU to use for the tunnel interface. This must be 100 bytes smaller than the uplink mtu. Default is 1400", +} + +func (OVNKubernetesConfig) SwaggerDoc() map[string]string { + return map_OVNKubernetesConfig +} + +var map_OpenShiftSDNConfig = map[string]string{ + "": "OpenShiftSDNConfig configures the three openshift-sdn plugins", + "mode": "mode is one of \"Multitenant\", \"Subnet\", or \"NetworkPolicy\"", + "vxlanPort": "vxlanPort is the port to use for all vxlan packets. The default is 4789.", + "mtu": "mtu is the mtu to use for the tunnel interface. Defaults to 1450 if unset. This must be 50 bytes smaller than the machine's uplink.", + "useExternalOpenvswitch": "useExternalOpenvswitch tells the operator not to install openvswitch, because it will be provided separately. If set, you must provide it yourself.", +} + +func (OpenShiftSDNConfig) SwaggerDoc() map[string]string { + return map_OpenShiftSDNConfig +} + +var map_ProxyConfig = map[string]string{ + "": "ProxyConfig defines the configuration knobs for kubeproxy All of these are optional and have sensible defaults", + "iptablesSyncPeriod": "The period that iptables rules are refreshed. Default: 30s", + "bindAddress": "The address to \"bind\" on Defaults to 0.0.0.0", + "proxyArguments": "Any additional arguments to pass to the kubeproxy process", +} + +func (ProxyConfig) SwaggerDoc() map[string]string { + return map_ProxyConfig +} + var map_OpenShiftAPIServer = map[string]string{ "": "OpenShiftAPIServer provides information to configure an operator to manage openshift-apiserver.", } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go index a7e8a96d0..f3d46fc7a 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go @@ -40,8 +40,10 @@ func NameSystems() namer.NameSystems { // If you change this, make sure you get the other instances in listers and informers pluralExceptions := map[string]string{ "DNS": "DNSes", + "DNSList": "DNSList", "Endpoints": "Endpoints", "Features": "Features", + "FeaturesList": "FeaturesList", "SecurityContextConstraints": "SecurityContextConstraints", } lowercaseNamer := namer.NewAllLowercasePluralNamer(pluralExceptions) @@ -96,10 +98,10 @@ func NameSystems() namer.NameSystems { } publicPluralNamer := &ExceptionNamer{ Exceptions: map[string]string{ - // these exceptions are used to deconflict the generated code - // you can put your fully qualified package like - // to generate a name that doesn't conflict with your group. - // "k8s.io/apis/events/v1beta1.Event": "EventResource" + // these exceptions are used to deconflict the generated code + // you can put your fully qualified package like + // to generate a name that doesn't conflict with your group. + // "k8s.io/apis/events/v1beta1.Event": "EventResource" }, KeyFunc: func(t *types.Type) string { return t.Name.Package + "." + t.Name.Name diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go index 47e9a8d11..7d597a4ae 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go @@ -51,8 +51,10 @@ func (g *genericGenerator) Filter(c *generator.Context, t *types.Type) bool { func (g *genericGenerator) Namers(c *generator.Context) namer.NameSystems { pluralExceptions := map[string]string{ "DNS": "DNSes", + "DNSList": "DNSList", "Endpoints": "Endpoints", "Features": "Features", + "FeaturesList": "FeaturesList", "SecurityContextConstraints": "SecurityContextConstraints", } return namer.NameSystems{ diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go index 00a53e9fd..b5ca6b5c0 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/packages.go @@ -37,8 +37,10 @@ import ( func NameSystems() namer.NameSystems { pluralExceptions := map[string]string{ "DNS": "DNSes", + "DNSList": "DNSList", "Endpoints": "Endpoints", "Features": "Features", + "FeaturesList": "FeaturesList", "SecurityContextConstraints": "SecurityContextConstraints", } return namer.NameSystems{ @@ -323,9 +325,9 @@ func versionPackage(basePackage string, groupPkgName string, gv clientgentypes.G DefaultGen: generator.DefaultGen{ OptionalName: "interface", }, - outputPackage: packagePath, - imports: generator.NewImportTracker(), - types: typesToGenerate, + outputPackage: packagePath, + imports: generator.NewImportTracker(), + types: typesToGenerate, internalInterfacesPackage: packageForInternalInterfaces(basePackage), }) diff --git a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go index 73b119de9..a17650634 100644 --- a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go +++ b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go @@ -37,8 +37,10 @@ import ( func NameSystems() namer.NameSystems { pluralExceptions := map[string]string{ "DNS": "DNSes", + "DNSList": "DNSList", "Endpoints": "Endpoints", "Features": "Features", + "FeaturesList": "FeaturesList", "SecurityContextConstraints": "SecurityContextConstraints", } return namer.NameSystems{