From 1d4ac7d1cb02b2e4b69b8677ac5843ab965578f9 Mon Sep 17 00:00:00 2001 From: Vicente Cheng Date: Wed, 16 Oct 2024 11:25:14 +0800 Subject: [PATCH] vendor: add storage.k8s.io related packages - for the new validator Signed-off-by: Vicente Cheng --- .../generated/controllers/storage/factory.go | 72 +++++++++++++++++++ .../controllers/storage/interface.go | 43 +++++++++++ .../controllers/storage/v1/interface.go | 49 +++++++++++++ .../controllers/storage/v1/storageclass.go | 39 ++++++++++ vendor/modules.txt | 2 + 5 files changed, 205 insertions(+) create mode 100644 vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/factory.go create mode 100644 vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/interface.go create mode 100644 vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/v1/interface.go create mode 100644 vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/v1/storageclass.go diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/factory.go b/vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/factory.go new file mode 100644 index 00000000..1e75281c --- /dev/null +++ b/vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/factory.go @@ -0,0 +1,72 @@ +/* +Copyright The Kubernetes Authors. + +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 main. DO NOT EDIT. + +package storage + +import ( + "github.com/rancher/lasso/pkg/controller" + "github.com/rancher/wrangler/v3/pkg/generic" + "k8s.io/client-go/rest" +) + +type Factory struct { + *generic.Factory +} + +func NewFactoryFromConfigOrDie(config *rest.Config) *Factory { + f, err := NewFactoryFromConfig(config) + if err != nil { + panic(err) + } + return f +} + +func NewFactoryFromConfig(config *rest.Config) (*Factory, error) { + return NewFactoryFromConfigWithOptions(config, nil) +} + +func NewFactoryFromConfigWithNamespace(config *rest.Config, namespace string) (*Factory, error) { + return NewFactoryFromConfigWithOptions(config, &FactoryOptions{ + Namespace: namespace, + }) +} + +type FactoryOptions = generic.FactoryOptions + +func NewFactoryFromConfigWithOptions(config *rest.Config, opts *FactoryOptions) (*Factory, error) { + f, err := generic.NewFactoryFromConfigWithOptions(config, opts) + return &Factory{ + Factory: f, + }, err +} + +func NewFactoryFromConfigWithOptionsOrDie(config *rest.Config, opts *FactoryOptions) *Factory { + f, err := NewFactoryFromConfigWithOptions(config, opts) + if err != nil { + panic(err) + } + return f +} + +func (c *Factory) Storage() Interface { + return New(c.ControllerFactory()) +} + +func (c *Factory) WithAgent(userAgent string) Interface { + return New(controller.NewSharedControllerFactoryWithAgent(userAgent, c.ControllerFactory())) +} diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/interface.go b/vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/interface.go new file mode 100644 index 00000000..28d59892 --- /dev/null +++ b/vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/interface.go @@ -0,0 +1,43 @@ +/* +Copyright The Kubernetes Authors. + +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 main. DO NOT EDIT. + +package storage + +import ( + "github.com/rancher/lasso/pkg/controller" + v1 "github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/v1" +) + +type Interface interface { + V1() v1.Interface +} + +type group struct { + controllerFactory controller.SharedControllerFactory +} + +// New returns a new Interface. +func New(controllerFactory controller.SharedControllerFactory) Interface { + return &group{ + controllerFactory: controllerFactory, + } +} + +func (g *group) V1() v1.Interface { + return v1.New(g.controllerFactory) +} diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/v1/interface.go b/vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/v1/interface.go new file mode 100644 index 00000000..c0d7f5c4 --- /dev/null +++ b/vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/v1/interface.go @@ -0,0 +1,49 @@ +/* +Copyright The Kubernetes Authors. + +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 main. DO NOT EDIT. + +package v1 + +import ( + "github.com/rancher/lasso/pkg/controller" + "github.com/rancher/wrangler/v3/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/schemes" + v1 "k8s.io/api/storage/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func init() { + schemes.Register(v1.AddToScheme) +} + +type Interface interface { + StorageClass() StorageClassController +} + +func New(controllerFactory controller.SharedControllerFactory) Interface { + return &version{ + controllerFactory: controllerFactory, + } +} + +type version struct { + controllerFactory controller.SharedControllerFactory +} + +func (v *version) StorageClass() StorageClassController { + return generic.NewNonNamespacedController[*v1.StorageClass, *v1.StorageClassList](schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "StorageClass"}, "storageclasses", v.controllerFactory) +} diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/v1/storageclass.go b/vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/v1/storageclass.go new file mode 100644 index 00000000..7bb71dd2 --- /dev/null +++ b/vendor/github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/v1/storageclass.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +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 main. DO NOT EDIT. + +package v1 + +import ( + "github.com/rancher/wrangler/v3/pkg/generic" + v1 "k8s.io/api/storage/v1" +) + +// StorageClassController interface for managing StorageClass resources. +type StorageClassController interface { + generic.NonNamespacedControllerInterface[*v1.StorageClass, *v1.StorageClassList] +} + +// StorageClassClient interface for managing StorageClass resources in Kubernetes. +type StorageClassClient interface { + generic.NonNamespacedClientInterface[*v1.StorageClass, *v1.StorageClassList] +} + +// StorageClassCache interface for retrieving StorageClass resources in memory. +type StorageClassCache interface { + generic.NonNamespacedCacheInterface[*v1.StorageClass] +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 69bab1c7..74b2c7de 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -218,6 +218,8 @@ github.com/rancher/wrangler/v3/pkg/generated/controllers/core github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1 github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac/v1 +github.com/rancher/wrangler/v3/pkg/generated/controllers/storage +github.com/rancher/wrangler/v3/pkg/generated/controllers/storage/v1 github.com/rancher/wrangler/v3/pkg/generic github.com/rancher/wrangler/v3/pkg/gvk github.com/rancher/wrangler/v3/pkg/kubeconfig