diff --git a/glide.lock b/glide.lock index 9364e3531..ba9a44800 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ hash: 595563cffda70c75833adcf07415011d115db7218cbbddc4c14f1684ad39638a -updated: 2019-06-12T12:57:01.408584637-04:00 +updated: 2019-06-27T10:15:52.43135905-04:00 imports: - name: github.com/davecgh/go-spew version: 782f4967f2dc4564575ca782fe2d04090b5faca8 @@ -41,7 +41,7 @@ imports: - name: github.com/modern-go/reflect2 version: 94122c33edd36123c84d5368cfb2b69df93a0ec8 - name: github.com/openshift/api - version: fa9befef991415fa1117f69eec05bfa0d1344732 + version: de5ca909c7322bb8d06fa5a9e5604491b373da52 subpackages: - apps/v1 - authorization/v1 diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index ff57fad72..7bf6bda5c 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -9,7 +9,7 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-ge verify="${VERIFY:-}" -for group in apps authorization build config image network oauth operator project quota route security template user; do +for group in apps authorization build config image network oauth project quota route security template user; do ${CODEGEN_PKG}/generate-groups.sh "client,lister,informer" \ github.com/openshift/client-go/${group} \ github.com/openshift/api \ @@ -26,3 +26,12 @@ for group in servicecertsigner; do --go-header-file ${SCRIPT_ROOT}/hack/boilerplate.txt \ ${verify} done + +for group in operator; do + ${CODEGEN_PKG}/generate-groups.sh "client,lister,informer" \ + github.com/openshift/client-go/${group} \ + github.com/openshift/api \ + "${group}:v1,v1alpha1" \ + --go-header-file ${SCRIPT_ROOT}/hack/boilerplate.txt \ + ${verify} +done \ No newline at end of file diff --git a/operator/clientset/versioned/clientset.go b/operator/clientset/versioned/clientset.go index 31213e147..e5e6911f4 100644 --- a/operator/clientset/versioned/clientset.go +++ b/operator/clientset/versioned/clientset.go @@ -4,6 +4,7 @@ package versioned import ( operatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" + operatorv1alpha1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -12,13 +13,15 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface OperatorV1() operatorv1.OperatorV1Interface + OperatorV1alpha1() operatorv1alpha1.OperatorV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - operatorV1 *operatorv1.OperatorV1Client + operatorV1 *operatorv1.OperatorV1Client + operatorV1alpha1 *operatorv1alpha1.OperatorV1alpha1Client } // OperatorV1 retrieves the OperatorV1Client @@ -26,6 +29,11 @@ func (c *Clientset) OperatorV1() operatorv1.OperatorV1Interface { return c.operatorV1 } +// OperatorV1alpha1 retrieves the OperatorV1alpha1Client +func (c *Clientset) OperatorV1alpha1() operatorv1alpha1.OperatorV1alpha1Interface { + return c.operatorV1alpha1 +} + // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -46,6 +54,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } + cs.operatorV1alpha1, err = operatorv1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -59,6 +71,7 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { func NewForConfigOrDie(c *rest.Config) *Clientset { var cs Clientset cs.operatorV1 = operatorv1.NewForConfigOrDie(c) + cs.operatorV1alpha1 = operatorv1alpha1.NewForConfigOrDie(c) cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs @@ -68,6 +81,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { func New(c rest.Interface) *Clientset { var cs Clientset cs.operatorV1 = operatorv1.New(c) + cs.operatorV1alpha1 = operatorv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/operator/clientset/versioned/fake/clientset_generated.go b/operator/clientset/versioned/fake/clientset_generated.go index e412511f6..80966b15a 100644 --- a/operator/clientset/versioned/fake/clientset_generated.go +++ b/operator/clientset/versioned/fake/clientset_generated.go @@ -6,6 +6,8 @@ import ( clientset "github.com/openshift/client-go/operator/clientset/versioned" operatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1" fakeoperatorv1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1/fake" + operatorv1alpha1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1" + fakeoperatorv1alpha1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -59,3 +61,8 @@ var _ clientset.Interface = &Clientset{} func (c *Clientset) OperatorV1() operatorv1.OperatorV1Interface { return &fakeoperatorv1.FakeOperatorV1{Fake: &c.Fake} } + +// OperatorV1alpha1 retrieves the OperatorV1alpha1Client +func (c *Clientset) OperatorV1alpha1() operatorv1alpha1.OperatorV1alpha1Interface { + return &fakeoperatorv1alpha1.FakeOperatorV1alpha1{Fake: &c.Fake} +} diff --git a/operator/clientset/versioned/fake/register.go b/operator/clientset/versioned/fake/register.go index 972715a37..20d540bc0 100644 --- a/operator/clientset/versioned/fake/register.go +++ b/operator/clientset/versioned/fake/register.go @@ -4,6 +4,7 @@ package fake import ( operatorv1 "github.com/openshift/api/operator/v1" + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -16,6 +17,7 @@ var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ operatorv1.AddToScheme, + operatorv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/operator/clientset/versioned/scheme/register.go b/operator/clientset/versioned/scheme/register.go index 9ee6ed21d..0a99d662e 100644 --- a/operator/clientset/versioned/scheme/register.go +++ b/operator/clientset/versioned/scheme/register.go @@ -4,6 +4,7 @@ package scheme import ( operatorv1 "github.com/openshift/api/operator/v1" + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -16,6 +17,7 @@ var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ operatorv1.AddToScheme, + operatorv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/doc.go b/operator/clientset/versioned/typed/operator/v1alpha1/doc.go new file mode 100644 index 000000000..93a7ca4e0 --- /dev/null +++ b/operator/clientset/versioned/typed/operator/v1alpha1/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/fake/doc.go b/operator/clientset/versioned/typed/operator/v1alpha1/fake/doc.go new file mode 100644 index 000000000..2b5ba4c8e --- /dev/null +++ b/operator/clientset/versioned/typed/operator/v1alpha1/fake/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go b/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go new file mode 100644 index 000000000..5ff47ad54 --- /dev/null +++ b/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_imagecontentsourcepolicy.go @@ -0,0 +1,104 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "github.com/openshift/api/operator/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeImageContentSourcePolicies implements ImageContentSourcePolicyInterface +type FakeImageContentSourcePolicies struct { + Fake *FakeOperatorV1alpha1 +} + +var imagecontentsourcepoliciesResource = schema.GroupVersionResource{Group: "operator.openshift.io", Version: "v1alpha1", Resource: "imagecontentsourcepolicies"} + +var imagecontentsourcepoliciesKind = schema.GroupVersionKind{Group: "operator.openshift.io", Version: "v1alpha1", Kind: "ImageContentSourcePolicy"} + +// Get takes name of the imageContentSourcePolicy, and returns the corresponding imageContentSourcePolicy object, and an error if there is any. +func (c *FakeImageContentSourcePolicies) Get(name string, options v1.GetOptions) (result *v1alpha1.ImageContentSourcePolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(imagecontentsourcepoliciesResource, name), &v1alpha1.ImageContentSourcePolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ImageContentSourcePolicy), err +} + +// List takes label and field selectors, and returns the list of ImageContentSourcePolicies that match those selectors. +func (c *FakeImageContentSourcePolicies) List(opts v1.ListOptions) (result *v1alpha1.ImageContentSourcePolicyList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(imagecontentsourcepoliciesResource, imagecontentsourcepoliciesKind, opts), &v1alpha1.ImageContentSourcePolicyList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ImageContentSourcePolicyList{ListMeta: obj.(*v1alpha1.ImageContentSourcePolicyList).ListMeta} + for _, item := range obj.(*v1alpha1.ImageContentSourcePolicyList).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 imageContentSourcePolicies. +func (c *FakeImageContentSourcePolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(imagecontentsourcepoliciesResource, opts)) +} + +// Create takes the representation of a imageContentSourcePolicy and creates it. Returns the server's representation of the imageContentSourcePolicy, and an error, if there is any. +func (c *FakeImageContentSourcePolicies) Create(imageContentSourcePolicy *v1alpha1.ImageContentSourcePolicy) (result *v1alpha1.ImageContentSourcePolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(imagecontentsourcepoliciesResource, imageContentSourcePolicy), &v1alpha1.ImageContentSourcePolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ImageContentSourcePolicy), err +} + +// Update takes the representation of a imageContentSourcePolicy and updates it. Returns the server's representation of the imageContentSourcePolicy, and an error, if there is any. +func (c *FakeImageContentSourcePolicies) Update(imageContentSourcePolicy *v1alpha1.ImageContentSourcePolicy) (result *v1alpha1.ImageContentSourcePolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(imagecontentsourcepoliciesResource, imageContentSourcePolicy), &v1alpha1.ImageContentSourcePolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ImageContentSourcePolicy), err +} + +// Delete takes name of the imageContentSourcePolicy and deletes it. Returns an error if one occurs. +func (c *FakeImageContentSourcePolicies) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(imagecontentsourcepoliciesResource, name), &v1alpha1.ImageContentSourcePolicy{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeImageContentSourcePolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(imagecontentsourcepoliciesResource, listOptions) + + _, err := c.Fake.Invokes(action, &v1alpha1.ImageContentSourcePolicyList{}) + return err +} + +// Patch applies the patch and returns the patched imageContentSourcePolicy. +func (c *FakeImageContentSourcePolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ImageContentSourcePolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(imagecontentsourcepoliciesResource, name, pt, data, subresources...), &v1alpha1.ImageContentSourcePolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ImageContentSourcePolicy), err +} diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go b/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go new file mode 100644 index 000000000..4759c1283 --- /dev/null +++ b/operator/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go @@ -0,0 +1,24 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "github.com/openshift/client-go/operator/clientset/versioned/typed/operator/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeOperatorV1alpha1 struct { + *testing.Fake +} + +func (c *FakeOperatorV1alpha1) ImageContentSourcePolicies() v1alpha1.ImageContentSourcePolicyInterface { + return &FakeImageContentSourcePolicies{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeOperatorV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go b/operator/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go new file mode 100644 index 000000000..42ec352cf --- /dev/null +++ b/operator/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go @@ -0,0 +1,5 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type ImageContentSourcePolicyExpansion interface{} diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/imagecontentsourcepolicy.go b/operator/clientset/versioned/typed/operator/v1alpha1/imagecontentsourcepolicy.go new file mode 100644 index 000000000..bac2a4e76 --- /dev/null +++ b/operator/clientset/versioned/typed/operator/v1alpha1/imagecontentsourcepolicy.go @@ -0,0 +1,148 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "time" + + v1alpha1 "github.com/openshift/api/operator/v1alpha1" + scheme "github.com/openshift/client-go/operator/clientset/versioned/scheme" + 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" +) + +// ImageContentSourcePoliciesGetter has a method to return a ImageContentSourcePolicyInterface. +// A group's client should implement this interface. +type ImageContentSourcePoliciesGetter interface { + ImageContentSourcePolicies() ImageContentSourcePolicyInterface +} + +// ImageContentSourcePolicyInterface has methods to work with ImageContentSourcePolicy resources. +type ImageContentSourcePolicyInterface interface { + Create(*v1alpha1.ImageContentSourcePolicy) (*v1alpha1.ImageContentSourcePolicy, error) + Update(*v1alpha1.ImageContentSourcePolicy) (*v1alpha1.ImageContentSourcePolicy, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1alpha1.ImageContentSourcePolicy, error) + List(opts v1.ListOptions) (*v1alpha1.ImageContentSourcePolicyList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ImageContentSourcePolicy, err error) + ImageContentSourcePolicyExpansion +} + +// imageContentSourcePolicies implements ImageContentSourcePolicyInterface +type imageContentSourcePolicies struct { + client rest.Interface +} + +// newImageContentSourcePolicies returns a ImageContentSourcePolicies +func newImageContentSourcePolicies(c *OperatorV1alpha1Client) *imageContentSourcePolicies { + return &imageContentSourcePolicies{ + client: c.RESTClient(), + } +} + +// Get takes name of the imageContentSourcePolicy, and returns the corresponding imageContentSourcePolicy object, and an error if there is any. +func (c *imageContentSourcePolicies) Get(name string, options v1.GetOptions) (result *v1alpha1.ImageContentSourcePolicy, err error) { + result = &v1alpha1.ImageContentSourcePolicy{} + err = c.client.Get(). + Resource("imagecontentsourcepolicies"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ImageContentSourcePolicies that match those selectors. +func (c *imageContentSourcePolicies) List(opts v1.ListOptions) (result *v1alpha1.ImageContentSourcePolicyList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.ImageContentSourcePolicyList{} + err = c.client.Get(). + Resource("imagecontentsourcepolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested imageContentSourcePolicies. +func (c *imageContentSourcePolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Resource("imagecontentsourcepolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch() +} + +// Create takes the representation of a imageContentSourcePolicy and creates it. Returns the server's representation of the imageContentSourcePolicy, and an error, if there is any. +func (c *imageContentSourcePolicies) Create(imageContentSourcePolicy *v1alpha1.ImageContentSourcePolicy) (result *v1alpha1.ImageContentSourcePolicy, err error) { + result = &v1alpha1.ImageContentSourcePolicy{} + err = c.client.Post(). + Resource("imagecontentsourcepolicies"). + Body(imageContentSourcePolicy). + Do(). + Into(result) + return +} + +// Update takes the representation of a imageContentSourcePolicy and updates it. Returns the server's representation of the imageContentSourcePolicy, and an error, if there is any. +func (c *imageContentSourcePolicies) Update(imageContentSourcePolicy *v1alpha1.ImageContentSourcePolicy) (result *v1alpha1.ImageContentSourcePolicy, err error) { + result = &v1alpha1.ImageContentSourcePolicy{} + err = c.client.Put(). + Resource("imagecontentsourcepolicies"). + Name(imageContentSourcePolicy.Name). + Body(imageContentSourcePolicy). + Do(). + Into(result) + return +} + +// Delete takes name of the imageContentSourcePolicy and deletes it. Returns an error if one occurs. +func (c *imageContentSourcePolicies) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("imagecontentsourcepolicies"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *imageContentSourcePolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + var timeout time.Duration + if listOptions.TimeoutSeconds != nil { + timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("imagecontentsourcepolicies"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Timeout(timeout). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched imageContentSourcePolicy. +func (c *imageContentSourcePolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ImageContentSourcePolicy, err error) { + result = &v1alpha1.ImageContentSourcePolicy{} + err = c.client.Patch(pt). + Resource("imagecontentsourcepolicies"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go b/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go new file mode 100644 index 000000000..ac87877f7 --- /dev/null +++ b/operator/clientset/versioned/typed/operator/v1alpha1/operator_client.go @@ -0,0 +1,74 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/openshift/api/operator/v1alpha1" + "github.com/openshift/client-go/operator/clientset/versioned/scheme" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + rest "k8s.io/client-go/rest" +) + +type OperatorV1alpha1Interface interface { + RESTClient() rest.Interface + ImageContentSourcePoliciesGetter +} + +// OperatorV1alpha1Client is used to interact with features provided by the operator.openshift.io group. +type OperatorV1alpha1Client struct { + restClient rest.Interface +} + +func (c *OperatorV1alpha1Client) ImageContentSourcePolicies() ImageContentSourcePolicyInterface { + return newImageContentSourcePolicies(c) +} + +// NewForConfig creates a new OperatorV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*OperatorV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &OperatorV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new OperatorV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *OperatorV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new OperatorV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *OperatorV1alpha1Client { + return &OperatorV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *OperatorV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/operator/informers/externalversions/generic.go b/operator/informers/externalversions/generic.go index e5f214585..8795ae8a0 100644 --- a/operator/informers/externalversions/generic.go +++ b/operator/informers/externalversions/generic.go @@ -6,6 +6,7 @@ import ( "fmt" v1 "github.com/openshift/api/operator/v1" + v1alpha1 "github.com/openshift/api/operator/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -66,6 +67,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case v1.SchemeGroupVersion.WithResource("servicecatalogcontrollermanagers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().ServiceCatalogControllerManagers().Informer()}, nil + // Group=operator.openshift.io, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("imagecontentsourcepolicies"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1alpha1().ImageContentSourcePolicies().Informer()}, nil + } return nil, fmt.Errorf("no informer found for %v", resource) diff --git a/operator/informers/externalversions/operator/interface.go b/operator/informers/externalversions/operator/interface.go index f636a83d5..4da3da158 100644 --- a/operator/informers/externalversions/operator/interface.go +++ b/operator/informers/externalversions/operator/interface.go @@ -5,12 +5,15 @@ package operator import ( internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" v1 "github.com/openshift/client-go/operator/informers/externalversions/operator/v1" + v1alpha1 "github.com/openshift/client-go/operator/informers/externalversions/operator/v1alpha1" ) // Interface provides access to each of this group's versions. type Interface interface { // V1 provides access to shared informers for resources in V1. V1() v1.Interface + // V1alpha1 provides access to shared informers for resources in V1alpha1. + V1alpha1() v1alpha1.Interface } type group struct { @@ -28,3 +31,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (g *group) V1() v1.Interface { return v1.New(g.factory, g.namespace, g.tweakListOptions) } + +// V1alpha1 returns a new v1alpha1.Interface. +func (g *group) V1alpha1() v1alpha1.Interface { + return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/operator/informers/externalversions/operator/v1alpha1/imagecontentsourcepolicy.go b/operator/informers/externalversions/operator/v1alpha1/imagecontentsourcepolicy.go new file mode 100644 index 000000000..4136c3c89 --- /dev/null +++ b/operator/informers/externalversions/operator/v1alpha1/imagecontentsourcepolicy.go @@ -0,0 +1,72 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + time "time" + + operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" + versioned "github.com/openshift/client-go/operator/clientset/versioned" + internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/openshift/client-go/operator/listers/operator/v1alpha1" + 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" +) + +// ImageContentSourcePolicyInformer provides access to a shared informer and lister for +// ImageContentSourcePolicies. +type ImageContentSourcePolicyInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ImageContentSourcePolicyLister +} + +type imageContentSourcePolicyInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewImageContentSourcePolicyInformer constructs a new informer for ImageContentSourcePolicy 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 NewImageContentSourcePolicyInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredImageContentSourcePolicyInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredImageContentSourcePolicyInformer constructs a new informer for ImageContentSourcePolicy 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 NewFilteredImageContentSourcePolicyInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.OperatorV1alpha1().ImageContentSourcePolicies().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.OperatorV1alpha1().ImageContentSourcePolicies().Watch(options) + }, + }, + &operatorv1alpha1.ImageContentSourcePolicy{}, + resyncPeriod, + indexers, + ) +} + +func (f *imageContentSourcePolicyInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredImageContentSourcePolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *imageContentSourcePolicyInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&operatorv1alpha1.ImageContentSourcePolicy{}, f.defaultInformer) +} + +func (f *imageContentSourcePolicyInformer) Lister() v1alpha1.ImageContentSourcePolicyLister { + return v1alpha1.NewImageContentSourcePolicyLister(f.Informer().GetIndexer()) +} diff --git a/operator/informers/externalversions/operator/v1alpha1/interface.go b/operator/informers/externalversions/operator/v1alpha1/interface.go new file mode 100644 index 000000000..43069d459 --- /dev/null +++ b/operator/informers/externalversions/operator/v1alpha1/interface.go @@ -0,0 +1,29 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + internalinterfaces "github.com/openshift/client-go/operator/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // ImageContentSourcePolicies returns a ImageContentSourcePolicyInformer. + ImageContentSourcePolicies() ImageContentSourcePolicyInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// ImageContentSourcePolicies returns a ImageContentSourcePolicyInformer. +func (v *version) ImageContentSourcePolicies() ImageContentSourcePolicyInformer { + return &imageContentSourcePolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/operator/listers/operator/v1alpha1/expansion_generated.go b/operator/listers/operator/v1alpha1/expansion_generated.go new file mode 100644 index 000000000..4cd9e28ac --- /dev/null +++ b/operator/listers/operator/v1alpha1/expansion_generated.go @@ -0,0 +1,7 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +// ImageContentSourcePolicyListerExpansion allows custom methods to be added to +// ImageContentSourcePolicyLister. +type ImageContentSourcePolicyListerExpansion interface{} diff --git a/operator/listers/operator/v1alpha1/imagecontentsourcepolicy.go b/operator/listers/operator/v1alpha1/imagecontentsourcepolicy.go new file mode 100644 index 000000000..5565ccf68 --- /dev/null +++ b/operator/listers/operator/v1alpha1/imagecontentsourcepolicy.go @@ -0,0 +1,49 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/openshift/api/operator/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ImageContentSourcePolicyLister helps list ImageContentSourcePolicies. +type ImageContentSourcePolicyLister interface { + // List lists all ImageContentSourcePolicies in the indexer. + List(selector labels.Selector) (ret []*v1alpha1.ImageContentSourcePolicy, err error) + // Get retrieves the ImageContentSourcePolicy from the index for a given name. + Get(name string) (*v1alpha1.ImageContentSourcePolicy, error) + ImageContentSourcePolicyListerExpansion +} + +// imageContentSourcePolicyLister implements the ImageContentSourcePolicyLister interface. +type imageContentSourcePolicyLister struct { + indexer cache.Indexer +} + +// NewImageContentSourcePolicyLister returns a new ImageContentSourcePolicyLister. +func NewImageContentSourcePolicyLister(indexer cache.Indexer) ImageContentSourcePolicyLister { + return &imageContentSourcePolicyLister{indexer: indexer} +} + +// List lists all ImageContentSourcePolicies in the indexer. +func (s *imageContentSourcePolicyLister) List(selector labels.Selector) (ret []*v1alpha1.ImageContentSourcePolicy, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ImageContentSourcePolicy)) + }) + return ret, err +} + +// Get retrieves the ImageContentSourcePolicy from the index for a given name. +func (s *imageContentSourcePolicyLister) Get(name string) (*v1alpha1.ImageContentSourcePolicy, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("imagecontentsourcepolicy"), name) + } + return obj.(*v1alpha1.ImageContentSourcePolicy), nil +} diff --git a/vendor/github.com/openshift/api/authorization/v1/types.go b/vendor/github.com/openshift/api/authorization/v1/types.go index 94b4aed0c..fde3ecf3d 100644 --- a/vendor/github.com/openshift/api/authorization/v1/types.go +++ b/vendor/github.com/openshift/api/authorization/v1/types.go @@ -16,6 +16,15 @@ import ( // 4. all allow RoleBinding PolicyRules in the namespace - short circuit on match // 5. deny by default +const ( + // GroupKind is string representation of kind used in role binding subjects that represents the "group". + GroupKind = "Group" + // UserKind is string representation of kind used in role binding subjects that represents the "user". + UserKind = "User" + + ScopesKey = "scopes.authorization.openshift.io" +) + // PolicyRule holds information that describes a policy rule, but does not contain information // about who the rule applies to or which namespace the rule applies to. type PolicyRule struct { 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 c8b5b482f..40ad00151 100644 --- a/vendor/github.com/openshift/api/config/v1/types_console.go +++ b/vendor/github.com/openshift/api/config/v1/types_console.go @@ -6,7 +6,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// Console holds cluster-wide information about Console. The canonical name is `cluster` +// Console holds cluster-wide information about Console. The canonical name is `cluster`. type Console struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -20,11 +20,13 @@ type Console struct { Status ConsoleStatus `json:"status"` } +// ConsoleSpec is the specification of the desired behavior of the Console. type ConsoleSpec struct { // +optional Authentication ConsoleAuthentication `json:"authentication"` } +// ConsoleStatus defines the observed status of the Console. type ConsoleStatus struct { // The URL for the console. This will be derived from the host for the route that // is created for the console. @@ -40,6 +42,7 @@ type ConsoleList struct { Items []Console `json:"items"` } +// ConsoleAuthentication defines a list of optional configuration for console authentication. type ConsoleAuthentication struct { // An optional, absolute URL to redirect web browsers to after logging out of // the console. If not specified, it will redirect to the default login page. 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 5b5ab1929..40ba5e493 100644 --- a/vendor/github.com/openshift/api/config/v1/types_network.go +++ b/vendor/github.com/openshift/api/config/v1/types_network.go @@ -24,7 +24,8 @@ type Network struct { // NetworkSpec is the desired network configuration. // As a general rule, this SHOULD NOT be read directly. Instead, you should // consume the NetworkStatus, as it indicates the currently deployed configuration. -// Currently, none of these fields may be changed after installation. +// Currently, changing ClusterNetwork, ServiceNetwork, or NetworkType after +// installation is not supported. type NetworkSpec struct { // IP address pool to use for pod IPs. ClusterNetwork []ClusterNetworkEntry `json:"clusterNetwork"` @@ -39,6 +40,11 @@ type NetworkSpec struct { // Currently supported values are: // - OpenShiftSDN NetworkType string `json:"networkType"` + + // externalIP defines configuration for controllers that + // affect Service.ExternalIP + // +optional + ExternalIP *ExternalIPConfig `json:"externalIP,omitempty"` } // NetworkStatus is the current network configuration. @@ -67,6 +73,39 @@ type ClusterNetworkEntry struct { HostPrefix uint32 `json:"hostPrefix"` } +// ExternalIPConfig specifies some IP blocks relevant for the ExternalIP field +// of a Service resource. +type ExternalIPConfig struct { + // policy is a set of restrictions applied to the ExternalIP field. + // If nil, any value is allowed for an ExternalIP. If the empty/zero + // policy is supplied, then ExternalIP is not allowed to be set. + // +optional + Policy *ExternalIPPolicy `json:"policy,omitempty"` + + // autoAssignCIDRs is a list of CIDRs from which to automatically assign + // Service.ExternalIP. These are assigned when the service is of type + // LoadBalancer. In general, this is only useful for bare-metal clusters. + // In Openshift 3.x, this was misleadingly called "IngressIPs". + // Automatically assigned External IPs are not affected by any + // ExternalIPPolicy rules. + // Currently, only one entry may be provided. + // +optional + AutoAssignCIDRs []string `json:"autoAssignCIDRs,omitempty"` +} + +// ExternalIPPolicy configures exactly which IPs are allowed for the ExternalIP +// field in a Service. If the zero struct is supplied, then none are permitted. +// The policy controller always allows automatically assigned external IPs. +type ExternalIPPolicy struct { + // allowedCIDRs is the list of allowed CIDRs. + AllowedCIDRs []string `json:"allowedCIDRs,omitempty"` + + // rejectedCIDRs is the list of disallowed CIDRs. These take precedence + // over allowedCIDRs. + // +optional + RejectedCIDRs []string `json:"rejectedCIDRs,omitempty"` +} + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type NetworkList 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 5539c9aa5..b869785f0 100644 --- a/vendor/github.com/openshift/api/config/v1/types_proxy.go +++ b/vendor/github.com/openshift/api/config/v1/types_proxy.go @@ -31,10 +31,7 @@ type ProxySpec struct { HTTPSProxy string `json:"httpsProxy,omitempty"` // noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. - // Each name is matched as either a domain which contains the host name as a suffix, or the host name itself. - // For instance, example.com would match example.com, example.com:80, and www.example.com. - // Wildcard(*) characters are not accepted, except a single * character which matches all hosts - // and effectively disables the proxy. Empty means unset and will not result in an env var. + // 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/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go index aa7adfb60..1300ced88 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 @@ -1157,6 +1157,58 @@ func (in *EtcdStorageConfig) DeepCopy() *EtcdStorageConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalIPConfig) DeepCopyInto(out *ExternalIPConfig) { + *out = *in + if in.Policy != nil { + in, out := &in.Policy, &out.Policy + *out = new(ExternalIPPolicy) + (*in).DeepCopyInto(*out) + } + if in.AutoAssignCIDRs != nil { + in, out := &in.AutoAssignCIDRs, &out.AutoAssignCIDRs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalIPConfig. +func (in *ExternalIPConfig) DeepCopy() *ExternalIPConfig { + if in == nil { + return nil + } + out := new(ExternalIPConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalIPPolicy) DeepCopyInto(out *ExternalIPPolicy) { + *out = *in + if in.AllowedCIDRs != nil { + in, out := &in.AllowedCIDRs, &out.AllowedCIDRs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.RejectedCIDRs != nil { + in, out := &in.RejectedCIDRs, &out.RejectedCIDRs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalIPPolicy. +func (in *ExternalIPPolicy) DeepCopy() *ExternalIPPolicy { + if in == nil { + return nil + } + out := new(ExternalIPPolicy) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *FeatureGate) DeepCopyInto(out *FeatureGate) { *out = *in @@ -2019,6 +2071,11 @@ func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.ExternalIP != nil { + in, out := &in.ExternalIP, &out.ExternalIP + *out = new(ExternalIPConfig) + (*in).DeepCopyInto(*out) + } return } 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 07da83229..730cffc41 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 @@ -539,7 +539,7 @@ func (UpdateHistory) SwaggerDoc() map[string]string { } var map_Console = map[string]string{ - "": "Console holds cluster-wide information about Console. The canonical name is `cluster`", + "": "Console holds cluster-wide information about Console. 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.", @@ -550,6 +550,7 @@ func (Console) SwaggerDoc() map[string]string { } var map_ConsoleAuthentication = map[string]string{ + "": "ConsoleAuthentication defines a list of optional configuration for console authentication.", "logoutRedirect": "An optional, absolute URL to redirect web browsers to after logging out of the console. If not specified, it will redirect to the default login page. This is required when using an identity provider that supports single sign-on (SSO) such as: - OpenID (Keycloak, Azure) - RequestHeader (GSSAPI, SSPI, SAML) - OAuth (GitHub, GitLab, Google) Logging out of the console will destroy the user's token. The logoutRedirect provides the user the option to perform single logout (SLO) through the identity provider to destroy their single sign-on session.", } @@ -565,7 +566,16 @@ func (ConsoleList) SwaggerDoc() map[string]string { return map_ConsoleList } +var map_ConsoleSpec = map[string]string{ + "": "ConsoleSpec is the specification of the desired behavior of the Console.", +} + +func (ConsoleSpec) SwaggerDoc() map[string]string { + return map_ConsoleSpec +} + var map_ConsoleStatus = map[string]string{ + "": "ConsoleStatus defines the observed status of the Console.", "consoleURL": "The URL for the console. This will be derived from the host for the route that is created for the console.", } @@ -798,6 +808,26 @@ func (ClusterNetworkEntry) SwaggerDoc() map[string]string { return map_ClusterNetworkEntry } +var map_ExternalIPConfig = map[string]string{ + "": "ExternalIPConfig specifies some IP blocks relevant for the ExternalIP field of a Service resource.", + "policy": "policy is a set of restrictions applied to the ExternalIP field. If nil, any value is allowed for an ExternalIP. If the empty/zero policy is supplied, then ExternalIP is not allowed to be set.", + "autoAssignCIDRs": "autoAssignCIDRs is a list of CIDRs from which to automatically assign Service.ExternalIP. These are assigned when the service is of type LoadBalancer. In general, this is only useful for bare-metal clusters. In Openshift 3.x, this was misleadingly called \"IngressIPs\". Automatically assigned External IPs are not affected by any ExternalIPPolicy rules. Currently, only one entry may be provided.", +} + +func (ExternalIPConfig) SwaggerDoc() map[string]string { + return map_ExternalIPConfig +} + +var map_ExternalIPPolicy = map[string]string{ + "": "ExternalIPPolicy configures exactly which IPs are allowed for the ExternalIP field in a Service. If the zero struct is supplied, then none are permitted. The policy controller always allows automatically assigned external IPs.", + "allowedCIDRs": "allowedCIDRs is the list of allowed CIDRs.", + "rejectedCIDRs": "rejectedCIDRs is the list of disallowed CIDRs. These take precedence over allowedCIDRs.", +} + +func (ExternalIPPolicy) SwaggerDoc() map[string]string { + return map_ExternalIPPolicy +} + var map_Network = map[string]string{ "": "Network holds cluster-wide information about Network. The canonical name is `cluster`", "metadata": "Standard object's metadata.", @@ -818,10 +848,11 @@ func (NetworkList) SwaggerDoc() map[string]string { } var map_NetworkSpec = map[string]string{ - "": "NetworkSpec is the desired network configuration. As a general rule, this SHOULD NOT be read directly. Instead, you should consume the NetworkStatus, as it indicates the currently deployed configuration. Currently, none of these fields may be changed after installation.", + "": "NetworkSpec is the desired network configuration. As a general rule, this SHOULD NOT be read directly. Instead, you should consume the NetworkStatus, as it indicates the currently deployed configuration. Currently, changing ClusterNetwork, ServiceNetwork, or NetworkType after installation is not supported.", "clusterNetwork": "IP address pool to use for pod IPs.", "serviceNetwork": "IP address pool for services. Currently, we only support a single entry here.", "networkType": "NetworkType is the plugin that is to be deployed (e.g. OpenShiftSDN). This should match a value that the cluster-network-operator understands, or else no networking will be installed. Currently supported values are: - OpenShiftSDN", + "externalIP": "externalIP defines configuration for controllers that affect Service.ExternalIP", } func (NetworkSpec) SwaggerDoc() map[string]string { @@ -1119,7 +1150,7 @@ var map_ProxySpec = map[string]string{ "": "ProxySpec contains cluster proxy creation configuration.", "httpProxy": "httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var.", "httpsProxy": "httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var.", - "noProxy": "noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. Each name is matched as either a domain which contains the host name as a suffix, or the host name itself. For instance, example.com would match example.com, example.com:80, and www.example.com. Wildcard(*) characters are not accepted, except a single * character which matches all hosts and effectively disables the proxy. Empty means unset and will not result in an env var.", + "noProxy": "noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. Empty means unset and will not result in an env var.", } func (ProxySpec) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/console/OWNERS b/vendor/github.com/openshift/api/console/OWNERS new file mode 100644 index 000000000..f6d5d3f5f --- /dev/null +++ b/vendor/github.com/openshift/api/console/OWNERS @@ -0,0 +1,3 @@ +reviewers: + - benjaminapetersen + - spadgett diff --git a/vendor/github.com/openshift/api/console/install.go b/vendor/github.com/openshift/api/console/install.go new file mode 100644 index 000000000..147d023b7 --- /dev/null +++ b/vendor/github.com/openshift/api/console/install.go @@ -0,0 +1,26 @@ +package console + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + + consolev1 "github.com/openshift/api/console/v1" +) + +const ( + GroupName = "console.openshift.io" +) + +var ( + schemeBuilder = runtime.NewSchemeBuilder(consolev1.Install) + // Install is a function which adds every version of this group to a scheme + Install = schemeBuilder.AddToScheme +) + +func Resource(resource string) schema.GroupResource { + return schema.GroupResource{Group: GroupName, Resource: resource} +} + +func Kind(kind string) schema.GroupKind { + return schema.GroupKind{Group: GroupName, Kind: kind} +} diff --git a/vendor/github.com/openshift/api/console/v1/doc.go b/vendor/github.com/openshift/api/console/v1/doc.go new file mode 100644 index 000000000..c08b5b519 --- /dev/null +++ b/vendor/github.com/openshift/api/console/v1/doc.go @@ -0,0 +1,7 @@ +// +k8s:deepcopy-gen=package,register +// +k8s:defaulter-gen=TypeMeta +// +k8s:openapi-gen=true + +// +groupName=console.openshift.io +// Package v1 is the v1 version of the API. +package v1 diff --git a/vendor/github.com/openshift/api/console/v1/register.go b/vendor/github.com/openshift/api/console/v1/register.go new file mode 100644 index 000000000..383c89613 --- /dev/null +++ b/vendor/github.com/openshift/api/console/v1/register.go @@ -0,0 +1,40 @@ +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var ( + GroupName = "console.openshift.io" + GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, corev1.AddToScheme) + // Install is a function which adds this version to a scheme + Install = schemeBuilder.AddToScheme + + // SchemeGroupVersion generated code relies on this name + // Deprecated + SchemeGroupVersion = GroupVersion + // AddToScheme exists solely to keep the old generators creating valid code + // DEPRECATED + AddToScheme = schemeBuilder.AddToScheme +) + +// Resource generated code relies on this being here, but it logically belongs to the group +// DEPRECATED +func Resource(resource string) schema.GroupResource { + return schema.GroupResource{Group: GroupName, Resource: resource} +} + +// addKnownTypes adds types to API group +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(GroupVersion, + &ConsoleLink{}, + &ConsoleCLIDownload{}, + &ConsoleNotification{}, + ) + metav1.AddToGroupVersion(scheme, GroupVersion) + return nil +} diff --git a/vendor/github.com/openshift/api/console/v1/types.go b/vendor/github.com/openshift/api/console/v1/types.go new file mode 100644 index 000000000..3dea7005a --- /dev/null +++ b/vendor/github.com/openshift/api/console/v1/types.go @@ -0,0 +1,9 @@ +package v1 + +// Represents a standard link that could be generated in HTML +type Link struct { + // text is the display text for the link + Text string `json:"text"` + // href is the absolute secure URL for the link (must use https) + Href string `json:"href"` +} diff --git a/vendor/github.com/openshift/api/console/v1/types_console_cli_download.go b/vendor/github.com/openshift/api/console/v1/types_console_cli_download.go new file mode 100644 index 000000000..00844a03c --- /dev/null +++ b/vendor/github.com/openshift/api/console/v1/types_console_cli_download.go @@ -0,0 +1,34 @@ +package v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ConsoleCLIDownload is an extension for configuring openshift web console command line interface (CLI) downloads. +type ConsoleCLIDownload struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec ConsoleCLIDownloadSpec `json:"spec"` +} + +// ConsoleCLIDownloadSpec is the desired cli download configuration. +type ConsoleCLIDownloadSpec struct { + // displayName is the display name of the CLI download. + DisplayName string `json:"displayName"` + // description is the description of the CLI download (can include markdown). + Description string `json:"description"` + // links is a list of objects that provide CLI download link details. + Links []Link `json:"links"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ConsoleCLIDownloadList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + metav1.ListMeta `json:"metadata"` + Items []ConsoleCLIDownload `json:"items"` +} diff --git a/vendor/github.com/openshift/api/console/v1/types_console_link.go b/vendor/github.com/openshift/api/console/v1/types_console_link.go new file mode 100644 index 000000000..11cd6b2d6 --- /dev/null +++ b/vendor/github.com/openshift/api/console/v1/types_console_link.go @@ -0,0 +1,41 @@ +package v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ConsoleLink is an extension for customizing OpenShift web console links. +type ConsoleLink struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec ConsoleLinkSpec `json:"spec"` +} + +// ConsoleLinkSpec is the desired console link configuration. +type ConsoleLinkSpec struct { + Link `json:",inline"` + // location determines which location in the console the link will be appended to. + Location ConsoleLinkLocation `json:"location"` +} + +// ConsoleLinkLocationSelector is a set of possible menu targets to which a link may be appended. +type ConsoleLinkLocation string + +const ( + // HelpMenu indicates that the link should appear in the help menu in the console. + HelpMenu ConsoleLinkLocation = "HelpMenu" + // UserMenu indicates that the link should appear in the user menu in the console. + UserMenu ConsoleLinkLocation = "UserMenu" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ConsoleLinkList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + metav1.ListMeta `json:"metadata"` + Items []ConsoleLink `json:"items"` +} diff --git a/vendor/github.com/openshift/api/console/v1/types_console_notification.go b/vendor/github.com/openshift/api/console/v1/types_console_notification.go new file mode 100644 index 000000000..b4347fe3a --- /dev/null +++ b/vendor/github.com/openshift/api/console/v1/types_console_notification.go @@ -0,0 +1,55 @@ +package v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ConsoleNotification is the extension for configuring openshift web console notifications. +type ConsoleNotification struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec ConsoleNotificationSpec `json:"spec"` +} + +// ConsoleNotificationSpec is the desired console notification configuration. +type ConsoleNotificationSpec struct { + // text is the visible text of the notification. + Text string `json:"text"` + // location is the location of the notification in the console. + // +optional + Location ConsoleNotificationLocation `json:"location,omitempty"` + // link is an object that holds notification link details. + // +optional + Link *Link `json:"link,omitempty"` + // color is the color of the text for the notification as CSS data type color. + // +optional + Color string `json:"color,omitempty"` + // backgroundColor is the color of the background for the notification as CSS data type color. + // +optional + BackgroundColor string `json:"backgroundColor,omitempty"` +} + +// ConsoleNotificationLocationSelector is a set of possible notification targets +// to which a notification may be appended. +type ConsoleNotificationLocation string + +const ( + // BannerTop indicates that the notification should appear at the top of the console. + BannerTop ConsoleNotificationLocation = "BannerTop" + // BannerBottom indicates that the notification should appear at the bottom of the console. + BannerBottom ConsoleNotificationLocation = "BannerBottom" + // BannerTopBottom indicates that the notification should appear both at the top and at the bottom of the console. + BannerTopBottom ConsoleNotificationLocation = "BannerTopBottom" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ConsoleNotificationList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + metav1.ListMeta `json:"metadata"` + Items []ConsoleNotification `json:"items"` +} diff --git a/vendor/github.com/openshift/api/console/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/console/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..df09edd21 --- /dev/null +++ b/vendor/github.com/openshift/api/console/v1/zz_generated.deepcopy.go @@ -0,0 +1,264 @@ +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + 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 *ConsoleCLIDownload) DeepCopyInto(out *ConsoleCLIDownload) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleCLIDownload. +func (in *ConsoleCLIDownload) DeepCopy() *ConsoleCLIDownload { + if in == nil { + return nil + } + out := new(ConsoleCLIDownload) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ConsoleCLIDownload) 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 *ConsoleCLIDownloadList) DeepCopyInto(out *ConsoleCLIDownloadList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ConsoleCLIDownload, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleCLIDownloadList. +func (in *ConsoleCLIDownloadList) DeepCopy() *ConsoleCLIDownloadList { + if in == nil { + return nil + } + out := new(ConsoleCLIDownloadList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ConsoleCLIDownloadList) 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 *ConsoleCLIDownloadSpec) DeepCopyInto(out *ConsoleCLIDownloadSpec) { + *out = *in + if in.Links != nil { + in, out := &in.Links, &out.Links + *out = make([]Link, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleCLIDownloadSpec. +func (in *ConsoleCLIDownloadSpec) DeepCopy() *ConsoleCLIDownloadSpec { + if in == nil { + return nil + } + out := new(ConsoleCLIDownloadSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConsoleLink) DeepCopyInto(out *ConsoleLink) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleLink. +func (in *ConsoleLink) DeepCopy() *ConsoleLink { + if in == nil { + return nil + } + out := new(ConsoleLink) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ConsoleLink) 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 *ConsoleLinkList) DeepCopyInto(out *ConsoleLinkList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ConsoleLink, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleLinkList. +func (in *ConsoleLinkList) DeepCopy() *ConsoleLinkList { + if in == nil { + return nil + } + out := new(ConsoleLinkList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ConsoleLinkList) 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 *ConsoleLinkSpec) DeepCopyInto(out *ConsoleLinkSpec) { + *out = *in + out.Link = in.Link + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleLinkSpec. +func (in *ConsoleLinkSpec) DeepCopy() *ConsoleLinkSpec { + if in == nil { + return nil + } + out := new(ConsoleLinkSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConsoleNotification) DeepCopyInto(out *ConsoleNotification) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleNotification. +func (in *ConsoleNotification) DeepCopy() *ConsoleNotification { + if in == nil { + return nil + } + out := new(ConsoleNotification) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ConsoleNotification) 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 *ConsoleNotificationList) DeepCopyInto(out *ConsoleNotificationList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ConsoleNotification, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleNotificationList. +func (in *ConsoleNotificationList) DeepCopy() *ConsoleNotificationList { + if in == nil { + return nil + } + out := new(ConsoleNotificationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ConsoleNotificationList) 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 *ConsoleNotificationSpec) DeepCopyInto(out *ConsoleNotificationSpec) { + *out = *in + if in.Link != nil { + in, out := &in.Link, &out.Link + *out = new(Link) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleNotificationSpec. +func (in *ConsoleNotificationSpec) DeepCopy() *ConsoleNotificationSpec { + if in == nil { + return nil + } + out := new(ConsoleNotificationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Link) DeepCopyInto(out *Link) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Link. +func (in *Link) DeepCopy() *Link { + if in == nil { + return nil + } + out := new(Link) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/openshift/api/console/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/console/v1/zz_generated.swagger_doc_generated.go new file mode 100644 index 000000000..c81196a9a --- /dev/null +++ b/vendor/github.com/openshift/api/console/v1/zz_generated.swagger_doc_generated.go @@ -0,0 +1,108 @@ +package v1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_Link = map[string]string{ + "": "Represents a standard link that could be generated in HTML", + "text": "text is the display text for the link", + "href": "href is the absolute secure URL for the link (must use https)", +} + +func (Link) SwaggerDoc() map[string]string { + return map_Link +} + +var map_ConsoleCLIDownload = map[string]string{ + "": "ConsoleCLIDownload is an extension for configuring openshift web console command line interface (CLI) downloads.", + "metadata": "Standard object's metadata.", +} + +func (ConsoleCLIDownload) SwaggerDoc() map[string]string { + return map_ConsoleCLIDownload +} + +var map_ConsoleCLIDownloadList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (ConsoleCLIDownloadList) SwaggerDoc() map[string]string { + return map_ConsoleCLIDownloadList +} + +var map_ConsoleCLIDownloadSpec = map[string]string{ + "": "ConsoleCLIDownloadSpec is the desired cli download configuration.", + "displayName": "displayName is the display name of the CLI download.", + "description": "description is the description of the CLI download (can include markdown).", + "links": "links is a list of objects that provide CLI download link details.", +} + +func (ConsoleCLIDownloadSpec) SwaggerDoc() map[string]string { + return map_ConsoleCLIDownloadSpec +} + +var map_ConsoleLink = map[string]string{ + "": "ConsoleLink is an extension for customizing OpenShift web console links.", + "metadata": "Standard object's metadata.", +} + +func (ConsoleLink) SwaggerDoc() map[string]string { + return map_ConsoleLink +} + +var map_ConsoleLinkList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (ConsoleLinkList) SwaggerDoc() map[string]string { + return map_ConsoleLinkList +} + +var map_ConsoleLinkSpec = map[string]string{ + "": "ConsoleLinkSpec is the desired console link configuration.", + "location": "location determines which location in the console the link will be appended to.", +} + +func (ConsoleLinkSpec) SwaggerDoc() map[string]string { + return map_ConsoleLinkSpec +} + +var map_ConsoleNotification = map[string]string{ + "": "ConsoleNotification is the extension for configuring openshift web console notifications.", + "metadata": "Standard object's metadata.", +} + +func (ConsoleNotification) SwaggerDoc() map[string]string { + return map_ConsoleNotification +} + +var map_ConsoleNotificationList = map[string]string{ + "metadata": "Standard object's metadata.", +} + +func (ConsoleNotificationList) SwaggerDoc() map[string]string { + return map_ConsoleNotificationList +} + +var map_ConsoleNotificationSpec = map[string]string{ + "": "ConsoleNotificationSpec is the desired console notification configuration.", + "text": "text is the visible text of the notification.", + "location": "location is the location of the notification in the console.", + "link": "link is an object that holds notification link details.", + "color": "color is the color of the text for the notification as CSS data type color.", + "backgroundColor": "backgroundColor is the color of the background for the notification as CSS data type color.", +} + +func (ConsoleNotificationSpec) SwaggerDoc() map[string]string { + return map_ConsoleNotificationSpec +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/image/v1/consts.go b/vendor/github.com/openshift/api/image/v1/consts.go new file mode 100644 index 000000000..11f57a44a --- /dev/null +++ b/vendor/github.com/openshift/api/image/v1/consts.go @@ -0,0 +1,69 @@ +package v1 + +import corev1 "k8s.io/api/core/v1" + +const ( + // ManagedByOpenShiftAnnotation indicates that an image is managed by OpenShift's registry. + ManagedByOpenShiftAnnotation = "openshift.io/image.managed" + + // DockerImageRepositoryCheckAnnotation indicates that OpenShift has + // attempted to import tag and image information from an external Docker + // image repository. + DockerImageRepositoryCheckAnnotation = "openshift.io/image.dockerRepositoryCheck" + + // InsecureRepositoryAnnotation may be set true on an image stream to allow insecure access to pull content. + InsecureRepositoryAnnotation = "openshift.io/image.insecureRepository" + + // ExcludeImageSecretAnnotation indicates that a secret should not be returned by imagestream/secrets. + ExcludeImageSecretAnnotation = "openshift.io/image.excludeSecret" + + // DockerImageLayersOrderAnnotation describes layers order in the docker image. + DockerImageLayersOrderAnnotation = "image.openshift.io/dockerLayersOrder" + + // DockerImageLayersOrderAscending indicates that image layers are sorted in + // the order of their addition (from oldest to latest) + DockerImageLayersOrderAscending = "ascending" + + // DockerImageLayersOrderDescending indicates that layers are sorted in + // reversed order of their addition (from newest to oldest). + DockerImageLayersOrderDescending = "descending" + + // ImporterPreferArchAnnotation represents an architecture that should be + // selected if an image uses a manifest list and it should be + // downconverted. + ImporterPreferArchAnnotation = "importer.image.openshift.io/prefer-arch" + + // ImporterPreferOSAnnotation represents an operation system that should + // be selected if an image uses a manifest list and it should be + // downconverted. + ImporterPreferOSAnnotation = "importer.image.openshift.io/prefer-os" + + // ImageManifestBlobStoredAnnotation indicates that manifest and config blobs of image are stored in on + // storage of integrated Docker registry. + ImageManifestBlobStoredAnnotation = "image.openshift.io/manifestBlobStored" + + // DefaultImageTag is used when an image tag is needed and the configuration does not specify a tag to use. + DefaultImageTag = "latest" + + // ResourceImageStreams represents a number of image streams in a project. + ResourceImageStreams corev1.ResourceName = "openshift.io/imagestreams" + + // ResourceImageStreamImages represents a number of unique references to images in all image stream + // statuses of a project. + ResourceImageStreamImages corev1.ResourceName = "openshift.io/images" + + // ResourceImageStreamTags represents a number of unique references to images in all image stream specs + // of a project. + ResourceImageStreamTags corev1.ResourceName = "openshift.io/image-tags" + + // Limit that applies to images. Used with a max["storage"] LimitRangeItem to set + // the maximum size of an image. + LimitTypeImage corev1.LimitType = "openshift.io/Image" + + // Limit that applies to image streams. Used with a max[resource] LimitRangeItem to set the maximum number + // of resource. Where the resource is one of "openshift.io/images" and "openshift.io/image-tags". + LimitTypeImageStream corev1.LimitType = "openshift.io/ImageStream" + + // The supported type of image signature. + ImageSignatureTypeAtomicImageV1 string = "AtomicImageV1" +) 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 54a11defd..ed0a0f9b5 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_console.go +++ b/vendor/github.com/openshift/api/operator/v1/types_console.go @@ -10,6 +10,7 @@ import ( // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// Console provides a means to configure an operator to manage the console. type Console struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -20,6 +21,7 @@ type Console struct { Status ConsoleStatus `json:"status,omitempty"` } +// ConsoleSpec is the specification of the desired behavior of the Console. type ConsoleSpec struct { OperatorSpec `json:",inline"` // customization is used to optionally provide a small set of @@ -30,10 +32,13 @@ type ConsoleSpec struct { Providers ConsoleProviders `json:"providers"` } +// ConsoleStatus defines the observed status of the Console. type ConsoleStatus struct { OperatorStatus `json:",inline"` } +// ConsoleProviders defines a list of optional additional providers of +// functionality to the console. type ConsoleProviders struct { // statuspage contains ID for statuspage.io page that provides status info about. // +optional @@ -46,6 +51,7 @@ type StatuspageProvider struct { PageID string `json:"pageID"` } +// ConsoleCustomization defines a list of optional configuration for the console UI. type ConsoleCustomization struct { // brand is the default branding of the web console which can be overridden by // providing the brand field. There is a limited set of specific brand options. @@ -74,7 +80,7 @@ type ConsoleCustomization struct { CustomLogoFile v1.ConfigMapFileReference `json:"customLogoFile,omitempty"` } -// Brand is a specific supported brand within the console +// Brand is a specific supported brand within the console. type Brand string const ( diff --git a/vendor/github.com/openshift/api/operator/v1/types_ingress.go b/vendor/github.com/openshift/api/operator/v1/types_ingress.go index 5bd1d3280..f5fa81ce8 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_ingress.go +++ b/vendor/github.com/openshift/api/operator/v1/types_ingress.go @@ -125,13 +125,6 @@ type IngressControllerSpec struct { // // +optional NodePlacement *NodePlacement `json:"nodePlacement,omitempty"` - - // securitySpec specifies settings for securing IngressController connections. - // - // If unset, the "Intermediate" security profile is used. - // - // +optional - SecuritySpec *SecuritySpec `json:"securitySpec,omitempty"` } // NodePlacement describes node scheduling configuration for an ingress @@ -177,9 +170,42 @@ const ( PrivateStrategyType EndpointPublishingStrategyType = "Private" ) +// LoadBalancerScope is the scope at which a load balancer is exposed. +type LoadBalancerScope string + +var ( + // InternalLoadBalancer is a load balancer that is exposed only on the + // cluster's private network. + InternalLoadBalancer LoadBalancerScope = "Internal" + + // ExternalLoadBalancer is a load balancer that is exposed on the + // cluster's public network (which is typically on the Internet). + ExternalLoadBalancer LoadBalancerScope = "External" +) + +// LoadBalancerStrategy holds parameters for a load balancer. +type LoadBalancerStrategy struct { + // scope indicates the scope at which the load balancer is exposed. + // Possible values are "External" and "Internal". The default is + // "External". + // +optional + Scope LoadBalancerScope `json:"scope"` +} + +// HostNetworkStrategy holds parameters for the HostNetwork endpoint publishing +// strategy. +type HostNetworkStrategy struct { +} + +// PrivateStrategy holds parameters for the Private endpoint publishing +// strategy. +type PrivateStrategy struct { +} + // EndpointPublishingStrategy is a way to publish the endpoints of an // IngressController, and represents the type and any additional configuration // for a specific type. +// +union type EndpointPublishingStrategy struct { // type is the publishing strategy to use. Valid values are: // @@ -216,7 +242,27 @@ type EndpointPublishingStrategy struct { // In this configuration, the ingress controller deployment uses container // networking, and is not explicitly published. The user must manually publish // the ingress controller. + // +unionDiscriminator + // +optional Type EndpointPublishingStrategyType `json:"type"` + + // loadBalancer holds parameters for the load balancer. Present only if + // type is LoadBalancerService. + // +optional + // +nullable + LoadBalancer *LoadBalancerStrategy `json:"loadBalancer,omitempty"` + + // hostNetwork holds parameters for the HostNetwork endpoint publishing + // strategy. Present only if type is HostNetwork. + // +optional + // +nullable + HostNetwork *HostNetworkStrategy `json:"hostNetwork,omitempty"` + + // private holds parameters for the Private endpoint publishing + // strategy. Present only if type is Private. + // +optional + // +nullable + Private *PrivateStrategy `json:"private,omitempty"` } var ( @@ -236,138 +282,6 @@ var ( DNSReadyIngressConditionType = "DNSReady" ) -// SecuritySpec defines the settings for securing IngressController connections. -type SecuritySpec struct { - // profile is one of "Old", "Intermediate", "Modern" or "Custom". "Old", - // "Intermediate" and "Modern" profiles map to security configurations from [1]: - // - // [1] https://wiki.mozilla.org/Security/Server_Side_TLS#Recommended_configurations - // - // When a profile of type "Old", "Intermediate" or "Modern" is set, the CustomSettings - // field is forbidden. - // - // customSettings must be provided if, and only if, profile is "Custom". - // - // If unset, the "Intermediate" profile is used. - // - Profile SecurityProfileType `json:"profile"` - // customSettings defines the schema for settings of a "Custom" profile - // and is ignored unless a "Custom" profile is specified. - // - // +optional - CustomSettings *CustomProfileSettings `json:"customSettings,omitempty"` - -} - -// SecurityProfileType defines a security profile. -type SecurityProfileType string - -const ( - // SecurityProfileOldType is a security profile that maps to: - // https://wiki.mozilla.org/Security/Server_Side_TLS#Old_backward_compatibility - SecurityProfileOldType SecurityProfileType = "Old" - // SecurityProfileIntermediateType is a security profile that maps to: - // https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29 - SecurityProfileIntermediateType SecurityProfileType = "Intermediate" - // SecurityProfileModernType is a security profile that maps to: - // https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility - SecurityProfileModernType SecurityProfileType = "Modern" - // SecurityProfileCustomType is a security profile that allows for custom settings - // through type CustomProfileSettings. - SecurityProfileCustomType SecurityProfileType = "Custom" - -) - -// CustomProfileSettings defines the schema for a custom security profile. -type CustomProfileSettings struct { - // ciphers is used to specify the cipher algorithms that are negotiated - // during the SSL/TLS handshake with an IngressController. Each cipher must - // be an explicit, colon-delimited list of ciphers. - // - // If unset, the "Intermediate" Ciphersuites [1] are used: - // - // [1] https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29 - // - // +optional - Ciphers *string `json:"ciphers,omitempty"` - // securityProtocol is used to specify one or more encryption protocols - // that are negotiated during the SSL/TLS handshake with the IngressController. - // - // If unset, the "Intermediate" Versions [1] are used: - // - // [1] https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29 - // - // - // +optional - SecurityProtocol *SecurityProtocol `json:"securityProtocol,omitempty"` - // dhParamSize sets the maximum size of the Diffie-Hellman parameters used for generating - // the ephemeral/temporary Diffie-Hellman key in case of DHE key exchange. The final size - // will try to match the size of the server's RSA (or DSA) key (e.g, a 2048 bits temporary - // DH key for a 2048 bits RSA key), but will not exceed this maximum value. Only 1024 or 2048 - // values are allowed. - // - // If unset, the "Intermediate" DH Parameter size [1] is used: - // - // [1] https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29 - // - // +optional - DHParamSize *DHParamSize `json:"dHParamSize,omitempty"` -} - -// SecurityProtocol defines one or more security protocols used by -// an IngressController to secure network connections. -type SecurityProtocol struct { - // minimumVersion enforces use of SecurityProtocolVersion or newer on - // SSL connections instantiated from an IngressController. minimumVersion - // must be lower than maximumVersion. - // - // If unset and maximumVersion is set, minimumVersion will be set - // to maximumVersion. If minimumVersion and maximumVersion are unset, - // the minimum version in "Intermediate" Versions [1] is used: - // - // [1] https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29 - // - // +optional - MinimumVersion *SecurityProtocolVersion `json:"minimumVersion,omitempty"` - // maximumVersion enforces use of SecurityProtocolVersion or older on - // SSL connections instantiated from an IngressController. maximumVersion - // must be higher than minimumVersion. - // - // If unset and minimumVersion is set, maximumVersion will be set - // to minimumVersion. If minimumVersion and maximumVersion are unset, - // the maximum version in "Intermediate" Versions [1] is used: - // - // [1] https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29 - // - // +optional - MaximumVersion *SecurityProtocolVersion `json:"maximumVersion,omitempty"` -} - -// SecurityProtocolVersion is a way to specify an IngressController security protocol. -type SecurityProtocolVersion string - -const ( - // SecurityProtocolTLS10Version is v1.0 of the TLS security protocol. - SecurityProtocolTLS10Version SecurityProtocolVersion = "TLSv1.0" - // SecurityProtocolTLS11Version is v1.1 of the TLS security protocol. - SecurityProtocolTLS11Version SecurityProtocolVersion = "TLSv1.1" - // SecurityProtocolTLS12Version is v1.2 of the TLS security protocol. - SecurityProtocolTLS12Version SecurityProtocolVersion = "TLSv1.2" - // SecurityProtocolTLS13Version is v1.3 of the TLS security protocol. - SecurityProtocolTLS13Version SecurityProtocolVersion = "TLSv1.3" -) - -// DHParamSize sets the maximum size of the Diffie-Hellman parameters used for generating -// the ephemeral/temporary Diffie-Hellman key in case of DHE key exchange. -type DHParamSize string - -const ( - // DHParamSize1024 is a Diffie-Hellman parameter of 1024 bits. - DHParamSize1024 DHParamSize = "1024" - // DHParamSize2048 is a Diffie-Hellman parameter of 2048 bits. - DHParamSize2048 DHParamSize = "2048" -) - // IngressControllerStatus defines the observed status of the IngressController. type IngressControllerStatus struct { // availableReplicas is number of observed available replicas according to the @@ -385,9 +299,6 @@ type IngressControllerStatus struct { // endpointPublishingStrategy is the actual strategy in use. EndpointPublishingStrategy *EndpointPublishingStrategy `json:"endpointPublishingStrategy,omitempty"` - // securityProfileType is the actual security profile in use. - SecurityProfile *SecurityProfileType `json:"securityProfile,omitempty"` - // conditions is a list of conditions and their status. // // Available means the ingress controller deployment is available and 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 e123096eb..5d9c9a864 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 @@ -272,37 +272,6 @@ 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 *CustomProfileSettings) DeepCopyInto(out *CustomProfileSettings) { - *out = *in - if in.Ciphers != nil { - in, out := &in.Ciphers, &out.Ciphers - *out = new(string) - **out = **in - } - if in.SecurityProtocol != nil { - in, out := &in.SecurityProtocol, &out.SecurityProtocol - *out = new(SecurityProtocol) - (*in).DeepCopyInto(*out) - } - if in.DHParamSize != nil { - in, out := &in.DHParamSize, &out.DHParamSize - *out = new(DHParamSize) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomProfileSettings. -func (in *CustomProfileSettings) DeepCopy() *CustomProfileSettings { - if in == nil { - return nil - } - out := new(CustomProfileSettings) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DNS) DeepCopyInto(out *DNS) { *out = *in @@ -437,6 +406,21 @@ func (in *DefaultNetworkDefinition) DeepCopy() *DefaultNetworkDefinition { // 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 + if in.LoadBalancer != nil { + in, out := &in.LoadBalancer, &out.LoadBalancer + *out = new(LoadBalancerStrategy) + **out = **in + } + if in.HostNetwork != nil { + in, out := &in.HostNetwork, &out.HostNetwork + *out = new(HostNetworkStrategy) + **out = **in + } + if in.Private != nil { + in, out := &in.Private, &out.Private + *out = new(PrivateStrategy) + **out = **in + } return } @@ -561,6 +545,22 @@ 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 *HostNetworkStrategy) DeepCopyInto(out *HostNetworkStrategy) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostNetworkStrategy. +func (in *HostNetworkStrategy) DeepCopy() *HostNetworkStrategy { + if in == nil { + return nil + } + out := new(HostNetworkStrategy) + in.DeepCopyInto(out) + 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 @@ -633,7 +633,7 @@ func (in *IngressControllerSpec) DeepCopyInto(out *IngressControllerSpec) { if in.EndpointPublishingStrategy != nil { in, out := &in.EndpointPublishingStrategy, &out.EndpointPublishingStrategy *out = new(EndpointPublishingStrategy) - **out = **in + (*in).DeepCopyInto(*out) } if in.DefaultCertificate != nil { in, out := &in.DefaultCertificate, &out.DefaultCertificate @@ -655,11 +655,6 @@ func (in *IngressControllerSpec) DeepCopyInto(out *IngressControllerSpec) { *out = new(NodePlacement) (*in).DeepCopyInto(*out) } - if in.SecuritySpec != nil { - in, out := &in.SecuritySpec, &out.SecuritySpec - *out = new(SecuritySpec) - (*in).DeepCopyInto(*out) - } return } @@ -679,12 +674,7 @@ func (in *IngressControllerStatus) DeepCopyInto(out *IngressControllerStatus) { if in.EndpointPublishingStrategy != nil { in, out := &in.EndpointPublishingStrategy, &out.EndpointPublishingStrategy *out = new(EndpointPublishingStrategy) - **out = **in - } - if in.SecurityProfile != nil { - in, out := &in.SecurityProfile, &out.SecurityProfile - *out = new(SecurityProfileType) - **out = **in + (*in).DeepCopyInto(*out) } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions @@ -1017,6 +1007,22 @@ func (in *KuryrConfig) DeepCopy() *KuryrConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoadBalancerStrategy) DeepCopyInto(out *LoadBalancerStrategy) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerStrategy. +func (in *LoadBalancerStrategy) DeepCopy() *LoadBalancerStrategy { + if in == nil { + return nil + } + out := new(LoadBalancerStrategy) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MyOperatorResource) DeepCopyInto(out *MyOperatorResource) { *out = *in @@ -1549,6 +1555,22 @@ 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 *PrivateStrategy) DeepCopyInto(out *PrivateStrategy) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateStrategy. +func (in *PrivateStrategy) DeepCopy() *PrivateStrategy { + if in == nil { + return nil + } + out := new(PrivateStrategy) + in.DeepCopyInto(out) + 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 @@ -1580,53 +1602,6 @@ func (in *ProxyConfig) DeepCopy() *ProxyConfig { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityProtocol) DeepCopyInto(out *SecurityProtocol) { - *out = *in - if in.MinimumVersion != nil { - in, out := &in.MinimumVersion, &out.MinimumVersion - *out = new(SecurityProtocolVersion) - **out = **in - } - if in.MaximumVersion != nil { - in, out := &in.MaximumVersion, &out.MaximumVersion - *out = new(SecurityProtocolVersion) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityProtocol. -func (in *SecurityProtocol) DeepCopy() *SecurityProtocol { - if in == nil { - return nil - } - out := new(SecurityProtocol) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecuritySpec) DeepCopyInto(out *SecuritySpec) { - *out = *in - if in.CustomSettings != nil { - in, out := &in.CustomSettings, &out.CustomSettings - *out = new(CustomProfileSettings) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecuritySpec. -func (in *SecuritySpec) DeepCopy() *SecuritySpec { - if in == nil { - return nil - } - out := new(SecuritySpec) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceCA) DeepCopyInto(out *ServiceCA) { *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 56054543e..14a2f776a 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 @@ -117,7 +117,16 @@ func (AuthenticationList) SwaggerDoc() map[string]string { return map_AuthenticationList } +var map_Console = map[string]string{ + "": "Console provides a means to configure an operator to manage the console.", +} + +func (Console) SwaggerDoc() map[string]string { + return map_Console +} + var map_ConsoleCustomization = map[string]string{ + "": "ConsoleCustomization defines a list of optional configuration for the console UI.", "brand": "brand is the default branding of the web console which can be overridden by providing the brand field. There is a limited set of specific brand options. This field controls elements of the console such as the logo. Invalid value will prevent a console rollout.", "documentationBaseURL": "documentationBaseURL links to external documentation are shown in various sections of the web console. Providing documentationBaseURL will override the default documentation URL. Invalid value will prevent a console rollout.", "customProductName": "customProductName is the name that will be displayed in page titles, logo alt text, and the about dialog instead of the normal OpenShift product name.", @@ -129,6 +138,7 @@ func (ConsoleCustomization) SwaggerDoc() map[string]string { } var map_ConsoleProviders = map[string]string{ + "": "ConsoleProviders defines a list of optional additional providers of functionality to the console.", "statuspage": "statuspage contains ID for statuspage.io page that provides status info about.", } @@ -137,6 +147,7 @@ func (ConsoleProviders) SwaggerDoc() map[string]string { } var map_ConsoleSpec = map[string]string{ + "": "ConsoleSpec is the specification of the desired behavior of the Console.", "customization": "customization is used to optionally provide a small set of customization options to the web console.", "providers": "providers contains configuration for using specific service providers.", } @@ -145,6 +156,14 @@ func (ConsoleSpec) SwaggerDoc() map[string]string { return map_ConsoleSpec } +var map_ConsoleStatus = map[string]string{ + "": "ConsoleStatus defines the observed status of the Console.", +} + +func (ConsoleStatus) SwaggerDoc() map[string]string { + return map_ConsoleStatus +} + var map_StatuspageProvider = map[string]string{ "": "StatuspageProvider provides identity for statuspage account.", "pageID": "pageID is the unique ID assigned by Statuspage for your page. This must be a public page.", @@ -209,24 +228,24 @@ func (EtcdList) SwaggerDoc() map[string]string { return map_EtcdList } -var map_CustomProfileSettings = map[string]string{ - "": "CustomProfileSettings defines the schema for a custom security profile.", - "ciphers": "ciphers is used to specify the cipher algorithms that are negotiated during the SSL/TLS handshake with an IngressController. Each cipher must be an explicit, colon-delimited list of ciphers.\n\nIf unset, the \"Intermediate\" Ciphersuites [1] are used:\n\n[1] https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29", - "securityProtocol": "securityProtocol is used to specify one or more encryption protocols that are negotiated during the SSL/TLS handshake with the IngressController.\n\nIf unset, the \"Intermediate\" Versions [1] are used:\n\n[1] https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29", - "dHParamSize": "dhParamSize sets the maximum size of the Diffie-Hellman parameters used for generating the ephemeral/temporary Diffie-Hellman key in case of DHE key exchange. The final size will try to match the size of the server's RSA (or DSA) key (e.g, a 2048 bits temporary DH key for a 2048 bits RSA key), but will not exceed this maximum value. Only 1024 or 2048 values are allowed.\n\nIf unset, the \"Intermediate\" DH Parameter size [1] is used:\n\n[1] https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29", +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.", + "loadBalancer": "loadBalancer holds parameters for the load balancer. Present only if type is LoadBalancerService.", + "hostNetwork": "hostNetwork holds parameters for the HostNetwork endpoint publishing strategy. Present only if type is HostNetwork.", + "private": "private holds parameters for the Private endpoint publishing strategy. Present only if type is Private.", } -func (CustomProfileSettings) SwaggerDoc() map[string]string { - return map_CustomProfileSettings +func (EndpointPublishingStrategy) SwaggerDoc() map[string]string { + return map_EndpointPublishingStrategy } -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.", +var map_HostNetworkStrategy = map[string]string{ + "": "HostNetworkStrategy holds parameters for the HostNetwork endpoint publishing strategy.", } -func (EndpointPublishingStrategy) SwaggerDoc() map[string]string { - return map_EndpointPublishingStrategy +func (HostNetworkStrategy) SwaggerDoc() map[string]string { + return map_HostNetworkStrategy } var map_IngressController = map[string]string{ @@ -256,7 +275,6 @@ var map_IngressControllerSpec = map[string]string{ "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.", - "securitySpec": "securitySpec specifies settings for securing IngressController connections.\n\nIf unset, the \"Intermediate\" security profile is used.", } func (IngressControllerSpec) SwaggerDoc() map[string]string { @@ -269,7 +287,6 @@ var map_IngressControllerStatus = map[string]string{ "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.", - "securityProfile": "securityProfileType is the actual security profile 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.", } @@ -277,6 +294,15 @@ func (IngressControllerStatus) SwaggerDoc() map[string]string { return map_IngressControllerStatus } +var map_LoadBalancerStrategy = map[string]string{ + "": "LoadBalancerStrategy holds parameters for a load balancer.", + "scope": "scope indicates the scope at which the load balancer is exposed. Possible values are \"External\" and \"Internal\". The default is \"External\".", +} + +func (LoadBalancerStrategy) SwaggerDoc() map[string]string { + return map_LoadBalancerStrategy +} + 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.", @@ -287,24 +313,12 @@ func (NodePlacement) SwaggerDoc() map[string]string { return map_NodePlacement } -var map_SecurityProtocol = map[string]string{ - "": "SecurityProtocol defines one or more security protocols used by an IngressController to secure network connections.", - "minimumVersion": "minimumVersion enforces use of SecurityProtocolVersion or newer on SSL connections instantiated from an IngressController. minimumVersion must be lower than maximumVersion.\n\nIf unset and maximumVersion is set, minimumVersion will be set to maximumVersion. If minimumVersion and maximumVersion are unset, the minimum version in \"Intermediate\" Versions [1] is used:\n\n[1] https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29", - "maximumVersion": "maximumVersion enforces use of SecurityProtocolVersion or older on SSL connections instantiated from an IngressController. maximumVersion must be higher than minimumVersion.\n\nIf unset and minimumVersion is set, maximumVersion will be set to minimumVersion. If minimumVersion and maximumVersion are unset, the maximum version in \"Intermediate\" Versions [1] is used:\n\n[1] https://wiki.mozilla.org/Security/Server_Side_TLS#Intermediate_compatibility_.28default.29", -} - -func (SecurityProtocol) SwaggerDoc() map[string]string { - return map_SecurityProtocol -} - -var map_SecuritySpec = map[string]string{ - "": "SecuritySpec defines the settings for securing IngressController connections.", - "profile": "profile is one of \"Old\", \"Intermediate\", \"Modern\" or \"Custom\". \"Old\", \"Intermediate\" and \"Modern\" profiles map to security configurations from [1]:\n\n[1] https://wiki.mozilla.org/Security/Server_Side_TLS#Recommended_configurations\n\nWhen a profile of type \"Old\", \"Intermediate\" or \"Modern\" is set, the CustomSettings field is forbidden.\n\ncustomSettings must be provided if, and only if, profile is \"Custom\".\n\nIf unset, the \"Intermediate\" profile is used.", - "customSettings": "customSettings defines the schema for settings of a \"Custom\" profile and is ignored unless a \"Custom\" profile is specified.", +var map_PrivateStrategy = map[string]string{ + "": "PrivateStrategy holds parameters for the Private endpoint publishing strategy.", } -func (SecuritySpec) SwaggerDoc() map[string]string { - return map_SecuritySpec +func (PrivateStrategy) SwaggerDoc() map[string]string { + return map_PrivateStrategy } var map_KubeAPIServer = map[string]string{ diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/register.go b/vendor/github.com/openshift/api/operator/v1alpha1/register.go index 5ddbdeb0e..3c731f618 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/register.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/register.go @@ -33,6 +33,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(GroupVersion, &GenericOperatorConfig{}, + &ImageContentSourcePolicy{}, + &ImageContentSourcePolicyList{}, ) return nil diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go b/vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go new file mode 100644 index 000000000..c82f41550 --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go @@ -0,0 +1,54 @@ +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ImageContentSourcePolicy holds cluster-wide information about how to handle registry mirror rules. +// When multple policies are defined, the outcome of the behavior is defined on each field. +type ImageContentSourcePolicy struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec holds user settable values for configuration + // +required + Spec ImageContentSourcePolicySpec `json:"spec"` +} + +// ImageContentSourcePolicySpec is the specification of the ImageContentSourcePolicy CRD. +type ImageContentSourcePolicySpec struct { + // repositoryDigestMirrors allows images referenced by image digests in pods to be + // pulled from alternative mirrored repository locations. The image pull specification + // provided to the pod will be compared to the source locations described in RepositoryDigestMirrors + // and the image may be pulled down from any of the repositories in the list instead of the + // specified repository allowing administrators to choose a potentially faster mirror. + // Only image pull specifications that have an image disgest will have this behavior applied + // to them - tags will continue to be pulled from the specified repository in the pull spec. + // When multiple policies are defined, any overlaps found will be merged together when the mirror + // rules are written to `/etc/containers/registries.conf`. For example, if policy A has sources `a, b, c` + // and policy B has sources `c, d, e`. Then the mirror rule written to `registries.conf` will be `a, b, c, d, e` + // where the duplicate `c` is removed. + // +optional + RepositoryDigestMirrors []RepositoryDigestMirrors `json:"repositoryDigestMirrors"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ImageContentSourcePolicyList lists the items in the ImageContentSourcePolicy CRD. +type ImageContentSourcePolicyList struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + metav1.ListMeta `json:"metadata"` + Items []ImageContentSourcePolicy `json:"items"` +} + +// RepositoryDigestMirrors holds cluster-wide information about how to handle mirros in the registries config. +// Note: the mirrors only work when pulling the images that are reference by their digests. +type RepositoryDigestMirrors struct { + // sources are repositories that are mirrors of each other. + // +optional + Sources []string `json:"sources,omitempty"` +} diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go index 72ae4b3db..36a17cff8 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go @@ -85,6 +85,89 @@ func (in *GenericOperatorConfig) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageContentSourcePolicy) DeepCopyInto(out *ImageContentSourcePolicy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentSourcePolicy. +func (in *ImageContentSourcePolicy) DeepCopy() *ImageContentSourcePolicy { + if in == nil { + return nil + } + out := new(ImageContentSourcePolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ImageContentSourcePolicy) 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 *ImageContentSourcePolicyList) DeepCopyInto(out *ImageContentSourcePolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ImageContentSourcePolicy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentSourcePolicyList. +func (in *ImageContentSourcePolicyList) DeepCopy() *ImageContentSourcePolicyList { + if in == nil { + return nil + } + out := new(ImageContentSourcePolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ImageContentSourcePolicyList) 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 *ImageContentSourcePolicySpec) DeepCopyInto(out *ImageContentSourcePolicySpec) { + *out = *in + if in.RepositoryDigestMirrors != nil { + in, out := &in.RepositoryDigestMirrors, &out.RepositoryDigestMirrors + *out = make([]RepositoryDigestMirrors, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentSourcePolicySpec. +func (in *ImageContentSourcePolicySpec) DeepCopy() *ImageContentSourcePolicySpec { + if in == nil { + return nil + } + out := new(ImageContentSourcePolicySpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LoggingConfig) DeepCopyInto(out *LoggingConfig) { *out = *in @@ -189,6 +272,27 @@ 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 *RepositoryDigestMirrors) DeepCopyInto(out *RepositoryDigestMirrors) { + *out = *in + if in.Sources != nil { + in, out := &in.Sources, &out.Sources + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryDigestMirrors. +func (in *RepositoryDigestMirrors) DeepCopy() *RepositoryDigestMirrors { + if in == nil { + return nil + } + out := new(RepositoryDigestMirrors) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StaticPodOperatorStatus) DeepCopyInto(out *StaticPodOperatorStatus) { *out = *in diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go index 59a145211..fc80a126b 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go @@ -135,4 +135,41 @@ func (VersionAvailability) SwaggerDoc() map[string]string { return map_VersionAvailability } +var map_ImageContentSourcePolicy = map[string]string{ + "": "ImageContentSourcePolicy holds cluster-wide information about how to handle registry mirror rules. When multple policies are defined, the outcome of the behavior is defined on each field.", + "metadata": "Standard object's metadata.", + "spec": "spec holds user settable values for configuration", +} + +func (ImageContentSourcePolicy) SwaggerDoc() map[string]string { + return map_ImageContentSourcePolicy +} + +var map_ImageContentSourcePolicyList = map[string]string{ + "": "ImageContentSourcePolicyList lists the items in the ImageContentSourcePolicy CRD.", + "metadata": "Standard object's metadata.", +} + +func (ImageContentSourcePolicyList) SwaggerDoc() map[string]string { + return map_ImageContentSourcePolicyList +} + +var map_ImageContentSourcePolicySpec = map[string]string{ + "": "ImageContentSourcePolicySpec is the specification of the ImageContentSourcePolicy CRD.", + "repositoryDigestMirrors": "repositoryDigestMirrors allows images referenced by image digests in pods to be pulled from alternative mirrored repository locations. The image pull specification provided to the pod will be compared to the source locations described in RepositoryDigestMirrors and the image may be pulled down from any of the repositories in the list instead of the specified repository allowing administrators to choose a potentially faster mirror. Only image pull specifications that have an image disgest will have this behavior applied to them - tags will continue to be pulled from the specified repository in the pull spec. When multiple policies are defined, any overlaps found will be merged together when the mirror rules are written to `/etc/containers/registries.conf`. For example, if policy A has sources `a, b, c` and policy B has sources `c, d, e`. Then the mirror rule written to `registries.conf` will be `a, b, c, d, e` where the duplicate `c` is removed.", +} + +func (ImageContentSourcePolicySpec) SwaggerDoc() map[string]string { + return map_ImageContentSourcePolicySpec +} + +var map_RepositoryDigestMirrors = map[string]string{ + "": "RepositoryDigestMirrors holds cluster-wide information about how to handle mirros in the registries config. Note: the mirrors only work when pulling the images that are reference by their digests.", + "sources": "sources are repositories that are mirrors of each other.", +} + +func (RepositoryDigestMirrors) SwaggerDoc() map[string]string { + return map_RepositoryDigestMirrors +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/security/v1/consts.go b/vendor/github.com/openshift/api/security/v1/consts.go new file mode 100644 index 000000000..28f8e5ae6 --- /dev/null +++ b/vendor/github.com/openshift/api/security/v1/consts.go @@ -0,0 +1,10 @@ +package v1 + +const ( + UIDRangeAnnotation = "openshift.io/sa.scc.uid-range" + // SupplementalGroupsAnnotation contains a comma delimited list of allocated supplemental groups + // for the namespace. Groups are in the form of a Block which supports {start}/{length} or {start}-{end} + SupplementalGroupsAnnotation = "openshift.io/sa.scc.supplemental-groups" + MCSAnnotation = "openshift.io/sa.scc.mcs" + ValidatedSCCAnnotation = "openshift.io/scc" +) diff --git a/vendor/github.com/openshift/api/unidling/v1alpha1/types.go b/vendor/github.com/openshift/api/unidling/v1alpha1/types.go new file mode 100644 index 000000000..d6ac1cc2e --- /dev/null +++ b/vendor/github.com/openshift/api/unidling/v1alpha1/types.go @@ -0,0 +1,43 @@ +package v1alpha1 + +const ( + // IdledAtAnnotation indicates that a given object (endpoints or scalable object)) + // is currently idled (and the time at which it was idled) + IdledAtAnnotation = "idling.alpha.openshift.io/idled-at" + + // UnidleTargetAnnotation contains the references and former scales for the scalable + // objects associated with the idled endpoints + UnidleTargetAnnotation = "idling.alpha.openshift.io/unidle-targets" + + // PreviousScaleAnnotation contains the previous scale of a scalable object + // (currently only applied by the idler) + PreviousScaleAnnotation = "idling.alpha.openshift.io/previous-scale" + + // NeedPodsReason is the reason for the event emitted to indicate that endpoints should be unidled + NeedPodsReason = "NeedPods" +) + +// NB: if these get changed, you'll need to actually add in the full API machinery for them + +// RecordedScaleReference is a CrossGroupObjectReference to a scale subresource that also +// has the previous replica count recorded +type RecordedScaleReference struct { + // Reference to the idled resource + CrossGroupObjectReference `json:",inline" protobuf:"bytes,1,opt,name=crossVersionObjectReference"` + // The last seen scale of the idled resource (before idling) + Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"` +} + +// CrossGroupObjectReference is a reference to an object in the same +// namespace in the specified group. It is similar to +// autoscaling.CrossVersionObjectReference. +type CrossGroupObjectReference struct { + // Kind of the referent; More info: http://releases.k8s.io/release-1.3/docs/devel/api-conventions.md#types-kinds" + Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` + // Name of the referent; More info: http://releases.k8s.io/release-1.3/docs/user-guide/identifiers.md#names + Name string `json:"name" protobuf:"bytes,2,opt,name=name"` + // API version of the referent (deprecated, prefer usng Group instead) + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,3,opt,name=apiVersion"` + // Group of the referent + Group string `json:"group,omitempty" protobuf:"bytes,3,opt,name=group"` +}