diff --git a/go.mod b/go.mod index d30ab4fed5..8f65dd0755 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/openshift/client-go go 1.16 require ( - github.com/openshift/api v0.0.0-20211005161005-4ec2bbe5ed00 + github.com/openshift/api v0.0.0-20211007134530-4cb30f221b89 github.com/spf13/pflag v1.0.5 k8s.io/api v0.22.1 k8s.io/apimachinery v0.22.1 diff --git a/go.sum b/go.sum index b5c90dc051..31b3605de1 100644 --- a/go.sum +++ b/go.sum @@ -187,6 +187,8 @@ github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/openshift/api v0.0.0-20211005161005-4ec2bbe5ed00 h1:P0Is1Xs2ytKOsi5/sVyWwLef3Du6unhYhX8vET4ehr0= github.com/openshift/api v0.0.0-20211005161005-4ec2bbe5ed00/go.mod h1:RsQCVJu4qhUawxxDP7pGlwU3IA4F01wYm3qKEu29Su8= +github.com/openshift/api v0.0.0-20211007134530-4cb30f221b89 h1:8asXeSr4GmJbTmO/kd1PvMrNc+MDoTEAcefX5Jl7EiA= +github.com/openshift/api v0.0.0-20211007134530-4cb30f221b89/go.mod h1:RsQCVJu4qhUawxxDP7pGlwU3IA4F01wYm3qKEu29Su8= github.com/openshift/build-machinery-go v0.0.0-20210712174854-1bb7fd1518d3/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= diff --git a/sharedresource/clientset/versioned/clientset.go b/sharedresource/clientset/versioned/clientset.go index 86d5cecc63..1db3c26dff 100644 --- a/sharedresource/clientset/versioned/clientset.go +++ b/sharedresource/clientset/versioned/clientset.go @@ -1,3 +1,81 @@ // Code generated by client-gen. DO NOT EDIT. package versioned + +import ( + "fmt" + + sharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + SharedresourceV1alpha1() sharedresourcev1alpha1.SharedresourceV1alpha1Interface +} + +// Clientset contains the clients for groups. Each group has exactly one +// version included in a Clientset. +type Clientset struct { + *discovery.DiscoveryClient + sharedresourceV1alpha1 *sharedresourcev1alpha1.SharedresourceV1alpha1Client +} + +// SharedresourceV1alpha1 retrieves the SharedresourceV1alpha1Client +func (c *Clientset) SharedresourceV1alpha1() sharedresourcev1alpha1.SharedresourceV1alpha1Interface { + return c.sharedresourceV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + var cs Clientset + var err error + cs.sharedresourceV1alpha1, err = sharedresourcev1alpha1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + var cs Clientset + cs.sharedresourceV1alpha1 = sharedresourcev1alpha1.NewForConfigOrDie(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) + return &cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.sharedresourceV1alpha1 = sharedresourcev1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/sharedresource/clientset/versioned/fake/clientset_generated.go b/sharedresource/clientset/versioned/fake/clientset_generated.go index bd08d7a1c3..970b81efa5 100644 --- a/sharedresource/clientset/versioned/fake/clientset_generated.go +++ b/sharedresource/clientset/versioned/fake/clientset_generated.go @@ -1,3 +1,69 @@ // Code generated by client-gen. DO NOT EDIT. package fake + +import ( + clientset "github.com/openshift/client-go/sharedresource/clientset/versioned" + sharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1" + fakesharedresourcev1alpha1 "github.com/openshift/client-go/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var ( + _ clientset.Interface = &Clientset{} + _ testing.FakeClient = &Clientset{} +) + +// SharedresourceV1alpha1 retrieves the SharedresourceV1alpha1Client +func (c *Clientset) SharedresourceV1alpha1() sharedresourcev1alpha1.SharedresourceV1alpha1Interface { + return &fakesharedresourcev1alpha1.FakeSharedresourceV1alpha1{Fake: &c.Fake} +} diff --git a/sharedresource/clientset/versioned/fake/register.go b/sharedresource/clientset/versioned/fake/register.go index bd08d7a1c3..36e2f1270d 100644 --- a/sharedresource/clientset/versioned/fake/register.go +++ b/sharedresource/clientset/versioned/fake/register.go @@ -1,3 +1,40 @@ // Code generated by client-gen. DO NOT EDIT. package fake + +import ( + sharedresourcev1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + sharedresourcev1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/sharedresource/clientset/versioned/scheme/register.go b/sharedresource/clientset/versioned/scheme/register.go index 29ea75c17c..eb9e2f4110 100644 --- a/sharedresource/clientset/versioned/scheme/register.go +++ b/sharedresource/clientset/versioned/scheme/register.go @@ -1,3 +1,40 @@ // Code generated by client-gen. DO NOT EDIT. package scheme + +import ( + sharedresourcev1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + sharedresourcev1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedconfigmap.go b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedconfigmap.go new file mode 100644 index 0000000000..fe787cc65f --- /dev/null +++ b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedconfigmap.go @@ -0,0 +1,117 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/openshift/api/sharedresource/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" +) + +// FakeSharedConfigMaps implements SharedConfigMapInterface +type FakeSharedConfigMaps struct { + Fake *FakeSharedresourceV1alpha1 +} + +var sharedconfigmapsResource = schema.GroupVersionResource{Group: "sharedresource.openshift.io", Version: "v1alpha1", Resource: "sharedconfigmaps"} + +var sharedconfigmapsKind = schema.GroupVersionKind{Group: "sharedresource.openshift.io", Version: "v1alpha1", Kind: "SharedConfigMap"} + +// Get takes name of the sharedConfigMap, and returns the corresponding sharedConfigMap object, and an error if there is any. +func (c *FakeSharedConfigMaps) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.SharedConfigMap, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(sharedconfigmapsResource, name), &v1alpha1.SharedConfigMap{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SharedConfigMap), err +} + +// List takes label and field selectors, and returns the list of SharedConfigMaps that match those selectors. +func (c *FakeSharedConfigMaps) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.SharedConfigMapList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(sharedconfigmapsResource, sharedconfigmapsKind, opts), &v1alpha1.SharedConfigMapList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.SharedConfigMapList{ListMeta: obj.(*v1alpha1.SharedConfigMapList).ListMeta} + for _, item := range obj.(*v1alpha1.SharedConfigMapList).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 sharedConfigMaps. +func (c *FakeSharedConfigMaps) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(sharedconfigmapsResource, opts)) +} + +// Create takes the representation of a sharedConfigMap and creates it. Returns the server's representation of the sharedConfigMap, and an error, if there is any. +func (c *FakeSharedConfigMaps) Create(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.CreateOptions) (result *v1alpha1.SharedConfigMap, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(sharedconfigmapsResource, sharedConfigMap), &v1alpha1.SharedConfigMap{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SharedConfigMap), err +} + +// Update takes the representation of a sharedConfigMap and updates it. Returns the server's representation of the sharedConfigMap, and an error, if there is any. +func (c *FakeSharedConfigMaps) Update(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.UpdateOptions) (result *v1alpha1.SharedConfigMap, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(sharedconfigmapsResource, sharedConfigMap), &v1alpha1.SharedConfigMap{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SharedConfigMap), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeSharedConfigMaps) UpdateStatus(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.UpdateOptions) (*v1alpha1.SharedConfigMap, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(sharedconfigmapsResource, "status", sharedConfigMap), &v1alpha1.SharedConfigMap{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SharedConfigMap), err +} + +// Delete takes name of the sharedConfigMap and deletes it. Returns an error if one occurs. +func (c *FakeSharedConfigMaps) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(sharedconfigmapsResource, name), &v1alpha1.SharedConfigMap{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeSharedConfigMaps) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(sharedconfigmapsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.SharedConfigMapList{}) + return err +} + +// Patch applies the patch and returns the patched sharedConfigMap. +func (c *FakeSharedConfigMaps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SharedConfigMap, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(sharedconfigmapsResource, name, pt, data, subresources...), &v1alpha1.SharedConfigMap{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SharedConfigMap), err +} diff --git a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedresource_client.go b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedresource_client.go index bd08d7a1c3..05a9729920 100644 --- a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedresource_client.go +++ b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedresource_client.go @@ -1,3 +1,28 @@ // Code generated by client-gen. DO NOT EDIT. package fake + +import ( + v1alpha1 "github.com/openshift/client-go/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeSharedresourceV1alpha1 struct { + *testing.Fake +} + +func (c *FakeSharedresourceV1alpha1) SharedConfigMaps() v1alpha1.SharedConfigMapInterface { + return &FakeSharedConfigMaps{c} +} + +func (c *FakeSharedresourceV1alpha1) SharedSecrets() v1alpha1.SharedSecretInterface { + return &FakeSharedSecrets{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeSharedresourceV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedsecret.go b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedsecret.go new file mode 100644 index 0000000000..abcc2eb54b --- /dev/null +++ b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/fake/fake_sharedsecret.go @@ -0,0 +1,117 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/openshift/api/sharedresource/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" +) + +// FakeSharedSecrets implements SharedSecretInterface +type FakeSharedSecrets struct { + Fake *FakeSharedresourceV1alpha1 +} + +var sharedsecretsResource = schema.GroupVersionResource{Group: "sharedresource.openshift.io", Version: "v1alpha1", Resource: "sharedsecrets"} + +var sharedsecretsKind = schema.GroupVersionKind{Group: "sharedresource.openshift.io", Version: "v1alpha1", Kind: "SharedSecret"} + +// Get takes name of the sharedSecret, and returns the corresponding sharedSecret object, and an error if there is any. +func (c *FakeSharedSecrets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.SharedSecret, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(sharedsecretsResource, name), &v1alpha1.SharedSecret{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SharedSecret), err +} + +// List takes label and field selectors, and returns the list of SharedSecrets that match those selectors. +func (c *FakeSharedSecrets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.SharedSecretList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(sharedsecretsResource, sharedsecretsKind, opts), &v1alpha1.SharedSecretList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.SharedSecretList{ListMeta: obj.(*v1alpha1.SharedSecretList).ListMeta} + for _, item := range obj.(*v1alpha1.SharedSecretList).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 sharedSecrets. +func (c *FakeSharedSecrets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(sharedsecretsResource, opts)) +} + +// Create takes the representation of a sharedSecret and creates it. Returns the server's representation of the sharedSecret, and an error, if there is any. +func (c *FakeSharedSecrets) Create(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.CreateOptions) (result *v1alpha1.SharedSecret, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(sharedsecretsResource, sharedSecret), &v1alpha1.SharedSecret{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SharedSecret), err +} + +// Update takes the representation of a sharedSecret and updates it. Returns the server's representation of the sharedSecret, and an error, if there is any. +func (c *FakeSharedSecrets) Update(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.UpdateOptions) (result *v1alpha1.SharedSecret, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(sharedsecretsResource, sharedSecret), &v1alpha1.SharedSecret{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SharedSecret), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeSharedSecrets) UpdateStatus(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.UpdateOptions) (*v1alpha1.SharedSecret, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(sharedsecretsResource, "status", sharedSecret), &v1alpha1.SharedSecret{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SharedSecret), err +} + +// Delete takes name of the sharedSecret and deletes it. Returns an error if one occurs. +func (c *FakeSharedSecrets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(sharedsecretsResource, name), &v1alpha1.SharedSecret{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeSharedSecrets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(sharedsecretsResource, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.SharedSecretList{}) + return err +} + +// Patch applies the patch and returns the patched sharedSecret. +func (c *FakeSharedSecrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SharedSecret, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(sharedsecretsResource, name, pt, data, subresources...), &v1alpha1.SharedSecret{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SharedSecret), err +} diff --git a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/generated_expansion.go b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/generated_expansion.go index 95037b3176..eed0a74e44 100644 --- a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/generated_expansion.go +++ b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/generated_expansion.go @@ -1,3 +1,7 @@ // Code generated by client-gen. DO NOT EDIT. package v1alpha1 + +type SharedConfigMapExpansion interface{} + +type SharedSecretExpansion interface{} diff --git a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedconfigmap.go b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedconfigmap.go new file mode 100644 index 0000000000..d5aa7fb57e --- /dev/null +++ b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedconfigmap.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + scheme "github.com/openshift/client-go/sharedresource/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" +) + +// SharedConfigMapsGetter has a method to return a SharedConfigMapInterface. +// A group's client should implement this interface. +type SharedConfigMapsGetter interface { + SharedConfigMaps() SharedConfigMapInterface +} + +// SharedConfigMapInterface has methods to work with SharedConfigMap resources. +type SharedConfigMapInterface interface { + Create(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.CreateOptions) (*v1alpha1.SharedConfigMap, error) + Update(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.UpdateOptions) (*v1alpha1.SharedConfigMap, error) + UpdateStatus(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.UpdateOptions) (*v1alpha1.SharedConfigMap, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.SharedConfigMap, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.SharedConfigMapList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SharedConfigMap, err error) + SharedConfigMapExpansion +} + +// sharedConfigMaps implements SharedConfigMapInterface +type sharedConfigMaps struct { + client rest.Interface +} + +// newSharedConfigMaps returns a SharedConfigMaps +func newSharedConfigMaps(c *SharedresourceV1alpha1Client) *sharedConfigMaps { + return &sharedConfigMaps{ + client: c.RESTClient(), + } +} + +// Get takes name of the sharedConfigMap, and returns the corresponding sharedConfigMap object, and an error if there is any. +func (c *sharedConfigMaps) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.SharedConfigMap, err error) { + result = &v1alpha1.SharedConfigMap{} + err = c.client.Get(). + Resource("sharedconfigmaps"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SharedConfigMaps that match those selectors. +func (c *sharedConfigMaps) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.SharedConfigMapList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.SharedConfigMapList{} + err = c.client.Get(). + Resource("sharedconfigmaps"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested sharedConfigMaps. +func (c *sharedConfigMaps) Watch(ctx context.Context, 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("sharedconfigmaps"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a sharedConfigMap and creates it. Returns the server's representation of the sharedConfigMap, and an error, if there is any. +func (c *sharedConfigMaps) Create(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.CreateOptions) (result *v1alpha1.SharedConfigMap, err error) { + result = &v1alpha1.SharedConfigMap{} + err = c.client.Post(). + Resource("sharedconfigmaps"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sharedConfigMap). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a sharedConfigMap and updates it. Returns the server's representation of the sharedConfigMap, and an error, if there is any. +func (c *sharedConfigMaps) Update(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.UpdateOptions) (result *v1alpha1.SharedConfigMap, err error) { + result = &v1alpha1.SharedConfigMap{} + err = c.client.Put(). + Resource("sharedconfigmaps"). + Name(sharedConfigMap.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sharedConfigMap). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *sharedConfigMaps) UpdateStatus(ctx context.Context, sharedConfigMap *v1alpha1.SharedConfigMap, opts v1.UpdateOptions) (result *v1alpha1.SharedConfigMap, err error) { + result = &v1alpha1.SharedConfigMap{} + err = c.client.Put(). + Resource("sharedconfigmaps"). + Name(sharedConfigMap.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sharedConfigMap). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the sharedConfigMap and deletes it. Returns an error if one occurs. +func (c *sharedConfigMaps) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("sharedconfigmaps"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *sharedConfigMaps) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("sharedconfigmaps"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched sharedConfigMap. +func (c *sharedConfigMaps) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SharedConfigMap, err error) { + result = &v1alpha1.SharedConfigMap{} + err = c.client.Patch(pt). + Resource("sharedconfigmaps"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedresource_client.go b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedresource_client.go index 95037b3176..66bade240e 100644 --- a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedresource_client.go +++ b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedresource_client.go @@ -1,3 +1,78 @@ // Code generated by client-gen. DO NOT EDIT. package v1alpha1 + +import ( + v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + "github.com/openshift/client-go/sharedresource/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type SharedresourceV1alpha1Interface interface { + RESTClient() rest.Interface + SharedConfigMapsGetter + SharedSecretsGetter +} + +// SharedresourceV1alpha1Client is used to interact with features provided by the sharedresource.openshift.io group. +type SharedresourceV1alpha1Client struct { + restClient rest.Interface +} + +func (c *SharedresourceV1alpha1Client) SharedConfigMaps() SharedConfigMapInterface { + return newSharedConfigMaps(c) +} + +func (c *SharedresourceV1alpha1Client) SharedSecrets() SharedSecretInterface { + return newSharedSecrets(c) +} + +// NewForConfig creates a new SharedresourceV1alpha1Client for the given config. +func NewForConfig(c *rest.Config) (*SharedresourceV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &SharedresourceV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new SharedresourceV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *SharedresourceV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new SharedresourceV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *SharedresourceV1alpha1Client { + return &SharedresourceV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + 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 *SharedresourceV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedsecret.go b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedsecret.go new file mode 100644 index 0000000000..35cb2a22a2 --- /dev/null +++ b/sharedresource/clientset/versioned/typed/sharedresource/v1alpha1/sharedsecret.go @@ -0,0 +1,168 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + scheme "github.com/openshift/client-go/sharedresource/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" +) + +// SharedSecretsGetter has a method to return a SharedSecretInterface. +// A group's client should implement this interface. +type SharedSecretsGetter interface { + SharedSecrets() SharedSecretInterface +} + +// SharedSecretInterface has methods to work with SharedSecret resources. +type SharedSecretInterface interface { + Create(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.CreateOptions) (*v1alpha1.SharedSecret, error) + Update(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.UpdateOptions) (*v1alpha1.SharedSecret, error) + UpdateStatus(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.UpdateOptions) (*v1alpha1.SharedSecret, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.SharedSecret, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.SharedSecretList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SharedSecret, err error) + SharedSecretExpansion +} + +// sharedSecrets implements SharedSecretInterface +type sharedSecrets struct { + client rest.Interface +} + +// newSharedSecrets returns a SharedSecrets +func newSharedSecrets(c *SharedresourceV1alpha1Client) *sharedSecrets { + return &sharedSecrets{ + client: c.RESTClient(), + } +} + +// Get takes name of the sharedSecret, and returns the corresponding sharedSecret object, and an error if there is any. +func (c *sharedSecrets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.SharedSecret, err error) { + result = &v1alpha1.SharedSecret{} + err = c.client.Get(). + Resource("sharedsecrets"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SharedSecrets that match those selectors. +func (c *sharedSecrets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.SharedSecretList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.SharedSecretList{} + err = c.client.Get(). + Resource("sharedsecrets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested sharedSecrets. +func (c *sharedSecrets) Watch(ctx context.Context, 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("sharedsecrets"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a sharedSecret and creates it. Returns the server's representation of the sharedSecret, and an error, if there is any. +func (c *sharedSecrets) Create(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.CreateOptions) (result *v1alpha1.SharedSecret, err error) { + result = &v1alpha1.SharedSecret{} + err = c.client.Post(). + Resource("sharedsecrets"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sharedSecret). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a sharedSecret and updates it. Returns the server's representation of the sharedSecret, and an error, if there is any. +func (c *sharedSecrets) Update(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.UpdateOptions) (result *v1alpha1.SharedSecret, err error) { + result = &v1alpha1.SharedSecret{} + err = c.client.Put(). + Resource("sharedsecrets"). + Name(sharedSecret.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sharedSecret). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *sharedSecrets) UpdateStatus(ctx context.Context, sharedSecret *v1alpha1.SharedSecret, opts v1.UpdateOptions) (result *v1alpha1.SharedSecret, err error) { + result = &v1alpha1.SharedSecret{} + err = c.client.Put(). + Resource("sharedsecrets"). + Name(sharedSecret.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(sharedSecret). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the sharedSecret and deletes it. Returns an error if one occurs. +func (c *sharedSecrets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Resource("sharedsecrets"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *sharedSecrets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Resource("sharedsecrets"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched sharedSecret. +func (c *sharedSecrets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SharedSecret, err error) { + result = &v1alpha1.SharedSecret{} + err = c.client.Patch(pt). + Resource("sharedsecrets"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/sharedresource/informers/externalversions/factory.go b/sharedresource/informers/externalversions/factory.go new file mode 100644 index 0000000000..b7b87f53eb --- /dev/null +++ b/sharedresource/informers/externalversions/factory.go @@ -0,0 +1,164 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package externalversions + +import ( + reflect "reflect" + sync "sync" + time "time" + + versioned "github.com/openshift/client-go/sharedresource/clientset/versioned" + internalinterfaces "github.com/openshift/client-go/sharedresource/informers/externalversions/internalinterfaces" + sharedresource "github.com/openshift/client-go/sharedresource/informers/externalversions/sharedresource" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" +) + +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + +type sharedInformerFactory struct { + client versioned.Interface + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc + lock sync.Mutex + defaultResync time.Duration + customResync map[reflect.Type]time.Duration + + informers map[reflect.Type]cache.SharedIndexInformer + // startedInformers is used for tracking which informers have been started. + // This allows Start() to be called multiple times safely. + startedInformers map[reflect.Type]bool +} + +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. +func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { + return NewSharedInformerFactoryWithOptions(client, defaultResync) +} + +// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. +// Listers obtained via this SharedInformerFactory will be subject to the same filters +// as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead +func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ + client: client, + namespace: v1.NamespaceAll, + defaultResync: defaultResync, + informers: make(map[reflect.Type]cache.SharedIndexInformer), + startedInformers: make(map[reflect.Type]bool), + customResync: make(map[reflect.Type]time.Duration), + } + + // Apply all options + for _, opt := range options { + factory = opt(factory) + } + + return factory +} + +// Start initializes all requested informers. +func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { + f.lock.Lock() + defer f.lock.Unlock() + + for informerType, informer := range f.informers { + if !f.startedInformers[informerType] { + go informer.Run(stopCh) + f.startedInformers[informerType] = true + } + } +} + +// WaitForCacheSync waits for all started informers' cache were synced. +func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { + informers := func() map[reflect.Type]cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informers := map[reflect.Type]cache.SharedIndexInformer{} + for informerType, informer := range f.informers { + if f.startedInformers[informerType] { + informers[informerType] = informer + } + } + return informers + }() + + res := map[reflect.Type]bool{} + for informType, informer := range informers { + res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) + } + return res +} + +// InternalInformerFor returns the SharedIndexInformer for obj using an internal +// client. +func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informerType := reflect.TypeOf(obj) + informer, exists := f.informers[informerType] + if exists { + return informer + } + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) + f.informers[informerType] = informer + + return informer +} + +// SharedInformerFactory provides shared informers for resources in all known +// API group versions. +type SharedInformerFactory interface { + internalinterfaces.SharedInformerFactory + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + + Sharedresource() sharedresource.Interface +} + +func (f *sharedInformerFactory) Sharedresource() sharedresource.Interface { + return sharedresource.New(f, f.namespace, f.tweakListOptions) +} diff --git a/sharedresource/informers/externalversions/generic.go b/sharedresource/informers/externalversions/generic.go new file mode 100644 index 0000000000..cd01619c59 --- /dev/null +++ b/sharedresource/informers/externalversions/generic.go @@ -0,0 +1,48 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package externalversions + +import ( + "fmt" + + v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" +) + +// GenericInformer is type of SharedIndexInformer which will locate and delegate to other +// sharedInformers based on type +type GenericInformer interface { + Informer() cache.SharedIndexInformer + Lister() cache.GenericLister +} + +type genericInformer struct { + informer cache.SharedIndexInformer + resource schema.GroupResource +} + +// Informer returns the SharedIndexInformer. +func (f *genericInformer) Informer() cache.SharedIndexInformer { + return f.informer +} + +// Lister returns the GenericLister. +func (f *genericInformer) Lister() cache.GenericLister { + return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) +} + +// ForResource gives generic access to a shared informer of the matching type +// TODO extend this to unknown resources with a client pool +func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { + switch resource { + // Group=sharedresource.openshift.io, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("sharedconfigmaps"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Sharedresource().V1alpha1().SharedConfigMaps().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("sharedsecrets"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Sharedresource().V1alpha1().SharedSecrets().Informer()}, nil + + } + + return nil, fmt.Errorf("no informer found for %v", resource) +} diff --git a/sharedresource/informers/externalversions/internalinterfaces/factory_interfaces.go b/sharedresource/informers/externalversions/internalinterfaces/factory_interfaces.go new file mode 100644 index 0000000000..6c6062175f --- /dev/null +++ b/sharedresource/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -0,0 +1,24 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package internalinterfaces + +import ( + time "time" + + versioned "github.com/openshift/client-go/sharedresource/clientset/versioned" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + cache "k8s.io/client-go/tools/cache" +) + +// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. +type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer + +// SharedInformerFactory a small interface to allow for adding an informer without an import cycle +type SharedInformerFactory interface { + Start(stopCh <-chan struct{}) + InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer +} + +// TweakListOptionsFunc is a function that transforms a v1.ListOptions. +type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/sharedresource/informers/externalversions/sharedresource/interface.go b/sharedresource/informers/externalversions/sharedresource/interface.go new file mode 100644 index 0000000000..3b81b63a3b --- /dev/null +++ b/sharedresource/informers/externalversions/sharedresource/interface.go @@ -0,0 +1,30 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package sharedresource + +import ( + internalinterfaces "github.com/openshift/client-go/sharedresource/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/openshift/client-go/sharedresource/informers/externalversions/sharedresource/v1alpha1" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1alpha1 provides access to shared informers for resources in V1alpha1. + V1alpha1() v1alpha1.Interface +} + +type group 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 &group{factory: f, namespace: namespace, tweakListOptions: 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/sharedresource/informers/externalversions/sharedresource/v1alpha1/interface.go b/sharedresource/informers/externalversions/sharedresource/v1alpha1/interface.go new file mode 100644 index 0000000000..64793c87e6 --- /dev/null +++ b/sharedresource/informers/externalversions/sharedresource/v1alpha1/interface.go @@ -0,0 +1,36 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + internalinterfaces "github.com/openshift/client-go/sharedresource/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // SharedConfigMaps returns a SharedConfigMapInformer. + SharedConfigMaps() SharedConfigMapInformer + // SharedSecrets returns a SharedSecretInformer. + SharedSecrets() SharedSecretInformer +} + +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} +} + +// SharedConfigMaps returns a SharedConfigMapInformer. +func (v *version) SharedConfigMaps() SharedConfigMapInformer { + return &sharedConfigMapInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// SharedSecrets returns a SharedSecretInformer. +func (v *version) SharedSecrets() SharedSecretInformer { + return &sharedSecretInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedconfigmap.go b/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedconfigmap.go new file mode 100644 index 0000000000..c6abdf730d --- /dev/null +++ b/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedconfigmap.go @@ -0,0 +1,73 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + sharedresourcev1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + versioned "github.com/openshift/client-go/sharedresource/clientset/versioned" + internalinterfaces "github.com/openshift/client-go/sharedresource/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/openshift/client-go/sharedresource/listers/sharedresource/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" +) + +// SharedConfigMapInformer provides access to a shared informer and lister for +// SharedConfigMaps. +type SharedConfigMapInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.SharedConfigMapLister +} + +type sharedConfigMapInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewSharedConfigMapInformer constructs a new informer for SharedConfigMap 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 NewSharedConfigMapInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredSharedConfigMapInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredSharedConfigMapInformer constructs a new informer for SharedConfigMap 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 NewFilteredSharedConfigMapInformer(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.SharedresourceV1alpha1().SharedConfigMaps().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SharedresourceV1alpha1().SharedConfigMaps().Watch(context.TODO(), options) + }, + }, + &sharedresourcev1alpha1.SharedConfigMap{}, + resyncPeriod, + indexers, + ) +} + +func (f *sharedConfigMapInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredSharedConfigMapInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *sharedConfigMapInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&sharedresourcev1alpha1.SharedConfigMap{}, f.defaultInformer) +} + +func (f *sharedConfigMapInformer) Lister() v1alpha1.SharedConfigMapLister { + return v1alpha1.NewSharedConfigMapLister(f.Informer().GetIndexer()) +} diff --git a/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedsecret.go b/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedsecret.go new file mode 100644 index 0000000000..cf10a8ef78 --- /dev/null +++ b/sharedresource/informers/externalversions/sharedresource/v1alpha1/sharedsecret.go @@ -0,0 +1,73 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + sharedresourcev1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + versioned "github.com/openshift/client-go/sharedresource/clientset/versioned" + internalinterfaces "github.com/openshift/client-go/sharedresource/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/openshift/client-go/sharedresource/listers/sharedresource/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" +) + +// SharedSecretInformer provides access to a shared informer and lister for +// SharedSecrets. +type SharedSecretInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.SharedSecretLister +} + +type sharedSecretInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewSharedSecretInformer constructs a new informer for SharedSecret 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 NewSharedSecretInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredSharedSecretInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredSharedSecretInformer constructs a new informer for SharedSecret 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 NewFilteredSharedSecretInformer(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.SharedresourceV1alpha1().SharedSecrets().List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SharedresourceV1alpha1().SharedSecrets().Watch(context.TODO(), options) + }, + }, + &sharedresourcev1alpha1.SharedSecret{}, + resyncPeriod, + indexers, + ) +} + +func (f *sharedSecretInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredSharedSecretInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *sharedSecretInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&sharedresourcev1alpha1.SharedSecret{}, f.defaultInformer) +} + +func (f *sharedSecretInformer) Lister() v1alpha1.SharedSecretLister { + return v1alpha1.NewSharedSecretLister(f.Informer().GetIndexer()) +} diff --git a/sharedresource/listers/sharedresource/v1alpha1/expansion_generated.go b/sharedresource/listers/sharedresource/v1alpha1/expansion_generated.go new file mode 100644 index 0000000000..f8934d465a --- /dev/null +++ b/sharedresource/listers/sharedresource/v1alpha1/expansion_generated.go @@ -0,0 +1,11 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +// SharedConfigMapListerExpansion allows custom methods to be added to +// SharedConfigMapLister. +type SharedConfigMapListerExpansion interface{} + +// SharedSecretListerExpansion allows custom methods to be added to +// SharedSecretLister. +type SharedSecretListerExpansion interface{} diff --git a/sharedresource/listers/sharedresource/v1alpha1/sharedconfigmap.go b/sharedresource/listers/sharedresource/v1alpha1/sharedconfigmap.go new file mode 100644 index 0000000000..cb4635332b --- /dev/null +++ b/sharedresource/listers/sharedresource/v1alpha1/sharedconfigmap.go @@ -0,0 +1,52 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// SharedConfigMapLister helps list SharedConfigMaps. +// All objects returned here must be treated as read-only. +type SharedConfigMapLister interface { + // List lists all SharedConfigMaps in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.SharedConfigMap, err error) + // Get retrieves the SharedConfigMap from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.SharedConfigMap, error) + SharedConfigMapListerExpansion +} + +// sharedConfigMapLister implements the SharedConfigMapLister interface. +type sharedConfigMapLister struct { + indexer cache.Indexer +} + +// NewSharedConfigMapLister returns a new SharedConfigMapLister. +func NewSharedConfigMapLister(indexer cache.Indexer) SharedConfigMapLister { + return &sharedConfigMapLister{indexer: indexer} +} + +// List lists all SharedConfigMaps in the indexer. +func (s *sharedConfigMapLister) List(selector labels.Selector) (ret []*v1alpha1.SharedConfigMap, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.SharedConfigMap)) + }) + return ret, err +} + +// Get retrieves the SharedConfigMap from the index for a given name. +func (s *sharedConfigMapLister) Get(name string) (*v1alpha1.SharedConfigMap, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("sharedconfigmap"), name) + } + return obj.(*v1alpha1.SharedConfigMap), nil +} diff --git a/sharedresource/listers/sharedresource/v1alpha1/sharedsecret.go b/sharedresource/listers/sharedresource/v1alpha1/sharedsecret.go new file mode 100644 index 0000000000..a5b88ee0fc --- /dev/null +++ b/sharedresource/listers/sharedresource/v1alpha1/sharedsecret.go @@ -0,0 +1,52 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// SharedSecretLister helps list SharedSecrets. +// All objects returned here must be treated as read-only. +type SharedSecretLister interface { + // List lists all SharedSecrets in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.SharedSecret, err error) + // Get retrieves the SharedSecret from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.SharedSecret, error) + SharedSecretListerExpansion +} + +// sharedSecretLister implements the SharedSecretLister interface. +type sharedSecretLister struct { + indexer cache.Indexer +} + +// NewSharedSecretLister returns a new SharedSecretLister. +func NewSharedSecretLister(indexer cache.Indexer) SharedSecretLister { + return &sharedSecretLister{indexer: indexer} +} + +// List lists all SharedSecrets in the indexer. +func (s *sharedSecretLister) List(selector labels.Selector) (ret []*v1alpha1.SharedSecret, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.SharedSecret)) + }) + return ret, err +} + +// Get retrieves the SharedSecret from the index for a given name. +func (s *sharedSecretLister) Get(name string) (*v1alpha1.SharedSecret, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("sharedsecret"), name) + } + return obj.(*v1alpha1.SharedSecret), nil +} diff --git a/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_proxy.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_proxy.crd.yaml index 8b6f46eeac..246225397f 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_proxy.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_03_config-operator_01_proxy.crd.yaml @@ -43,7 +43,7 @@ spec: description: httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var. type: string noProxy: - description: 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. + description: noProxy is a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. Empty means unset and will not result in an env var. type: string readinessEndpoints: description: readinessEndpoints is a list of endpoints used to verify readiness of the proxy. diff --git a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml index 442d39a652..f67be27db4 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_10_config-operator_01_build.crd.yaml @@ -61,7 +61,7 @@ spec: description: httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var. type: string noProxy: - description: 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. + description: noProxy is a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. Empty means unset and will not result in an env var. type: string readinessEndpoints: description: readinessEndpoints is a list of endpoints used to verify readiness of the proxy. @@ -168,7 +168,7 @@ spec: description: httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var. type: string noProxy: - description: 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. + description: noProxy is a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. Empty means unset and will not result in an env var. type: string readinessEndpoints: description: readinessEndpoints is a list of endpoints used to verify readiness of the proxy. 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 35e78bb69c..01ee4690df 100644 --- a/vendor/github.com/openshift/api/config/v1/types_proxy.go +++ b/vendor/github.com/openshift/api/config/v1/types_proxy.go @@ -35,7 +35,7 @@ type ProxySpec struct { // +optional HTTPSProxy string `json:"httpsProxy,omitempty"` - // noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. + // noProxy is a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. // Empty means unset and will not result in an env var. // +optional NoProxy string `json:"noProxy,omitempty"` diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go index 28ac40830b..be6679fd8f 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 @@ -1729,7 +1729,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. Empty means unset and will not result in an env var.", + "noProxy": "noProxy is a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. Empty means unset and will not result in an env var.", "readinessEndpoints": "readinessEndpoints is a list of endpoints used to verify readiness of the proxy.", "trustedCA": "trustedCA is a reference to a ConfigMap containing a CA certificate bundle. The trustedCA field should only be consumed by a proxy validator. The validator is responsible for reading the certificate bundle from the required key \"ca-bundle.crt\", merging it with the system default trust bundle, and writing the merged trust bundle to a ConfigMap named \"trusted-ca-bundle\" in the \"openshift-config-managed\" namespace. Clients that expect to make proxy connections must use the trusted-ca-bundle for all HTTPS requests to the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as well.\n\nThe namespace for the ConfigMap referenced by trustedCA is \"openshift-config\". Here is an example ConfigMap (in yaml):\n\napiVersion: v1 kind: ConfigMap metadata:\n name: user-ca-bundle\n namespace: openshift-config\n data:\n ca-bundle.crt: |", } diff --git a/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go b/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go index beff5e93b7..827c76dd81 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go +++ b/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go @@ -52,7 +52,7 @@ const ( ManilaCSIDriver CSIDriverName = "manila.csi.openstack.org" OvirtCSIDriver CSIDriverName = "csi.ovirt.org" KubevirtCSIDriver CSIDriverName = "csi.kubevirt.io" - SharedResourcesCSIDriver CSIDriverName = "csi.shared-resources.openshift.io" + SharedResourcesCSIDriver CSIDriverName = "csi.sharedresource.openshift.io" AlibabaDiskCSIDriver CSIDriverName = "diskplugin.csi.alibabacloud.com" IBMVPCBlockCSIDriver CSIDriverName = "vpc.block.csi.ibm.io" ) diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/0000_10_sharedconfigmap.crd.yaml b/vendor/github.com/openshift/api/sharedresource/v1alpha1/0000_10_sharedconfigmap.crd.yaml new file mode 100644 index 0000000000..c7d8d7b878 --- /dev/null +++ b/vendor/github.com/openshift/api/sharedresource/v1alpha1/0000_10_sharedconfigmap.crd.yaml @@ -0,0 +1,105 @@ +# this is the boilerplate crd def that controller-gen reads and modifies with the +# contents from shared_configmap_type.go +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: sharedconfigmaps.sharedresource.openshift.io + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/979 + displayName: SharedConfigMap + description: Extension for sharing ConfigMaps across Namespaces +spec: + scope: Cluster + group: sharedresource.openshift.io + names: + plural: sharedconfigmaps + singular: sharedconfigmap + kind: SharedConfigMap + listKind: SharedConfigMapList + versions: + - name: v1alpha1 + served: true + storage: true + "schema": + "openAPIV3Schema": + description: "SharedConfigMap allows a ConfigMap to be shared across namespaces. Pods can mount the shared ConfigMap by adding a CSI volume to the pod specification using the \"csi.sharedresource.openshift.io\" CSI driver and a reference to the SharedConfigMap in the volume attributes: \n spec: volumes: - name: shared-configmap csi: driver: csi.sharedresource.openshift.io volumeAttributes: sharedConfigMap: my-share \n For the mount to be successful, the pod's service account must be granted permission to 'use' the named SharedConfigMap object within its namespace with an appropriate Role and RoleBinding. For compactness, here are example `oc` invocations for creating such Role and RoleBinding objects. \n `oc create role shared-resource-my-share --verb=use --resource=sharedconfigmaps.sharedresource.openshift.io --resource-name=my-share` `oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=my-namespace:default` \n Shared resource objects, in this case ConfigMaps, have default permissions of list, get, and watch for system authenticated users. \n Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. These capabilities should not be used by applications needing long term support." + type: object + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: spec is the specification of the desired shared configmap + type: object + required: + - configMapRef + properties: + configMapRef: + description: configMapRef is a reference to the ConfigMap to share + type: object + required: + - name + - namespace + properties: + name: + description: name represents the name of the ConfigMap that is being referenced. + type: string + namespace: + description: namespace represents the namespace where the referenced ConfigMap is located. + type: string + description: + description: description is a user readable explanation of what the backing resource provides. + type: string + status: + description: status is the observed status of the shared configmap + type: object + properties: + conditions: + description: conditions represents any observations made on this particular shared resource by the underlying CSI driver or Share controller. + type: array + items: + description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + type: object + required: + - lastTransitionTime + - message + - reason + - status + - type + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + type: string + format: date-time + message: + description: message is a human readable message indicating details about the transition. This may be an empty string. + type: string + maxLength: 32768 + observedGeneration: + description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + type: integer + format: int64 + minimum: 0 + reason: + description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + type: string + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + status: + description: status of the condition, one of True, False, Unknown. + type: string + enum: + - "True" + - "False" + - Unknown + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + type: string + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/0000_10_sharedsecret.crd.yaml b/vendor/github.com/openshift/api/sharedresource/v1alpha1/0000_10_sharedsecret.crd.yaml new file mode 100644 index 0000000000..b323df5909 --- /dev/null +++ b/vendor/github.com/openshift/api/sharedresource/v1alpha1/0000_10_sharedsecret.crd.yaml @@ -0,0 +1,105 @@ +# this is the boilerplate crd def that controller-gen reads and modifies with the +# contents from shared_secret_type.go +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: sharedsecrets.sharedresource.openshift.io + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/979 + displayName: SharedSecret + description: Extension for sharing Secrets across Namespaces +spec: + scope: Cluster + group: sharedresource.openshift.io + names: + plural: sharedsecrets + singular: sharedsecret + kind: SharedSecret + listKind: SharedSecretList + versions: + - name: v1alpha1 + served: true + storage: true + "schema": + "openAPIV3Schema": + description: "SharedSecret allows a Secret to be shared across namespaces. Pods can mount the shared Secret by adding a CSI volume to the pod specification using the \"csi.sharedresource.openshift.io\" CSI driver and a reference to the SharedSecret in the volume attributes: \n spec: volumes: - name: shared-secret csi: driver: csi.sharedresource.openshift.io volumeAttributes: sharedSecret: my-share \n For the mount to be successful, the pod's service account must be granted permission to 'use' the named SharedSecret object within its namespace with an appropriate Role and RoleBinding. For compactness, here are example `oc` invocations for creating such Role and RoleBinding objects. \n `oc create role shared-resource-my-share --verb=use --resource=sharedsecrets.sharedresource.openshift.io --resource-name=my-share` `oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=my-namespace:default` \n Shared resource objects, in this case Secrets, have default permissions of list, get, and watch for system authenticated users. \n Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. These capabilities should not be used by applications needing long term support." + type: object + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: spec is the specification of the desired shared secret + type: object + required: + - secretRef + properties: + description: + description: description is a user readable explanation of what the backing resource provides. + type: string + secretRef: + description: secretRef is a reference to the Secret to share + type: object + required: + - name + - namespace + properties: + name: + description: name represents the name of the Secret that is being referenced. + type: string + namespace: + description: namespace represents the namespace where the referenced Secret is located. + type: string + status: + description: status is the observed status of the shared secret + type: object + properties: + conditions: + description: conditions represents any observations made on this particular shared resource by the underlying CSI driver or Share controller. + type: array + items: + description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + type: object + required: + - lastTransitionTime + - message + - reason + - status + - type + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + type: string + format: date-time + message: + description: message is a human readable message indicating details about the transition. This may be an empty string. + type: string + maxLength: 32768 + observedGeneration: + description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + type: integer + format: int64 + minimum: 0 + reason: + description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + type: string + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + status: + description: status of the condition, one of True, False, Unknown. + type: string + enum: + - "True" + - "False" + - Unknown + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + type: string + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/doc.go b/vendor/github.com/openshift/api/sharedresource/v1alpha1/doc.go new file mode 100644 index 0000000000..833dd7f12c --- /dev/null +++ b/vendor/github.com/openshift/api/sharedresource/v1alpha1/doc.go @@ -0,0 +1,7 @@ +// +k8s:deepcopy-gen=package,register +// +k8s:defaulter-gen=TypeMeta +// +k8s:openapi-gen=true + +// +groupName=sharedresource.openshift.io +// Package v1alplha1 is the v1alpha1 version of the API. +package v1alpha1 diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/register.go b/vendor/github.com/openshift/api/sharedresource/v1alpha1/register.go new file mode 100644 index 0000000000..506b5f0ac0 --- /dev/null +++ b/vendor/github.com/openshift/api/sharedresource/v1alpha1/register.go @@ -0,0 +1,48 @@ +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +const ( + Version = "v1alpha1" + GroupName = "sharedresource.openshift.io" +) + +var ( + scheme = runtime.NewScheme() + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme + // SchemeGroupVersion is the group version used to register these objects. + SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: Version} + // Install is a function which adds this version to a scheme + Install = SchemeBuilder.AddToScheme +) + +func init() { + AddToScheme(scheme) +} + +// addKnownTypes adds the set of types defined in this package to the supplied scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &SharedConfigMap{}, + &SharedConfigMapList{}, + &SharedSecret{}, + &SharedSecretList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/types_shared_configmap.go b/vendor/github.com/openshift/api/sharedresource/v1alpha1/types_shared_configmap.go new file mode 100644 index 0000000000..0032b8a892 --- /dev/null +++ b/vendor/github.com/openshift/api/sharedresource/v1alpha1/types_shared_configmap.go @@ -0,0 +1,88 @@ +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SharedConfigMap allows a ConfigMap to be shared across namespaces. +// Pods can mount the shared ConfigMap by adding a CSI volume to the pod specification using the +// "csi.sharedresource.openshift.io" CSI driver and a reference to the SharedConfigMap in the volume attributes: +// +// spec: +// volumes: +// - name: shared-configmap +// csi: +// driver: csi.sharedresource.openshift.io +// volumeAttributes: +// sharedConfigMap: my-share +// +// For the mount to be successful, the pod's service account must be granted permission to 'use' the named SharedConfigMap object +// within its namespace with an appropriate Role and RoleBinding. For compactness, here are example `oc` invocations for creating +// such Role and RoleBinding objects. +// +// `oc create role shared-resource-my-share --verb=use --resource=sharedconfigmaps.sharedresource.openshift.io --resource-name=my-share` +// `oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=my-namespace:default` +// +// Shared resource objects, in this case ConfigMaps, have default permissions of list, get, and watch for system authenticated users. +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// These capabilities should not be used by applications needing long term support. +// +k8s:openapi-gen=true +// +openshift:compatibility-gen:level=4 +// +kubebuilder:subresource:status +// +type SharedConfigMap struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec is the specification of the desired shared configmap + // +kubebuilder:validation:Required + Spec SharedConfigMapSpec `json:"spec,omitempty"` + + // status is the observed status of the shared configmap + Status SharedConfigMapStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SharedConfigMapList contains a list of SharedConfigMap objects. +// +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +type SharedConfigMapList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SharedConfigMap `json:"items"` +} + +// SharedConfigMapReference contains information about which ConfigMap to share +type SharedConfigMapReference struct { + // name represents the name of the ConfigMap that is being referenced. + // +kubebuilder:validation:Required + Name string `json:"name"` + // namespace represents the namespace where the referenced ConfigMap is located. + // +kubebuilder:validation:Required + Namespace string `json:"namespace"` +} + +// SharedConfigMapSpec defines the desired state of a SharedConfigMap +// +k8s:openapi-gen=true +type SharedConfigMapSpec struct { + //configMapRef is a reference to the ConfigMap to share + // +kubebuilder:validation:Required + ConfigMapRef SharedConfigMapReference `json:"configMapRef"` + // description is a user readable explanation of what the backing resource provides. + Description string `json:"description,omitempty"` +} + +// SharedSecretStatus contains the observed status of the shared resource +type SharedConfigMapStatus struct { + // conditions represents any observations made on this particular shared resource by the underlying CSI driver or Share controller. + // +patchMergeKey=type + // +patchStrategy=merge + Conditions []metav1.Condition `json:"conditions,omitempty"` +} diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/types_shared_secret.go b/vendor/github.com/openshift/api/sharedresource/v1alpha1/types_shared_secret.go new file mode 100644 index 0000000000..99a539df60 --- /dev/null +++ b/vendor/github.com/openshift/api/sharedresource/v1alpha1/types_shared_secret.go @@ -0,0 +1,86 @@ +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SharedSecret allows a Secret to be shared across namespaces. +// Pods can mount the shared Secret by adding a CSI volume to the pod specification using the +// "csi.sharedresource.openshift.io" CSI driver and a reference to the SharedSecret in the volume attributes: +// +// spec: +// volumes: +// - name: shared-secret +// csi: +// driver: csi.sharedresource.openshift.io +// volumeAttributes: +// sharedSecret: my-share +// +// For the mount to be successful, the pod's service account must be granted permission to 'use' the named SharedSecret object +// within its namespace with an appropriate Role and RoleBinding. For compactness, here are example `oc` invocations for creating +// such Role and RoleBinding objects. +// +// `oc create role shared-resource-my-share --verb=use --resource=sharedsecrets.sharedresource.openshift.io --resource-name=my-share` +// `oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=my-namespace:default` +// +// Shared resource objects, in this case Secrets, have default permissions of list, get, and watch for system authenticated users. +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +// +kubebuilder:subresource:status +// +type SharedSecret struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec is the specification of the desired shared secret + // +kubebuilder:validation:Required + Spec SharedSecretSpec `json:"spec,omitempty"` + + // status is the observed status of the shared secret + Status SharedSecretStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// SharedSecretList contains a list of SharedSecret objects. +// +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 +type SharedSecretList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []SharedSecret `json:"items"` +} + +// SharedSecretReference contains information about which Secret to share +type SharedSecretReference struct { + // name represents the name of the Secret that is being referenced. + // +kubebuilder:validation:Required + Name string `json:"name"` + // namespace represents the namespace where the referenced Secret is located. + // +kubebuilder:validation:Required + Namespace string `json:"namespace"` +} + +// SharedSecretSpec defines the desired state of a SharedSecret +// +k8s:openapi-gen=true +type SharedSecretSpec struct { + // secretRef is a reference to the Secret to share + // +kubebuilder:validation:Required + SecretRef SharedSecretReference `json:"secretRef"` + // description is a user readable explanation of what the backing resource provides. + Description string `json:"description,omitempty"` +} + +// SharedSecretStatus contains the observed status of the shared resource +type SharedSecretStatus struct { + // conditions represents any observations made on this particular shared resource by the underlying CSI driver or Share controller. + // +patchMergeKey=type + // +patchStrategy=merge + Conditions []metav1.Condition `json:"conditions,omitempty"` +} diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..3c6bf8b429 --- /dev/null +++ b/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,244 @@ +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedConfigMap) DeepCopyInto(out *SharedConfigMap) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMap. +func (in *SharedConfigMap) DeepCopy() *SharedConfigMap { + if in == nil { + return nil + } + out := new(SharedConfigMap) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SharedConfigMap) 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 *SharedConfigMapList) DeepCopyInto(out *SharedConfigMapList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SharedConfigMap, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMapList. +func (in *SharedConfigMapList) DeepCopy() *SharedConfigMapList { + if in == nil { + return nil + } + out := new(SharedConfigMapList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SharedConfigMapList) 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 *SharedConfigMapReference) DeepCopyInto(out *SharedConfigMapReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMapReference. +func (in *SharedConfigMapReference) DeepCopy() *SharedConfigMapReference { + if in == nil { + return nil + } + out := new(SharedConfigMapReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedConfigMapSpec) DeepCopyInto(out *SharedConfigMapSpec) { + *out = *in + out.ConfigMapRef = in.ConfigMapRef + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMapSpec. +func (in *SharedConfigMapSpec) DeepCopy() *SharedConfigMapSpec { + if in == nil { + return nil + } + out := new(SharedConfigMapSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedConfigMapStatus) DeepCopyInto(out *SharedConfigMapStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMapStatus. +func (in *SharedConfigMapStatus) DeepCopy() *SharedConfigMapStatus { + if in == nil { + return nil + } + out := new(SharedConfigMapStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecret) DeepCopyInto(out *SharedSecret) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecret. +func (in *SharedSecret) DeepCopy() *SharedSecret { + if in == nil { + return nil + } + out := new(SharedSecret) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SharedSecret) 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 *SharedSecretList) DeepCopyInto(out *SharedSecretList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]SharedSecret, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretList. +func (in *SharedSecretList) DeepCopy() *SharedSecretList { + if in == nil { + return nil + } + out := new(SharedSecretList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *SharedSecretList) 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 *SharedSecretReference) DeepCopyInto(out *SharedSecretReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretReference. +func (in *SharedSecretReference) DeepCopy() *SharedSecretReference { + if in == nil { + return nil + } + out := new(SharedSecretReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecretSpec) DeepCopyInto(out *SharedSecretSpec) { + *out = *in + out.SecretRef = in.SecretRef + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretSpec. +func (in *SharedSecretSpec) DeepCopy() *SharedSecretSpec { + if in == nil { + return nil + } + out := new(SharedSecretSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SharedSecretStatus) DeepCopyInto(out *SharedSecretStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretStatus. +func (in *SharedSecretStatus) DeepCopy() *SharedSecretStatus { + if in == nil { + return nil + } + out := new(SharedSecretStatus) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.swagger_doc_generated.go new file mode 100644 index 0000000000..94cfc12fd9 --- /dev/null +++ b/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.swagger_doc_generated.go @@ -0,0 +1,108 @@ +package v1alpha1 + +// 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_SharedConfigMap = map[string]string{ + "": "SharedConfigMap allows a ConfigMap to be shared across namespaces. Pods can mount the shared ConfigMap by adding a CSI volume to the pod specification using the \"csi.sharedresource.openshift.io\" CSI driver and a reference to the SharedConfigMap in the volume attributes:\n\nspec:\n volumes:\n - name: shared-configmap\n csi:\n driver: csi.sharedresource.openshift.io\n volumeAttributes:\n sharedConfigMap: my-share\n\nFor the mount to be successful, the pod's service account must be granted permission to 'use' the named SharedConfigMap object within its namespace with an appropriate Role and RoleBinding. For compactness, here are example `oc` invocations for creating such Role and RoleBinding objects.\n\n `oc create role shared-resource-my-share --verb=use --resource=sharedconfigmaps.sharedresource.openshift.io --resource-name=my-share`\n `oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=my-namespace:default`\n\nShared resource objects, in this case ConfigMaps, have default permissions of list, get, and watch for system authenticated users.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. These capabilities should not be used by applications needing long term support.", + "spec": "spec is the specification of the desired shared configmap", + "status": "status is the observed status of the shared configmap", +} + +func (SharedConfigMap) SwaggerDoc() map[string]string { + return map_SharedConfigMap +} + +var map_SharedConfigMapList = map[string]string{ + "": "SharedConfigMapList contains a list of SharedConfigMap objects.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. These capabilities should not be used by applications needing long term support.", +} + +func (SharedConfigMapList) SwaggerDoc() map[string]string { + return map_SharedConfigMapList +} + +var map_SharedConfigMapReference = map[string]string{ + "": "SharedConfigMapReference contains information about which ConfigMap to share", + "name": "name represents the name of the ConfigMap that is being referenced.", + "namespace": "namespace represents the namespace where the referenced ConfigMap is located.", +} + +func (SharedConfigMapReference) SwaggerDoc() map[string]string { + return map_SharedConfigMapReference +} + +var map_SharedConfigMapSpec = map[string]string{ + "": "SharedConfigMapSpec defines the desired state of a SharedConfigMap", + "configMapRef": "configMapRef is a reference to the ConfigMap to share", + "description": "description is a user readable explanation of what the backing resource provides.", +} + +func (SharedConfigMapSpec) SwaggerDoc() map[string]string { + return map_SharedConfigMapSpec +} + +var map_SharedConfigMapStatus = map[string]string{ + "": "SharedSecretStatus contains the observed status of the shared resource", + "conditions": "conditions represents any observations made on this particular shared resource by the underlying CSI driver or Share controller.", +} + +func (SharedConfigMapStatus) SwaggerDoc() map[string]string { + return map_SharedConfigMapStatus +} + +var map_SharedSecret = map[string]string{ + "": "SharedSecret allows a Secret to be shared across namespaces. Pods can mount the shared Secret by adding a CSI volume to the pod specification using the \"csi.sharedresource.openshift.io\" CSI driver and a reference to the SharedSecret in the volume attributes:\n\nspec:\n volumes:\n - name: shared-secret\n csi:\n driver: csi.sharedresource.openshift.io\n volumeAttributes:\n sharedSecret: my-share\n\nFor the mount to be successful, the pod's service account must be granted permission to 'use' the named SharedSecret object within its namespace with an appropriate Role and RoleBinding. For compactness, here are example `oc` invocations for creating such Role and RoleBinding objects.\n\n `oc create role shared-resource-my-share --verb=use --resource=sharedsecrets.sharedresource.openshift.io --resource-name=my-share`\n `oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=my-namespace:default`\n\nShared resource objects, in this case Secrets, have default permissions of list, get, and watch for system authenticated users.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. These capabilities should not be used by applications needing long term support.", + "spec": "spec is the specification of the desired shared secret", + "status": "status is the observed status of the shared secret", +} + +func (SharedSecret) SwaggerDoc() map[string]string { + return map_SharedSecret +} + +var map_SharedSecretList = map[string]string{ + "": "SharedSecretList contains a list of SharedSecret objects.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. These capabilities should not be used by applications needing long term support.", +} + +func (SharedSecretList) SwaggerDoc() map[string]string { + return map_SharedSecretList +} + +var map_SharedSecretReference = map[string]string{ + "": "SharedSecretReference contains information about which Secret to share", + "name": "name represents the name of the Secret that is being referenced.", + "namespace": "namespace represents the namespace where the referenced Secret is located.", +} + +func (SharedSecretReference) SwaggerDoc() map[string]string { + return map_SharedSecretReference +} + +var map_SharedSecretSpec = map[string]string{ + "": "SharedSecretSpec defines the desired state of a SharedSecret", + "secretRef": "secretRef is a reference to the Secret to share", + "description": "description is a user readable explanation of what the backing resource provides.", +} + +func (SharedSecretSpec) SwaggerDoc() map[string]string { + return map_SharedSecretSpec +} + +var map_SharedSecretStatus = map[string]string{ + "": "SharedSecretStatus contains the observed status of the shared resource", + "conditions": "conditions represents any observations made on this particular shared resource by the underlying CSI driver or Share controller.", +} + +func (SharedSecretStatus) SwaggerDoc() map[string]string { + return map_SharedSecretStatus +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/modules.txt b/vendor/modules.txt index f381cfe1eb..dd3bed81d3 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -53,7 +53,7 @@ github.com/mailru/easyjson/jwriter github.com/modern-go/concurrent # github.com/modern-go/reflect2 v1.0.1 github.com/modern-go/reflect2 -# github.com/openshift/api v0.0.0-20211005161005-4ec2bbe5ed00 +# github.com/openshift/api v0.0.0-20211007134530-4cb30f221b89 ## explicit github.com/openshift/api/apiserver/v1 github.com/openshift/api/apps/v1 @@ -81,6 +81,7 @@ github.com/openshift/api/samples/v1 github.com/openshift/api/security/v1 github.com/openshift/api/securityinternal/v1 github.com/openshift/api/servicecertsigner/v1alpha1 +github.com/openshift/api/sharedresource/v1alpha1 github.com/openshift/api/template/v1 github.com/openshift/api/user/v1 # github.com/pkg/errors v0.9.1