diff --git a/Makefile b/Makefile index cb5a7c0..aa84398 100644 --- a/Makefile +++ b/Makefile @@ -32,10 +32,10 @@ help: ## Display this help. ##@ Development manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. - $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases + $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./apis/..." output:crd:artifacts:config=config/crd/bases -generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. - $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." +generate: controller-gen generate-client ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations and the clientset, informers and listers. + $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./apis/..." fmt: ## Run go fmt against code. go fmt ./... @@ -81,6 +81,19 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/default | kubectl delete -f - +run-client-gen: client-gen + $(CLIENT_GEN) --clientset-name versioned --input-base github.com/pluralsh/plural-operator/apis --input platform/v1alpha1,vpn/v1alpha1 --output-package github.com/pluralsh/plural-operator/generated/client/clientset --go-header-file hack/boilerplate.go.txt + +run-lister-gen: lister-gen + $(LISTER_GEN) --input-dirs github.com/pluralsh/plural-operator/apis/platform/v1alpha1,github.com/pluralsh/plural-operator/apis/vpn/v1alpha1 --output-package github.com/pluralsh/plural-operator/generated/client/listers --go-header-file hack/boilerplate.go.txt + +run-informer-gen: informer-gen + $(INFORMER_GEN) --input-dirs github.com/pluralsh/plural-operator/apis/platform/v1alpha1,github.com/pluralsh/plural-operator/apis/vpn/v1alpha1 --versioned-clientset-package github.com/pluralsh/plural-operator/generated/client/clientset/versioned --listers-package github.com/pluralsh/plural-operator/generated/client/listers --output-package github.com/pluralsh/plural-operator/generated/client/informers --go-header-file hack/boilerplate.go.txt + +generate-client: run-client-gen run-lister-gen run-informer-gen + rm -rf generated + mv github.com/pluralsh/plural-operator/generated generated + rm -rf github.com CONTROLLER_GEN = $(shell pwd)/bin/controller-gen controller-gen: ## Download controller-gen locally if necessary. @@ -90,10 +103,25 @@ KUSTOMIZE = $(shell pwd)/bin/kustomize kustomize: ## Download kustomize locally if necessary. $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4@v4.5.7) -client-gen: - ./hack/update-codegen.sh - mv github.com/pluralsh/plural-operator/generated generated - rm -rf github.com +CLIENT_GEN = $(shell pwd)/bin/client-gen +client-gen: ## Download client-gen locally if necessary. + $(call go-get-tool,$(CLIENT_GEN),k8s.io/code-generator/cmd/client-gen@v0.25.3) + +LISTER_GEN = $(shell pwd)/bin/lister-gen +lister-gen: ## Download lister-gen locally if necessary. + $(call go-get-tool,$(LISTER_GEN),k8s.io/code-generator/cmd/lister-gen@v0.25.3) + +INFORMER_GEN = $(shell pwd)/bin/informer-gen +informer-gen: ## Download informer-gen locally if necessary. + $(call go-get-tool,$(INFORMER_GEN),k8s.io/code-generator/cmd/informer-gen@v0.25.3) + +DEFFAULTER_GEN = $(shell pwd)/bin/defaulter-gen +defaulter-gen: ## Download defaulter-gen locally if necessary. + $(call go-get-tool,$(DEFFAULTER_GEN),k8s.io/code-generator/cmd/defaulter-gen@v0.25.3) + +DEEPCOPY_GEN = $(shell pwd)/bin/deepcopy-gen +deepcopy-gen: ## Download deepcopy-gen locally if necessary. + $(call go-get-tool,$(DEEPCOPY_GEN),k8s.io/code-generator/cmd/deepcopy-gen@v0.25.3) # go-get-tool will 'go get' any package $2 and install it to $1. PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) diff --git a/apis/platform/v1alpha1/configurationoverlay_types.go b/apis/platform/v1alpha1/configurationoverlay_types.go index 2af3ea6..a73d76c 100644 --- a/apis/platform/v1alpha1/configurationoverlay_types.go +++ b/apis/platform/v1alpha1/configurationoverlay_types.go @@ -72,6 +72,7 @@ type ConfigurationOverlayStatus struct { // Important: Run "make" to regenerate code after modifying this file } +//+genclient //+kubebuilder:object:root=true //+kubebuilder:subresource:status diff --git a/apis/platform/v1alpha1/defaultstorageclass_types.go b/apis/platform/v1alpha1/defaultstorageclass_types.go index d124538..27adba6 100644 --- a/apis/platform/v1alpha1/defaultstorageclass_types.go +++ b/apis/platform/v1alpha1/defaultstorageclass_types.go @@ -31,6 +31,7 @@ type DefaultStorageClassStatus struct { // Important: Run "make" to regenerate code after modifying this file } +//+genclient //+kubebuilder:object:root=true //+kubebuilder:subresource:status //+kubebuilder:resource:scope=Cluster diff --git a/apis/platform/v1alpha1/license_types.go b/apis/platform/v1alpha1/license_types.go index e27fb3b..9087302 100644 --- a/apis/platform/v1alpha1/license_types.go +++ b/apis/platform/v1alpha1/license_types.go @@ -63,6 +63,7 @@ type LicenseStatus struct { Secrets map[string]string `json:"secrets"` } +//+genclient //+kubebuilder:object:root=true //+kubebuilder:subresource:status diff --git a/apis/platform/v1alpha1/registrycredential_types.go b/apis/platform/v1alpha1/registrycredential_types.go index 6da6399..2f3e6f2 100644 --- a/apis/platform/v1alpha1/registrycredential_types.go +++ b/apis/platform/v1alpha1/registrycredential_types.go @@ -2,6 +2,7 @@ package v1alpha1 import ( "fmt" + corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -36,6 +37,7 @@ type RegistryCredentialStatus struct { // Important: Run "make" to regenerate code after modifying this file } +//+genclient //+kubebuilder:object:root=true //+kubebuilder:subresource:status diff --git a/apis/platform/v1alpha1/resourcegroup_types.go b/apis/platform/v1alpha1/resourcegroup_types.go index 28201ba..09b09ea 100644 --- a/apis/platform/v1alpha1/resourcegroup_types.go +++ b/apis/platform/v1alpha1/resourcegroup_types.go @@ -33,6 +33,7 @@ type ResourceGroupStatus struct { // Important: Run "make" to regenerate code after modifying this file } +//+genclient //+kubebuilder:object:root=true //+kubebuilder:subresource:status //+kubebuilder:resource:scope=Cluster diff --git a/apis/platform/v1alpha1/runbook_types.go b/apis/platform/v1alpha1/runbook_types.go index fc09057..aeef6cf 100644 --- a/apis/platform/v1alpha1/runbook_types.go +++ b/apis/platform/v1alpha1/runbook_types.go @@ -194,6 +194,7 @@ type RunbookStatus struct { Alerts []*RunbookAlertStatus `json:"alerts"` } +//+genclient //+kubebuilder:object:root=true //+kubebuilder:subresource:status diff --git a/apis/platform/v1alpha1/secretsync_types.go b/apis/platform/v1alpha1/secretsync_types.go index 9ff93f4..53cc1fa 100644 --- a/apis/platform/v1alpha1/secretsync_types.go +++ b/apis/platform/v1alpha1/secretsync_types.go @@ -40,6 +40,7 @@ type SecretSyncStatus struct { // Important: Run "make" to regenerate code after modifying this file } +//+genclient //+kubebuilder:object:root=true //+kubebuilder:subresource:status diff --git a/apis/platform/v1alpha1/statefulsetresize_types.go b/apis/platform/v1alpha1/statefulsetresize_types.go index bf50df2..c67dc85 100644 --- a/apis/platform/v1alpha1/statefulsetresize_types.go +++ b/apis/platform/v1alpha1/statefulsetresize_types.go @@ -43,6 +43,7 @@ type StatefulSetResizeStatus struct { // Important: Run "make" to regenerate code after modifying this file } +//+genclient //+kubebuilder:object:root=true //+kubebuilder:subresource:status diff --git a/apis/vpn/v1alpha1/doc.go b/apis/vpn/v1alpha1/doc.go new file mode 100644 index 0000000..497bd09 --- /dev/null +++ b/apis/vpn/v1alpha1/doc.go @@ -0,0 +1,3 @@ +// +groupName=vpn.plural.sh + +package v1alpha1 diff --git a/apis/vpn/v1alpha1/register.go b/apis/vpn/v1alpha1/register.go new file mode 100644 index 0000000..2dfd631 --- /dev/null +++ b/apis/vpn/v1alpha1/register.go @@ -0,0 +1,12 @@ +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// SchemeGroupVersion is group version used to register these objects. +var SchemeGroupVersion = GroupVersion + +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/apis/vpn/v1alpha1/wireguardpeer_types.go b/apis/vpn/v1alpha1/wireguardpeer_types.go index 291e569..d5cd5a2 100644 --- a/apis/vpn/v1alpha1/wireguardpeer_types.go +++ b/apis/vpn/v1alpha1/wireguardpeer_types.go @@ -84,6 +84,7 @@ type WireguardPeerStatus struct { Conditions crhelperTypes.Conditions `json:"conditions,omitempty"` } +//+genclient //+kubebuilder:object:root=true //+kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Wireguard Server",type="string",JSONPath=".spec.wireguardRef",description="The Wireguard Server this peer belongs to" diff --git a/apis/vpn/v1alpha1/wireguardserver_types.go b/apis/vpn/v1alpha1/wireguardserver_types.go index ef2fbfe..eff8c24 100644 --- a/apis/vpn/v1alpha1/wireguardserver_types.go +++ b/apis/vpn/v1alpha1/wireguardserver_types.go @@ -125,6 +125,7 @@ type WireguardServerStatus struct { Conditions crhelperTypes.Conditions `json:"conditions,omitempty"` } +//+genclient // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Hostname",type="string",JSONPath=".status.hostname",description="WireguardServer hostname" diff --git a/generated/platform/clientset/versioned/clientset.go b/generated/client/clientset/versioned/clientset.go similarity index 62% rename from generated/platform/clientset/versioned/clientset.go rename to generated/client/clientset/versioned/clientset.go index 7ee172c..b90a559 100644 --- a/generated/platform/clientset/versioned/clientset.go +++ b/generated/client/clientset/versioned/clientset.go @@ -19,8 +19,10 @@ package versioned import ( "fmt" + "net/http" - platformv1alpha1 "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned/typed/platform/v1alpha1" + platformv1alpha1 "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/typed/platform/v1alpha1" + vpnv1alpha1 "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/typed/vpn/v1alpha1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -29,6 +31,7 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface PlatformV1alpha1() platformv1alpha1.PlatformV1alpha1Interface + VpnV1alpha1() vpnv1alpha1.VpnV1alpha1Interface } // Clientset contains the clients for groups. Each group has exactly one @@ -36,6 +39,7 @@ type Interface interface { type Clientset struct { *discovery.DiscoveryClient platformV1alpha1 *platformv1alpha1.PlatformV1alpha1Client + vpnV1alpha1 *vpnv1alpha1.VpnV1alpha1Client } // PlatformV1alpha1 retrieves the PlatformV1alpha1Client @@ -43,6 +47,11 @@ func (c *Clientset) PlatformV1alpha1() platformv1alpha1.PlatformV1alpha1Interfac return c.platformV1alpha1 } +// VpnV1alpha1 retrieves the VpnV1alpha1Client +func (c *Clientset) VpnV1alpha1() vpnv1alpha1.VpnV1alpha1Interface { + return c.vpnV1alpha1 +} + // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { if c == nil { @@ -54,22 +63,49 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { // 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. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c + + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + + // share the transport between all clients + httpClient, err := rest.HTTPClientFor(&configShallowCopy) + if err != nil { + return nil, err + } + + return NewForConfigAndClient(&configShallowCopy, httpClient) +} + +// NewForConfigAndClient creates a new Clientset for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*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.platformV1alpha1, err = platformv1alpha1.NewForConfig(&configShallowCopy) + cs.platformV1alpha1, err = platformv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + cs.vpnV1alpha1, err = vpnv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -79,17 +115,18 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { // 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.platformV1alpha1 = platformv1alpha1.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs + cs, err := NewForConfig(c) + if err != nil { + panic(err) + } + return cs } // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset cs.platformV1alpha1 = platformv1alpha1.New(c) + cs.vpnV1alpha1 = vpnv1alpha1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/generated/platform/clientset/versioned/doc.go b/generated/client/clientset/versioned/doc.go similarity index 100% rename from generated/platform/clientset/versioned/doc.go rename to generated/client/clientset/versioned/doc.go diff --git a/generated/platform/clientset/versioned/fake/clientset_generated.go b/generated/client/clientset/versioned/fake/clientset_generated.go similarity index 79% rename from generated/platform/clientset/versioned/fake/clientset_generated.go rename to generated/client/clientset/versioned/fake/clientset_generated.go index 9b87f24..b01b23e 100644 --- a/generated/platform/clientset/versioned/fake/clientset_generated.go +++ b/generated/client/clientset/versioned/fake/clientset_generated.go @@ -18,9 +18,11 @@ limitations under the License. package fake import ( - clientset "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned" - platformv1alpha1 "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned/typed/platform/v1alpha1" - fakeplatformv1alpha1 "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake" + clientset "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + platformv1alpha1 "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/typed/platform/v1alpha1" + fakeplatformv1alpha1 "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/typed/platform/v1alpha1/fake" + vpnv1alpha1 "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/typed/vpn/v1alpha1" + fakevpnv1alpha1 "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/typed/vpn/v1alpha1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -73,9 +75,17 @@ func (c *Clientset) Tracker() testing.ObjectTracker { return c.tracker } -var _ clientset.Interface = &Clientset{} +var ( + _ clientset.Interface = &Clientset{} + _ testing.FakeClient = &Clientset{} +) // PlatformV1alpha1 retrieves the PlatformV1alpha1Client func (c *Clientset) PlatformV1alpha1() platformv1alpha1.PlatformV1alpha1Interface { return &fakeplatformv1alpha1.FakePlatformV1alpha1{Fake: &c.Fake} } + +// VpnV1alpha1 retrieves the VpnV1alpha1Client +func (c *Clientset) VpnV1alpha1() vpnv1alpha1.VpnV1alpha1Interface { + return &fakevpnv1alpha1.FakeVpnV1alpha1{Fake: &c.Fake} +} diff --git a/generated/platform/clientset/versioned/fake/doc.go b/generated/client/clientset/versioned/fake/doc.go similarity index 100% rename from generated/platform/clientset/versioned/fake/doc.go rename to generated/client/clientset/versioned/fake/doc.go diff --git a/generated/platform/clientset/versioned/fake/register.go b/generated/client/clientset/versioned/fake/register.go similarity index 95% rename from generated/platform/clientset/versioned/fake/register.go rename to generated/client/clientset/versioned/fake/register.go index 449bcef..33edace 100644 --- a/generated/platform/clientset/versioned/fake/register.go +++ b/generated/client/clientset/versioned/fake/register.go @@ -19,6 +19,7 @@ package fake import ( platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + vpnv1alpha1 "github.com/pluralsh/plural-operator/apis/vpn/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -31,6 +32,7 @@ var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ platformv1alpha1.AddToScheme, + vpnv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/platform/clientset/versioned/scheme/doc.go b/generated/client/clientset/versioned/scheme/doc.go similarity index 100% rename from generated/platform/clientset/versioned/scheme/doc.go rename to generated/client/clientset/versioned/scheme/doc.go diff --git a/generated/platform/clientset/versioned/scheme/register.go b/generated/client/clientset/versioned/scheme/register.go similarity index 95% rename from generated/platform/clientset/versioned/scheme/register.go rename to generated/client/clientset/versioned/scheme/register.go index cd4389c..33a6a15 100644 --- a/generated/platform/clientset/versioned/scheme/register.go +++ b/generated/client/clientset/versioned/scheme/register.go @@ -19,6 +19,7 @@ package scheme import ( platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + vpnv1alpha1 "github.com/pluralsh/plural-operator/apis/vpn/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -31,6 +32,7 @@ var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ platformv1alpha1.AddToScheme, + vpnv1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/configurationoverlay.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/configurationoverlay.go new file mode 100644 index 0000000..d72678c --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/configurationoverlay.go @@ -0,0 +1,194 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + scheme "github.com/pluralsh/plural-operator/generated/client/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" +) + +// ConfigurationOverlaysGetter has a method to return a ConfigurationOverlayInterface. +// A group's client should implement this interface. +type ConfigurationOverlaysGetter interface { + ConfigurationOverlays(namespace string) ConfigurationOverlayInterface +} + +// ConfigurationOverlayInterface has methods to work with ConfigurationOverlay resources. +type ConfigurationOverlayInterface interface { + Create(ctx context.Context, configurationOverlay *v1alpha1.ConfigurationOverlay, opts v1.CreateOptions) (*v1alpha1.ConfigurationOverlay, error) + Update(ctx context.Context, configurationOverlay *v1alpha1.ConfigurationOverlay, opts v1.UpdateOptions) (*v1alpha1.ConfigurationOverlay, error) + UpdateStatus(ctx context.Context, configurationOverlay *v1alpha1.ConfigurationOverlay, opts v1.UpdateOptions) (*v1alpha1.ConfigurationOverlay, 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.ConfigurationOverlay, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ConfigurationOverlayList, 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.ConfigurationOverlay, err error) + ConfigurationOverlayExpansion +} + +// configurationOverlays implements ConfigurationOverlayInterface +type configurationOverlays struct { + client rest.Interface + ns string +} + +// newConfigurationOverlays returns a ConfigurationOverlays +func newConfigurationOverlays(c *PlatformV1alpha1Client, namespace string) *configurationOverlays { + return &configurationOverlays{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the configurationOverlay, and returns the corresponding configurationOverlay object, and an error if there is any. +func (c *configurationOverlays) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ConfigurationOverlay, err error) { + result = &v1alpha1.ConfigurationOverlay{} + err = c.client.Get(). + Namespace(c.ns). + Resource("configurationoverlays"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ConfigurationOverlays that match those selectors. +func (c *configurationOverlays) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ConfigurationOverlayList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.ConfigurationOverlayList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("configurationoverlays"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested configurationOverlays. +func (c *configurationOverlays) 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(). + Namespace(c.ns). + Resource("configurationoverlays"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a configurationOverlay and creates it. Returns the server's representation of the configurationOverlay, and an error, if there is any. +func (c *configurationOverlays) Create(ctx context.Context, configurationOverlay *v1alpha1.ConfigurationOverlay, opts v1.CreateOptions) (result *v1alpha1.ConfigurationOverlay, err error) { + result = &v1alpha1.ConfigurationOverlay{} + err = c.client.Post(). + Namespace(c.ns). + Resource("configurationoverlays"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(configurationOverlay). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a configurationOverlay and updates it. Returns the server's representation of the configurationOverlay, and an error, if there is any. +func (c *configurationOverlays) Update(ctx context.Context, configurationOverlay *v1alpha1.ConfigurationOverlay, opts v1.UpdateOptions) (result *v1alpha1.ConfigurationOverlay, err error) { + result = &v1alpha1.ConfigurationOverlay{} + err = c.client.Put(). + Namespace(c.ns). + Resource("configurationoverlays"). + Name(configurationOverlay.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(configurationOverlay). + 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 *configurationOverlays) UpdateStatus(ctx context.Context, configurationOverlay *v1alpha1.ConfigurationOverlay, opts v1.UpdateOptions) (result *v1alpha1.ConfigurationOverlay, err error) { + result = &v1alpha1.ConfigurationOverlay{} + err = c.client.Put(). + Namespace(c.ns). + Resource("configurationoverlays"). + Name(configurationOverlay.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(configurationOverlay). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the configurationOverlay and deletes it. Returns an error if one occurs. +func (c *configurationOverlays) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("configurationoverlays"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *configurationOverlays) 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(). + Namespace(c.ns). + Resource("configurationoverlays"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched configurationOverlay. +func (c *configurationOverlays) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ConfigurationOverlay, err error) { + result = &v1alpha1.ConfigurationOverlay{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("configurationoverlays"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/dashboard.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/dashboard.go similarity index 98% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/dashboard.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/dashboard.go index 648547d..9f088b8 100644 --- a/generated/platform/clientset/versioned/typed/platform/v1alpha1/dashboard.go +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/dashboard.go @@ -22,7 +22,7 @@ import ( "time" v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" - scheme "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned/scheme" + scheme "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/defaultstorageclass.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/defaultstorageclass.go new file mode 100644 index 0000000..1ab2af1 --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/defaultstorageclass.go @@ -0,0 +1,194 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + scheme "github.com/pluralsh/plural-operator/generated/client/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" +) + +// DefaultStorageClassesGetter has a method to return a DefaultStorageClassInterface. +// A group's client should implement this interface. +type DefaultStorageClassesGetter interface { + DefaultStorageClasses(namespace string) DefaultStorageClassInterface +} + +// DefaultStorageClassInterface has methods to work with DefaultStorageClass resources. +type DefaultStorageClassInterface interface { + Create(ctx context.Context, defaultStorageClass *v1alpha1.DefaultStorageClass, opts v1.CreateOptions) (*v1alpha1.DefaultStorageClass, error) + Update(ctx context.Context, defaultStorageClass *v1alpha1.DefaultStorageClass, opts v1.UpdateOptions) (*v1alpha1.DefaultStorageClass, error) + UpdateStatus(ctx context.Context, defaultStorageClass *v1alpha1.DefaultStorageClass, opts v1.UpdateOptions) (*v1alpha1.DefaultStorageClass, 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.DefaultStorageClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.DefaultStorageClassList, 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.DefaultStorageClass, err error) + DefaultStorageClassExpansion +} + +// defaultStorageClasses implements DefaultStorageClassInterface +type defaultStorageClasses struct { + client rest.Interface + ns string +} + +// newDefaultStorageClasses returns a DefaultStorageClasses +func newDefaultStorageClasses(c *PlatformV1alpha1Client, namespace string) *defaultStorageClasses { + return &defaultStorageClasses{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the defaultStorageClass, and returns the corresponding defaultStorageClass object, and an error if there is any. +func (c *defaultStorageClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.DefaultStorageClass, err error) { + result = &v1alpha1.DefaultStorageClass{} + err = c.client.Get(). + Namespace(c.ns). + Resource("defaultstorageclasses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of DefaultStorageClasses that match those selectors. +func (c *defaultStorageClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.DefaultStorageClassList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.DefaultStorageClassList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("defaultstorageclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested defaultStorageClasses. +func (c *defaultStorageClasses) 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(). + Namespace(c.ns). + Resource("defaultstorageclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a defaultStorageClass and creates it. Returns the server's representation of the defaultStorageClass, and an error, if there is any. +func (c *defaultStorageClasses) Create(ctx context.Context, defaultStorageClass *v1alpha1.DefaultStorageClass, opts v1.CreateOptions) (result *v1alpha1.DefaultStorageClass, err error) { + result = &v1alpha1.DefaultStorageClass{} + err = c.client.Post(). + Namespace(c.ns). + Resource("defaultstorageclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(defaultStorageClass). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a defaultStorageClass and updates it. Returns the server's representation of the defaultStorageClass, and an error, if there is any. +func (c *defaultStorageClasses) Update(ctx context.Context, defaultStorageClass *v1alpha1.DefaultStorageClass, opts v1.UpdateOptions) (result *v1alpha1.DefaultStorageClass, err error) { + result = &v1alpha1.DefaultStorageClass{} + err = c.client.Put(). + Namespace(c.ns). + Resource("defaultstorageclasses"). + Name(defaultStorageClass.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(defaultStorageClass). + 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 *defaultStorageClasses) UpdateStatus(ctx context.Context, defaultStorageClass *v1alpha1.DefaultStorageClass, opts v1.UpdateOptions) (result *v1alpha1.DefaultStorageClass, err error) { + result = &v1alpha1.DefaultStorageClass{} + err = c.client.Put(). + Namespace(c.ns). + Resource("defaultstorageclasses"). + Name(defaultStorageClass.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(defaultStorageClass). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the defaultStorageClass and deletes it. Returns an error if one occurs. +func (c *defaultStorageClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("defaultstorageclasses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *defaultStorageClasses) 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(). + Namespace(c.ns). + Resource("defaultstorageclasses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched defaultStorageClass. +func (c *defaultStorageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.DefaultStorageClass, err error) { + result = &v1alpha1.DefaultStorageClass{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("defaultstorageclasses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/doc.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/doc.go similarity index 100% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/doc.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/doc.go diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/doc.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/doc.go similarity index 100% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/doc.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/fake/doc.go diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_configurationoverlay.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_configurationoverlay.go new file mode 100644 index 0000000..6da4f52 --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_configurationoverlay.go @@ -0,0 +1,141 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/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" +) + +// FakeConfigurationOverlays implements ConfigurationOverlayInterface +type FakeConfigurationOverlays struct { + Fake *FakePlatformV1alpha1 + ns string +} + +var configurationoverlaysResource = schema.GroupVersionResource{Group: "platform.plural.sh", Version: "v1alpha1", Resource: "configurationoverlays"} + +var configurationoverlaysKind = schema.GroupVersionKind{Group: "platform.plural.sh", Version: "v1alpha1", Kind: "ConfigurationOverlay"} + +// Get takes name of the configurationOverlay, and returns the corresponding configurationOverlay object, and an error if there is any. +func (c *FakeConfigurationOverlays) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ConfigurationOverlay, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(configurationoverlaysResource, c.ns, name), &v1alpha1.ConfigurationOverlay{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ConfigurationOverlay), err +} + +// List takes label and field selectors, and returns the list of ConfigurationOverlays that match those selectors. +func (c *FakeConfigurationOverlays) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ConfigurationOverlayList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(configurationoverlaysResource, configurationoverlaysKind, c.ns, opts), &v1alpha1.ConfigurationOverlayList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ConfigurationOverlayList{ListMeta: obj.(*v1alpha1.ConfigurationOverlayList).ListMeta} + for _, item := range obj.(*v1alpha1.ConfigurationOverlayList).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 configurationOverlays. +func (c *FakeConfigurationOverlays) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(configurationoverlaysResource, c.ns, opts)) + +} + +// Create takes the representation of a configurationOverlay and creates it. Returns the server's representation of the configurationOverlay, and an error, if there is any. +func (c *FakeConfigurationOverlays) Create(ctx context.Context, configurationOverlay *v1alpha1.ConfigurationOverlay, opts v1.CreateOptions) (result *v1alpha1.ConfigurationOverlay, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(configurationoverlaysResource, c.ns, configurationOverlay), &v1alpha1.ConfigurationOverlay{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ConfigurationOverlay), err +} + +// Update takes the representation of a configurationOverlay and updates it. Returns the server's representation of the configurationOverlay, and an error, if there is any. +func (c *FakeConfigurationOverlays) Update(ctx context.Context, configurationOverlay *v1alpha1.ConfigurationOverlay, opts v1.UpdateOptions) (result *v1alpha1.ConfigurationOverlay, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(configurationoverlaysResource, c.ns, configurationOverlay), &v1alpha1.ConfigurationOverlay{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ConfigurationOverlay), 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 *FakeConfigurationOverlays) UpdateStatus(ctx context.Context, configurationOverlay *v1alpha1.ConfigurationOverlay, opts v1.UpdateOptions) (*v1alpha1.ConfigurationOverlay, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(configurationoverlaysResource, "status", c.ns, configurationOverlay), &v1alpha1.ConfigurationOverlay{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ConfigurationOverlay), err +} + +// Delete takes name of the configurationOverlay and deletes it. Returns an error if one occurs. +func (c *FakeConfigurationOverlays) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(configurationoverlaysResource, c.ns, name, opts), &v1alpha1.ConfigurationOverlay{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeConfigurationOverlays) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(configurationoverlaysResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ConfigurationOverlayList{}) + return err +} + +// Patch applies the patch and returns the patched configurationOverlay. +func (c *FakeConfigurationOverlays) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ConfigurationOverlay, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(configurationoverlaysResource, c.ns, name, pt, data, subresources...), &v1alpha1.ConfigurationOverlay{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ConfigurationOverlay), err +} diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_dashboard.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_dashboard.go similarity index 98% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_dashboard.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_dashboard.go index b448664..42619f2 100644 --- a/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_dashboard.go +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_dashboard.go @@ -116,7 +116,7 @@ func (c *FakeDashboards) UpdateStatus(ctx context.Context, dashboard *v1alpha1.D // Delete takes name of the dashboard and deletes it. Returns an error if one occurs. func (c *FakeDashboards) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(dashboardsResource, c.ns, name), &v1alpha1.Dashboard{}) + Invokes(testing.NewDeleteActionWithOptions(dashboardsResource, c.ns, name, opts), &v1alpha1.Dashboard{}) return err } diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_defaultstorageclass.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_defaultstorageclass.go new file mode 100644 index 0000000..6793afe --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_defaultstorageclass.go @@ -0,0 +1,141 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/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" +) + +// FakeDefaultStorageClasses implements DefaultStorageClassInterface +type FakeDefaultStorageClasses struct { + Fake *FakePlatformV1alpha1 + ns string +} + +var defaultstorageclassesResource = schema.GroupVersionResource{Group: "platform.plural.sh", Version: "v1alpha1", Resource: "defaultstorageclasses"} + +var defaultstorageclassesKind = schema.GroupVersionKind{Group: "platform.plural.sh", Version: "v1alpha1", Kind: "DefaultStorageClass"} + +// Get takes name of the defaultStorageClass, and returns the corresponding defaultStorageClass object, and an error if there is any. +func (c *FakeDefaultStorageClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.DefaultStorageClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(defaultstorageclassesResource, c.ns, name), &v1alpha1.DefaultStorageClass{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.DefaultStorageClass), err +} + +// List takes label and field selectors, and returns the list of DefaultStorageClasses that match those selectors. +func (c *FakeDefaultStorageClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.DefaultStorageClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(defaultstorageclassesResource, defaultstorageclassesKind, c.ns, opts), &v1alpha1.DefaultStorageClassList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.DefaultStorageClassList{ListMeta: obj.(*v1alpha1.DefaultStorageClassList).ListMeta} + for _, item := range obj.(*v1alpha1.DefaultStorageClassList).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 defaultStorageClasses. +func (c *FakeDefaultStorageClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(defaultstorageclassesResource, c.ns, opts)) + +} + +// Create takes the representation of a defaultStorageClass and creates it. Returns the server's representation of the defaultStorageClass, and an error, if there is any. +func (c *FakeDefaultStorageClasses) Create(ctx context.Context, defaultStorageClass *v1alpha1.DefaultStorageClass, opts v1.CreateOptions) (result *v1alpha1.DefaultStorageClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(defaultstorageclassesResource, c.ns, defaultStorageClass), &v1alpha1.DefaultStorageClass{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.DefaultStorageClass), err +} + +// Update takes the representation of a defaultStorageClass and updates it. Returns the server's representation of the defaultStorageClass, and an error, if there is any. +func (c *FakeDefaultStorageClasses) Update(ctx context.Context, defaultStorageClass *v1alpha1.DefaultStorageClass, opts v1.UpdateOptions) (result *v1alpha1.DefaultStorageClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(defaultstorageclassesResource, c.ns, defaultStorageClass), &v1alpha1.DefaultStorageClass{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.DefaultStorageClass), 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 *FakeDefaultStorageClasses) UpdateStatus(ctx context.Context, defaultStorageClass *v1alpha1.DefaultStorageClass, opts v1.UpdateOptions) (*v1alpha1.DefaultStorageClass, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(defaultstorageclassesResource, "status", c.ns, defaultStorageClass), &v1alpha1.DefaultStorageClass{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.DefaultStorageClass), err +} + +// Delete takes name of the defaultStorageClass and deletes it. Returns an error if one occurs. +func (c *FakeDefaultStorageClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(defaultstorageclassesResource, c.ns, name, opts), &v1alpha1.DefaultStorageClass{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeDefaultStorageClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(defaultstorageclassesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.DefaultStorageClassList{}) + return err +} + +// Patch applies the patch and returns the patched defaultStorageClass. +func (c *FakeDefaultStorageClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.DefaultStorageClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(defaultstorageclassesResource, c.ns, name, pt, data, subresources...), &v1alpha1.DefaultStorageClass{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.DefaultStorageClass), err +} diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_license.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_license.go new file mode 100644 index 0000000..59b25cb --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_license.go @@ -0,0 +1,141 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/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" +) + +// FakeLicenses implements LicenseInterface +type FakeLicenses struct { + Fake *FakePlatformV1alpha1 + ns string +} + +var licensesResource = schema.GroupVersionResource{Group: "platform.plural.sh", Version: "v1alpha1", Resource: "licenses"} + +var licensesKind = schema.GroupVersionKind{Group: "platform.plural.sh", Version: "v1alpha1", Kind: "License"} + +// Get takes name of the license, and returns the corresponding license object, and an error if there is any. +func (c *FakeLicenses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.License, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(licensesResource, c.ns, name), &v1alpha1.License{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.License), err +} + +// List takes label and field selectors, and returns the list of Licenses that match those selectors. +func (c *FakeLicenses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.LicenseList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(licensesResource, licensesKind, c.ns, opts), &v1alpha1.LicenseList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.LicenseList{ListMeta: obj.(*v1alpha1.LicenseList).ListMeta} + for _, item := range obj.(*v1alpha1.LicenseList).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 licenses. +func (c *FakeLicenses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(licensesResource, c.ns, opts)) + +} + +// Create takes the representation of a license and creates it. Returns the server's representation of the license, and an error, if there is any. +func (c *FakeLicenses) Create(ctx context.Context, license *v1alpha1.License, opts v1.CreateOptions) (result *v1alpha1.License, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(licensesResource, c.ns, license), &v1alpha1.License{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.License), err +} + +// Update takes the representation of a license and updates it. Returns the server's representation of the license, and an error, if there is any. +func (c *FakeLicenses) Update(ctx context.Context, license *v1alpha1.License, opts v1.UpdateOptions) (result *v1alpha1.License, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(licensesResource, c.ns, license), &v1alpha1.License{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.License), 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 *FakeLicenses) UpdateStatus(ctx context.Context, license *v1alpha1.License, opts v1.UpdateOptions) (*v1alpha1.License, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(licensesResource, "status", c.ns, license), &v1alpha1.License{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.License), err +} + +// Delete takes name of the license and deletes it. Returns an error if one occurs. +func (c *FakeLicenses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(licensesResource, c.ns, name, opts), &v1alpha1.License{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeLicenses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(licensesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.LicenseList{}) + return err +} + +// Patch applies the patch and returns the patched license. +func (c *FakeLicenses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.License, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(licensesResource, c.ns, name, pt, data, subresources...), &v1alpha1.License{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.License), err +} diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_logfilter.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_logfilter.go similarity index 98% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_logfilter.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_logfilter.go index cf6f6b8..4a2f856 100644 --- a/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_logfilter.go +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_logfilter.go @@ -116,7 +116,7 @@ func (c *FakeLogFilters) UpdateStatus(ctx context.Context, logFilter *v1alpha1.L // Delete takes name of the logFilter and deletes it. Returns an error if one occurs. func (c *FakeLogFilters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(logfiltersResource, c.ns, name), &v1alpha1.LogFilter{}) + Invokes(testing.NewDeleteActionWithOptions(logfiltersResource, c.ns, name, opts), &v1alpha1.LogFilter{}) return err } diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_logtail.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_logtail.go similarity index 98% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_logtail.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_logtail.go index 9fa49af..3830e99 100644 --- a/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_logtail.go +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_logtail.go @@ -116,7 +116,7 @@ func (c *FakeLogTails) UpdateStatus(ctx context.Context, logTail *v1alpha1.LogTa // Delete takes name of the logTail and deletes it. Returns an error if one occurs. func (c *FakeLogTails) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(logtailsResource, c.ns, name), &v1alpha1.LogTail{}) + Invokes(testing.NewDeleteActionWithOptions(logtailsResource, c.ns, name, opts), &v1alpha1.LogTail{}) return err } diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_platform_client.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_platform_client.go similarity index 55% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_platform_client.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_platform_client.go index 8ffb8fd..e9e6890 100644 --- a/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_platform_client.go +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_platform_client.go @@ -18,7 +18,7 @@ limitations under the License. package fake import ( - v1alpha1 "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned/typed/platform/v1alpha1" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/typed/platform/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) @@ -27,10 +27,22 @@ type FakePlatformV1alpha1 struct { *testing.Fake } +func (c *FakePlatformV1alpha1) ConfigurationOverlays(namespace string) v1alpha1.ConfigurationOverlayInterface { + return &FakeConfigurationOverlays{c, namespace} +} + func (c *FakePlatformV1alpha1) Dashboards(namespace string) v1alpha1.DashboardInterface { return &FakeDashboards{c, namespace} } +func (c *FakePlatformV1alpha1) DefaultStorageClasses(namespace string) v1alpha1.DefaultStorageClassInterface { + return &FakeDefaultStorageClasses{c, namespace} +} + +func (c *FakePlatformV1alpha1) Licenses(namespace string) v1alpha1.LicenseInterface { + return &FakeLicenses{c, namespace} +} + func (c *FakePlatformV1alpha1) LogFilters(namespace string) v1alpha1.LogFilterInterface { return &FakeLogFilters{c, namespace} } @@ -43,10 +55,30 @@ func (c *FakePlatformV1alpha1) Proxies(namespace string) v1alpha1.ProxyInterface return &FakeProxies{c, namespace} } +func (c *FakePlatformV1alpha1) RegistryCredentials(namespace string) v1alpha1.RegistryCredentialInterface { + return &FakeRegistryCredentials{c, namespace} +} + +func (c *FakePlatformV1alpha1) ResourceGroups(namespace string) v1alpha1.ResourceGroupInterface { + return &FakeResourceGroups{c, namespace} +} + +func (c *FakePlatformV1alpha1) Runbooks(namespace string) v1alpha1.RunbookInterface { + return &FakeRunbooks{c, namespace} +} + +func (c *FakePlatformV1alpha1) SecretSyncs(namespace string) v1alpha1.SecretSyncInterface { + return &FakeSecretSyncs{c, namespace} +} + func (c *FakePlatformV1alpha1) SlashCommands(namespace string) v1alpha1.SlashCommandInterface { return &FakeSlashCommands{c, namespace} } +func (c *FakePlatformV1alpha1) StatefulSetResizes(namespace string) v1alpha1.StatefulSetResizeInterface { + return &FakeStatefulSetResizes{c, namespace} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakePlatformV1alpha1) RESTClient() rest.Interface { diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_proxy.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_proxy.go similarity index 98% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_proxy.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_proxy.go index 83d62a0..90333d3 100644 --- a/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_proxy.go +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_proxy.go @@ -116,7 +116,7 @@ func (c *FakeProxies) UpdateStatus(ctx context.Context, proxy *v1alpha1.Proxy, o // Delete takes name of the proxy and deletes it. Returns an error if one occurs. func (c *FakeProxies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(proxiesResource, c.ns, name), &v1alpha1.Proxy{}) + Invokes(testing.NewDeleteActionWithOptions(proxiesResource, c.ns, name, opts), &v1alpha1.Proxy{}) return err } diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_registrycredential.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_registrycredential.go new file mode 100644 index 0000000..774c67a --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_registrycredential.go @@ -0,0 +1,141 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/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" +) + +// FakeRegistryCredentials implements RegistryCredentialInterface +type FakeRegistryCredentials struct { + Fake *FakePlatformV1alpha1 + ns string +} + +var registrycredentialsResource = schema.GroupVersionResource{Group: "platform.plural.sh", Version: "v1alpha1", Resource: "registrycredentials"} + +var registrycredentialsKind = schema.GroupVersionKind{Group: "platform.plural.sh", Version: "v1alpha1", Kind: "RegistryCredential"} + +// Get takes name of the registryCredential, and returns the corresponding registryCredential object, and an error if there is any. +func (c *FakeRegistryCredentials) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RegistryCredential, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(registrycredentialsResource, c.ns, name), &v1alpha1.RegistryCredential{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RegistryCredential), err +} + +// List takes label and field selectors, and returns the list of RegistryCredentials that match those selectors. +func (c *FakeRegistryCredentials) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RegistryCredentialList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(registrycredentialsResource, registrycredentialsKind, c.ns, opts), &v1alpha1.RegistryCredentialList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.RegistryCredentialList{ListMeta: obj.(*v1alpha1.RegistryCredentialList).ListMeta} + for _, item := range obj.(*v1alpha1.RegistryCredentialList).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 registryCredentials. +func (c *FakeRegistryCredentials) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(registrycredentialsResource, c.ns, opts)) + +} + +// Create takes the representation of a registryCredential and creates it. Returns the server's representation of the registryCredential, and an error, if there is any. +func (c *FakeRegistryCredentials) Create(ctx context.Context, registryCredential *v1alpha1.RegistryCredential, opts v1.CreateOptions) (result *v1alpha1.RegistryCredential, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(registrycredentialsResource, c.ns, registryCredential), &v1alpha1.RegistryCredential{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RegistryCredential), err +} + +// Update takes the representation of a registryCredential and updates it. Returns the server's representation of the registryCredential, and an error, if there is any. +func (c *FakeRegistryCredentials) Update(ctx context.Context, registryCredential *v1alpha1.RegistryCredential, opts v1.UpdateOptions) (result *v1alpha1.RegistryCredential, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(registrycredentialsResource, c.ns, registryCredential), &v1alpha1.RegistryCredential{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RegistryCredential), 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 *FakeRegistryCredentials) UpdateStatus(ctx context.Context, registryCredential *v1alpha1.RegistryCredential, opts v1.UpdateOptions) (*v1alpha1.RegistryCredential, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(registrycredentialsResource, "status", c.ns, registryCredential), &v1alpha1.RegistryCredential{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RegistryCredential), err +} + +// Delete takes name of the registryCredential and deletes it. Returns an error if one occurs. +func (c *FakeRegistryCredentials) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(registrycredentialsResource, c.ns, name, opts), &v1alpha1.RegistryCredential{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRegistryCredentials) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(registrycredentialsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.RegistryCredentialList{}) + return err +} + +// Patch applies the patch and returns the patched registryCredential. +func (c *FakeRegistryCredentials) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RegistryCredential, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(registrycredentialsResource, c.ns, name, pt, data, subresources...), &v1alpha1.RegistryCredential{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.RegistryCredential), err +} diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_resourcegroup.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_resourcegroup.go new file mode 100644 index 0000000..aefef4b --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_resourcegroup.go @@ -0,0 +1,141 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/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" +) + +// FakeResourceGroups implements ResourceGroupInterface +type FakeResourceGroups struct { + Fake *FakePlatformV1alpha1 + ns string +} + +var resourcegroupsResource = schema.GroupVersionResource{Group: "platform.plural.sh", Version: "v1alpha1", Resource: "resourcegroups"} + +var resourcegroupsKind = schema.GroupVersionKind{Group: "platform.plural.sh", Version: "v1alpha1", Kind: "ResourceGroup"} + +// Get takes name of the resourceGroup, and returns the corresponding resourceGroup object, and an error if there is any. +func (c *FakeResourceGroups) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceGroup, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(resourcegroupsResource, c.ns, name), &v1alpha1.ResourceGroup{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceGroup), err +} + +// List takes label and field selectors, and returns the list of ResourceGroups that match those selectors. +func (c *FakeResourceGroups) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceGroupList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(resourcegroupsResource, resourcegroupsKind, c.ns, opts), &v1alpha1.ResourceGroupList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ResourceGroupList{ListMeta: obj.(*v1alpha1.ResourceGroupList).ListMeta} + for _, item := range obj.(*v1alpha1.ResourceGroupList).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 resourceGroups. +func (c *FakeResourceGroups) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(resourcegroupsResource, c.ns, opts)) + +} + +// Create takes the representation of a resourceGroup and creates it. Returns the server's representation of the resourceGroup, and an error, if there is any. +func (c *FakeResourceGroups) Create(ctx context.Context, resourceGroup *v1alpha1.ResourceGroup, opts v1.CreateOptions) (result *v1alpha1.ResourceGroup, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(resourcegroupsResource, c.ns, resourceGroup), &v1alpha1.ResourceGroup{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceGroup), err +} + +// Update takes the representation of a resourceGroup and updates it. Returns the server's representation of the resourceGroup, and an error, if there is any. +func (c *FakeResourceGroups) Update(ctx context.Context, resourceGroup *v1alpha1.ResourceGroup, opts v1.UpdateOptions) (result *v1alpha1.ResourceGroup, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(resourcegroupsResource, c.ns, resourceGroup), &v1alpha1.ResourceGroup{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceGroup), 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 *FakeResourceGroups) UpdateStatus(ctx context.Context, resourceGroup *v1alpha1.ResourceGroup, opts v1.UpdateOptions) (*v1alpha1.ResourceGroup, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(resourcegroupsResource, "status", c.ns, resourceGroup), &v1alpha1.ResourceGroup{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceGroup), err +} + +// Delete takes name of the resourceGroup and deletes it. Returns an error if one occurs. +func (c *FakeResourceGroups) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(resourcegroupsResource, c.ns, name, opts), &v1alpha1.ResourceGroup{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeResourceGroups) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(resourcegroupsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ResourceGroupList{}) + return err +} + +// Patch applies the patch and returns the patched resourceGroup. +func (c *FakeResourceGroups) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceGroup, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(resourcegroupsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ResourceGroup{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.ResourceGroup), err +} diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_runbook.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_runbook.go new file mode 100644 index 0000000..56a3039 --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_runbook.go @@ -0,0 +1,141 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/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" +) + +// FakeRunbooks implements RunbookInterface +type FakeRunbooks struct { + Fake *FakePlatformV1alpha1 + ns string +} + +var runbooksResource = schema.GroupVersionResource{Group: "platform.plural.sh", Version: "v1alpha1", Resource: "runbooks"} + +var runbooksKind = schema.GroupVersionKind{Group: "platform.plural.sh", Version: "v1alpha1", Kind: "Runbook"} + +// Get takes name of the runbook, and returns the corresponding runbook object, and an error if there is any. +func (c *FakeRunbooks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Runbook, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(runbooksResource, c.ns, name), &v1alpha1.Runbook{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Runbook), err +} + +// List takes label and field selectors, and returns the list of Runbooks that match those selectors. +func (c *FakeRunbooks) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RunbookList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(runbooksResource, runbooksKind, c.ns, opts), &v1alpha1.RunbookList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.RunbookList{ListMeta: obj.(*v1alpha1.RunbookList).ListMeta} + for _, item := range obj.(*v1alpha1.RunbookList).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 runbooks. +func (c *FakeRunbooks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(runbooksResource, c.ns, opts)) + +} + +// Create takes the representation of a runbook and creates it. Returns the server's representation of the runbook, and an error, if there is any. +func (c *FakeRunbooks) Create(ctx context.Context, runbook *v1alpha1.Runbook, opts v1.CreateOptions) (result *v1alpha1.Runbook, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(runbooksResource, c.ns, runbook), &v1alpha1.Runbook{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Runbook), err +} + +// Update takes the representation of a runbook and updates it. Returns the server's representation of the runbook, and an error, if there is any. +func (c *FakeRunbooks) Update(ctx context.Context, runbook *v1alpha1.Runbook, opts v1.UpdateOptions) (result *v1alpha1.Runbook, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(runbooksResource, c.ns, runbook), &v1alpha1.Runbook{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Runbook), 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 *FakeRunbooks) UpdateStatus(ctx context.Context, runbook *v1alpha1.Runbook, opts v1.UpdateOptions) (*v1alpha1.Runbook, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(runbooksResource, "status", c.ns, runbook), &v1alpha1.Runbook{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Runbook), err +} + +// Delete takes name of the runbook and deletes it. Returns an error if one occurs. +func (c *FakeRunbooks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(runbooksResource, c.ns, name, opts), &v1alpha1.Runbook{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeRunbooks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(runbooksResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.RunbookList{}) + return err +} + +// Patch applies the patch and returns the patched runbook. +func (c *FakeRunbooks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Runbook, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(runbooksResource, c.ns, name, pt, data, subresources...), &v1alpha1.Runbook{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Runbook), err +} diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_secretsync.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_secretsync.go new file mode 100644 index 0000000..2f7584c --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_secretsync.go @@ -0,0 +1,141 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/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" +) + +// FakeSecretSyncs implements SecretSyncInterface +type FakeSecretSyncs struct { + Fake *FakePlatformV1alpha1 + ns string +} + +var secretsyncsResource = schema.GroupVersionResource{Group: "platform.plural.sh", Version: "v1alpha1", Resource: "secretsyncs"} + +var secretsyncsKind = schema.GroupVersionKind{Group: "platform.plural.sh", Version: "v1alpha1", Kind: "SecretSync"} + +// Get takes name of the secretSync, and returns the corresponding secretSync object, and an error if there is any. +func (c *FakeSecretSyncs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.SecretSync, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(secretsyncsResource, c.ns, name), &v1alpha1.SecretSync{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SecretSync), err +} + +// List takes label and field selectors, and returns the list of SecretSyncs that match those selectors. +func (c *FakeSecretSyncs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.SecretSyncList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(secretsyncsResource, secretsyncsKind, c.ns, opts), &v1alpha1.SecretSyncList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.SecretSyncList{ListMeta: obj.(*v1alpha1.SecretSyncList).ListMeta} + for _, item := range obj.(*v1alpha1.SecretSyncList).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 secretSyncs. +func (c *FakeSecretSyncs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(secretsyncsResource, c.ns, opts)) + +} + +// Create takes the representation of a secretSync and creates it. Returns the server's representation of the secretSync, and an error, if there is any. +func (c *FakeSecretSyncs) Create(ctx context.Context, secretSync *v1alpha1.SecretSync, opts v1.CreateOptions) (result *v1alpha1.SecretSync, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(secretsyncsResource, c.ns, secretSync), &v1alpha1.SecretSync{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SecretSync), err +} + +// Update takes the representation of a secretSync and updates it. Returns the server's representation of the secretSync, and an error, if there is any. +func (c *FakeSecretSyncs) Update(ctx context.Context, secretSync *v1alpha1.SecretSync, opts v1.UpdateOptions) (result *v1alpha1.SecretSync, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(secretsyncsResource, c.ns, secretSync), &v1alpha1.SecretSync{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SecretSync), 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 *FakeSecretSyncs) UpdateStatus(ctx context.Context, secretSync *v1alpha1.SecretSync, opts v1.UpdateOptions) (*v1alpha1.SecretSync, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(secretsyncsResource, "status", c.ns, secretSync), &v1alpha1.SecretSync{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SecretSync), err +} + +// Delete takes name of the secretSync and deletes it. Returns an error if one occurs. +func (c *FakeSecretSyncs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(secretsyncsResource, c.ns, name, opts), &v1alpha1.SecretSync{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeSecretSyncs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(secretsyncsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.SecretSyncList{}) + return err +} + +// Patch applies the patch and returns the patched secretSync. +func (c *FakeSecretSyncs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SecretSync, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(secretsyncsResource, c.ns, name, pt, data, subresources...), &v1alpha1.SecretSync{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.SecretSync), err +} diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_slashcommand.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_slashcommand.go similarity index 97% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_slashcommand.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_slashcommand.go index 96ff6c4..13cf216 100644 --- a/generated/platform/clientset/versioned/typed/platform/v1alpha1/fake/fake_slashcommand.go +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_slashcommand.go @@ -116,7 +116,7 @@ func (c *FakeSlashCommands) UpdateStatus(ctx context.Context, slashCommand *v1al // Delete takes name of the slashCommand and deletes it. Returns an error if one occurs. func (c *FakeSlashCommands) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(slashcommandsResource, c.ns, name), &v1alpha1.SlashCommand{}) + Invokes(testing.NewDeleteActionWithOptions(slashcommandsResource, c.ns, name, opts), &v1alpha1.SlashCommand{}) return err } diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_statefulsetresize.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_statefulsetresize.go new file mode 100644 index 0000000..5692a65 --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/fake/fake_statefulsetresize.go @@ -0,0 +1,141 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/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" +) + +// FakeStatefulSetResizes implements StatefulSetResizeInterface +type FakeStatefulSetResizes struct { + Fake *FakePlatformV1alpha1 + ns string +} + +var statefulsetresizesResource = schema.GroupVersionResource{Group: "platform.plural.sh", Version: "v1alpha1", Resource: "statefulsetresizes"} + +var statefulsetresizesKind = schema.GroupVersionKind{Group: "platform.plural.sh", Version: "v1alpha1", Kind: "StatefulSetResize"} + +// Get takes name of the statefulSetResize, and returns the corresponding statefulSetResize object, and an error if there is any. +func (c *FakeStatefulSetResizes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StatefulSetResize, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(statefulsetresizesResource, c.ns, name), &v1alpha1.StatefulSetResize{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StatefulSetResize), err +} + +// List takes label and field selectors, and returns the list of StatefulSetResizes that match those selectors. +func (c *FakeStatefulSetResizes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StatefulSetResizeList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(statefulsetresizesResource, statefulsetresizesKind, c.ns, opts), &v1alpha1.StatefulSetResizeList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.StatefulSetResizeList{ListMeta: obj.(*v1alpha1.StatefulSetResizeList).ListMeta} + for _, item := range obj.(*v1alpha1.StatefulSetResizeList).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 statefulSetResizes. +func (c *FakeStatefulSetResizes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(statefulsetresizesResource, c.ns, opts)) + +} + +// Create takes the representation of a statefulSetResize and creates it. Returns the server's representation of the statefulSetResize, and an error, if there is any. +func (c *FakeStatefulSetResizes) Create(ctx context.Context, statefulSetResize *v1alpha1.StatefulSetResize, opts v1.CreateOptions) (result *v1alpha1.StatefulSetResize, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(statefulsetresizesResource, c.ns, statefulSetResize), &v1alpha1.StatefulSetResize{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StatefulSetResize), err +} + +// Update takes the representation of a statefulSetResize and updates it. Returns the server's representation of the statefulSetResize, and an error, if there is any. +func (c *FakeStatefulSetResizes) Update(ctx context.Context, statefulSetResize *v1alpha1.StatefulSetResize, opts v1.UpdateOptions) (result *v1alpha1.StatefulSetResize, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(statefulsetresizesResource, c.ns, statefulSetResize), &v1alpha1.StatefulSetResize{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StatefulSetResize), 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 *FakeStatefulSetResizes) UpdateStatus(ctx context.Context, statefulSetResize *v1alpha1.StatefulSetResize, opts v1.UpdateOptions) (*v1alpha1.StatefulSetResize, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(statefulsetresizesResource, "status", c.ns, statefulSetResize), &v1alpha1.StatefulSetResize{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StatefulSetResize), err +} + +// Delete takes name of the statefulSetResize and deletes it. Returns an error if one occurs. +func (c *FakeStatefulSetResizes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(statefulsetresizesResource, c.ns, name, opts), &v1alpha1.StatefulSetResize{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeStatefulSetResizes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(statefulsetresizesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.StatefulSetResizeList{}) + return err +} + +// Patch applies the patch and returns the patched statefulSetResize. +func (c *FakeStatefulSetResizes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StatefulSetResize, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(statefulsetresizesResource, c.ns, name, pt, data, subresources...), &v1alpha1.StatefulSetResize{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.StatefulSetResize), err +} diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/generated_expansion.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/generated_expansion.go new file mode 100644 index 0000000..b2c21fa --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/generated_expansion.go @@ -0,0 +1,44 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type ConfigurationOverlayExpansion interface{} + +type DashboardExpansion interface{} + +type DefaultStorageClassExpansion interface{} + +type LicenseExpansion interface{} + +type LogFilterExpansion interface{} + +type LogTailExpansion interface{} + +type ProxyExpansion interface{} + +type RegistryCredentialExpansion interface{} + +type ResourceGroupExpansion interface{} + +type RunbookExpansion interface{} + +type SecretSyncExpansion interface{} + +type SlashCommandExpansion interface{} + +type StatefulSetResizeExpansion interface{} diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/license.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/license.go new file mode 100644 index 0000000..f175e37 --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/license.go @@ -0,0 +1,194 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + scheme "github.com/pluralsh/plural-operator/generated/client/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" +) + +// LicensesGetter has a method to return a LicenseInterface. +// A group's client should implement this interface. +type LicensesGetter interface { + Licenses(namespace string) LicenseInterface +} + +// LicenseInterface has methods to work with License resources. +type LicenseInterface interface { + Create(ctx context.Context, license *v1alpha1.License, opts v1.CreateOptions) (*v1alpha1.License, error) + Update(ctx context.Context, license *v1alpha1.License, opts v1.UpdateOptions) (*v1alpha1.License, error) + UpdateStatus(ctx context.Context, license *v1alpha1.License, opts v1.UpdateOptions) (*v1alpha1.License, 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.License, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.LicenseList, 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.License, err error) + LicenseExpansion +} + +// licenses implements LicenseInterface +type licenses struct { + client rest.Interface + ns string +} + +// newLicenses returns a Licenses +func newLicenses(c *PlatformV1alpha1Client, namespace string) *licenses { + return &licenses{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the license, and returns the corresponding license object, and an error if there is any. +func (c *licenses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.License, err error) { + result = &v1alpha1.License{} + err = c.client.Get(). + Namespace(c.ns). + Resource("licenses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Licenses that match those selectors. +func (c *licenses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.LicenseList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.LicenseList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("licenses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested licenses. +func (c *licenses) 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(). + Namespace(c.ns). + Resource("licenses"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a license and creates it. Returns the server's representation of the license, and an error, if there is any. +func (c *licenses) Create(ctx context.Context, license *v1alpha1.License, opts v1.CreateOptions) (result *v1alpha1.License, err error) { + result = &v1alpha1.License{} + err = c.client.Post(). + Namespace(c.ns). + Resource("licenses"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(license). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a license and updates it. Returns the server's representation of the license, and an error, if there is any. +func (c *licenses) Update(ctx context.Context, license *v1alpha1.License, opts v1.UpdateOptions) (result *v1alpha1.License, err error) { + result = &v1alpha1.License{} + err = c.client.Put(). + Namespace(c.ns). + Resource("licenses"). + Name(license.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(license). + 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 *licenses) UpdateStatus(ctx context.Context, license *v1alpha1.License, opts v1.UpdateOptions) (result *v1alpha1.License, err error) { + result = &v1alpha1.License{} + err = c.client.Put(). + Namespace(c.ns). + Resource("licenses"). + Name(license.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(license). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the license and deletes it. Returns an error if one occurs. +func (c *licenses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("licenses"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *licenses) 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(). + Namespace(c.ns). + Resource("licenses"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched license. +func (c *licenses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.License, err error) { + result = &v1alpha1.License{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("licenses"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/logfilter.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/logfilter.go similarity index 98% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/logfilter.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/logfilter.go index 3e1b124..df84ee3 100644 --- a/generated/platform/clientset/versioned/typed/platform/v1alpha1/logfilter.go +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/logfilter.go @@ -22,7 +22,7 @@ import ( "time" v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" - scheme "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned/scheme" + scheme "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/logtail.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/logtail.go similarity index 98% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/logtail.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/logtail.go index 90e333b..52829bb 100644 --- a/generated/platform/clientset/versioned/typed/platform/v1alpha1/logtail.go +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/logtail.go @@ -22,7 +22,7 @@ import ( "time" v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" - scheme "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned/scheme" + scheme "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/platform_client.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/platform_client.go similarity index 58% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/platform_client.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/platform_client.go index 3df296e..43566c1 100644 --- a/generated/platform/clientset/versioned/typed/platform/v1alpha1/platform_client.go +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/platform_client.go @@ -18,18 +18,28 @@ limitations under the License. package v1alpha1 import ( + "net/http" + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" - "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned/scheme" + "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) type PlatformV1alpha1Interface interface { RESTClient() rest.Interface + ConfigurationOverlaysGetter DashboardsGetter + DefaultStorageClassesGetter + LicensesGetter LogFiltersGetter LogTailsGetter ProxiesGetter + RegistryCredentialsGetter + ResourceGroupsGetter + RunbooksGetter + SecretSyncsGetter SlashCommandsGetter + StatefulSetResizesGetter } // PlatformV1alpha1Client is used to interact with features provided by the platform.plural.sh group. @@ -37,10 +47,22 @@ type PlatformV1alpha1Client struct { restClient rest.Interface } +func (c *PlatformV1alpha1Client) ConfigurationOverlays(namespace string) ConfigurationOverlayInterface { + return newConfigurationOverlays(c, namespace) +} + func (c *PlatformV1alpha1Client) Dashboards(namespace string) DashboardInterface { return newDashboards(c, namespace) } +func (c *PlatformV1alpha1Client) DefaultStorageClasses(namespace string) DefaultStorageClassInterface { + return newDefaultStorageClasses(c, namespace) +} + +func (c *PlatformV1alpha1Client) Licenses(namespace string) LicenseInterface { + return newLicenses(c, namespace) +} + func (c *PlatformV1alpha1Client) LogFilters(namespace string) LogFilterInterface { return newLogFilters(c, namespace) } @@ -53,17 +75,53 @@ func (c *PlatformV1alpha1Client) Proxies(namespace string) ProxyInterface { return newProxies(c, namespace) } +func (c *PlatformV1alpha1Client) RegistryCredentials(namespace string) RegistryCredentialInterface { + return newRegistryCredentials(c, namespace) +} + +func (c *PlatformV1alpha1Client) ResourceGroups(namespace string) ResourceGroupInterface { + return newResourceGroups(c, namespace) +} + +func (c *PlatformV1alpha1Client) Runbooks(namespace string) RunbookInterface { + return newRunbooks(c, namespace) +} + +func (c *PlatformV1alpha1Client) SecretSyncs(namespace string) SecretSyncInterface { + return newSecretSyncs(c, namespace) +} + func (c *PlatformV1alpha1Client) SlashCommands(namespace string) SlashCommandInterface { return newSlashCommands(c, namespace) } +func (c *PlatformV1alpha1Client) StatefulSetResizes(namespace string) StatefulSetResizeInterface { + return newStatefulSetResizes(c, namespace) +} + // NewForConfig creates a new PlatformV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*PlatformV1alpha1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err } - client, err := rest.RESTClientFor(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new PlatformV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*PlatformV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err } diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/proxy.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/proxy.go similarity index 98% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/proxy.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/proxy.go index 8c618d8..3ee68c6 100644 --- a/generated/platform/clientset/versioned/typed/platform/v1alpha1/proxy.go +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/proxy.go @@ -22,7 +22,7 @@ import ( "time" v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" - scheme "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned/scheme" + scheme "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/registrycredential.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/registrycredential.go new file mode 100644 index 0000000..00387c3 --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/registrycredential.go @@ -0,0 +1,194 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + scheme "github.com/pluralsh/plural-operator/generated/client/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" +) + +// RegistryCredentialsGetter has a method to return a RegistryCredentialInterface. +// A group's client should implement this interface. +type RegistryCredentialsGetter interface { + RegistryCredentials(namespace string) RegistryCredentialInterface +} + +// RegistryCredentialInterface has methods to work with RegistryCredential resources. +type RegistryCredentialInterface interface { + Create(ctx context.Context, registryCredential *v1alpha1.RegistryCredential, opts v1.CreateOptions) (*v1alpha1.RegistryCredential, error) + Update(ctx context.Context, registryCredential *v1alpha1.RegistryCredential, opts v1.UpdateOptions) (*v1alpha1.RegistryCredential, error) + UpdateStatus(ctx context.Context, registryCredential *v1alpha1.RegistryCredential, opts v1.UpdateOptions) (*v1alpha1.RegistryCredential, 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.RegistryCredential, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RegistryCredentialList, 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.RegistryCredential, err error) + RegistryCredentialExpansion +} + +// registryCredentials implements RegistryCredentialInterface +type registryCredentials struct { + client rest.Interface + ns string +} + +// newRegistryCredentials returns a RegistryCredentials +func newRegistryCredentials(c *PlatformV1alpha1Client, namespace string) *registryCredentials { + return ®istryCredentials{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the registryCredential, and returns the corresponding registryCredential object, and an error if there is any. +func (c *registryCredentials) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RegistryCredential, err error) { + result = &v1alpha1.RegistryCredential{} + err = c.client.Get(). + Namespace(c.ns). + Resource("registrycredentials"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of RegistryCredentials that match those selectors. +func (c *registryCredentials) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RegistryCredentialList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.RegistryCredentialList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("registrycredentials"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested registryCredentials. +func (c *registryCredentials) 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(). + Namespace(c.ns). + Resource("registrycredentials"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a registryCredential and creates it. Returns the server's representation of the registryCredential, and an error, if there is any. +func (c *registryCredentials) Create(ctx context.Context, registryCredential *v1alpha1.RegistryCredential, opts v1.CreateOptions) (result *v1alpha1.RegistryCredential, err error) { + result = &v1alpha1.RegistryCredential{} + err = c.client.Post(). + Namespace(c.ns). + Resource("registrycredentials"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(registryCredential). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a registryCredential and updates it. Returns the server's representation of the registryCredential, and an error, if there is any. +func (c *registryCredentials) Update(ctx context.Context, registryCredential *v1alpha1.RegistryCredential, opts v1.UpdateOptions) (result *v1alpha1.RegistryCredential, err error) { + result = &v1alpha1.RegistryCredential{} + err = c.client.Put(). + Namespace(c.ns). + Resource("registrycredentials"). + Name(registryCredential.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(registryCredential). + 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 *registryCredentials) UpdateStatus(ctx context.Context, registryCredential *v1alpha1.RegistryCredential, opts v1.UpdateOptions) (result *v1alpha1.RegistryCredential, err error) { + result = &v1alpha1.RegistryCredential{} + err = c.client.Put(). + Namespace(c.ns). + Resource("registrycredentials"). + Name(registryCredential.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(registryCredential). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the registryCredential and deletes it. Returns an error if one occurs. +func (c *registryCredentials) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("registrycredentials"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *registryCredentials) 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(). + Namespace(c.ns). + Resource("registrycredentials"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched registryCredential. +func (c *registryCredentials) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RegistryCredential, err error) { + result = &v1alpha1.RegistryCredential{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("registrycredentials"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/resourcegroup.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/resourcegroup.go new file mode 100644 index 0000000..305d135 --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/resourcegroup.go @@ -0,0 +1,194 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + scheme "github.com/pluralsh/plural-operator/generated/client/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" +) + +// ResourceGroupsGetter has a method to return a ResourceGroupInterface. +// A group's client should implement this interface. +type ResourceGroupsGetter interface { + ResourceGroups(namespace string) ResourceGroupInterface +} + +// ResourceGroupInterface has methods to work with ResourceGroup resources. +type ResourceGroupInterface interface { + Create(ctx context.Context, resourceGroup *v1alpha1.ResourceGroup, opts v1.CreateOptions) (*v1alpha1.ResourceGroup, error) + Update(ctx context.Context, resourceGroup *v1alpha1.ResourceGroup, opts v1.UpdateOptions) (*v1alpha1.ResourceGroup, error) + UpdateStatus(ctx context.Context, resourceGroup *v1alpha1.ResourceGroup, opts v1.UpdateOptions) (*v1alpha1.ResourceGroup, 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.ResourceGroup, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ResourceGroupList, 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.ResourceGroup, err error) + ResourceGroupExpansion +} + +// resourceGroups implements ResourceGroupInterface +type resourceGroups struct { + client rest.Interface + ns string +} + +// newResourceGroups returns a ResourceGroups +func newResourceGroups(c *PlatformV1alpha1Client, namespace string) *resourceGroups { + return &resourceGroups{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the resourceGroup, and returns the corresponding resourceGroup object, and an error if there is any. +func (c *resourceGroups) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceGroup, err error) { + result = &v1alpha1.ResourceGroup{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourcegroups"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ResourceGroups that match those selectors. +func (c *resourceGroups) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceGroupList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.ResourceGroupList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("resourcegroups"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested resourceGroups. +func (c *resourceGroups) 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(). + Namespace(c.ns). + Resource("resourcegroups"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a resourceGroup and creates it. Returns the server's representation of the resourceGroup, and an error, if there is any. +func (c *resourceGroups) Create(ctx context.Context, resourceGroup *v1alpha1.ResourceGroup, opts v1.CreateOptions) (result *v1alpha1.ResourceGroup, err error) { + result = &v1alpha1.ResourceGroup{} + err = c.client.Post(). + Namespace(c.ns). + Resource("resourcegroups"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceGroup). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a resourceGroup and updates it. Returns the server's representation of the resourceGroup, and an error, if there is any. +func (c *resourceGroups) Update(ctx context.Context, resourceGroup *v1alpha1.ResourceGroup, opts v1.UpdateOptions) (result *v1alpha1.ResourceGroup, err error) { + result = &v1alpha1.ResourceGroup{} + err = c.client.Put(). + Namespace(c.ns). + Resource("resourcegroups"). + Name(resourceGroup.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceGroup). + 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 *resourceGroups) UpdateStatus(ctx context.Context, resourceGroup *v1alpha1.ResourceGroup, opts v1.UpdateOptions) (result *v1alpha1.ResourceGroup, err error) { + result = &v1alpha1.ResourceGroup{} + err = c.client.Put(). + Namespace(c.ns). + Resource("resourcegroups"). + Name(resourceGroup.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(resourceGroup). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the resourceGroup and deletes it. Returns an error if one occurs. +func (c *resourceGroups) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("resourcegroups"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *resourceGroups) 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(). + Namespace(c.ns). + Resource("resourcegroups"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched resourceGroup. +func (c *resourceGroups) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceGroup, err error) { + result = &v1alpha1.ResourceGroup{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("resourcegroups"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/runbook.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/runbook.go new file mode 100644 index 0000000..ce64d53 --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/runbook.go @@ -0,0 +1,194 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + scheme "github.com/pluralsh/plural-operator/generated/client/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" +) + +// RunbooksGetter has a method to return a RunbookInterface. +// A group's client should implement this interface. +type RunbooksGetter interface { + Runbooks(namespace string) RunbookInterface +} + +// RunbookInterface has methods to work with Runbook resources. +type RunbookInterface interface { + Create(ctx context.Context, runbook *v1alpha1.Runbook, opts v1.CreateOptions) (*v1alpha1.Runbook, error) + Update(ctx context.Context, runbook *v1alpha1.Runbook, opts v1.UpdateOptions) (*v1alpha1.Runbook, error) + UpdateStatus(ctx context.Context, runbook *v1alpha1.Runbook, opts v1.UpdateOptions) (*v1alpha1.Runbook, 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.Runbook, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RunbookList, 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.Runbook, err error) + RunbookExpansion +} + +// runbooks implements RunbookInterface +type runbooks struct { + client rest.Interface + ns string +} + +// newRunbooks returns a Runbooks +func newRunbooks(c *PlatformV1alpha1Client, namespace string) *runbooks { + return &runbooks{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the runbook, and returns the corresponding runbook object, and an error if there is any. +func (c *runbooks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Runbook, err error) { + result = &v1alpha1.Runbook{} + err = c.client.Get(). + Namespace(c.ns). + Resource("runbooks"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Runbooks that match those selectors. +func (c *runbooks) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RunbookList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.RunbookList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("runbooks"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested runbooks. +func (c *runbooks) 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(). + Namespace(c.ns). + Resource("runbooks"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a runbook and creates it. Returns the server's representation of the runbook, and an error, if there is any. +func (c *runbooks) Create(ctx context.Context, runbook *v1alpha1.Runbook, opts v1.CreateOptions) (result *v1alpha1.Runbook, err error) { + result = &v1alpha1.Runbook{} + err = c.client.Post(). + Namespace(c.ns). + Resource("runbooks"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(runbook). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a runbook and updates it. Returns the server's representation of the runbook, and an error, if there is any. +func (c *runbooks) Update(ctx context.Context, runbook *v1alpha1.Runbook, opts v1.UpdateOptions) (result *v1alpha1.Runbook, err error) { + result = &v1alpha1.Runbook{} + err = c.client.Put(). + Namespace(c.ns). + Resource("runbooks"). + Name(runbook.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(runbook). + 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 *runbooks) UpdateStatus(ctx context.Context, runbook *v1alpha1.Runbook, opts v1.UpdateOptions) (result *v1alpha1.Runbook, err error) { + result = &v1alpha1.Runbook{} + err = c.client.Put(). + Namespace(c.ns). + Resource("runbooks"). + Name(runbook.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(runbook). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the runbook and deletes it. Returns an error if one occurs. +func (c *runbooks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("runbooks"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *runbooks) 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(). + Namespace(c.ns). + Resource("runbooks"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched runbook. +func (c *runbooks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Runbook, err error) { + result = &v1alpha1.Runbook{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("runbooks"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/secretsync.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/secretsync.go new file mode 100644 index 0000000..983fde7 --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/secretsync.go @@ -0,0 +1,194 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + scheme "github.com/pluralsh/plural-operator/generated/client/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" +) + +// SecretSyncsGetter has a method to return a SecretSyncInterface. +// A group's client should implement this interface. +type SecretSyncsGetter interface { + SecretSyncs(namespace string) SecretSyncInterface +} + +// SecretSyncInterface has methods to work with SecretSync resources. +type SecretSyncInterface interface { + Create(ctx context.Context, secretSync *v1alpha1.SecretSync, opts v1.CreateOptions) (*v1alpha1.SecretSync, error) + Update(ctx context.Context, secretSync *v1alpha1.SecretSync, opts v1.UpdateOptions) (*v1alpha1.SecretSync, error) + UpdateStatus(ctx context.Context, secretSync *v1alpha1.SecretSync, opts v1.UpdateOptions) (*v1alpha1.SecretSync, 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.SecretSync, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.SecretSyncList, 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.SecretSync, err error) + SecretSyncExpansion +} + +// secretSyncs implements SecretSyncInterface +type secretSyncs struct { + client rest.Interface + ns string +} + +// newSecretSyncs returns a SecretSyncs +func newSecretSyncs(c *PlatformV1alpha1Client, namespace string) *secretSyncs { + return &secretSyncs{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the secretSync, and returns the corresponding secretSync object, and an error if there is any. +func (c *secretSyncs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.SecretSync, err error) { + result = &v1alpha1.SecretSync{} + err = c.client.Get(). + Namespace(c.ns). + Resource("secretsyncs"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of SecretSyncs that match those selectors. +func (c *secretSyncs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.SecretSyncList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.SecretSyncList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("secretsyncs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested secretSyncs. +func (c *secretSyncs) 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(). + Namespace(c.ns). + Resource("secretsyncs"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a secretSync and creates it. Returns the server's representation of the secretSync, and an error, if there is any. +func (c *secretSyncs) Create(ctx context.Context, secretSync *v1alpha1.SecretSync, opts v1.CreateOptions) (result *v1alpha1.SecretSync, err error) { + result = &v1alpha1.SecretSync{} + err = c.client.Post(). + Namespace(c.ns). + Resource("secretsyncs"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(secretSync). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a secretSync and updates it. Returns the server's representation of the secretSync, and an error, if there is any. +func (c *secretSyncs) Update(ctx context.Context, secretSync *v1alpha1.SecretSync, opts v1.UpdateOptions) (result *v1alpha1.SecretSync, err error) { + result = &v1alpha1.SecretSync{} + err = c.client.Put(). + Namespace(c.ns). + Resource("secretsyncs"). + Name(secretSync.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(secretSync). + 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 *secretSyncs) UpdateStatus(ctx context.Context, secretSync *v1alpha1.SecretSync, opts v1.UpdateOptions) (result *v1alpha1.SecretSync, err error) { + result = &v1alpha1.SecretSync{} + err = c.client.Put(). + Namespace(c.ns). + Resource("secretsyncs"). + Name(secretSync.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(secretSync). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the secretSync and deletes it. Returns an error if one occurs. +func (c *secretSyncs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("secretsyncs"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *secretSyncs) 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(). + Namespace(c.ns). + Resource("secretsyncs"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched secretSync. +func (c *secretSyncs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SecretSync, err error) { + result = &v1alpha1.SecretSync{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("secretsyncs"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/slashcommand.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/slashcommand.go similarity index 98% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/slashcommand.go rename to generated/client/clientset/versioned/typed/platform/v1alpha1/slashcommand.go index 2f4cdd3..a925b9f 100644 --- a/generated/platform/clientset/versioned/typed/platform/v1alpha1/slashcommand.go +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/slashcommand.go @@ -22,7 +22,7 @@ import ( "time" v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" - scheme "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned/scheme" + scheme "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" diff --git a/generated/client/clientset/versioned/typed/platform/v1alpha1/statefulsetresize.go b/generated/client/clientset/versioned/typed/platform/v1alpha1/statefulsetresize.go new file mode 100644 index 0000000..7168901 --- /dev/null +++ b/generated/client/clientset/versioned/typed/platform/v1alpha1/statefulsetresize.go @@ -0,0 +1,194 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + scheme "github.com/pluralsh/plural-operator/generated/client/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" +) + +// StatefulSetResizesGetter has a method to return a StatefulSetResizeInterface. +// A group's client should implement this interface. +type StatefulSetResizesGetter interface { + StatefulSetResizes(namespace string) StatefulSetResizeInterface +} + +// StatefulSetResizeInterface has methods to work with StatefulSetResize resources. +type StatefulSetResizeInterface interface { + Create(ctx context.Context, statefulSetResize *v1alpha1.StatefulSetResize, opts v1.CreateOptions) (*v1alpha1.StatefulSetResize, error) + Update(ctx context.Context, statefulSetResize *v1alpha1.StatefulSetResize, opts v1.UpdateOptions) (*v1alpha1.StatefulSetResize, error) + UpdateStatus(ctx context.Context, statefulSetResize *v1alpha1.StatefulSetResize, opts v1.UpdateOptions) (*v1alpha1.StatefulSetResize, 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.StatefulSetResize, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.StatefulSetResizeList, 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.StatefulSetResize, err error) + StatefulSetResizeExpansion +} + +// statefulSetResizes implements StatefulSetResizeInterface +type statefulSetResizes struct { + client rest.Interface + ns string +} + +// newStatefulSetResizes returns a StatefulSetResizes +func newStatefulSetResizes(c *PlatformV1alpha1Client, namespace string) *statefulSetResizes { + return &statefulSetResizes{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the statefulSetResize, and returns the corresponding statefulSetResize object, and an error if there is any. +func (c *statefulSetResizes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StatefulSetResize, err error) { + result = &v1alpha1.StatefulSetResize{} + err = c.client.Get(). + Namespace(c.ns). + Resource("statefulsetresizes"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of StatefulSetResizes that match those selectors. +func (c *statefulSetResizes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StatefulSetResizeList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.StatefulSetResizeList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("statefulsetresizes"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested statefulSetResizes. +func (c *statefulSetResizes) 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(). + Namespace(c.ns). + Resource("statefulsetresizes"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a statefulSetResize and creates it. Returns the server's representation of the statefulSetResize, and an error, if there is any. +func (c *statefulSetResizes) Create(ctx context.Context, statefulSetResize *v1alpha1.StatefulSetResize, opts v1.CreateOptions) (result *v1alpha1.StatefulSetResize, err error) { + result = &v1alpha1.StatefulSetResize{} + err = c.client.Post(). + Namespace(c.ns). + Resource("statefulsetresizes"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(statefulSetResize). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a statefulSetResize and updates it. Returns the server's representation of the statefulSetResize, and an error, if there is any. +func (c *statefulSetResizes) Update(ctx context.Context, statefulSetResize *v1alpha1.StatefulSetResize, opts v1.UpdateOptions) (result *v1alpha1.StatefulSetResize, err error) { + result = &v1alpha1.StatefulSetResize{} + err = c.client.Put(). + Namespace(c.ns). + Resource("statefulsetresizes"). + Name(statefulSetResize.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(statefulSetResize). + 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 *statefulSetResizes) UpdateStatus(ctx context.Context, statefulSetResize *v1alpha1.StatefulSetResize, opts v1.UpdateOptions) (result *v1alpha1.StatefulSetResize, err error) { + result = &v1alpha1.StatefulSetResize{} + err = c.client.Put(). + Namespace(c.ns). + Resource("statefulsetresizes"). + Name(statefulSetResize.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(statefulSetResize). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the statefulSetResize and deletes it. Returns an error if one occurs. +func (c *statefulSetResizes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("statefulsetresizes"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *statefulSetResizes) 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(). + Namespace(c.ns). + Resource("statefulsetresizes"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched statefulSetResize. +func (c *statefulSetResizes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StatefulSetResize, err error) { + result = &v1alpha1.StatefulSetResize{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("statefulsetresizes"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/generated/client/clientset/versioned/typed/vpn/v1alpha1/doc.go b/generated/client/clientset/versioned/typed/vpn/v1alpha1/doc.go new file mode 100644 index 0000000..7560780 --- /dev/null +++ b/generated/client/clientset/versioned/typed/vpn/v1alpha1/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/generated/client/clientset/versioned/typed/vpn/v1alpha1/fake/doc.go b/generated/client/clientset/versioned/typed/vpn/v1alpha1/fake/doc.go new file mode 100644 index 0000000..2cd4ad1 --- /dev/null +++ b/generated/client/clientset/versioned/typed/vpn/v1alpha1/fake/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/generated/client/clientset/versioned/typed/vpn/v1alpha1/fake/fake_vpn_client.go b/generated/client/clientset/versioned/typed/vpn/v1alpha1/fake/fake_vpn_client.go new file mode 100644 index 0000000..f19b0ee --- /dev/null +++ b/generated/client/clientset/versioned/typed/vpn/v1alpha1/fake/fake_vpn_client.go @@ -0,0 +1,43 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/typed/vpn/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeVpnV1alpha1 struct { + *testing.Fake +} + +func (c *FakeVpnV1alpha1) WireguardPeers(namespace string) v1alpha1.WireguardPeerInterface { + return &FakeWireguardPeers{c, namespace} +} + +func (c *FakeVpnV1alpha1) WireguardServers(namespace string) v1alpha1.WireguardServerInterface { + return &FakeWireguardServers{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeVpnV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/generated/client/clientset/versioned/typed/vpn/v1alpha1/fake/fake_wireguardpeer.go b/generated/client/clientset/versioned/typed/vpn/v1alpha1/fake/fake_wireguardpeer.go new file mode 100644 index 0000000..9812b37 --- /dev/null +++ b/generated/client/clientset/versioned/typed/vpn/v1alpha1/fake/fake_wireguardpeer.go @@ -0,0 +1,141 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/vpn/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" +) + +// FakeWireguardPeers implements WireguardPeerInterface +type FakeWireguardPeers struct { + Fake *FakeVpnV1alpha1 + ns string +} + +var wireguardpeersResource = schema.GroupVersionResource{Group: "vpn.plural.sh", Version: "v1alpha1", Resource: "wireguardpeers"} + +var wireguardpeersKind = schema.GroupVersionKind{Group: "vpn.plural.sh", Version: "v1alpha1", Kind: "WireguardPeer"} + +// Get takes name of the wireguardPeer, and returns the corresponding wireguardPeer object, and an error if there is any. +func (c *FakeWireguardPeers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.WireguardPeer, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(wireguardpeersResource, c.ns, name), &v1alpha1.WireguardPeer{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.WireguardPeer), err +} + +// List takes label and field selectors, and returns the list of WireguardPeers that match those selectors. +func (c *FakeWireguardPeers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.WireguardPeerList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(wireguardpeersResource, wireguardpeersKind, c.ns, opts), &v1alpha1.WireguardPeerList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.WireguardPeerList{ListMeta: obj.(*v1alpha1.WireguardPeerList).ListMeta} + for _, item := range obj.(*v1alpha1.WireguardPeerList).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 wireguardPeers. +func (c *FakeWireguardPeers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(wireguardpeersResource, c.ns, opts)) + +} + +// Create takes the representation of a wireguardPeer and creates it. Returns the server's representation of the wireguardPeer, and an error, if there is any. +func (c *FakeWireguardPeers) Create(ctx context.Context, wireguardPeer *v1alpha1.WireguardPeer, opts v1.CreateOptions) (result *v1alpha1.WireguardPeer, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(wireguardpeersResource, c.ns, wireguardPeer), &v1alpha1.WireguardPeer{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.WireguardPeer), err +} + +// Update takes the representation of a wireguardPeer and updates it. Returns the server's representation of the wireguardPeer, and an error, if there is any. +func (c *FakeWireguardPeers) Update(ctx context.Context, wireguardPeer *v1alpha1.WireguardPeer, opts v1.UpdateOptions) (result *v1alpha1.WireguardPeer, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(wireguardpeersResource, c.ns, wireguardPeer), &v1alpha1.WireguardPeer{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.WireguardPeer), 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 *FakeWireguardPeers) UpdateStatus(ctx context.Context, wireguardPeer *v1alpha1.WireguardPeer, opts v1.UpdateOptions) (*v1alpha1.WireguardPeer, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(wireguardpeersResource, "status", c.ns, wireguardPeer), &v1alpha1.WireguardPeer{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.WireguardPeer), err +} + +// Delete takes name of the wireguardPeer and deletes it. Returns an error if one occurs. +func (c *FakeWireguardPeers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(wireguardpeersResource, c.ns, name, opts), &v1alpha1.WireguardPeer{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeWireguardPeers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(wireguardpeersResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.WireguardPeerList{}) + return err +} + +// Patch applies the patch and returns the patched wireguardPeer. +func (c *FakeWireguardPeers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.WireguardPeer, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(wireguardpeersResource, c.ns, name, pt, data, subresources...), &v1alpha1.WireguardPeer{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.WireguardPeer), err +} diff --git a/generated/client/clientset/versioned/typed/vpn/v1alpha1/fake/fake_wireguardserver.go b/generated/client/clientset/versioned/typed/vpn/v1alpha1/fake/fake_wireguardserver.go new file mode 100644 index 0000000..53ebcf2 --- /dev/null +++ b/generated/client/clientset/versioned/typed/vpn/v1alpha1/fake/fake_wireguardserver.go @@ -0,0 +1,141 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/vpn/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" +) + +// FakeWireguardServers implements WireguardServerInterface +type FakeWireguardServers struct { + Fake *FakeVpnV1alpha1 + ns string +} + +var wireguardserversResource = schema.GroupVersionResource{Group: "vpn.plural.sh", Version: "v1alpha1", Resource: "wireguardservers"} + +var wireguardserversKind = schema.GroupVersionKind{Group: "vpn.plural.sh", Version: "v1alpha1", Kind: "WireguardServer"} + +// Get takes name of the wireguardServer, and returns the corresponding wireguardServer object, and an error if there is any. +func (c *FakeWireguardServers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.WireguardServer, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(wireguardserversResource, c.ns, name), &v1alpha1.WireguardServer{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.WireguardServer), err +} + +// List takes label and field selectors, and returns the list of WireguardServers that match those selectors. +func (c *FakeWireguardServers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.WireguardServerList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(wireguardserversResource, wireguardserversKind, c.ns, opts), &v1alpha1.WireguardServerList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.WireguardServerList{ListMeta: obj.(*v1alpha1.WireguardServerList).ListMeta} + for _, item := range obj.(*v1alpha1.WireguardServerList).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 wireguardServers. +func (c *FakeWireguardServers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(wireguardserversResource, c.ns, opts)) + +} + +// Create takes the representation of a wireguardServer and creates it. Returns the server's representation of the wireguardServer, and an error, if there is any. +func (c *FakeWireguardServers) Create(ctx context.Context, wireguardServer *v1alpha1.WireguardServer, opts v1.CreateOptions) (result *v1alpha1.WireguardServer, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(wireguardserversResource, c.ns, wireguardServer), &v1alpha1.WireguardServer{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.WireguardServer), err +} + +// Update takes the representation of a wireguardServer and updates it. Returns the server's representation of the wireguardServer, and an error, if there is any. +func (c *FakeWireguardServers) Update(ctx context.Context, wireguardServer *v1alpha1.WireguardServer, opts v1.UpdateOptions) (result *v1alpha1.WireguardServer, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(wireguardserversResource, c.ns, wireguardServer), &v1alpha1.WireguardServer{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.WireguardServer), 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 *FakeWireguardServers) UpdateStatus(ctx context.Context, wireguardServer *v1alpha1.WireguardServer, opts v1.UpdateOptions) (*v1alpha1.WireguardServer, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(wireguardserversResource, "status", c.ns, wireguardServer), &v1alpha1.WireguardServer{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.WireguardServer), err +} + +// Delete takes name of the wireguardServer and deletes it. Returns an error if one occurs. +func (c *FakeWireguardServers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(wireguardserversResource, c.ns, name, opts), &v1alpha1.WireguardServer{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeWireguardServers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(wireguardserversResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.WireguardServerList{}) + return err +} + +// Patch applies the patch and returns the patched wireguardServer. +func (c *FakeWireguardServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.WireguardServer, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(wireguardserversResource, c.ns, name, pt, data, subresources...), &v1alpha1.WireguardServer{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.WireguardServer), err +} diff --git a/generated/platform/clientset/versioned/typed/platform/v1alpha1/generated_expansion.go b/generated/client/clientset/versioned/typed/vpn/v1alpha1/generated_expansion.go similarity index 77% rename from generated/platform/clientset/versioned/typed/platform/v1alpha1/generated_expansion.go rename to generated/client/clientset/versioned/typed/vpn/v1alpha1/generated_expansion.go index 7cc8350..97dff95 100644 --- a/generated/platform/clientset/versioned/typed/platform/v1alpha1/generated_expansion.go +++ b/generated/client/clientset/versioned/typed/vpn/v1alpha1/generated_expansion.go @@ -17,12 +17,6 @@ limitations under the License. package v1alpha1 -type DashboardExpansion interface{} +type WireguardPeerExpansion interface{} -type LogFilterExpansion interface{} - -type LogTailExpansion interface{} - -type ProxyExpansion interface{} - -type SlashCommandExpansion interface{} +type WireguardServerExpansion interface{} diff --git a/generated/client/clientset/versioned/typed/vpn/v1alpha1/vpn_client.go b/generated/client/clientset/versioned/typed/vpn/v1alpha1/vpn_client.go new file mode 100644 index 0000000..a158daa --- /dev/null +++ b/generated/client/clientset/versioned/typed/vpn/v1alpha1/vpn_client.go @@ -0,0 +1,111 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "net/http" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/vpn/v1alpha1" + "github.com/pluralsh/plural-operator/generated/client/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type VpnV1alpha1Interface interface { + RESTClient() rest.Interface + WireguardPeersGetter + WireguardServersGetter +} + +// VpnV1alpha1Client is used to interact with features provided by the vpn.plural.sh group. +type VpnV1alpha1Client struct { + restClient rest.Interface +} + +func (c *VpnV1alpha1Client) WireguardPeers(namespace string) WireguardPeerInterface { + return newWireguardPeers(c, namespace) +} + +func (c *VpnV1alpha1Client) WireguardServers(namespace string) WireguardServerInterface { + return newWireguardServers(c, namespace) +} + +// NewForConfig creates a new VpnV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*VpnV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new VpnV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*VpnV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &VpnV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new VpnV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *VpnV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new VpnV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *VpnV1alpha1Client { + return &VpnV1alpha1Client{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 *VpnV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/generated/client/clientset/versioned/typed/vpn/v1alpha1/wireguardpeer.go b/generated/client/clientset/versioned/typed/vpn/v1alpha1/wireguardpeer.go new file mode 100644 index 0000000..5d8bcd2 --- /dev/null +++ b/generated/client/clientset/versioned/typed/vpn/v1alpha1/wireguardpeer.go @@ -0,0 +1,194 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/vpn/v1alpha1" + scheme "github.com/pluralsh/plural-operator/generated/client/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" +) + +// WireguardPeersGetter has a method to return a WireguardPeerInterface. +// A group's client should implement this interface. +type WireguardPeersGetter interface { + WireguardPeers(namespace string) WireguardPeerInterface +} + +// WireguardPeerInterface has methods to work with WireguardPeer resources. +type WireguardPeerInterface interface { + Create(ctx context.Context, wireguardPeer *v1alpha1.WireguardPeer, opts v1.CreateOptions) (*v1alpha1.WireguardPeer, error) + Update(ctx context.Context, wireguardPeer *v1alpha1.WireguardPeer, opts v1.UpdateOptions) (*v1alpha1.WireguardPeer, error) + UpdateStatus(ctx context.Context, wireguardPeer *v1alpha1.WireguardPeer, opts v1.UpdateOptions) (*v1alpha1.WireguardPeer, 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.WireguardPeer, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.WireguardPeerList, 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.WireguardPeer, err error) + WireguardPeerExpansion +} + +// wireguardPeers implements WireguardPeerInterface +type wireguardPeers struct { + client rest.Interface + ns string +} + +// newWireguardPeers returns a WireguardPeers +func newWireguardPeers(c *VpnV1alpha1Client, namespace string) *wireguardPeers { + return &wireguardPeers{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the wireguardPeer, and returns the corresponding wireguardPeer object, and an error if there is any. +func (c *wireguardPeers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.WireguardPeer, err error) { + result = &v1alpha1.WireguardPeer{} + err = c.client.Get(). + Namespace(c.ns). + Resource("wireguardpeers"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of WireguardPeers that match those selectors. +func (c *wireguardPeers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.WireguardPeerList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.WireguardPeerList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("wireguardpeers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested wireguardPeers. +func (c *wireguardPeers) 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(). + Namespace(c.ns). + Resource("wireguardpeers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a wireguardPeer and creates it. Returns the server's representation of the wireguardPeer, and an error, if there is any. +func (c *wireguardPeers) Create(ctx context.Context, wireguardPeer *v1alpha1.WireguardPeer, opts v1.CreateOptions) (result *v1alpha1.WireguardPeer, err error) { + result = &v1alpha1.WireguardPeer{} + err = c.client.Post(). + Namespace(c.ns). + Resource("wireguardpeers"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(wireguardPeer). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a wireguardPeer and updates it. Returns the server's representation of the wireguardPeer, and an error, if there is any. +func (c *wireguardPeers) Update(ctx context.Context, wireguardPeer *v1alpha1.WireguardPeer, opts v1.UpdateOptions) (result *v1alpha1.WireguardPeer, err error) { + result = &v1alpha1.WireguardPeer{} + err = c.client.Put(). + Namespace(c.ns). + Resource("wireguardpeers"). + Name(wireguardPeer.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(wireguardPeer). + 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 *wireguardPeers) UpdateStatus(ctx context.Context, wireguardPeer *v1alpha1.WireguardPeer, opts v1.UpdateOptions) (result *v1alpha1.WireguardPeer, err error) { + result = &v1alpha1.WireguardPeer{} + err = c.client.Put(). + Namespace(c.ns). + Resource("wireguardpeers"). + Name(wireguardPeer.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(wireguardPeer). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the wireguardPeer and deletes it. Returns an error if one occurs. +func (c *wireguardPeers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("wireguardpeers"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *wireguardPeers) 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(). + Namespace(c.ns). + Resource("wireguardpeers"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched wireguardPeer. +func (c *wireguardPeers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.WireguardPeer, err error) { + result = &v1alpha1.WireguardPeer{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("wireguardpeers"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/generated/client/clientset/versioned/typed/vpn/v1alpha1/wireguardserver.go b/generated/client/clientset/versioned/typed/vpn/v1alpha1/wireguardserver.go new file mode 100644 index 0000000..f4900ac --- /dev/null +++ b/generated/client/clientset/versioned/typed/vpn/v1alpha1/wireguardserver.go @@ -0,0 +1,194 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/pluralsh/plural-operator/apis/vpn/v1alpha1" + scheme "github.com/pluralsh/plural-operator/generated/client/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" +) + +// WireguardServersGetter has a method to return a WireguardServerInterface. +// A group's client should implement this interface. +type WireguardServersGetter interface { + WireguardServers(namespace string) WireguardServerInterface +} + +// WireguardServerInterface has methods to work with WireguardServer resources. +type WireguardServerInterface interface { + Create(ctx context.Context, wireguardServer *v1alpha1.WireguardServer, opts v1.CreateOptions) (*v1alpha1.WireguardServer, error) + Update(ctx context.Context, wireguardServer *v1alpha1.WireguardServer, opts v1.UpdateOptions) (*v1alpha1.WireguardServer, error) + UpdateStatus(ctx context.Context, wireguardServer *v1alpha1.WireguardServer, opts v1.UpdateOptions) (*v1alpha1.WireguardServer, 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.WireguardServer, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.WireguardServerList, 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.WireguardServer, err error) + WireguardServerExpansion +} + +// wireguardServers implements WireguardServerInterface +type wireguardServers struct { + client rest.Interface + ns string +} + +// newWireguardServers returns a WireguardServers +func newWireguardServers(c *VpnV1alpha1Client, namespace string) *wireguardServers { + return &wireguardServers{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the wireguardServer, and returns the corresponding wireguardServer object, and an error if there is any. +func (c *wireguardServers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.WireguardServer, err error) { + result = &v1alpha1.WireguardServer{} + err = c.client.Get(). + Namespace(c.ns). + Resource("wireguardservers"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of WireguardServers that match those selectors. +func (c *wireguardServers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.WireguardServerList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.WireguardServerList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("wireguardservers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested wireguardServers. +func (c *wireguardServers) 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(). + Namespace(c.ns). + Resource("wireguardservers"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a wireguardServer and creates it. Returns the server's representation of the wireguardServer, and an error, if there is any. +func (c *wireguardServers) Create(ctx context.Context, wireguardServer *v1alpha1.WireguardServer, opts v1.CreateOptions) (result *v1alpha1.WireguardServer, err error) { + result = &v1alpha1.WireguardServer{} + err = c.client.Post(). + Namespace(c.ns). + Resource("wireguardservers"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(wireguardServer). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a wireguardServer and updates it. Returns the server's representation of the wireguardServer, and an error, if there is any. +func (c *wireguardServers) Update(ctx context.Context, wireguardServer *v1alpha1.WireguardServer, opts v1.UpdateOptions) (result *v1alpha1.WireguardServer, err error) { + result = &v1alpha1.WireguardServer{} + err = c.client.Put(). + Namespace(c.ns). + Resource("wireguardservers"). + Name(wireguardServer.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(wireguardServer). + 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 *wireguardServers) UpdateStatus(ctx context.Context, wireguardServer *v1alpha1.WireguardServer, opts v1.UpdateOptions) (result *v1alpha1.WireguardServer, err error) { + result = &v1alpha1.WireguardServer{} + err = c.client.Put(). + Namespace(c.ns). + Resource("wireguardservers"). + Name(wireguardServer.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(wireguardServer). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the wireguardServer and deletes it. Returns an error if one occurs. +func (c *wireguardServers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("wireguardservers"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *wireguardServers) 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(). + Namespace(c.ns). + Resource("wireguardservers"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched wireguardServer. +func (c *wireguardServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.WireguardServer, err error) { + result = &v1alpha1.WireguardServer{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("wireguardservers"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/generated/platform/informers/externalversions/factory.go b/generated/client/informers/externalversions/factory.go similarity index 93% rename from generated/platform/informers/externalversions/factory.go rename to generated/client/informers/externalversions/factory.go index f2350f6..3fb39ac 100644 --- a/generated/platform/informers/externalversions/factory.go +++ b/generated/client/informers/externalversions/factory.go @@ -22,9 +22,10 @@ import ( sync "sync" time "time" - versioned "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned" - internalinterfaces "github.com/pluralsh/plural-operator/generated/platform/informers/externalversions/internalinterfaces" - platform "github.com/pluralsh/plural-operator/generated/platform/informers/externalversions/platform" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + platform "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/platform" + vpn "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/vpn" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -172,8 +173,13 @@ type SharedInformerFactory interface { WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool Platform() platform.Interface + Vpn() vpn.Interface } func (f *sharedInformerFactory) Platform() platform.Interface { return platform.New(f, f.namespace, f.tweakListOptions) } + +func (f *sharedInformerFactory) Vpn() vpn.Interface { + return vpn.New(f, f.namespace, f.tweakListOptions) +} diff --git a/generated/platform/informers/externalversions/generic.go b/generated/client/informers/externalversions/generic.go similarity index 56% rename from generated/platform/informers/externalversions/generic.go rename to generated/client/informers/externalversions/generic.go index 923ba93..78bf5f2 100644 --- a/generated/platform/informers/externalversions/generic.go +++ b/generated/client/informers/externalversions/generic.go @@ -21,6 +21,7 @@ import ( "fmt" v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + vpnv1alpha1 "github.com/pluralsh/plural-operator/apis/vpn/v1alpha1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -52,16 +53,38 @@ func (f *genericInformer) Lister() cache.GenericLister { func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { // Group=platform.plural.sh, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("configurationoverlays"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Platform().V1alpha1().ConfigurationOverlays().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("dashboards"): return &genericInformer{resource: resource.GroupResource(), informer: f.Platform().V1alpha1().Dashboards().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("defaultstorageclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Platform().V1alpha1().DefaultStorageClasses().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("licenses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Platform().V1alpha1().Licenses().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("logfilters"): return &genericInformer{resource: resource.GroupResource(), informer: f.Platform().V1alpha1().LogFilters().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("logtails"): return &genericInformer{resource: resource.GroupResource(), informer: f.Platform().V1alpha1().LogTails().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("proxies"): return &genericInformer{resource: resource.GroupResource(), informer: f.Platform().V1alpha1().Proxies().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("registrycredentials"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Platform().V1alpha1().RegistryCredentials().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("resourcegroups"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Platform().V1alpha1().ResourceGroups().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("runbooks"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Platform().V1alpha1().Runbooks().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("secretsyncs"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Platform().V1alpha1().SecretSyncs().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("slashcommands"): return &genericInformer{resource: resource.GroupResource(), informer: f.Platform().V1alpha1().SlashCommands().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("statefulsetresizes"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Platform().V1alpha1().StatefulSetResizes().Informer()}, nil + + // Group=vpn.plural.sh, Version=v1alpha1 + case vpnv1alpha1.SchemeGroupVersion.WithResource("wireguardpeers"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Vpn().V1alpha1().WireguardPeers().Informer()}, nil + case vpnv1alpha1.SchemeGroupVersion.WithResource("wireguardservers"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Vpn().V1alpha1().WireguardServers().Informer()}, nil } diff --git a/generated/platform/informers/externalversions/internalinterfaces/factory_interfaces.go b/generated/client/informers/externalversions/internalinterfaces/factory_interfaces.go similarity index 93% rename from generated/platform/informers/externalversions/internalinterfaces/factory_interfaces.go rename to generated/client/informers/externalversions/internalinterfaces/factory_interfaces.go index 05551b1..25f4d02 100644 --- a/generated/platform/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/generated/client/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -20,7 +20,7 @@ package internalinterfaces import ( time "time" - versioned "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" cache "k8s.io/client-go/tools/cache" diff --git a/generated/platform/informers/externalversions/platform/interface.go b/generated/client/informers/externalversions/platform/interface.go similarity index 89% rename from generated/platform/informers/externalversions/platform/interface.go rename to generated/client/informers/externalversions/platform/interface.go index 111bc79..36a9684 100644 --- a/generated/platform/informers/externalversions/platform/interface.go +++ b/generated/client/informers/externalversions/platform/interface.go @@ -18,8 +18,8 @@ limitations under the License. package platform import ( - internalinterfaces "github.com/pluralsh/plural-operator/generated/platform/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/pluralsh/plural-operator/generated/platform/informers/externalversions/platform/v1alpha1" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/platform/v1alpha1" ) // Interface provides access to each of this group's versions. diff --git a/generated/client/informers/externalversions/platform/v1alpha1/configurationoverlay.go b/generated/client/informers/externalversions/platform/v1alpha1/configurationoverlay.go new file mode 100644 index 0000000..676c40f --- /dev/null +++ b/generated/client/informers/externalversions/platform/v1alpha1/configurationoverlay.go @@ -0,0 +1,89 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/platform/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" +) + +// ConfigurationOverlayInformer provides access to a shared informer and lister for +// ConfigurationOverlays. +type ConfigurationOverlayInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ConfigurationOverlayLister +} + +type configurationOverlayInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewConfigurationOverlayInformer constructs a new informer for ConfigurationOverlay 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 NewConfigurationOverlayInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredConfigurationOverlayInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredConfigurationOverlayInformer constructs a new informer for ConfigurationOverlay 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 NewFilteredConfigurationOverlayInformer(client versioned.Interface, namespace string, 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.PlatformV1alpha1().ConfigurationOverlays(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.PlatformV1alpha1().ConfigurationOverlays(namespace).Watch(context.TODO(), options) + }, + }, + &platformv1alpha1.ConfigurationOverlay{}, + resyncPeriod, + indexers, + ) +} + +func (f *configurationOverlayInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredConfigurationOverlayInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *configurationOverlayInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&platformv1alpha1.ConfigurationOverlay{}, f.defaultInformer) +} + +func (f *configurationOverlayInformer) Lister() v1alpha1.ConfigurationOverlayLister { + return v1alpha1.NewConfigurationOverlayLister(f.Informer().GetIndexer()) +} diff --git a/generated/platform/informers/externalversions/platform/v1alpha1/dashboard.go b/generated/client/informers/externalversions/platform/v1alpha1/dashboard.go similarity index 93% rename from generated/platform/informers/externalversions/platform/v1alpha1/dashboard.go rename to generated/client/informers/externalversions/platform/v1alpha1/dashboard.go index cf05487..0dffaea 100644 --- a/generated/platform/informers/externalversions/platform/v1alpha1/dashboard.go +++ b/generated/client/informers/externalversions/platform/v1alpha1/dashboard.go @@ -22,9 +22,9 @@ import ( time "time" platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" - versioned "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned" - internalinterfaces "github.com/pluralsh/plural-operator/generated/platform/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/pluralsh/plural-operator/generated/platform/listers/platform/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/platform/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" diff --git a/generated/client/informers/externalversions/platform/v1alpha1/defaultstorageclass.go b/generated/client/informers/externalversions/platform/v1alpha1/defaultstorageclass.go new file mode 100644 index 0000000..f783ec4 --- /dev/null +++ b/generated/client/informers/externalversions/platform/v1alpha1/defaultstorageclass.go @@ -0,0 +1,89 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/platform/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" +) + +// DefaultStorageClassInformer provides access to a shared informer and lister for +// DefaultStorageClasses. +type DefaultStorageClassInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.DefaultStorageClassLister +} + +type defaultStorageClassInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewDefaultStorageClassInformer constructs a new informer for DefaultStorageClass 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 NewDefaultStorageClassInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredDefaultStorageClassInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredDefaultStorageClassInformer constructs a new informer for DefaultStorageClass 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 NewFilteredDefaultStorageClassInformer(client versioned.Interface, namespace string, 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.PlatformV1alpha1().DefaultStorageClasses(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.PlatformV1alpha1().DefaultStorageClasses(namespace).Watch(context.TODO(), options) + }, + }, + &platformv1alpha1.DefaultStorageClass{}, + resyncPeriod, + indexers, + ) +} + +func (f *defaultStorageClassInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredDefaultStorageClassInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *defaultStorageClassInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&platformv1alpha1.DefaultStorageClass{}, f.defaultInformer) +} + +func (f *defaultStorageClassInformer) Lister() v1alpha1.DefaultStorageClassLister { + return v1alpha1.NewDefaultStorageClassLister(f.Informer().GetIndexer()) +} diff --git a/generated/client/informers/externalversions/platform/v1alpha1/interface.go b/generated/client/informers/externalversions/platform/v1alpha1/interface.go new file mode 100644 index 0000000..e9bebb5 --- /dev/null +++ b/generated/client/informers/externalversions/platform/v1alpha1/interface.go @@ -0,0 +1,128 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // ConfigurationOverlays returns a ConfigurationOverlayInformer. + ConfigurationOverlays() ConfigurationOverlayInformer + // Dashboards returns a DashboardInformer. + Dashboards() DashboardInformer + // DefaultStorageClasses returns a DefaultStorageClassInformer. + DefaultStorageClasses() DefaultStorageClassInformer + // Licenses returns a LicenseInformer. + Licenses() LicenseInformer + // LogFilters returns a LogFilterInformer. + LogFilters() LogFilterInformer + // LogTails returns a LogTailInformer. + LogTails() LogTailInformer + // Proxies returns a ProxyInformer. + Proxies() ProxyInformer + // RegistryCredentials returns a RegistryCredentialInformer. + RegistryCredentials() RegistryCredentialInformer + // ResourceGroups returns a ResourceGroupInformer. + ResourceGroups() ResourceGroupInformer + // Runbooks returns a RunbookInformer. + Runbooks() RunbookInformer + // SecretSyncs returns a SecretSyncInformer. + SecretSyncs() SecretSyncInformer + // SlashCommands returns a SlashCommandInformer. + SlashCommands() SlashCommandInformer + // StatefulSetResizes returns a StatefulSetResizeInformer. + StatefulSetResizes() StatefulSetResizeInformer +} + +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} +} + +// ConfigurationOverlays returns a ConfigurationOverlayInformer. +func (v *version) ConfigurationOverlays() ConfigurationOverlayInformer { + return &configurationOverlayInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// Dashboards returns a DashboardInformer. +func (v *version) Dashboards() DashboardInformer { + return &dashboardInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// DefaultStorageClasses returns a DefaultStorageClassInformer. +func (v *version) DefaultStorageClasses() DefaultStorageClassInformer { + return &defaultStorageClassInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// Licenses returns a LicenseInformer. +func (v *version) Licenses() LicenseInformer { + return &licenseInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// LogFilters returns a LogFilterInformer. +func (v *version) LogFilters() LogFilterInformer { + return &logFilterInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// LogTails returns a LogTailInformer. +func (v *version) LogTails() LogTailInformer { + return &logTailInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// Proxies returns a ProxyInformer. +func (v *version) Proxies() ProxyInformer { + return &proxyInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// RegistryCredentials returns a RegistryCredentialInformer. +func (v *version) RegistryCredentials() RegistryCredentialInformer { + return ®istryCredentialInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// ResourceGroups returns a ResourceGroupInformer. +func (v *version) ResourceGroups() ResourceGroupInformer { + return &resourceGroupInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// Runbooks returns a RunbookInformer. +func (v *version) Runbooks() RunbookInformer { + return &runbookInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// SecretSyncs returns a SecretSyncInformer. +func (v *version) SecretSyncs() SecretSyncInformer { + return &secretSyncInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// SlashCommands returns a SlashCommandInformer. +func (v *version) SlashCommands() SlashCommandInformer { + return &slashCommandInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// StatefulSetResizes returns a StatefulSetResizeInformer. +func (v *version) StatefulSetResizes() StatefulSetResizeInformer { + return &statefulSetResizeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/generated/client/informers/externalversions/platform/v1alpha1/license.go b/generated/client/informers/externalversions/platform/v1alpha1/license.go new file mode 100644 index 0000000..30c910a --- /dev/null +++ b/generated/client/informers/externalversions/platform/v1alpha1/license.go @@ -0,0 +1,89 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/platform/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" +) + +// LicenseInformer provides access to a shared informer and lister for +// Licenses. +type LicenseInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.LicenseLister +} + +type licenseInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewLicenseInformer constructs a new informer for License 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 NewLicenseInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredLicenseInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredLicenseInformer constructs a new informer for License 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 NewFilteredLicenseInformer(client versioned.Interface, namespace string, 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.PlatformV1alpha1().Licenses(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.PlatformV1alpha1().Licenses(namespace).Watch(context.TODO(), options) + }, + }, + &platformv1alpha1.License{}, + resyncPeriod, + indexers, + ) +} + +func (f *licenseInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredLicenseInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *licenseInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&platformv1alpha1.License{}, f.defaultInformer) +} + +func (f *licenseInformer) Lister() v1alpha1.LicenseLister { + return v1alpha1.NewLicenseLister(f.Informer().GetIndexer()) +} diff --git a/generated/platform/informers/externalversions/platform/v1alpha1/logfilter.go b/generated/client/informers/externalversions/platform/v1alpha1/logfilter.go similarity index 93% rename from generated/platform/informers/externalversions/platform/v1alpha1/logfilter.go rename to generated/client/informers/externalversions/platform/v1alpha1/logfilter.go index b9b9b09..f70621f 100644 --- a/generated/platform/informers/externalversions/platform/v1alpha1/logfilter.go +++ b/generated/client/informers/externalversions/platform/v1alpha1/logfilter.go @@ -22,9 +22,9 @@ import ( time "time" platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" - versioned "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned" - internalinterfaces "github.com/pluralsh/plural-operator/generated/platform/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/pluralsh/plural-operator/generated/platform/listers/platform/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/platform/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" diff --git a/generated/platform/informers/externalversions/platform/v1alpha1/logtail.go b/generated/client/informers/externalversions/platform/v1alpha1/logtail.go similarity index 93% rename from generated/platform/informers/externalversions/platform/v1alpha1/logtail.go rename to generated/client/informers/externalversions/platform/v1alpha1/logtail.go index 32212f8..eb22e0e 100644 --- a/generated/platform/informers/externalversions/platform/v1alpha1/logtail.go +++ b/generated/client/informers/externalversions/platform/v1alpha1/logtail.go @@ -22,9 +22,9 @@ import ( time "time" platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" - versioned "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned" - internalinterfaces "github.com/pluralsh/plural-operator/generated/platform/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/pluralsh/plural-operator/generated/platform/listers/platform/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/platform/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" diff --git a/generated/platform/informers/externalversions/platform/v1alpha1/proxy.go b/generated/client/informers/externalversions/platform/v1alpha1/proxy.go similarity index 93% rename from generated/platform/informers/externalversions/platform/v1alpha1/proxy.go rename to generated/client/informers/externalversions/platform/v1alpha1/proxy.go index 873d8ab..8b13fc0 100644 --- a/generated/platform/informers/externalversions/platform/v1alpha1/proxy.go +++ b/generated/client/informers/externalversions/platform/v1alpha1/proxy.go @@ -22,9 +22,9 @@ import ( time "time" platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" - versioned "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned" - internalinterfaces "github.com/pluralsh/plural-operator/generated/platform/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/pluralsh/plural-operator/generated/platform/listers/platform/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/platform/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" diff --git a/generated/client/informers/externalversions/platform/v1alpha1/registrycredential.go b/generated/client/informers/externalversions/platform/v1alpha1/registrycredential.go new file mode 100644 index 0000000..d08ab4f --- /dev/null +++ b/generated/client/informers/externalversions/platform/v1alpha1/registrycredential.go @@ -0,0 +1,89 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/platform/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" +) + +// RegistryCredentialInformer provides access to a shared informer and lister for +// RegistryCredentials. +type RegistryCredentialInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.RegistryCredentialLister +} + +type registryCredentialInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewRegistryCredentialInformer constructs a new informer for RegistryCredential 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 NewRegistryCredentialInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredRegistryCredentialInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredRegistryCredentialInformer constructs a new informer for RegistryCredential 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 NewFilteredRegistryCredentialInformer(client versioned.Interface, namespace string, 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.PlatformV1alpha1().RegistryCredentials(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.PlatformV1alpha1().RegistryCredentials(namespace).Watch(context.TODO(), options) + }, + }, + &platformv1alpha1.RegistryCredential{}, + resyncPeriod, + indexers, + ) +} + +func (f *registryCredentialInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredRegistryCredentialInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *registryCredentialInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&platformv1alpha1.RegistryCredential{}, f.defaultInformer) +} + +func (f *registryCredentialInformer) Lister() v1alpha1.RegistryCredentialLister { + return v1alpha1.NewRegistryCredentialLister(f.Informer().GetIndexer()) +} diff --git a/generated/client/informers/externalversions/platform/v1alpha1/resourcegroup.go b/generated/client/informers/externalversions/platform/v1alpha1/resourcegroup.go new file mode 100644 index 0000000..89312dc --- /dev/null +++ b/generated/client/informers/externalversions/platform/v1alpha1/resourcegroup.go @@ -0,0 +1,89 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/platform/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" +) + +// ResourceGroupInformer provides access to a shared informer and lister for +// ResourceGroups. +type ResourceGroupInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.ResourceGroupLister +} + +type resourceGroupInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewResourceGroupInformer constructs a new informer for ResourceGroup 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 NewResourceGroupInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredResourceGroupInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredResourceGroupInformer constructs a new informer for ResourceGroup 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 NewFilteredResourceGroupInformer(client versioned.Interface, namespace string, 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.PlatformV1alpha1().ResourceGroups(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.PlatformV1alpha1().ResourceGroups(namespace).Watch(context.TODO(), options) + }, + }, + &platformv1alpha1.ResourceGroup{}, + resyncPeriod, + indexers, + ) +} + +func (f *resourceGroupInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredResourceGroupInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *resourceGroupInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&platformv1alpha1.ResourceGroup{}, f.defaultInformer) +} + +func (f *resourceGroupInformer) Lister() v1alpha1.ResourceGroupLister { + return v1alpha1.NewResourceGroupLister(f.Informer().GetIndexer()) +} diff --git a/generated/client/informers/externalversions/platform/v1alpha1/runbook.go b/generated/client/informers/externalversions/platform/v1alpha1/runbook.go new file mode 100644 index 0000000..ce84f59 --- /dev/null +++ b/generated/client/informers/externalversions/platform/v1alpha1/runbook.go @@ -0,0 +1,89 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/platform/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" +) + +// RunbookInformer provides access to a shared informer and lister for +// Runbooks. +type RunbookInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.RunbookLister +} + +type runbookInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewRunbookInformer constructs a new informer for Runbook 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 NewRunbookInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredRunbookInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredRunbookInformer constructs a new informer for Runbook 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 NewFilteredRunbookInformer(client versioned.Interface, namespace string, 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.PlatformV1alpha1().Runbooks(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.PlatformV1alpha1().Runbooks(namespace).Watch(context.TODO(), options) + }, + }, + &platformv1alpha1.Runbook{}, + resyncPeriod, + indexers, + ) +} + +func (f *runbookInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredRunbookInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *runbookInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&platformv1alpha1.Runbook{}, f.defaultInformer) +} + +func (f *runbookInformer) Lister() v1alpha1.RunbookLister { + return v1alpha1.NewRunbookLister(f.Informer().GetIndexer()) +} diff --git a/generated/client/informers/externalversions/platform/v1alpha1/secretsync.go b/generated/client/informers/externalversions/platform/v1alpha1/secretsync.go new file mode 100644 index 0000000..42d00bc --- /dev/null +++ b/generated/client/informers/externalversions/platform/v1alpha1/secretsync.go @@ -0,0 +1,89 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/platform/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" +) + +// SecretSyncInformer provides access to a shared informer and lister for +// SecretSyncs. +type SecretSyncInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.SecretSyncLister +} + +type secretSyncInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewSecretSyncInformer constructs a new informer for SecretSync 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 NewSecretSyncInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredSecretSyncInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredSecretSyncInformer constructs a new informer for SecretSync 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 NewFilteredSecretSyncInformer(client versioned.Interface, namespace string, 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.PlatformV1alpha1().SecretSyncs(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.PlatformV1alpha1().SecretSyncs(namespace).Watch(context.TODO(), options) + }, + }, + &platformv1alpha1.SecretSync{}, + resyncPeriod, + indexers, + ) +} + +func (f *secretSyncInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredSecretSyncInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *secretSyncInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&platformv1alpha1.SecretSync{}, f.defaultInformer) +} + +func (f *secretSyncInformer) Lister() v1alpha1.SecretSyncLister { + return v1alpha1.NewSecretSyncLister(f.Informer().GetIndexer()) +} diff --git a/generated/platform/informers/externalversions/platform/v1alpha1/slashcommand.go b/generated/client/informers/externalversions/platform/v1alpha1/slashcommand.go similarity index 93% rename from generated/platform/informers/externalversions/platform/v1alpha1/slashcommand.go rename to generated/client/informers/externalversions/platform/v1alpha1/slashcommand.go index 8ce6f6c..85487b3 100644 --- a/generated/platform/informers/externalversions/platform/v1alpha1/slashcommand.go +++ b/generated/client/informers/externalversions/platform/v1alpha1/slashcommand.go @@ -22,9 +22,9 @@ import ( time "time" platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" - versioned "github.com/pluralsh/plural-operator/generated/platform/clientset/versioned" - internalinterfaces "github.com/pluralsh/plural-operator/generated/platform/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/pluralsh/plural-operator/generated/platform/listers/platform/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/platform/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" diff --git a/generated/client/informers/externalversions/platform/v1alpha1/statefulsetresize.go b/generated/client/informers/externalversions/platform/v1alpha1/statefulsetresize.go new file mode 100644 index 0000000..675b36d --- /dev/null +++ b/generated/client/informers/externalversions/platform/v1alpha1/statefulsetresize.go @@ -0,0 +1,89 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + platformv1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/platform/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" +) + +// StatefulSetResizeInformer provides access to a shared informer and lister for +// StatefulSetResizes. +type StatefulSetResizeInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.StatefulSetResizeLister +} + +type statefulSetResizeInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewStatefulSetResizeInformer constructs a new informer for StatefulSetResize 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 NewStatefulSetResizeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredStatefulSetResizeInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredStatefulSetResizeInformer constructs a new informer for StatefulSetResize 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 NewFilteredStatefulSetResizeInformer(client versioned.Interface, namespace string, 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.PlatformV1alpha1().StatefulSetResizes(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.PlatformV1alpha1().StatefulSetResizes(namespace).Watch(context.TODO(), options) + }, + }, + &platformv1alpha1.StatefulSetResize{}, + resyncPeriod, + indexers, + ) +} + +func (f *statefulSetResizeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredStatefulSetResizeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *statefulSetResizeInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&platformv1alpha1.StatefulSetResize{}, f.defaultInformer) +} + +func (f *statefulSetResizeInformer) Lister() v1alpha1.StatefulSetResizeLister { + return v1alpha1.NewStatefulSetResizeLister(f.Informer().GetIndexer()) +} diff --git a/generated/client/informers/externalversions/vpn/interface.go b/generated/client/informers/externalversions/vpn/interface.go new file mode 100644 index 0000000..d6dbe08 --- /dev/null +++ b/generated/client/informers/externalversions/vpn/interface.go @@ -0,0 +1,45 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package vpn + +import ( + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/vpn/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/generated/client/informers/externalversions/vpn/v1alpha1/interface.go b/generated/client/informers/externalversions/vpn/v1alpha1/interface.go new file mode 100644 index 0000000..83e1575 --- /dev/null +++ b/generated/client/informers/externalversions/vpn/v1alpha1/interface.go @@ -0,0 +1,51 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // WireguardPeers returns a WireguardPeerInformer. + WireguardPeers() WireguardPeerInformer + // WireguardServers returns a WireguardServerInformer. + WireguardServers() WireguardServerInformer +} + +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} +} + +// WireguardPeers returns a WireguardPeerInformer. +func (v *version) WireguardPeers() WireguardPeerInformer { + return &wireguardPeerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// WireguardServers returns a WireguardServerInformer. +func (v *version) WireguardServers() WireguardServerInformer { + return &wireguardServerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/generated/client/informers/externalversions/vpn/v1alpha1/wireguardpeer.go b/generated/client/informers/externalversions/vpn/v1alpha1/wireguardpeer.go new file mode 100644 index 0000000..b91b581 --- /dev/null +++ b/generated/client/informers/externalversions/vpn/v1alpha1/wireguardpeer.go @@ -0,0 +1,89 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + vpnv1alpha1 "github.com/pluralsh/plural-operator/apis/vpn/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/vpn/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" +) + +// WireguardPeerInformer provides access to a shared informer and lister for +// WireguardPeers. +type WireguardPeerInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.WireguardPeerLister +} + +type wireguardPeerInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewWireguardPeerInformer constructs a new informer for WireguardPeer 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 NewWireguardPeerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredWireguardPeerInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredWireguardPeerInformer constructs a new informer for WireguardPeer 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 NewFilteredWireguardPeerInformer(client versioned.Interface, namespace string, 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.VpnV1alpha1().WireguardPeers(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.VpnV1alpha1().WireguardPeers(namespace).Watch(context.TODO(), options) + }, + }, + &vpnv1alpha1.WireguardPeer{}, + resyncPeriod, + indexers, + ) +} + +func (f *wireguardPeerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredWireguardPeerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *wireguardPeerInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&vpnv1alpha1.WireguardPeer{}, f.defaultInformer) +} + +func (f *wireguardPeerInformer) Lister() v1alpha1.WireguardPeerLister { + return v1alpha1.NewWireguardPeerLister(f.Informer().GetIndexer()) +} diff --git a/generated/client/informers/externalversions/vpn/v1alpha1/wireguardserver.go b/generated/client/informers/externalversions/vpn/v1alpha1/wireguardserver.go new file mode 100644 index 0000000..4b20a78 --- /dev/null +++ b/generated/client/informers/externalversions/vpn/v1alpha1/wireguardserver.go @@ -0,0 +1,89 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + vpnv1alpha1 "github.com/pluralsh/plural-operator/apis/vpn/v1alpha1" + versioned "github.com/pluralsh/plural-operator/generated/client/clientset/versioned" + internalinterfaces "github.com/pluralsh/plural-operator/generated/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/pluralsh/plural-operator/generated/client/listers/vpn/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" +) + +// WireguardServerInformer provides access to a shared informer and lister for +// WireguardServers. +type WireguardServerInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.WireguardServerLister +} + +type wireguardServerInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewWireguardServerInformer constructs a new informer for WireguardServer 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 NewWireguardServerInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredWireguardServerInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredWireguardServerInformer constructs a new informer for WireguardServer 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 NewFilteredWireguardServerInformer(client versioned.Interface, namespace string, 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.VpnV1alpha1().WireguardServers(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.VpnV1alpha1().WireguardServers(namespace).Watch(context.TODO(), options) + }, + }, + &vpnv1alpha1.WireguardServer{}, + resyncPeriod, + indexers, + ) +} + +func (f *wireguardServerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredWireguardServerInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *wireguardServerInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&vpnv1alpha1.WireguardServer{}, f.defaultInformer) +} + +func (f *wireguardServerInformer) Lister() v1alpha1.WireguardServerLister { + return v1alpha1.NewWireguardServerLister(f.Informer().GetIndexer()) +} diff --git a/generated/client/listers/platform/v1alpha1/configurationoverlay.go b/generated/client/listers/platform/v1alpha1/configurationoverlay.go new file mode 100644 index 0000000..3d7a090 --- /dev/null +++ b/generated/client/listers/platform/v1alpha1/configurationoverlay.go @@ -0,0 +1,98 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ConfigurationOverlayLister helps list ConfigurationOverlays. +// All objects returned here must be treated as read-only. +type ConfigurationOverlayLister interface { + // List lists all ConfigurationOverlays in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.ConfigurationOverlay, err error) + // ConfigurationOverlays returns an object that can list and get ConfigurationOverlays. + ConfigurationOverlays(namespace string) ConfigurationOverlayNamespaceLister + ConfigurationOverlayListerExpansion +} + +// configurationOverlayLister implements the ConfigurationOverlayLister interface. +type configurationOverlayLister struct { + indexer cache.Indexer +} + +// NewConfigurationOverlayLister returns a new ConfigurationOverlayLister. +func NewConfigurationOverlayLister(indexer cache.Indexer) ConfigurationOverlayLister { + return &configurationOverlayLister{indexer: indexer} +} + +// List lists all ConfigurationOverlays in the indexer. +func (s *configurationOverlayLister) List(selector labels.Selector) (ret []*v1alpha1.ConfigurationOverlay, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ConfigurationOverlay)) + }) + return ret, err +} + +// ConfigurationOverlays returns an object that can list and get ConfigurationOverlays. +func (s *configurationOverlayLister) ConfigurationOverlays(namespace string) ConfigurationOverlayNamespaceLister { + return configurationOverlayNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ConfigurationOverlayNamespaceLister helps list and get ConfigurationOverlays. +// All objects returned here must be treated as read-only. +type ConfigurationOverlayNamespaceLister interface { + // List lists all ConfigurationOverlays in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.ConfigurationOverlay, err error) + // Get retrieves the ConfigurationOverlay from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.ConfigurationOverlay, error) + ConfigurationOverlayNamespaceListerExpansion +} + +// configurationOverlayNamespaceLister implements the ConfigurationOverlayNamespaceLister +// interface. +type configurationOverlayNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ConfigurationOverlays in the indexer for a given namespace. +func (s configurationOverlayNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ConfigurationOverlay, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ConfigurationOverlay)) + }) + return ret, err +} + +// Get retrieves the ConfigurationOverlay from the indexer for a given namespace and name. +func (s configurationOverlayNamespaceLister) Get(name string) (*v1alpha1.ConfigurationOverlay, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("configurationoverlay"), name) + } + return obj.(*v1alpha1.ConfigurationOverlay), nil +} diff --git a/generated/platform/listers/platform/v1alpha1/dashboard.go b/generated/client/listers/platform/v1alpha1/dashboard.go similarity index 100% rename from generated/platform/listers/platform/v1alpha1/dashboard.go rename to generated/client/listers/platform/v1alpha1/dashboard.go diff --git a/generated/client/listers/platform/v1alpha1/defaultstorageclass.go b/generated/client/listers/platform/v1alpha1/defaultstorageclass.go new file mode 100644 index 0000000..8c7faa5 --- /dev/null +++ b/generated/client/listers/platform/v1alpha1/defaultstorageclass.go @@ -0,0 +1,98 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// DefaultStorageClassLister helps list DefaultStorageClasses. +// All objects returned here must be treated as read-only. +type DefaultStorageClassLister interface { + // List lists all DefaultStorageClasses in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.DefaultStorageClass, err error) + // DefaultStorageClasses returns an object that can list and get DefaultStorageClasses. + DefaultStorageClasses(namespace string) DefaultStorageClassNamespaceLister + DefaultStorageClassListerExpansion +} + +// defaultStorageClassLister implements the DefaultStorageClassLister interface. +type defaultStorageClassLister struct { + indexer cache.Indexer +} + +// NewDefaultStorageClassLister returns a new DefaultStorageClassLister. +func NewDefaultStorageClassLister(indexer cache.Indexer) DefaultStorageClassLister { + return &defaultStorageClassLister{indexer: indexer} +} + +// List lists all DefaultStorageClasses in the indexer. +func (s *defaultStorageClassLister) List(selector labels.Selector) (ret []*v1alpha1.DefaultStorageClass, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.DefaultStorageClass)) + }) + return ret, err +} + +// DefaultStorageClasses returns an object that can list and get DefaultStorageClasses. +func (s *defaultStorageClassLister) DefaultStorageClasses(namespace string) DefaultStorageClassNamespaceLister { + return defaultStorageClassNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// DefaultStorageClassNamespaceLister helps list and get DefaultStorageClasses. +// All objects returned here must be treated as read-only. +type DefaultStorageClassNamespaceLister interface { + // List lists all DefaultStorageClasses in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.DefaultStorageClass, err error) + // Get retrieves the DefaultStorageClass from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.DefaultStorageClass, error) + DefaultStorageClassNamespaceListerExpansion +} + +// defaultStorageClassNamespaceLister implements the DefaultStorageClassNamespaceLister +// interface. +type defaultStorageClassNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all DefaultStorageClasses in the indexer for a given namespace. +func (s defaultStorageClassNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.DefaultStorageClass, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.DefaultStorageClass)) + }) + return ret, err +} + +// Get retrieves the DefaultStorageClass from the indexer for a given namespace and name. +func (s defaultStorageClassNamespaceLister) Get(name string) (*v1alpha1.DefaultStorageClass, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("defaultstorageclass"), name) + } + return obj.(*v1alpha1.DefaultStorageClass), nil +} diff --git a/generated/client/listers/platform/v1alpha1/expansion_generated.go b/generated/client/listers/platform/v1alpha1/expansion_generated.go new file mode 100644 index 0000000..f67735e --- /dev/null +++ b/generated/client/listers/platform/v1alpha1/expansion_generated.go @@ -0,0 +1,122 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +// ConfigurationOverlayListerExpansion allows custom methods to be added to +// ConfigurationOverlayLister. +type ConfigurationOverlayListerExpansion interface{} + +// ConfigurationOverlayNamespaceListerExpansion allows custom methods to be added to +// ConfigurationOverlayNamespaceLister. +type ConfigurationOverlayNamespaceListerExpansion interface{} + +// DashboardListerExpansion allows custom methods to be added to +// DashboardLister. +type DashboardListerExpansion interface{} + +// DashboardNamespaceListerExpansion allows custom methods to be added to +// DashboardNamespaceLister. +type DashboardNamespaceListerExpansion interface{} + +// DefaultStorageClassListerExpansion allows custom methods to be added to +// DefaultStorageClassLister. +type DefaultStorageClassListerExpansion interface{} + +// DefaultStorageClassNamespaceListerExpansion allows custom methods to be added to +// DefaultStorageClassNamespaceLister. +type DefaultStorageClassNamespaceListerExpansion interface{} + +// LicenseListerExpansion allows custom methods to be added to +// LicenseLister. +type LicenseListerExpansion interface{} + +// LicenseNamespaceListerExpansion allows custom methods to be added to +// LicenseNamespaceLister. +type LicenseNamespaceListerExpansion interface{} + +// LogFilterListerExpansion allows custom methods to be added to +// LogFilterLister. +type LogFilterListerExpansion interface{} + +// LogFilterNamespaceListerExpansion allows custom methods to be added to +// LogFilterNamespaceLister. +type LogFilterNamespaceListerExpansion interface{} + +// LogTailListerExpansion allows custom methods to be added to +// LogTailLister. +type LogTailListerExpansion interface{} + +// LogTailNamespaceListerExpansion allows custom methods to be added to +// LogTailNamespaceLister. +type LogTailNamespaceListerExpansion interface{} + +// ProxyListerExpansion allows custom methods to be added to +// ProxyLister. +type ProxyListerExpansion interface{} + +// ProxyNamespaceListerExpansion allows custom methods to be added to +// ProxyNamespaceLister. +type ProxyNamespaceListerExpansion interface{} + +// RegistryCredentialListerExpansion allows custom methods to be added to +// RegistryCredentialLister. +type RegistryCredentialListerExpansion interface{} + +// RegistryCredentialNamespaceListerExpansion allows custom methods to be added to +// RegistryCredentialNamespaceLister. +type RegistryCredentialNamespaceListerExpansion interface{} + +// ResourceGroupListerExpansion allows custom methods to be added to +// ResourceGroupLister. +type ResourceGroupListerExpansion interface{} + +// ResourceGroupNamespaceListerExpansion allows custom methods to be added to +// ResourceGroupNamespaceLister. +type ResourceGroupNamespaceListerExpansion interface{} + +// RunbookListerExpansion allows custom methods to be added to +// RunbookLister. +type RunbookListerExpansion interface{} + +// RunbookNamespaceListerExpansion allows custom methods to be added to +// RunbookNamespaceLister. +type RunbookNamespaceListerExpansion interface{} + +// SecretSyncListerExpansion allows custom methods to be added to +// SecretSyncLister. +type SecretSyncListerExpansion interface{} + +// SecretSyncNamespaceListerExpansion allows custom methods to be added to +// SecretSyncNamespaceLister. +type SecretSyncNamespaceListerExpansion interface{} + +// SlashCommandListerExpansion allows custom methods to be added to +// SlashCommandLister. +type SlashCommandListerExpansion interface{} + +// SlashCommandNamespaceListerExpansion allows custom methods to be added to +// SlashCommandNamespaceLister. +type SlashCommandNamespaceListerExpansion interface{} + +// StatefulSetResizeListerExpansion allows custom methods to be added to +// StatefulSetResizeLister. +type StatefulSetResizeListerExpansion interface{} + +// StatefulSetResizeNamespaceListerExpansion allows custom methods to be added to +// StatefulSetResizeNamespaceLister. +type StatefulSetResizeNamespaceListerExpansion interface{} diff --git a/generated/client/listers/platform/v1alpha1/license.go b/generated/client/listers/platform/v1alpha1/license.go new file mode 100644 index 0000000..b718eb9 --- /dev/null +++ b/generated/client/listers/platform/v1alpha1/license.go @@ -0,0 +1,98 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// LicenseLister helps list Licenses. +// All objects returned here must be treated as read-only. +type LicenseLister interface { + // List lists all Licenses in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.License, err error) + // Licenses returns an object that can list and get Licenses. + Licenses(namespace string) LicenseNamespaceLister + LicenseListerExpansion +} + +// licenseLister implements the LicenseLister interface. +type licenseLister struct { + indexer cache.Indexer +} + +// NewLicenseLister returns a new LicenseLister. +func NewLicenseLister(indexer cache.Indexer) LicenseLister { + return &licenseLister{indexer: indexer} +} + +// List lists all Licenses in the indexer. +func (s *licenseLister) List(selector labels.Selector) (ret []*v1alpha1.License, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.License)) + }) + return ret, err +} + +// Licenses returns an object that can list and get Licenses. +func (s *licenseLister) Licenses(namespace string) LicenseNamespaceLister { + return licenseNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// LicenseNamespaceLister helps list and get Licenses. +// All objects returned here must be treated as read-only. +type LicenseNamespaceLister interface { + // List lists all Licenses in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.License, err error) + // Get retrieves the License from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.License, error) + LicenseNamespaceListerExpansion +} + +// licenseNamespaceLister implements the LicenseNamespaceLister +// interface. +type licenseNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Licenses in the indexer for a given namespace. +func (s licenseNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.License, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.License)) + }) + return ret, err +} + +// Get retrieves the License from the indexer for a given namespace and name. +func (s licenseNamespaceLister) Get(name string) (*v1alpha1.License, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("license"), name) + } + return obj.(*v1alpha1.License), nil +} diff --git a/generated/platform/listers/platform/v1alpha1/logfilter.go b/generated/client/listers/platform/v1alpha1/logfilter.go similarity index 100% rename from generated/platform/listers/platform/v1alpha1/logfilter.go rename to generated/client/listers/platform/v1alpha1/logfilter.go diff --git a/generated/platform/listers/platform/v1alpha1/logtail.go b/generated/client/listers/platform/v1alpha1/logtail.go similarity index 100% rename from generated/platform/listers/platform/v1alpha1/logtail.go rename to generated/client/listers/platform/v1alpha1/logtail.go diff --git a/generated/platform/listers/platform/v1alpha1/proxy.go b/generated/client/listers/platform/v1alpha1/proxy.go similarity index 100% rename from generated/platform/listers/platform/v1alpha1/proxy.go rename to generated/client/listers/platform/v1alpha1/proxy.go diff --git a/generated/client/listers/platform/v1alpha1/registrycredential.go b/generated/client/listers/platform/v1alpha1/registrycredential.go new file mode 100644 index 0000000..ce8ee2e --- /dev/null +++ b/generated/client/listers/platform/v1alpha1/registrycredential.go @@ -0,0 +1,98 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// RegistryCredentialLister helps list RegistryCredentials. +// All objects returned here must be treated as read-only. +type RegistryCredentialLister interface { + // List lists all RegistryCredentials in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.RegistryCredential, err error) + // RegistryCredentials returns an object that can list and get RegistryCredentials. + RegistryCredentials(namespace string) RegistryCredentialNamespaceLister + RegistryCredentialListerExpansion +} + +// registryCredentialLister implements the RegistryCredentialLister interface. +type registryCredentialLister struct { + indexer cache.Indexer +} + +// NewRegistryCredentialLister returns a new RegistryCredentialLister. +func NewRegistryCredentialLister(indexer cache.Indexer) RegistryCredentialLister { + return ®istryCredentialLister{indexer: indexer} +} + +// List lists all RegistryCredentials in the indexer. +func (s *registryCredentialLister) List(selector labels.Selector) (ret []*v1alpha1.RegistryCredential, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.RegistryCredential)) + }) + return ret, err +} + +// RegistryCredentials returns an object that can list and get RegistryCredentials. +func (s *registryCredentialLister) RegistryCredentials(namespace string) RegistryCredentialNamespaceLister { + return registryCredentialNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// RegistryCredentialNamespaceLister helps list and get RegistryCredentials. +// All objects returned here must be treated as read-only. +type RegistryCredentialNamespaceLister interface { + // List lists all RegistryCredentials in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.RegistryCredential, err error) + // Get retrieves the RegistryCredential from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.RegistryCredential, error) + RegistryCredentialNamespaceListerExpansion +} + +// registryCredentialNamespaceLister implements the RegistryCredentialNamespaceLister +// interface. +type registryCredentialNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all RegistryCredentials in the indexer for a given namespace. +func (s registryCredentialNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.RegistryCredential, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.RegistryCredential)) + }) + return ret, err +} + +// Get retrieves the RegistryCredential from the indexer for a given namespace and name. +func (s registryCredentialNamespaceLister) Get(name string) (*v1alpha1.RegistryCredential, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("registrycredential"), name) + } + return obj.(*v1alpha1.RegistryCredential), nil +} diff --git a/generated/client/listers/platform/v1alpha1/resourcegroup.go b/generated/client/listers/platform/v1alpha1/resourcegroup.go new file mode 100644 index 0000000..21e5a4a --- /dev/null +++ b/generated/client/listers/platform/v1alpha1/resourcegroup.go @@ -0,0 +1,98 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// ResourceGroupLister helps list ResourceGroups. +// All objects returned here must be treated as read-only. +type ResourceGroupLister interface { + // List lists all ResourceGroups in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.ResourceGroup, err error) + // ResourceGroups returns an object that can list and get ResourceGroups. + ResourceGroups(namespace string) ResourceGroupNamespaceLister + ResourceGroupListerExpansion +} + +// resourceGroupLister implements the ResourceGroupLister interface. +type resourceGroupLister struct { + indexer cache.Indexer +} + +// NewResourceGroupLister returns a new ResourceGroupLister. +func NewResourceGroupLister(indexer cache.Indexer) ResourceGroupLister { + return &resourceGroupLister{indexer: indexer} +} + +// List lists all ResourceGroups in the indexer. +func (s *resourceGroupLister) List(selector labels.Selector) (ret []*v1alpha1.ResourceGroup, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ResourceGroup)) + }) + return ret, err +} + +// ResourceGroups returns an object that can list and get ResourceGroups. +func (s *resourceGroupLister) ResourceGroups(namespace string) ResourceGroupNamespaceLister { + return resourceGroupNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// ResourceGroupNamespaceLister helps list and get ResourceGroups. +// All objects returned here must be treated as read-only. +type ResourceGroupNamespaceLister interface { + // List lists all ResourceGroups in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.ResourceGroup, err error) + // Get retrieves the ResourceGroup from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.ResourceGroup, error) + ResourceGroupNamespaceListerExpansion +} + +// resourceGroupNamespaceLister implements the ResourceGroupNamespaceLister +// interface. +type resourceGroupNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all ResourceGroups in the indexer for a given namespace. +func (s resourceGroupNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ResourceGroup, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.ResourceGroup)) + }) + return ret, err +} + +// Get retrieves the ResourceGroup from the indexer for a given namespace and name. +func (s resourceGroupNamespaceLister) Get(name string) (*v1alpha1.ResourceGroup, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("resourcegroup"), name) + } + return obj.(*v1alpha1.ResourceGroup), nil +} diff --git a/generated/client/listers/platform/v1alpha1/runbook.go b/generated/client/listers/platform/v1alpha1/runbook.go new file mode 100644 index 0000000..582153b --- /dev/null +++ b/generated/client/listers/platform/v1alpha1/runbook.go @@ -0,0 +1,98 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// RunbookLister helps list Runbooks. +// All objects returned here must be treated as read-only. +type RunbookLister interface { + // List lists all Runbooks in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.Runbook, err error) + // Runbooks returns an object that can list and get Runbooks. + Runbooks(namespace string) RunbookNamespaceLister + RunbookListerExpansion +} + +// runbookLister implements the RunbookLister interface. +type runbookLister struct { + indexer cache.Indexer +} + +// NewRunbookLister returns a new RunbookLister. +func NewRunbookLister(indexer cache.Indexer) RunbookLister { + return &runbookLister{indexer: indexer} +} + +// List lists all Runbooks in the indexer. +func (s *runbookLister) List(selector labels.Selector) (ret []*v1alpha1.Runbook, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.Runbook)) + }) + return ret, err +} + +// Runbooks returns an object that can list and get Runbooks. +func (s *runbookLister) Runbooks(namespace string) RunbookNamespaceLister { + return runbookNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// RunbookNamespaceLister helps list and get Runbooks. +// All objects returned here must be treated as read-only. +type RunbookNamespaceLister interface { + // List lists all Runbooks in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.Runbook, err error) + // Get retrieves the Runbook from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.Runbook, error) + RunbookNamespaceListerExpansion +} + +// runbookNamespaceLister implements the RunbookNamespaceLister +// interface. +type runbookNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Runbooks in the indexer for a given namespace. +func (s runbookNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.Runbook, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.Runbook)) + }) + return ret, err +} + +// Get retrieves the Runbook from the indexer for a given namespace and name. +func (s runbookNamespaceLister) Get(name string) (*v1alpha1.Runbook, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("runbook"), name) + } + return obj.(*v1alpha1.Runbook), nil +} diff --git a/generated/client/listers/platform/v1alpha1/secretsync.go b/generated/client/listers/platform/v1alpha1/secretsync.go new file mode 100644 index 0000000..f7c79b2 --- /dev/null +++ b/generated/client/listers/platform/v1alpha1/secretsync.go @@ -0,0 +1,98 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// SecretSyncLister helps list SecretSyncs. +// All objects returned here must be treated as read-only. +type SecretSyncLister interface { + // List lists all SecretSyncs in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.SecretSync, err error) + // SecretSyncs returns an object that can list and get SecretSyncs. + SecretSyncs(namespace string) SecretSyncNamespaceLister + SecretSyncListerExpansion +} + +// secretSyncLister implements the SecretSyncLister interface. +type secretSyncLister struct { + indexer cache.Indexer +} + +// NewSecretSyncLister returns a new SecretSyncLister. +func NewSecretSyncLister(indexer cache.Indexer) SecretSyncLister { + return &secretSyncLister{indexer: indexer} +} + +// List lists all SecretSyncs in the indexer. +func (s *secretSyncLister) List(selector labels.Selector) (ret []*v1alpha1.SecretSync, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.SecretSync)) + }) + return ret, err +} + +// SecretSyncs returns an object that can list and get SecretSyncs. +func (s *secretSyncLister) SecretSyncs(namespace string) SecretSyncNamespaceLister { + return secretSyncNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// SecretSyncNamespaceLister helps list and get SecretSyncs. +// All objects returned here must be treated as read-only. +type SecretSyncNamespaceLister interface { + // List lists all SecretSyncs in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.SecretSync, err error) + // Get retrieves the SecretSync from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.SecretSync, error) + SecretSyncNamespaceListerExpansion +} + +// secretSyncNamespaceLister implements the SecretSyncNamespaceLister +// interface. +type secretSyncNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all SecretSyncs in the indexer for a given namespace. +func (s secretSyncNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.SecretSync, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.SecretSync)) + }) + return ret, err +} + +// Get retrieves the SecretSync from the indexer for a given namespace and name. +func (s secretSyncNamespaceLister) Get(name string) (*v1alpha1.SecretSync, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("secretsync"), name) + } + return obj.(*v1alpha1.SecretSync), nil +} diff --git a/generated/platform/listers/platform/v1alpha1/slashcommand.go b/generated/client/listers/platform/v1alpha1/slashcommand.go similarity index 100% rename from generated/platform/listers/platform/v1alpha1/slashcommand.go rename to generated/client/listers/platform/v1alpha1/slashcommand.go diff --git a/generated/client/listers/platform/v1alpha1/statefulsetresize.go b/generated/client/listers/platform/v1alpha1/statefulsetresize.go new file mode 100644 index 0000000..9e5878d --- /dev/null +++ b/generated/client/listers/platform/v1alpha1/statefulsetresize.go @@ -0,0 +1,98 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/pluralsh/plural-operator/apis/platform/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// StatefulSetResizeLister helps list StatefulSetResizes. +// All objects returned here must be treated as read-only. +type StatefulSetResizeLister interface { + // List lists all StatefulSetResizes in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.StatefulSetResize, err error) + // StatefulSetResizes returns an object that can list and get StatefulSetResizes. + StatefulSetResizes(namespace string) StatefulSetResizeNamespaceLister + StatefulSetResizeListerExpansion +} + +// statefulSetResizeLister implements the StatefulSetResizeLister interface. +type statefulSetResizeLister struct { + indexer cache.Indexer +} + +// NewStatefulSetResizeLister returns a new StatefulSetResizeLister. +func NewStatefulSetResizeLister(indexer cache.Indexer) StatefulSetResizeLister { + return &statefulSetResizeLister{indexer: indexer} +} + +// List lists all StatefulSetResizes in the indexer. +func (s *statefulSetResizeLister) List(selector labels.Selector) (ret []*v1alpha1.StatefulSetResize, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.StatefulSetResize)) + }) + return ret, err +} + +// StatefulSetResizes returns an object that can list and get StatefulSetResizes. +func (s *statefulSetResizeLister) StatefulSetResizes(namespace string) StatefulSetResizeNamespaceLister { + return statefulSetResizeNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// StatefulSetResizeNamespaceLister helps list and get StatefulSetResizes. +// All objects returned here must be treated as read-only. +type StatefulSetResizeNamespaceLister interface { + // List lists all StatefulSetResizes in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.StatefulSetResize, err error) + // Get retrieves the StatefulSetResize from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.StatefulSetResize, error) + StatefulSetResizeNamespaceListerExpansion +} + +// statefulSetResizeNamespaceLister implements the StatefulSetResizeNamespaceLister +// interface. +type statefulSetResizeNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all StatefulSetResizes in the indexer for a given namespace. +func (s statefulSetResizeNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.StatefulSetResize, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.StatefulSetResize)) + }) + return ret, err +} + +// Get retrieves the StatefulSetResize from the indexer for a given namespace and name. +func (s statefulSetResizeNamespaceLister) Get(name string) (*v1alpha1.StatefulSetResize, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("statefulsetresize"), name) + } + return obj.(*v1alpha1.StatefulSetResize), nil +} diff --git a/generated/client/listers/vpn/v1alpha1/expansion_generated.go b/generated/client/listers/vpn/v1alpha1/expansion_generated.go new file mode 100644 index 0000000..0831b3c --- /dev/null +++ b/generated/client/listers/vpn/v1alpha1/expansion_generated.go @@ -0,0 +1,34 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +// WireguardPeerListerExpansion allows custom methods to be added to +// WireguardPeerLister. +type WireguardPeerListerExpansion interface{} + +// WireguardPeerNamespaceListerExpansion allows custom methods to be added to +// WireguardPeerNamespaceLister. +type WireguardPeerNamespaceListerExpansion interface{} + +// WireguardServerListerExpansion allows custom methods to be added to +// WireguardServerLister. +type WireguardServerListerExpansion interface{} + +// WireguardServerNamespaceListerExpansion allows custom methods to be added to +// WireguardServerNamespaceLister. +type WireguardServerNamespaceListerExpansion interface{} diff --git a/generated/client/listers/vpn/v1alpha1/wireguardpeer.go b/generated/client/listers/vpn/v1alpha1/wireguardpeer.go new file mode 100644 index 0000000..be8cabe --- /dev/null +++ b/generated/client/listers/vpn/v1alpha1/wireguardpeer.go @@ -0,0 +1,98 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/pluralsh/plural-operator/apis/vpn/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// WireguardPeerLister helps list WireguardPeers. +// All objects returned here must be treated as read-only. +type WireguardPeerLister interface { + // List lists all WireguardPeers in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.WireguardPeer, err error) + // WireguardPeers returns an object that can list and get WireguardPeers. + WireguardPeers(namespace string) WireguardPeerNamespaceLister + WireguardPeerListerExpansion +} + +// wireguardPeerLister implements the WireguardPeerLister interface. +type wireguardPeerLister struct { + indexer cache.Indexer +} + +// NewWireguardPeerLister returns a new WireguardPeerLister. +func NewWireguardPeerLister(indexer cache.Indexer) WireguardPeerLister { + return &wireguardPeerLister{indexer: indexer} +} + +// List lists all WireguardPeers in the indexer. +func (s *wireguardPeerLister) List(selector labels.Selector) (ret []*v1alpha1.WireguardPeer, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.WireguardPeer)) + }) + return ret, err +} + +// WireguardPeers returns an object that can list and get WireguardPeers. +func (s *wireguardPeerLister) WireguardPeers(namespace string) WireguardPeerNamespaceLister { + return wireguardPeerNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// WireguardPeerNamespaceLister helps list and get WireguardPeers. +// All objects returned here must be treated as read-only. +type WireguardPeerNamespaceLister interface { + // List lists all WireguardPeers in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.WireguardPeer, err error) + // Get retrieves the WireguardPeer from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.WireguardPeer, error) + WireguardPeerNamespaceListerExpansion +} + +// wireguardPeerNamespaceLister implements the WireguardPeerNamespaceLister +// interface. +type wireguardPeerNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all WireguardPeers in the indexer for a given namespace. +func (s wireguardPeerNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.WireguardPeer, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.WireguardPeer)) + }) + return ret, err +} + +// Get retrieves the WireguardPeer from the indexer for a given namespace and name. +func (s wireguardPeerNamespaceLister) Get(name string) (*v1alpha1.WireguardPeer, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("wireguardpeer"), name) + } + return obj.(*v1alpha1.WireguardPeer), nil +} diff --git a/generated/client/listers/vpn/v1alpha1/wireguardserver.go b/generated/client/listers/vpn/v1alpha1/wireguardserver.go new file mode 100644 index 0000000..31d93fc --- /dev/null +++ b/generated/client/listers/vpn/v1alpha1/wireguardserver.go @@ -0,0 +1,98 @@ +/* +Copyright 2021. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/pluralsh/plural-operator/apis/vpn/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// WireguardServerLister helps list WireguardServers. +// All objects returned here must be treated as read-only. +type WireguardServerLister interface { + // List lists all WireguardServers in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.WireguardServer, err error) + // WireguardServers returns an object that can list and get WireguardServers. + WireguardServers(namespace string) WireguardServerNamespaceLister + WireguardServerListerExpansion +} + +// wireguardServerLister implements the WireguardServerLister interface. +type wireguardServerLister struct { + indexer cache.Indexer +} + +// NewWireguardServerLister returns a new WireguardServerLister. +func NewWireguardServerLister(indexer cache.Indexer) WireguardServerLister { + return &wireguardServerLister{indexer: indexer} +} + +// List lists all WireguardServers in the indexer. +func (s *wireguardServerLister) List(selector labels.Selector) (ret []*v1alpha1.WireguardServer, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.WireguardServer)) + }) + return ret, err +} + +// WireguardServers returns an object that can list and get WireguardServers. +func (s *wireguardServerLister) WireguardServers(namespace string) WireguardServerNamespaceLister { + return wireguardServerNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// WireguardServerNamespaceLister helps list and get WireguardServers. +// All objects returned here must be treated as read-only. +type WireguardServerNamespaceLister interface { + // List lists all WireguardServers in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.WireguardServer, err error) + // Get retrieves the WireguardServer from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.WireguardServer, error) + WireguardServerNamespaceListerExpansion +} + +// wireguardServerNamespaceLister implements the WireguardServerNamespaceLister +// interface. +type wireguardServerNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all WireguardServers in the indexer for a given namespace. +func (s wireguardServerNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.WireguardServer, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.WireguardServer)) + }) + return ret, err +} + +// Get retrieves the WireguardServer from the indexer for a given namespace and name. +func (s wireguardServerNamespaceLister) Get(name string) (*v1alpha1.WireguardServer, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("wireguardserver"), name) + } + return obj.(*v1alpha1.WireguardServer), nil +} diff --git a/generated/platform/informers/externalversions/platform/v1alpha1/interface.go b/generated/platform/informers/externalversions/platform/v1alpha1/interface.go deleted file mode 100644 index d4ef8d9..0000000 --- a/generated/platform/informers/externalversions/platform/v1alpha1/interface.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -Copyright 2021. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "github.com/pluralsh/plural-operator/generated/platform/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // Dashboards returns a DashboardInformer. - Dashboards() DashboardInformer - // LogFilters returns a LogFilterInformer. - LogFilters() LogFilterInformer - // LogTails returns a LogTailInformer. - LogTails() LogTailInformer - // Proxies returns a ProxyInformer. - Proxies() ProxyInformer - // SlashCommands returns a SlashCommandInformer. - SlashCommands() SlashCommandInformer -} - -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} -} - -// Dashboards returns a DashboardInformer. -func (v *version) Dashboards() DashboardInformer { - return &dashboardInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// LogFilters returns a LogFilterInformer. -func (v *version) LogFilters() LogFilterInformer { - return &logFilterInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// LogTails returns a LogTailInformer. -func (v *version) LogTails() LogTailInformer { - return &logTailInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// Proxies returns a ProxyInformer. -func (v *version) Proxies() ProxyInformer { - return &proxyInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// SlashCommands returns a SlashCommandInformer. -func (v *version) SlashCommands() SlashCommandInformer { - return &slashCommandInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/generated/platform/listers/platform/v1alpha1/expansion_generated.go b/generated/platform/listers/platform/v1alpha1/expansion_generated.go deleted file mode 100644 index cbd69ef..0000000 --- a/generated/platform/listers/platform/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 2021. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// DashboardListerExpansion allows custom methods to be added to -// DashboardLister. -type DashboardListerExpansion interface{} - -// DashboardNamespaceListerExpansion allows custom methods to be added to -// DashboardNamespaceLister. -type DashboardNamespaceListerExpansion interface{} - -// LogFilterListerExpansion allows custom methods to be added to -// LogFilterLister. -type LogFilterListerExpansion interface{} - -// LogFilterNamespaceListerExpansion allows custom methods to be added to -// LogFilterNamespaceLister. -type LogFilterNamespaceListerExpansion interface{} - -// LogTailListerExpansion allows custom methods to be added to -// LogTailLister. -type LogTailListerExpansion interface{} - -// LogTailNamespaceListerExpansion allows custom methods to be added to -// LogTailNamespaceLister. -type LogTailNamespaceListerExpansion interface{} - -// ProxyListerExpansion allows custom methods to be added to -// ProxyLister. -type ProxyListerExpansion interface{} - -// ProxyNamespaceListerExpansion allows custom methods to be added to -// ProxyNamespaceLister. -type ProxyNamespaceListerExpansion interface{} - -// SlashCommandListerExpansion allows custom methods to be added to -// SlashCommandLister. -type SlashCommandListerExpansion interface{} - -// SlashCommandNamespaceListerExpansion allows custom methods to be added to -// SlashCommandNamespaceLister. -type SlashCommandNamespaceListerExpansion interface{} diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh deleted file mode 100755 index 8d01e5e..0000000 --- a/hack/update-codegen.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o nounset -set -o pipefail - -# corresponding to go mod init -MODULE=github.com/pluralsh/plural-operator -# api package -APIS_PKG=api -# generated output package -OUTPUT_PKG=generated/platform -# group-version such as foo:v1alpha1 -GROUP_VERSION=platform:v1alpha1 - -SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)} - -# generate the code with: -# --output-base because this script should also be able to run inside the vendor dir of -# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir -# instead of the $GOPATH directly. For normal projects this can be dropped. -bash "${CODEGEN_PKG}"/generate-groups.sh "client,lister,informer" \ - ${MODULE}/${OUTPUT_PKG} ${MODULE}/${APIS_PKG} \ - ${GROUP_VERSION} \ - --go-header-file "${SCRIPT_ROOT}"/hack/boilerplate.go.txt \ - --output-base "${SCRIPT_ROOT}" -# --output-base "${SCRIPT_ROOT}/../../.." \ \ No newline at end of file