diff --git a/Makefile b/Makefile index 2171a228d..b2b573bea 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,7 @@ ldflags: require-%: @if ! command -v $* 1> /dev/null 2>&1; then echo "$* not found in \$$PATH"; exit 1; fi -build: WHAT ?= ./cmd/... ./cli/cmd/... +build: WHAT ?= ./cmd/... ./cli/cmd/... ./kcp/cmd/kcp-init/... build: require-jq require-go require-git verify-go-versions ## Build the project mkdir -p $(GOBIN_DIR) set -x; for W in $(WHAT); do \ @@ -132,15 +132,12 @@ build: require-jq require-go require-git verify-go-versions ## Build the project done .PHONY: build -.PHONY: build-all -build-all: - GOOS=$(OS) GOARCH=$(ARCH) $(MAKE) build WHAT=./cmd/... - install: WHAT ?= ./cmd/... ./cli/cmd/... install: ## install binaries to GOBIN GOOS=$(OS) GOARCH=$(ARCH) go install -ldflags="$(LDFLAGS)" $(WHAT) .PHONY: install + $(GOLANGCI_LINT): GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) github.com/golangci/golangci-lint/v2/cmd/golangci-lint $(GOLANGCI_LINT_BIN) $(GOLANGCI_LINT_VER) @@ -166,7 +163,7 @@ vendor: ## Vendor the dependencies go mod vendor .PHONY: vendor -tools: $(GOLANGCI_LINT) $(CONTROLLER_GEN) $(YAML_PATCH) $(GOTESTSUM) $(CODE_GENERATOR) +tools: $(GOLANGCI_LINT) $(CONTROLLER_GEN) $(YAML_PATCH) $(GOTESTSUM) $(CODE_GENERATOR) .PHONY: tools $(CONTROLLER_GEN): @@ -188,7 +185,7 @@ $(KUBE_APPLYCONFIGURATION_GEN): GOBIN=$(GOBIN_DIR) $(GO_INSTALL) k8s.io/code-generator/cmd/$(KUBE_APPLYCONFIGURATION_GEN_BIN) $(KUBE_APPLYCONFIGURATION_GEN_BIN) $(KUBE_APPLYCONFIGURATION_GEN_VER) -codegen: WHAT ?= ./sdk/kcp ./sdk/client +codegen: WHAT ?= ./sdk/client codegen: $(CONTROLLER_GEN) $(YAML_PATCH) $(CODE_GENERATOR) $(KUBE_CLIENT_GEN) $(KUBE_LISTER_GEN) $(KUBE_INFORMER_GEN) $(KUBE_APPLYCONFIGURATION_GEN) go mod download ./hack/update-codegen.sh @@ -273,7 +270,7 @@ endif test-e2e: TEST_ARGS ?= test-e2e: WORK_DIR ?= . test-e2e: WHAT ?= ./test/e2e... -test-e2e: $(KCP) $(DEX) build-all +test-e2e: $(KCP) $(DEX) build mkdir .kcp $(DEX) serve hack/dex-config-dev.yaml 2>&1 & DEX_PID=$$!; \ $(KCP) start &>.kcp/kcp.log & KCP_PID=$$!; \ @@ -288,7 +285,7 @@ endif test: WHAT ?= ./... # We will need to move into the sub package, of pkg/apis to run those tests. test: ## run unit tests - $(GO_TEST) -race -count $(COUNT) -coverprofile=coverage.txt -covermode=atomic $(TEST_ARGS) $$(go list "$(WHAT)" | grep -v ./test/e2e/) + $(GO_TEST) -race -count $(COUNT) -coverprofile=coverage.txt -covermode=atomic $(TEST_ARGS) $$(go list "$(WHAT)" | grep -v ./test/e2e/ | grep -v ./kcp) cd sdk/apis && $(GO_TEST) -race -count $(COUNT) -coverprofile=coverage.txt -covermode=atomic $(TEST_ARGS) $(WHAT) .PHONY: verify-imports diff --git a/backend/config.go b/backend/config.go new file mode 100644 index 000000000..953294735 --- /dev/null +++ b/backend/config.go @@ -0,0 +1,158 @@ +/* +Copyright 2022 The Kube Bind 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. +*/ + +package backend + +import ( + "context" + "fmt" + "net/url" + "strings" + + apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" + apisv1alpha2 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha2" + "github.com/kcp-dev/multicluster-provider/apiexport" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apimachinery/pkg/runtime" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/utils/ptr" + ctrl "sigs.k8s.io/controller-runtime" + ctrlconfig "sigs.k8s.io/controller-runtime/pkg/config" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" + mcmanager "sigs.k8s.io/multicluster-runtime/pkg/manager" + "sigs.k8s.io/multicluster-runtime/pkg/multicluster" + + kuberesources "github.com/kube-bind/kube-bind/backend/kubernetes/resources" + "github.com/kube-bind/kube-bind/backend/options" + kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" + kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" +) + +type Config struct { + Options *options.CompletedOptions + + Provider multicluster.Provider + ExternalAddressGenerator kuberesources.ExternalAddreesGeneratorFunc + Manager mcmanager.Manager + Scheme *runtime.Scheme + + ClientConfig *rest.Config +} + +func NewConfig(options *options.CompletedOptions) (*Config, error) { + config := &Config{ + Options: options, + } + + // create clients + rules := clientcmd.NewDefaultClientConfigLoadingRules() + rules.ExplicitPath = options.KubeConfig + var err error + config.ClientConfig, err = clientcmd.NewNonInteractiveDeferredLoadingClientConfig(rules, nil).ClientConfig() + if err != nil { + return nil, err + } + config.ClientConfig = rest.CopyConfig(config.ClientConfig) + config.ClientConfig = rest.AddUserAgent(config.ClientConfig, "kube-bind-backend") + + if options.ServerURL != "" { + config.ClientConfig.Host = options.ServerURL + } + + // Set up controller-runtime manager + scheme := runtime.NewScheme() + if err := clientgoscheme.AddToScheme(scheme); err != nil { + return nil, fmt.Errorf("error adding client-go scheme: %w", err) + } + if err := apiextensionsv1.AddToScheme(scheme); err != nil { + return nil, fmt.Errorf("error adding apiextensions scheme: %w", err) + } + if err := kubebindv1alpha1.AddToScheme(scheme); err != nil { + return nil, fmt.Errorf("error adding kubebind scheme: %w", err) + } + if err := kubebindv1alpha2.AddToScheme(scheme); err != nil { + return nil, fmt.Errorf("error adding kubebind scheme: %w", err) + } + + config.Scheme = scheme + + switch options.Provider { + case "kcp": + if err := apisv1alpha1.AddToScheme(scheme); err != nil { + return nil, fmt.Errorf("error adding apis scheme: %w", err) + } + if err := apisv1alpha2.AddToScheme(scheme); err != nil { + return nil, fmt.Errorf("error adding apis scheme: %w", err) + } + provider, err := apiexport.New(config.ClientConfig, apiexport.Options{ + Scheme: scheme, + }) + if err != nil { + return nil, fmt.Errorf("error setting up kcp provider: %w", err) + } + + config.ExternalAddressGenerator = parseKCPServerURL + config.Provider = provider + default: + config.ExternalAddressGenerator = kuberesources.DefaultExternalAddreesGenerator + config.Provider = nil + } + + opts := ctrl.Options{ + Controller: ctrlconfig.Controller{ + SkipNameValidation: ptr.To(config.Options.ExtraOptions.TestingSkipNameValidation), + }, + Metrics: metricsserver.Options{ + BindAddress: "0", + }, + Scheme: scheme, + } + + manager, err := mcmanager.New(config.ClientConfig, config.Provider, opts) + if err != nil { + return nil, fmt.Errorf("error setting up controller manager: %w", err) + } + + config.Manager = manager + + return config, nil +} + +func parseKCPServerURL(ctx context.Context, clusterConfig *rest.Config) (string, error) { + // In kcp case, we are talking via apiexport so clientconfig will be pointing to + // https://192.168.2.166:6443/services/apiexport/2sssrgg8ivlpw0cy/kube-bind.io/clusters/2p0rtkf7b697s6mj + // We need to extract host and /clusters/... part + u, err := url.Parse(clusterConfig.Host) + if err != nil { + return "", err + } + + // Extract cluster ID from the path + // Path format: /services/apiexport/{export-id}/kube-bind.io/clusters/{cluster-id} + pathParts := strings.Split(strings.Trim(u.Path, "/"), "/") + if len(pathParts) < 5 || pathParts[4] != "clusters" { + return "", fmt.Errorf("invalid apiexport URL format") + } + + clusterID := pathParts[5] + + // Construct new URL with cluster path + u.Path = "/clusters/" + clusterID + + return u.String(), nil +} diff --git a/contrib/example-backend/controllers/clusterbinding/clusterbinding_controller.go b/backend/controllers/clusterbinding/clusterbinding_controller.go similarity index 81% rename from contrib/example-backend/controllers/clusterbinding/clusterbinding_controller.go rename to backend/controllers/clusterbinding/clusterbinding_controller.go index 834dcf5b1..c7e380b6e 100644 --- a/contrib/example-backend/controllers/clusterbinding/clusterbinding_controller.go +++ b/backend/controllers/clusterbinding/clusterbinding_controller.go @@ -26,11 +26,11 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/rest" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/cluster" + "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/reconcile" @@ -39,40 +39,31 @@ import ( mcreconcile "sigs.k8s.io/multicluster-runtime/pkg/reconcile" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - bindclient "github.com/kube-bind/kube-bind/sdk/client/clientset/versioned" ) const ( - controllerName = "kube-bind-example-backend-clusterbinding" + controllerName = "kube-bind-backend-clusterbinding" ) // ClusterBindingReconciler reconciles a ClusterBinding object. type ClusterBindingReconciler struct { - manager mcmanager.Manager - + manager mcmanager.Manager + opts controller.TypedOptions[mcreconcile.Request] scope kubebindv1alpha2.InformerScope - bindClient bindclient.Interface reconciler reconciler } // NewClusterBindingReconciler returns a new ClusterBindingReconciler to reconcile ClusterBindings. func NewClusterBindingReconciler( + _ context.Context, mgr mcmanager.Manager, - config *rest.Config, + opts controller.TypedOptions[mcreconcile.Request], scope kubebindv1alpha2.InformerScope, ) (*ClusterBindingReconciler, error) { - config = rest.CopyConfig(config) - config = rest.AddUserAgent(config, controllerName) - - bindClient, err := bindclient.NewForConfig(config) - if err != nil { - return nil, err - } - r := &ClusterBindingReconciler{ - manager: mgr, - scope: scope, - bindClient: bindClient, + manager: mgr, + opts: opts, + scope: scope, reconciler: reconciler{ scope: scope, listServiceExports: func(ctx context.Context, cache cache.Cache, ns string) ([]*kubebindv1alpha2.APIServiceExport, error) { @@ -88,7 +79,7 @@ func NewClusterBindingReconciler( }, getAPIResourceSchema: func(ctx context.Context, cache cache.Cache, name string) (*kubebindv1alpha2.APIResourceSchema, error) { result := &kubebindv1alpha2.APIResourceSchema{} - err = cache.Get(ctx, types.NamespacedName{Name: name}, result) + err := cache.Get(ctx, types.NamespacedName{Name: name}, result) if err != nil { return nil, fmt.Errorf("failed to get APIResourceSchema %q: %w", name, err) } @@ -102,17 +93,11 @@ func NewClusterBindingReconciler( } return &role, nil }, - createClusterRole: func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRole) (*rbacv1.ClusterRole, error) { - if err := client.Create(ctx, binding); err != nil { - return nil, err - } - return binding, nil + createClusterRole: func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRole) error { + return client.Create(ctx, binding) }, - updateClusterRole: func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRole) (*rbacv1.ClusterRole, error) { - if err := client.Update(ctx, binding); err != nil { - return nil, err - } - return binding, nil + updateClusterRole: func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRole) error { + return client.Update(ctx, binding) }, getClusterRoleBinding: func(ctx context.Context, cache cache.Cache, name string) (*rbacv1.ClusterRoleBinding, error) { var binding rbacv1.ClusterRoleBinding @@ -122,17 +107,11 @@ func NewClusterBindingReconciler( } return &binding, nil }, - createClusterRoleBinding: func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRoleBinding) (*rbacv1.ClusterRoleBinding, error) { - if err := client.Create(ctx, binding); err != nil { - return nil, err - } - return binding, nil + createClusterRoleBinding: func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRoleBinding) error { + return client.Create(ctx, binding) }, - updateClusterRoleBinding: func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRoleBinding) (*rbacv1.ClusterRoleBinding, error) { - if err := client.Update(ctx, binding); err != nil { - return nil, err - } - return binding, nil + updateClusterRoleBinding: func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRoleBinding) error { + return client.Update(ctx, binding) }, deleteClusterRoleBinding: func(ctx context.Context, client client.Client, name string) error { binding := &rbacv1.ClusterRoleBinding{ @@ -144,29 +123,21 @@ func NewClusterBindingReconciler( var ns v1.Namespace key := types.NamespacedName{Name: name} if err := cache.Get(ctx, key, &ns); err != nil { - return nil, fmt.Errorf("failed to get Namespace %q: %w", name, err) + return nil, err } return &ns, nil }, - createRoleBinding: func(ctx context.Context, client client.Client, ns string, binding *rbacv1.RoleBinding) (*rbacv1.RoleBinding, error) { - binding.Namespace = ns - if err := client.Create(ctx, binding); err != nil { - return nil, err - } - return binding, nil + createRoleBinding: func(ctx context.Context, client client.Client, binding *rbacv1.RoleBinding) error { + return client.Create(ctx, binding) }, - updateRoleBinding: func(ctx context.Context, client client.Client, ns string, binding *rbacv1.RoleBinding) (*rbacv1.RoleBinding, error) { - binding.Namespace = ns - if err := client.Update(ctx, binding); err != nil { - return nil, err - } - return binding, nil + updateRoleBinding: func(ctx context.Context, client client.Client, binding *rbacv1.RoleBinding) error { + return client.Update(ctx, binding) }, getRoleBinding: func(ctx context.Context, cache cache.Cache, ns, name string) (*rbacv1.RoleBinding, error) { var binding rbacv1.RoleBinding key := types.NamespacedName{Namespace: ns, Name: name} if err := cache.Get(ctx, key, &binding); err != nil { - return nil, fmt.Errorf("failed to get RoleBinding %q in namespace %q: %w", name, ns, err) + return nil, err } return &binding, nil }, @@ -244,6 +215,7 @@ func (r *ClusterBindingReconciler) SetupWithManager(mgr mcmanager.Manager) error &kubebindv1alpha2.APIServiceExport{}, mapAPIResourceSchema, ). + WithOptions(r.opts). Named(controllerName). Complete(r) } diff --git a/contrib/example-backend/controllers/clusterbinding/clusterbinding_reconcile.go b/backend/controllers/clusterbinding/clusterbinding_reconcile.go similarity index 90% rename from contrib/example-backend/controllers/clusterbinding/clusterbinding_reconcile.go rename to backend/controllers/clusterbinding/clusterbinding_reconcile.go index 2ec7c1ff4..ebf235d53 100644 --- a/contrib/example-backend/controllers/clusterbinding/clusterbinding_reconcile.go +++ b/backend/controllers/clusterbinding/clusterbinding_reconcile.go @@ -31,7 +31,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" - kuberesources "github.com/kube-bind/kube-bind/contrib/example-backend/kubernetes/resources" + kuberesources "github.com/kube-bind/kube-bind/backend/kubernetes/resources" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" conditionsapi "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/util/conditions" @@ -43,17 +43,17 @@ type reconciler struct { listServiceExports func(ctx context.Context, cache cache.Cache, ns string) ([]*kubebindv1alpha2.APIServiceExport, error) getAPIResourceSchema func(ctx context.Context, cache cache.Cache, name string) (*kubebindv1alpha2.APIResourceSchema, error) getClusterRole func(ctx context.Context, cache cache.Cache, name string) (*rbacv1.ClusterRole, error) - createClusterRole func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRole) (*rbacv1.ClusterRole, error) - updateClusterRole func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRole) (*rbacv1.ClusterRole, error) + createClusterRole func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRole) error + updateClusterRole func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRole) error getClusterRoleBinding func(ctx context.Context, cache cache.Cache, name string) (*rbacv1.ClusterRoleBinding, error) - createClusterRoleBinding func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRoleBinding) (*rbacv1.ClusterRoleBinding, error) - updateClusterRoleBinding func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRoleBinding) (*rbacv1.ClusterRoleBinding, error) + createClusterRoleBinding func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRoleBinding) error + updateClusterRoleBinding func(ctx context.Context, client client.Client, binding *rbacv1.ClusterRoleBinding) error deleteClusterRoleBinding func(ctx context.Context, client client.Client, name string) error getRoleBinding func(ctx context.Context, cache cache.Cache, ns, name string) (*rbacv1.RoleBinding, error) - createRoleBinding func(ctx context.Context, client client.Client, ns string, binding *rbacv1.RoleBinding) (*rbacv1.RoleBinding, error) - updateRoleBinding func(ctx context.Context, client client.Client, ns string, binding *rbacv1.RoleBinding) (*rbacv1.RoleBinding, error) + createRoleBinding func(ctx context.Context, client client.Client, binding *rbacv1.RoleBinding) error + updateRoleBinding func(ctx context.Context, client client.Client, binding *rbacv1.RoleBinding) error getNamespace func(ctx context.Context, cache cache.Cache, name string) (*corev1.Namespace, error) } @@ -172,13 +172,13 @@ func (r *reconciler) ensureRBACClusterRole(ctx context.Context, client client.Cl } if role == nil { - if _, err := r.createClusterRole(ctx, client, expected); err != nil { + if err := r.createClusterRole(ctx, client, expected); err != nil { return fmt.Errorf("failed to create ClusterRole %s: %w", expected.Name, err) } } else if !reflect.DeepEqual(role.Rules, expected.Rules) { role = role.DeepCopy() role.Rules = expected.Rules - if _, err := r.updateClusterRole(ctx, client, role); err != nil { + if err := r.updateClusterRole(ctx, client, role); err != nil { return fmt.Errorf("failed to create ClusterRole %s: %w", role.Name, err) } } @@ -232,14 +232,14 @@ func (r *reconciler) ensureRBACClusterRoleBinding(ctx context.Context, client cl } if binding == nil { - if _, err := r.createClusterRoleBinding(ctx, client, expected); err != nil { + if err := r.createClusterRoleBinding(ctx, client, expected); err != nil { return fmt.Errorf("failed to create ClusterRoleBinding %s: %w", expected.Name, err) } } else if !reflect.DeepEqual(binding.Subjects, expected.Subjects) { binding = binding.DeepCopy() binding.Subjects = expected.Subjects // roleRef is immutable - if _, err := r.updateClusterRoleBinding(ctx, client, binding); err != nil { + if err := r.updateClusterRoleBinding(ctx, client, binding); err != nil { return fmt.Errorf("failed to create ClusterRoleBinding %s: %w", expected.Namespace, err) } } @@ -272,14 +272,15 @@ func (r *reconciler) ensureRBACRoleBinding(ctx context.Context, client client.Cl } if binding == nil { - if _, err := r.createRoleBinding(ctx, client, clusterBinding.Namespace, expected); err != nil { + expected.Namespace = clusterBinding.Namespace + if err := r.createRoleBinding(ctx, client, expected); err != nil { return fmt.Errorf("failed to create RoleBinding %s: %w", expected.Name, err) } } else if !reflect.DeepEqual(binding.Subjects, expected.Subjects) { binding = binding.DeepCopy() binding.Subjects = expected.Subjects // roleRef is immutable - if _, err := r.updateRoleBinding(ctx, client, clusterBinding.Namespace, binding); err != nil { + if err := r.updateRoleBinding(ctx, client, binding); err != nil { return fmt.Errorf("failed to create RoleBinding %s: %w", expected.Namespace, err) } } diff --git a/contrib/example-backend/controllers/serviceexport/serviceexport_controller.go b/backend/controllers/serviceexport/serviceexport_controller.go similarity index 90% rename from contrib/example-backend/controllers/serviceexport/serviceexport_controller.go rename to backend/controllers/serviceexport/serviceexport_controller.go index 701d1bd07..f3a455267 100644 --- a/contrib/example-backend/controllers/serviceexport/serviceexport_controller.go +++ b/backend/controllers/serviceexport/serviceexport_controller.go @@ -24,11 +24,11 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/client-go/rest" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/cluster" + "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/reconcile" @@ -38,18 +38,17 @@ import ( "github.com/kube-bind/kube-bind/pkg/indexers" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - bindclient "github.com/kube-bind/kube-bind/sdk/client/clientset/versioned" ) const ( - controllerName = "kube-bind-example-backend-serviceexport" + controllerName = "kube-bind-backend-serviceexport" ) // APIServiceExportReconciler reconciles a APIServiceExport object. type APIServiceExportReconciler struct { manager mcmanager.Manager + opts controller.TypedOptions[mcreconcile.Request] - bindClient bindclient.Interface reconciler reconciler } @@ -57,24 +56,16 @@ type APIServiceExportReconciler struct { func NewAPIServiceExportReconciler( ctx context.Context, mgr mcmanager.Manager, - config *rest.Config, + opts controller.TypedOptions[mcreconcile.Request], ) (*APIServiceExportReconciler, error) { - config = rest.CopyConfig(config) - config = rest.AddUserAgent(config, controllerName) - - bindClient, err := bindclient.NewForConfig(config) - if err != nil { - return nil, err - } - if err := mgr.GetFieldIndexer().IndexField(ctx, &kubebindv1alpha2.APIServiceExport{}, indexers.ServiceExportByAPIResourceSchema, indexers.IndexServiceExportByAPIResourceSchema); err != nil { return nil, fmt.Errorf("failed to setup ServiceExportByAPIResourceSchema indexer: %w", err) } r := &APIServiceExportReconciler{ - manager: mgr, - bindClient: bindClient, + manager: mgr, + opts: opts, reconciler: reconciler{ getAPIResourceSchema: func(ctx context.Context, cache cache.Cache, name string) (*kubebindv1alpha2.APIResourceSchema, error) { var schema kubebindv1alpha2.APIResourceSchema @@ -84,8 +75,13 @@ func NewAPIServiceExportReconciler( } return &schema, nil }, - deleteServiceExport: func(ctx context.Context, ns, name string) error { - return bindClient.KubeBindV1alpha2().APIServiceExports(ns).Delete(ctx, name, metav1.DeleteOptions{}) + deleteServiceExport: func(ctx context.Context, cl client.Client, ns, name string) error { + return cl.Delete(ctx, &kubebindv1alpha2.APIServiceExport{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: ns, + Name: name, + }, + }) }, }, } @@ -178,6 +174,7 @@ func (r *APIServiceExportReconciler) SetupWithManager(mgr mcmanager.Manager) err &kubebindv1alpha2.APIResourceSchema{}, getAPIResourceSchemaMapper, ). + WithOptions(r.opts). Named(controllerName). Complete(r) } diff --git a/contrib/example-backend/controllers/serviceexport/serviceexport_reconcile.go b/backend/controllers/serviceexport/serviceexport_reconcile.go similarity index 95% rename from contrib/example-backend/controllers/serviceexport/serviceexport_reconcile.go rename to backend/controllers/serviceexport/serviceexport_reconcile.go index 52f10df7f..061fbb967 100644 --- a/contrib/example-backend/controllers/serviceexport/serviceexport_reconcile.go +++ b/backend/controllers/serviceexport/serviceexport_reconcile.go @@ -27,6 +27,7 @@ import ( utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/cache" + "sigs.k8s.io/controller-runtime/pkg/client" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" kubebindhelpers "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2/helpers" @@ -35,7 +36,7 @@ import ( type reconciler struct { getAPIResourceSchema func(ctx context.Context, cache cache.Cache, name string) (*kubebindv1alpha2.APIResourceSchema, error) - deleteServiceExport func(ctx context.Context, namespace, name string) error + deleteServiceExport func(ctx context.Context, client client.Client, namespace, name string) error } func (r *reconciler) reconcile(ctx context.Context, cache cache.Cache, export *kubebindv1alpha2.APIServiceExport) error { diff --git a/contrib/example-backend/controllers/serviceexportrequest/serviceexportrequest_controller.go b/backend/controllers/serviceexportrequest/serviceexportrequest_controller.go similarity index 85% rename from contrib/example-backend/controllers/serviceexportrequest/serviceexportrequest_controller.go rename to backend/controllers/serviceexportrequest/serviceexportrequest_controller.go index 392d8d54c..f21a71bc6 100644 --- a/contrib/example-backend/controllers/serviceexportrequest/serviceexportrequest_controller.go +++ b/backend/controllers/serviceexportrequest/serviceexportrequest_controller.go @@ -24,12 +24,11 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - kubernetesclient "k8s.io/client-go/kubernetes" - "k8s.io/client-go/rest" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/cluster" + "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/reconcile" @@ -39,19 +38,17 @@ import ( "github.com/kube-bind/kube-bind/pkg/indexers" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - bindclient "github.com/kube-bind/kube-bind/sdk/client/clientset/versioned" ) const ( - controllerName = "kube-bind-example-backend-serviceexportrequest" + controllerName = "kube-bind-backend-serviceexportrequest" ) // APIServiceExportRequestReconciler reconciles a APIServiceExportRequest object. type APIServiceExportRequestReconciler struct { manager mcmanager.Manager + opts controller.TypedOptions[mcreconcile.Request] - bindClient bindclient.Interface - kubeClient kubernetesclient.Interface informerScope kubebindv1alpha2.InformerScope clusterScopedIsolation kubebindv1alpha2.Isolation reconciler reconciler @@ -61,22 +58,10 @@ type APIServiceExportRequestReconciler struct { func NewAPIServiceExportRequestReconciler( ctx context.Context, mgr mcmanager.Manager, - config *rest.Config, + opts controller.TypedOptions[mcreconcile.Request], scope kubebindv1alpha2.InformerScope, isolation kubebindv1alpha2.Isolation, ) (*APIServiceExportRequestReconciler, error) { - config = rest.CopyConfig(config) - config = rest.AddUserAgent(config, controllerName) - - bindClient, err := bindclient.NewForConfig(config) - if err != nil { - return nil, err - } - kubeClient, err := kubernetesclient.NewForConfig(config) - if err != nil { - return nil, err - } - // Set up field indexers for APIServiceExportRequests if err := mgr.GetFieldIndexer().IndexField(ctx, &kubebindv1alpha2.APIServiceExportRequest{}, indexers.ServiceExportRequestByServiceExport, indexers.IndexServiceExportRequestByServiceExport); err != nil { @@ -90,8 +75,7 @@ func NewAPIServiceExportRequestReconciler( r := &APIServiceExportRequestReconciler{ manager: mgr, - bindClient: bindClient, - kubeClient: kubeClient, + opts: opts, informerScope: scope, clusterScopedIsolation: isolation, reconciler: reconciler{ @@ -113,14 +97,22 @@ func NewAPIServiceExportRequestReconciler( } return &export, nil }, - createServiceExport: func(ctx context.Context, resource *kubebindv1alpha2.APIServiceExport) (*kubebindv1alpha2.APIServiceExport, error) { - return bindClient.KubeBindV1alpha2().APIServiceExports(resource.Namespace).Create(ctx, resource, metav1.CreateOptions{}) + createServiceExport: func(ctx context.Context, cl client.Client, resource *kubebindv1alpha2.APIServiceExport) error { + return cl.Create(ctx, resource) }, - createAPIResourceSchema: func(ctx context.Context, schema *kubebindv1alpha2.APIResourceSchema) (*kubebindv1alpha2.APIResourceSchema, error) { - return bindClient.KubeBindV1alpha2().APIResourceSchemas().Create(ctx, schema, metav1.CreateOptions{}) + createAPIResourceSchema: func(ctx context.Context, cl client.Client, schema *kubebindv1alpha2.APIResourceSchema) (*kubebindv1alpha2.APIResourceSchema, error) { + if err := cl.Create(ctx, schema); err != nil { + return nil, err + } + return schema, nil }, - deleteServiceExportRequest: func(ctx context.Context, ns, name string) error { - return bindClient.KubeBindV1alpha2().APIServiceExportRequests(ns).Delete(ctx, name, metav1.DeleteOptions{}) + deleteServiceExportRequest: func(ctx context.Context, cl client.Client, ns, name string) error { + return cl.Delete(ctx, &kubebindv1alpha2.APIServiceExportRequest{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: ns, + Name: name, + }, + }) }, }, } @@ -222,7 +214,7 @@ func (r *APIServiceExportRequestReconciler) Reconcile(ctx context.Context, req m original := apiServiceExportRequest.DeepCopy() // Run the reconciliation logic - if err := r.reconciler.reconcile(ctx, cache, apiServiceExportRequest); err != nil { + if err := r.reconciler.reconcile(ctx, client, cache, apiServiceExportRequest); err != nil { logger.Error(err, "Failed to reconcile APIServiceExportRequest") return ctrl.Result{}, err } @@ -252,6 +244,7 @@ func (r *APIServiceExportRequestReconciler) SetupWithManager(mgr mcmanager.Manag &kubebindv1alpha2.APIResourceSchema{}, getAPIResourceSchemaMapper, ). + WithOptions(r.opts). Named(controllerName). Complete(r) } diff --git a/contrib/example-backend/controllers/serviceexportrequest/serviceexportrequest_reconcile.go b/backend/controllers/serviceexportrequest/serviceexportrequest_reconcile.go similarity index 81% rename from contrib/example-backend/controllers/serviceexportrequest/serviceexportrequest_reconcile.go rename to backend/controllers/serviceexportrequest/serviceexportrequest_reconcile.go index d858c4953..9b80f31aa 100644 --- a/contrib/example-backend/controllers/serviceexportrequest/serviceexportrequest_reconcile.go +++ b/backend/controllers/serviceexportrequest/serviceexportrequest_reconcile.go @@ -26,6 +26,7 @@ import ( utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/klog/v2" "sigs.k8s.io/controller-runtime/pkg/cache" + "sigs.k8s.io/controller-runtime/pkg/client" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2/helpers" @@ -39,15 +40,15 @@ type reconciler struct { getAPIResourceSchema func(ctx context.Context, cache cache.Cache, name string) (*kubebindv1alpha2.APIResourceSchema, error) getServiceExport func(ctx context.Context, cache cache.Cache, ns, name string) (*kubebindv1alpha2.APIServiceExport, error) - createServiceExport func(ctx context.Context, resource *kubebindv1alpha2.APIServiceExport) (*kubebindv1alpha2.APIServiceExport, error) - createAPIResourceSchema func(ctx context.Context, schema *kubebindv1alpha2.APIResourceSchema) (*kubebindv1alpha2.APIResourceSchema, error) - deleteServiceExportRequest func(ctx context.Context, namespace, name string) error + createServiceExport func(ctx context.Context, cl client.Client, resource *kubebindv1alpha2.APIServiceExport) error + createAPIResourceSchema func(ctx context.Context, cl client.Client, schema *kubebindv1alpha2.APIResourceSchema) (*kubebindv1alpha2.APIResourceSchema, error) + deleteServiceExportRequest func(ctx context.Context, cl client.Client, namespace, name string) error } -func (r *reconciler) reconcile(ctx context.Context, cache cache.Cache, req *kubebindv1alpha2.APIServiceExportRequest) error { +func (r *reconciler) reconcile(ctx context.Context, cl client.Client, cache cache.Cache, req *kubebindv1alpha2.APIServiceExportRequest) error { var errs []error - if err := r.ensureExports(ctx, cache, req); err != nil { + if err := r.ensureExports(ctx, cl, cache, req); err != nil { errs = append(errs, err) } @@ -56,7 +57,7 @@ func (r *reconciler) reconcile(ctx context.Context, cache cache.Cache, req *kube return utilerrors.NewAggregate(errs) } -func (r *reconciler) ensureExports(ctx context.Context, cache cache.Cache, req *kubebindv1alpha2.APIServiceExportRequest) error { +func (r *reconciler) ensureExports(ctx context.Context, cl client.Client, cache cache.Cache, req *kubebindv1alpha2.APIServiceExportRequest) error { logger := klog.FromContext(ctx) if req.Status.Phase == kubebindv1alpha2.APIServiceExportRequestPhasePending { @@ -108,7 +109,7 @@ func (r *reconciler) ensureExports(ctx context.Context, cache cache.Cache, req * } logger.V(1).Info("Creating APIServiceExport", "name", export.Name, "namespace", export.Namespace) - if _, err = r.createServiceExport(ctx, export); err != nil { + if err = r.createServiceExport(ctx, cl, export); err != nil { return err } } @@ -126,7 +127,7 @@ func (r *reconciler) ensureExports(ctx context.Context, cache cache.Cache, req * if time.Since(req.CreationTimestamp.Time) > 10*time.Minute { logger.Info("Deleting service binding request %s/%s", req.Namespace, req.Name, "reason", "timeout", "age", time.Since(req.CreationTimestamp.Time)) - return r.deleteServiceExportRequest(ctx, req.Namespace, req.Name) + return r.deleteServiceExportRequest(ctx, cl, req.Namespace, req.Name) } return nil diff --git a/contrib/example-backend/controllers/servicenamespace/servicenamespace_controller.go b/backend/controllers/servicenamespace/servicenamespace_controller.go similarity index 85% rename from contrib/example-backend/controllers/servicenamespace/servicenamespace_controller.go rename to backend/controllers/servicenamespace/servicenamespace_controller.go index 78e336c21..de8ca9882 100644 --- a/contrib/example-backend/controllers/servicenamespace/servicenamespace_controller.go +++ b/backend/controllers/servicenamespace/servicenamespace_controller.go @@ -24,14 +24,12 @@ import ( corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - kubernetesclient "k8s.io/client-go/kubernetes" - "k8s.io/client-go/rest" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/cluster" + "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/reconcile" @@ -41,19 +39,17 @@ import ( "github.com/kube-bind/kube-bind/pkg/indexers" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - bindclient "github.com/kube-bind/kube-bind/sdk/client/clientset/versioned" ) const ( - controllerName = "kube-bind-example-backend-servicenamespace" + controllerName = "kube-bind-backend-servicenamespace" ) // APIServiceNamespaceReconciler reconciles a APIServiceNamespace object. type APIServiceNamespaceReconciler struct { manager mcmanager.Manager + opts controller.TypedOptions[mcreconcile.Request] - bindClient bindclient.Interface - kubeClient kubernetesclient.Interface informerScope kubebindv1alpha2.InformerScope clusterScopedIsolation kubebindv1alpha2.Isolation reconciler reconciler @@ -63,22 +59,10 @@ type APIServiceNamespaceReconciler struct { func NewAPIServiceNamespaceReconciler( ctx context.Context, mgr mcmanager.Manager, - config *rest.Config, + opts controller.TypedOptions[mcreconcile.Request], scope kubebindv1alpha2.InformerScope, isolation kubebindv1alpha2.Isolation, ) (*APIServiceNamespaceReconciler, error) { - config = rest.CopyConfig(config) - config = rest.AddUserAgent(config, controllerName) - - bindClient, err := bindclient.NewForConfig(config) - if err != nil { - return nil, err - } - kubeClient, err := kubernetesclient.NewForConfig(config) - if err != nil { - return nil, err - } - // Set up field indexers for APIServiceNamespaces if err := mgr.GetFieldIndexer().IndexField(ctx, &kubebindv1alpha2.APIServiceNamespace{}, indexers.ServiceNamespaceByNamespace, indexers.IndexServiceNamespaceByNamespaceControllerRuntime); err != nil { @@ -87,8 +71,7 @@ func NewAPIServiceNamespaceReconciler( r := &APIServiceNamespaceReconciler{ manager: mgr, - bindClient: bindClient, - kubeClient: kubeClient, + opts: opts, informerScope: scope, clusterScopedIsolation: isolation, reconciler: reconciler{ @@ -102,11 +85,16 @@ func NewAPIServiceNamespaceReconciler( } return &ns, nil }, - createNamespace: func(ctx context.Context, ns *corev1.Namespace) (*corev1.Namespace, error) { - return kubeClient.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{}) + createNamespace: func(ctx context.Context, client client.Client, ns *corev1.Namespace) error { + return client.Create(ctx, ns) }, - deleteNamespace: func(ctx context.Context, name string) error { - return kubeClient.CoreV1().Namespaces().Delete(ctx, name, metav1.DeleteOptions{}) + deleteNamespace: func(ctx context.Context, client client.Client, name string) error { + var ns corev1.Namespace + key := types.NamespacedName{Name: name} + if err := client.Get(ctx, key, &ns); err != nil { + return err + } + return client.Delete(ctx, &ns) }, getRoleBinding: func(ctx context.Context, cache cache.Cache, ns, name string) (*rbacv1.RoleBinding, error) { @@ -117,11 +105,11 @@ func NewAPIServiceNamespaceReconciler( } return &rb, nil }, - createRoleBinding: func(ctx context.Context, crb *rbacv1.RoleBinding) (*rbacv1.RoleBinding, error) { - return kubeClient.RbacV1().RoleBindings(crb.Namespace).Create(ctx, crb, metav1.CreateOptions{}) + createRoleBinding: func(ctx context.Context, client client.Client, crb *rbacv1.RoleBinding) error { + return client.Create(ctx, crb) }, - updateRoleBinding: func(ctx context.Context, crb *rbacv1.RoleBinding) (*rbacv1.RoleBinding, error) { - return kubeClient.RbacV1().RoleBindings(crb.Namespace).Update(ctx, crb, metav1.UpdateOptions{}) + updateRoleBinding: func(ctx context.Context, client client.Client, crb *rbacv1.RoleBinding) error { + return client.Update(ctx, crb) }, }, } @@ -247,7 +235,7 @@ func (r *APIServiceNamespaceReconciler) Reconcile(ctx context.Context, req mcrec // Request object not found, could have been deleted after reconcile request. // Handle deletion logic here nsName := req.Namespace + "-" + req.Name - if err := r.reconciler.deleteNamespace(ctx, nsName); err != nil && !errors.IsNotFound(err) { + if err := r.reconciler.deleteNamespace(ctx, client, nsName); err != nil && !errors.IsNotFound(err) { return ctrl.Result{}, fmt.Errorf("failed to delete namespace %q: %w", nsName, err) } logger.Info("APIServiceNamespace not found, ignoring") @@ -261,7 +249,7 @@ func (r *APIServiceNamespaceReconciler) Reconcile(ctx context.Context, req mcrec original := apiServiceNamespace.DeepCopy() // Run the reconciliation logic - if err := r.reconciler.reconcile(ctx, cache, apiServiceNamespace); err != nil { + if err := r.reconciler.reconcile(ctx, client, cache, apiServiceNamespace); err != nil { logger.Error(err, "Failed to reconcile APIServiceNamespace") return ctrl.Result{}, err } @@ -295,6 +283,7 @@ func (r *APIServiceNamespaceReconciler) SetupWithManager(mgr mcmanager.Manager) &kubebindv1alpha2.APIServiceExport{}, getServiceExportMapper, ). + WithOptions(r.opts). Named(controllerName). Complete(r) } diff --git a/contrib/example-backend/controllers/servicenamespace/servicenamespace_reconcile.go b/backend/controllers/servicenamespace/servicenamespace_reconcile.go similarity index 74% rename from contrib/example-backend/controllers/servicenamespace/servicenamespace_reconcile.go rename to backend/controllers/servicenamespace/servicenamespace_reconcile.go index 8c854594e..ffdb1bd53 100644 --- a/contrib/example-backend/controllers/servicenamespace/servicenamespace_reconcile.go +++ b/backend/controllers/servicenamespace/servicenamespace_reconcile.go @@ -26,8 +26,9 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/cache" + "sigs.k8s.io/controller-runtime/pkg/client" - kuberesources "github.com/kube-bind/kube-bind/contrib/example-backend/kubernetes/resources" + kuberesources "github.com/kube-bind/kube-bind/backend/kubernetes/resources" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" ) @@ -35,15 +36,15 @@ type reconciler struct { scope kubebindv1alpha2.InformerScope getNamespace func(ctx context.Context, cache cache.Cache, name string) (*corev1.Namespace, error) - createNamespace func(ctx context.Context, ns *corev1.Namespace) (*corev1.Namespace, error) - deleteNamespace func(ctx context.Context, name string) error + createNamespace func(ctx context.Context, client client.Client, ns *corev1.Namespace) error + deleteNamespace func(ctx context.Context, client client.Client, name string) error getRoleBinding func(ctx context.Context, cache cache.Cache, ns, name string) (*rbacv1.RoleBinding, error) - createRoleBinding func(ctx context.Context, crb *rbacv1.RoleBinding) (*rbacv1.RoleBinding, error) - updateRoleBinding func(ctx context.Context, cr *rbacv1.RoleBinding) (*rbacv1.RoleBinding, error) + createRoleBinding func(ctx context.Context, client client.Client, crb *rbacv1.RoleBinding) error + updateRoleBinding func(ctx context.Context, client client.Client, cr *rbacv1.RoleBinding) error } -func (c *reconciler) reconcile(ctx context.Context, cache cache.Cache, sns *kubebindv1alpha2.APIServiceNamespace) error { +func (c *reconciler) reconcile(ctx context.Context, client client.Client, cache cache.Cache, sns *kubebindv1alpha2.APIServiceNamespace) error { var ns *corev1.Namespace nsName := sns.Namespace + "-" + sns.Name if sns.Status.Namespace != "" { @@ -59,13 +60,13 @@ func (c *reconciler) reconcile(ctx context.Context, cache cache.Cache, sns *kube }, }, } - if _, err := c.createNamespace(ctx, ns); err != nil && !errors.IsAlreadyExists(err) { + if err := c.createNamespace(ctx, client, ns); err != nil && !errors.IsAlreadyExists(err) { return fmt.Errorf("failed to create namespace %q: %w", nsName, err) } } if c.scope == kubebindv1alpha2.NamespacedScope { - if err := c.ensureRBACRoleBinding(ctx, cache, nsName, sns); err != nil { + if err := c.ensureRBACRoleBinding(ctx, client, cache, nsName, sns); err != nil { return fmt.Errorf("failed to ensure RBAC: %w", err) } } @@ -77,7 +78,7 @@ func (c *reconciler) reconcile(ctx context.Context, cache cache.Cache, sns *kube return nil } -func (c *reconciler) ensureRBACRoleBinding(ctx context.Context, cache cache.Cache, ns string, sns *kubebindv1alpha2.APIServiceNamespace) error { +func (c *reconciler) ensureRBACRoleBinding(ctx context.Context, client client.Client, cache cache.Cache, ns string, sns *kubebindv1alpha2.APIServiceNamespace) error { objName := "kube-binder" binding, err := c.getRoleBinding(ctx, cache, ns, objName) if err != nil && !errors.IsNotFound(err) { @@ -104,14 +105,14 @@ func (c *reconciler) ensureRBACRoleBinding(ctx context.Context, cache cache.Cach } if binding == nil { - if _, err := c.createRoleBinding(ctx, expected); err != nil { + if err := c.createRoleBinding(ctx, client, expected); err != nil { return fmt.Errorf("failed to create role binding %s/%s: %w", ns, objName, err) } } else if !reflect.DeepEqual(binding.Subjects, expected.Subjects) || !reflect.DeepEqual(binding.RoleRef, expected.RoleRef) { binding = binding.DeepCopy() binding.Subjects = expected.Subjects binding.RoleRef = expected.RoleRef - if _, err := c.updateRoleBinding(ctx, binding); err != nil { + if err := c.updateRoleBinding(ctx, client, binding); err != nil { return fmt.Errorf("failed to create role binding %s/%s: %w", ns, objName, err) } } diff --git a/contrib/example-backend/cookie/cookie.go b/backend/cookie/cookie.go similarity index 100% rename from contrib/example-backend/cookie/cookie.go rename to backend/cookie/cookie.go diff --git a/contrib/example-backend/cookie/session.go b/backend/cookie/session.go similarity index 100% rename from contrib/example-backend/cookie/session.go rename to backend/cookie/session.go diff --git a/contrib/example-backend/deploy/01-clusterrole.yaml b/backend/deploy/01-clusterrole.yaml similarity index 100% rename from contrib/example-backend/deploy/01-clusterrole.yaml rename to backend/deploy/01-clusterrole.yaml diff --git a/contrib/example-backend/deploy/bootstrap.go b/backend/deploy/bootstrap.go similarity index 100% rename from contrib/example-backend/deploy/bootstrap.go rename to backend/deploy/bootstrap.go diff --git a/contrib/example-backend/http/handler.go b/backend/http/handler.go similarity index 98% rename from contrib/example-backend/http/handler.go rename to backend/http/handler.go index d22f46e78..07836b856 100644 --- a/contrib/example-backend/http/handler.go +++ b/backend/http/handler.go @@ -38,10 +38,10 @@ import ( componentbaseversion "k8s.io/component-base/version" "k8s.io/klog/v2" - "github.com/kube-bind/kube-bind/contrib/example-backend/cookie" - "github.com/kube-bind/kube-bind/contrib/example-backend/kubernetes" - "github.com/kube-bind/kube-bind/contrib/example-backend/kubernetes/resources" - "github.com/kube-bind/kube-bind/contrib/example-backend/template" + "github.com/kube-bind/kube-bind/backend/cookie" + "github.com/kube-bind/kube-bind/backend/kubernetes" + "github.com/kube-bind/kube-bind/backend/kubernetes/resources" + "github.com/kube-bind/kube-bind/backend/template" bindversion "github.com/kube-bind/kube-bind/pkg/version" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" ) @@ -319,6 +319,7 @@ func (h *handler) handleResources(w http.ResponseWriter, r *http.Request) { labelSelector := labels.Set{ resources.ExportedCRDsLabel: "true", } + crds, err := h.kubeManager.ListCustomResourceDefinitions(r.Context(), cluster, labelSelector.AsSelector()) if err != nil { logger.Error(err, "failed to list crds") diff --git a/contrib/example-backend/http/oidc.go b/backend/http/oidc.go similarity index 100% rename from contrib/example-backend/http/oidc.go rename to backend/http/oidc.go diff --git a/contrib/example-backend/http/server.go b/backend/http/server.go similarity index 96% rename from contrib/example-backend/http/server.go rename to backend/http/server.go index 7efdfd787..009ccb852 100644 --- a/contrib/example-backend/http/server.go +++ b/backend/http/server.go @@ -26,7 +26,7 @@ import ( "github.com/gorilla/mux" - "github.com/kube-bind/kube-bind/contrib/example-backend/options" + "github.com/kube-bind/kube-bind/backend/options" ) type Server struct { diff --git a/contrib/example-backend/kubernetes/indexers.go b/backend/kubernetes/indexers.go similarity index 92% rename from contrib/example-backend/kubernetes/indexers.go rename to backend/kubernetes/indexers.go index 093e9a3f5..059af99ec 100644 --- a/contrib/example-backend/kubernetes/indexers.go +++ b/backend/kubernetes/indexers.go @@ -20,7 +20,7 @@ import ( corev1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/kube-bind/kube-bind/contrib/example-backend/kubernetes/resources" + "github.com/kube-bind/kube-bind/backend/kubernetes/resources" ) const ( diff --git a/contrib/example-backend/kubernetes/manager.go b/backend/kubernetes/manager.go similarity index 88% rename from contrib/example-backend/kubernetes/manager.go rename to backend/kubernetes/manager.go index a807187fe..57fa95731 100644 --- a/contrib/example-backend/kubernetes/manager.go +++ b/backend/kubernetes/manager.go @@ -29,7 +29,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" mcmanager "sigs.k8s.io/multicluster-runtime/pkg/manager" - kuberesources "github.com/kube-bind/kube-bind/contrib/example-backend/kubernetes/resources" + kuberesources "github.com/kube-bind/kube-bind/backend/kubernetes/resources" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" ) @@ -37,9 +37,9 @@ type Manager struct { namespacePrefix string providerPrettyName string - externalAddress string - externalCA []byte - externalTLSServerName string + externalAddressGenerator kuberesources.ExternalAddreesGeneratorFunc + externalCA []byte + externalTLSServerName string manager mcmanager.Manager } @@ -47,7 +47,7 @@ type Manager struct { func NewKubernetesManager( ctx context.Context, namespacePrefix, providerPrettyName string, - externalAddress string, + externalAddressGenerator kuberesources.ExternalAddreesGeneratorFunc, externalCA []byte, externalTLSServerName string, manager mcmanager.Manager, @@ -56,9 +56,9 @@ func NewKubernetesManager( namespacePrefix: namespacePrefix, providerPrettyName: providerPrettyName, - externalAddress: externalAddress, - externalCA: externalCA, - externalTLSServerName: externalTLSServerName, + externalAddressGenerator: externalAddressGenerator, + externalCA: externalCA, + externalTLSServerName: externalTLSServerName, manager: manager, } @@ -135,7 +135,7 @@ func (m *Manager) HandleResources(ctx context.Context, identity, cluster, resour return nil, err } - kfgSecret, err := kuberesources.GenerateKubeconfig(ctx, c, cl.GetConfig(), m.externalAddress, m.externalCA, m.externalTLSServerName, saSecret.Name, ns, kubeconfigSecretName) + kfgSecret, err := kuberesources.GenerateKubeconfig(ctx, c, cl.GetConfig(), m.externalAddressGenerator, m.externalCA, m.externalTLSServerName, saSecret.Name, ns, kubeconfigSecretName) if err != nil { return nil, err } @@ -148,10 +148,10 @@ func (m *Manager) ListAPIResourceSchemas(ctx context.Context, cluster string) (* if err != nil { return nil, err } - c := cl.GetClient() + cache := cl.GetCache() var schemas kubebindv1alpha2.APIResourceSchemaList - err = c.List(ctx, &schemas) + err = cache.List(ctx, &schemas) if err != nil { return nil, err } diff --git a/contrib/example-backend/kubernetes/resources/cluster_binding.go b/backend/kubernetes/resources/cluster_binding.go similarity index 100% rename from contrib/example-backend/kubernetes/resources/cluster_binding.go rename to backend/kubernetes/resources/cluster_binding.go diff --git a/contrib/example-backend/kubernetes/resources/kubeconfig.go b/backend/kubernetes/resources/kubeconfig.go similarity index 82% rename from contrib/example-backend/kubernetes/resources/kubeconfig.go rename to backend/kubernetes/resources/kubeconfig.go index b4ff587f2..163091b27 100644 --- a/contrib/example-backend/kubernetes/resources/kubeconfig.go +++ b/backend/kubernetes/resources/kubeconfig.go @@ -38,16 +38,22 @@ import ( func GenerateKubeconfig(ctx context.Context, client client.Client, clusterConfig *rest.Config, - externalAddress string, + externalAddressGenerator ExternalAddreesGeneratorFunc, externalCA []byte, externalTLSServerName string, saSecretName, ns, kubeconfigSecretName string, ) (*corev1.Secret, error) { logger := klog.FromContext(ctx) - if externalAddress == "" { - externalAddress = clusterConfig.Host + if externalAddressGenerator == nil { + externalAddressGenerator = DefaultExternalAddreesGenerator } + + externalAddress, err := externalAddressGenerator(ctx, clusterConfig) + if err != nil { + return nil, fmt.Errorf("failed to generate external address: %w", err) + } + if externalCA == nil { if len(clusterConfig.CAData) != 0 { externalCA = clusterConfig.CAData @@ -134,3 +140,12 @@ func GenerateKubeconfig(ctx context.Context, } return &existing, nil } + +// ExternalAddreesGeneratorFunc is a function that generates the external address for a cluster based on the clusterConfig +// and is dependent on the provider. +type ExternalAddreesGeneratorFunc func(ctx context.Context, clusterConfig *rest.Config) (string, error) + +// DefaultExternalAddreesGenerator is the default implementation of the ExternalAddreesGeneratorFunc. +func DefaultExternalAddreesGenerator(ctx context.Context, clusterConfig *rest.Config) (string, error) { + return clusterConfig.Host, nil +} diff --git a/contrib/example-backend/kubernetes/resources/namespace.go b/backend/kubernetes/resources/namespace.go similarity index 100% rename from contrib/example-backend/kubernetes/resources/namespace.go rename to backend/kubernetes/resources/namespace.go diff --git a/contrib/example-backend/kubernetes/resources/rbac.go b/backend/kubernetes/resources/rbac.go similarity index 100% rename from contrib/example-backend/kubernetes/resources/rbac.go rename to backend/kubernetes/resources/rbac.go diff --git a/contrib/example-backend/kubernetes/resources/resources.go b/backend/kubernetes/resources/resources.go similarity index 100% rename from contrib/example-backend/kubernetes/resources/resources.go rename to backend/kubernetes/resources/resources.go diff --git a/contrib/example-backend/kubernetes/resources/secret.go b/backend/kubernetes/resources/secret.go similarity index 100% rename from contrib/example-backend/kubernetes/resources/secret.go rename to backend/kubernetes/resources/secret.go diff --git a/contrib/example-backend/options/cookie.go b/backend/options/cookie.go similarity index 100% rename from contrib/example-backend/options/cookie.go rename to backend/options/cookie.go diff --git a/contrib/example-backend/options/oidc.go b/backend/options/oidc.go similarity index 100% rename from contrib/example-backend/options/oidc.go rename to backend/options/oidc.go diff --git a/contrib/example-backend/options/options.go b/backend/options/options.go similarity index 95% rename from contrib/example-backend/options/options.go rename to backend/options/options.go index 64fd26ba6..5512c1678 100644 --- a/contrib/example-backend/options/options.go +++ b/backend/options/options.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Kube Bind Authors. +Copyright 2025 The Kube Bind Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -38,10 +38,12 @@ type Options struct { ExtraOptions } + type ExtraOptions struct { KubeConfig string - Provider string + Provider string + ServerURL string NamespacePrefix string PrettyName string @@ -83,9 +85,10 @@ func NewOptions() *Options { ExtraOptions: ExtraOptions{ Provider: "kubernetes", NamespacePrefix: "cluster", - PrettyName: "Example Backend", + PrettyName: "Backend", ConsumerScope: string(kubebindv1alpha2.NamespacedScope), ClusterScopedIsolation: string(kubebindv1alpha2.IsolationPrefixed), + ServerURL: "", }, } } @@ -115,6 +118,8 @@ func (options *Options) AddFlags(fs *pflag.FlagSet) { fmt.Sprintf("The multicluster runtime provider. Possible values are: %v", sets.List(sets.Set[string](sets.StringKeySet(providerAliases)))), ) + fs.StringVar(&options.ServerURL, "server-url", options.ServerURL, "The URL of the backend server. If not specified, it will be derived from the kubeconfig or service account's hosts.") + fs.StringVar(&options.TestingAutoSelect, "testing-auto-select", options.TestingAutoSelect, ". that is automatically selected on th bind screen for testing") fs.MarkHidden("testing-auto-select") //nolint:errcheck } diff --git a/contrib/example-backend/options/serve.go b/backend/options/serve.go similarity index 100% rename from contrib/example-backend/options/serve.go rename to backend/options/serve.go diff --git a/contrib/example-backend/server.go b/backend/server.go similarity index 68% rename from contrib/example-backend/server.go rename to backend/server.go index 5040a1f60..4f1d06dc5 100644 --- a/contrib/example-backend/server.go +++ b/backend/server.go @@ -21,23 +21,19 @@ import ( "encoding/base64" "fmt" "net" + "os" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "k8s.io/apimachinery/pkg/runtime" - clientgoscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/klog/v2" "k8s.io/utils/ptr" - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/config" - metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" - mcmanager "sigs.k8s.io/multicluster-runtime/pkg/manager" - - "github.com/kube-bind/kube-bind/contrib/example-backend/controllers/clusterbinding" - "github.com/kube-bind/kube-bind/contrib/example-backend/controllers/serviceexport" - "github.com/kube-bind/kube-bind/contrib/example-backend/controllers/serviceexportrequest" - "github.com/kube-bind/kube-bind/contrib/example-backend/controllers/servicenamespace" - examplehttp "github.com/kube-bind/kube-bind/contrib/example-backend/http" - examplekube "github.com/kube-bind/kube-bind/contrib/example-backend/kubernetes" + "sigs.k8s.io/controller-runtime/pkg/controller" + mcreconcile "sigs.k8s.io/multicluster-runtime/pkg/reconcile" + + "github.com/kube-bind/kube-bind/backend/controllers/clusterbinding" + "github.com/kube-bind/kube-bind/backend/controllers/serviceexport" + "github.com/kube-bind/kube-bind/backend/controllers/serviceexportrequest" + "github.com/kube-bind/kube-bind/backend/controllers/servicenamespace" + examplehttp "github.com/kube-bind/kube-bind/backend/http" + examplekube "github.com/kube-bind/kube-bind/backend/kubernetes" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" ) @@ -47,7 +43,6 @@ type Server struct { OIDC *examplehttp.OIDCServiceProvider Kubernetes *examplekube.Manager WebServer *examplehttp.Server - Manager mcmanager.Manager Controllers } @@ -56,8 +51,7 @@ type Controllers struct { ClusterBinding *clusterbinding.ClusterBindingReconciler ServiceExport *serviceexport.APIServiceExportReconciler ServiceExportRequest *serviceexportrequest.APIServiceExportRequestReconciler - - ServiceNamespace *servicenamespace.APIServiceNamespaceReconciler + ServiceNamespace *servicenamespace.APIServiceNamespaceReconciler } func NewServer(ctx context.Context, c *Config) (*Server, error) { @@ -71,33 +65,6 @@ func NewServer(ctx context.Context, c *Config) (*Server, error) { return nil, fmt.Errorf("error setting up HTTP Server: %w", err) } - // Set up controller-runtime manager - scheme := runtime.NewScheme() - if err := clientgoscheme.AddToScheme(scheme); err != nil { - return nil, fmt.Errorf("error adding client-go scheme: %w", err) - } - if err := apiextensionsv1.AddToScheme(scheme); err != nil { - return nil, fmt.Errorf("error adding apiextensions scheme: %w", err) - } - if err := kubebindv1alpha2.AddToScheme(scheme); err != nil { - return nil, fmt.Errorf("error adding kubebind scheme: %w", err) - } - - opts := ctrl.Options{ - Controller: config.Controller{ - SkipNameValidation: ptr.To(c.Options.ExtraOptions.TestingSkipNameValidation), - }, - Metrics: metricsserver.Options{ - BindAddress: "0", - }, - Scheme: scheme, - } - - s.Manager, err = mcmanager.New(s.Config.ClientConfig, s.Config.Provider, opts) - if err != nil { - return nil, fmt.Errorf("error setting up controller manager: %w", err) - } - // setup oidc backend callback := c.Options.OIDC.CallbackURL if callback == "" { @@ -116,10 +83,10 @@ func NewServer(ctx context.Context, c *Config) (*Server, error) { ctx, c.Options.NamespacePrefix, c.Options.PrettyName, - c.Options.ExternalAddress, + c.ExternalAddressGenerator, c.Options.ExternalCA, c.Options.TLSExternalServerName, - s.Manager, + s.Config.Manager, ) if err != nil { return nil, fmt.Errorf("error setting up Kubernetes Manager: %w", err) @@ -155,10 +122,15 @@ func NewServer(ctx context.Context, c *Config) (*Server, error) { } handler.AddRoutes(s.WebServer.Router) + opts := controller.TypedOptions[mcreconcile.Request]{ + SkipNameValidation: ptr.To(c.Options.TestingSkipNameValidation), + } + // construct controllers s.ClusterBinding, err = clusterbinding.NewClusterBindingReconciler( - s.Manager, - c.ClientConfig, + ctx, + s.Config.Manager, + opts, kubebindv1alpha2.InformerScope(c.Options.ConsumerScope), ) if err != nil { @@ -166,29 +138,29 @@ func NewServer(ctx context.Context, c *Config) (*Server, error) { } // Register the ClusterBinding controller with the manager - if err := s.ClusterBinding.SetupWithManager(s.Manager); err != nil { + if err := s.ClusterBinding.SetupWithManager(s.Config.Manager); err != nil { return nil, fmt.Errorf("error setting up ClusterBinding controller with manager: %w", err) } // construct APIServiceExport controller with multicluster-runtime s.ServiceExport, err = serviceexport.NewAPIServiceExportReconciler( ctx, - s.Manager, - c.ClientConfig, + s.Config.Manager, + opts, ) if err != nil { return nil, fmt.Errorf("error setting up APIServiceExport Controller: %w", err) } // Register the APIServiceExport controller with the manager - if err := s.ServiceExport.SetupWithManager(s.Manager); err != nil { + if err := s.ServiceExport.SetupWithManager(s.Config.Manager); err != nil { return nil, fmt.Errorf("error setting up APIServiceExport controller with manager: %w", err) } s.ServiceNamespace, err = servicenamespace.NewAPIServiceNamespaceReconciler( ctx, - s.Manager, - c.ClientConfig, + s.Config.Manager, + opts, kubebindv1alpha2.InformerScope(c.Options.ConsumerScope), kubebindv1alpha2.Isolation(c.Options.ClusterScopedIsolation), ) @@ -197,13 +169,13 @@ func NewServer(ctx context.Context, c *Config) (*Server, error) { } // Register the APIServiceNamespace controller with the manager - if err := s.ServiceNamespace.SetupWithManager(s.Manager); err != nil { + if err := s.ServiceNamespace.SetupWithManager(s.Config.Manager); err != nil { return nil, fmt.Errorf("error setting up APIServiceNamespace controller with manager: %w", err) } s.ServiceExportRequest, err = serviceexportrequest.NewAPIServiceExportRequestReconciler( ctx, - s.Manager, - c.ClientConfig, + s.Config.Manager, + opts, kubebindv1alpha2.InformerScope(c.Options.ConsumerScope), kubebindv1alpha2.Isolation(c.Options.ClusterScopedIsolation), ) @@ -212,7 +184,7 @@ func NewServer(ctx context.Context, c *Config) (*Server, error) { } // Register the ServiceExportRequest controller with the manager - if err := s.ServiceExportRequest.SetupWithManager(s.Manager); err != nil { + if err := s.ServiceExportRequest.SetupWithManager(s.Config.Manager); err != nil { return nil, fmt.Errorf("error setting up ServiceExportRequest controller with manager: %w", err) } @@ -226,9 +198,19 @@ func (s *Server) Addr() net.Addr { func (s *Server) Run(ctx context.Context) error { logger := klog.FromContext(ctx) + if s.Config.Provider != nil { + logger.Info("Starting provider") + go func() { + if err := s.Config.Provider.Start(ctx, s.Config.Manager); err != nil { + logger.Error(err, "unable to run provider") + os.Exit(1) + } + }() + } + // start controller-runtime manager after bootstrap completes go func() { - if err := s.Manager.Start(ctx); err != nil { + if err := s.Config.Manager.Start(ctx); err != nil { logger.Error(err, "Failed to start controller manager") } }() diff --git a/contrib/example-backend/template/files.go b/backend/template/files.go similarity index 100% rename from contrib/example-backend/template/files.go rename to backend/template/files.go diff --git a/contrib/example-backend/template/icon/github-icon.svg b/backend/template/icon/github-icon.svg similarity index 100% rename from contrib/example-backend/template/icon/github-icon.svg rename to backend/template/icon/github-icon.svg diff --git a/contrib/example-backend/template/icon/google-icon.svg b/backend/template/icon/google-icon.svg similarity index 100% rename from contrib/example-backend/template/icon/google-icon.svg rename to backend/template/icon/google-icon.svg diff --git a/contrib/example-backend/template/icon/microsoft-icon.svg b/backend/template/icon/microsoft-icon.svg similarity index 100% rename from contrib/example-backend/template/icon/microsoft-icon.svg rename to backend/template/icon/microsoft-icon.svg diff --git a/contrib/example-backend/template/login.html b/backend/template/login.html similarity index 100% rename from contrib/example-backend/template/login.html rename to backend/template/login.html diff --git a/contrib/example-backend/template/resources.gohtml b/backend/template/resources.gohtml similarity index 100% rename from contrib/example-backend/template/resources.gohtml rename to backend/template/resources.gohtml diff --git a/contrib/example-backend/template/styles.css b/backend/template/styles.css similarity index 100% rename from contrib/example-backend/template/styles.css rename to backend/template/styles.css diff --git a/cli/go.mod b/cli/go.mod index 7314d924e..d4591e527 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -20,11 +20,11 @@ require ( github.com/spf13/cobra v1.9.1 github.com/spf13/pflag v1.0.6 github.com/stretchr/testify v1.10.0 - k8s.io/api v0.33.0 + k8s.io/api v0.33.3 k8s.io/apiextensions-apiserver v0.33.0 - k8s.io/apimachinery v0.33.0 + k8s.io/apimachinery v0.33.3 k8s.io/cli-runtime v0.32.0 - k8s.io/client-go v0.33.0 + k8s.io/client-go v0.33.3 k8s.io/component-base v0.33.0 k8s.io/klog/v2 v2.130.1 sigs.k8s.io/yaml v1.4.0 @@ -121,12 +121,12 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiserver v0.33.0 // indirect k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect - k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect + k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect rsc.io/qr v0.2.0 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect - sigs.k8s.io/kustomize/api v0.18.0 // indirect - sigs.k8s.io/kustomize/kyaml v0.18.1 // indirect + sigs.k8s.io/kustomize/api v0.19.0 // indirect + sigs.k8s.io/kustomize/kyaml v0.19.0 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect ) diff --git a/cli/go.sum b/cli/go.sum index 9cbb02510..a56520ac3 100644 --- a/cli/go.sum +++ b/cli/go.sum @@ -308,18 +308,18 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYs gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.33.0 h1:yTgZVn1XEe6opVpP1FylmNrIFWuDqe2H0V8CT5gxfIU= -k8s.io/api v0.33.0/go.mod h1:CTO61ECK/KU7haa3qq8sarQ0biLq2ju405IZAd9zsiM= +k8s.io/api v0.33.3 h1:SRd5t//hhkI1buzxb288fy2xvjubstenEKL9K51KBI8= +k8s.io/api v0.33.3/go.mod h1:01Y/iLUjNBM3TAvypct7DIj0M0NIZc+PzAHCIo0CYGE= k8s.io/apiextensions-apiserver v0.33.0 h1:d2qpYL7Mngbsc1taA4IjJPRJ9ilnsXIrndH+r9IimOs= k8s.io/apiextensions-apiserver v0.33.0/go.mod h1:VeJ8u9dEEN+tbETo+lFkwaaZPg6uFKLGj5vyNEwwSzc= -k8s.io/apimachinery v0.33.0 h1:1a6kHrJxb2hs4t8EE5wuR/WxKDwGN1FKH3JvDtA0CIQ= -k8s.io/apimachinery v0.33.0/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= +k8s.io/apimachinery v0.33.3 h1:4ZSrmNa0c/ZpZJhAgRdcsFcZOw1PQU1bALVQ0B3I5LA= +k8s.io/apimachinery v0.33.3/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= k8s.io/apiserver v0.33.0 h1:QqcM6c+qEEjkOODHppFXRiw/cE2zP85704YrQ9YaBbc= k8s.io/apiserver v0.33.0/go.mod h1:EixYOit0YTxt8zrO2kBU7ixAtxFce9gKGq367nFmqI8= k8s.io/cli-runtime v0.32.0 h1:dP+OZqs7zHPpGQMCGAhectbHU2SNCuZtIimRKTv2T1c= k8s.io/cli-runtime v0.32.0/go.mod h1:Mai8ht2+esoDRK5hr861KRy6z0zHsSTYttNVJXgP3YQ= -k8s.io/client-go v0.33.0 h1:UASR0sAYVUzs2kYuKn/ZakZlcs2bEHaizrrHUZg0G98= -k8s.io/client-go v0.33.0/go.mod h1:kGkd+l/gNGg8GYWAPr0xF1rRKvVWvzh9vmZAMXtaKOg= +k8s.io/client-go v0.33.3 h1:M5AfDnKfYmVJif92ngN532gFqakcGi6RvaOF16efrpA= +k8s.io/client-go v0.33.3/go.mod h1:luqKBQggEf3shbxHY4uVENAxrDISLOarxpTKMiUuujg= k8s.io/component-base v0.33.0 h1:Ot4PyJI+0JAD9covDhwLp9UNkUja209OzsJ4FzScBNk= k8s.io/component-base v0.33.0/go.mod h1:aXYZLbw3kihdkOPMDhWbjGCO6sg+luw554KP51t8qCU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= @@ -328,18 +328,18 @@ k8s.io/kms v0.33.0 h1:fhQSW/vyaWDhMp0vDuO/sLg2RlGZf4F77beSXcB4/eE= k8s.io/kms v0.33.0/go.mod h1:C1I8mjFFBNzfUZXYt9FZVJ8MJl7ynFbGgZFbBzkBJ3E= k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= -k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0= -k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= +k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/qr v0.2.0 h1:6vBLea5/NRMVTz8V66gipeLycZMl/+UlFmk8DvqQ6WY= rsc.io/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= -sigs.k8s.io/kustomize/api v0.18.0 h1:hTzp67k+3NEVInwz5BHyzc9rGxIauoXferXyjv5lWPo= -sigs.k8s.io/kustomize/api v0.18.0/go.mod h1:f8isXnX+8b+SGLHQ6yO4JG1rdkZlvhaCf/uZbLVMb0U= -sigs.k8s.io/kustomize/kyaml v0.18.1 h1:WvBo56Wzw3fjS+7vBjN6TeivvpbW9GmRaWZ9CIVmt4E= -sigs.k8s.io/kustomize/kyaml v0.18.1/go.mod h1:C3L2BFVU1jgcddNBE1TxuVLgS46TjObMwW5FT9FcjYo= +sigs.k8s.io/kustomize/api v0.19.0 h1:F+2HB2mU1MSiR9Hp1NEgoU2q9ItNOaBJl0I4Dlus5SQ= +sigs.k8s.io/kustomize/api v0.19.0/go.mod h1:/BbwnivGVcBh1r+8m3tH1VNxJmHSk1PzP5fkP6lbL1o= +sigs.k8s.io/kustomize/kyaml v0.19.0 h1:RFge5qsO1uHhwJsu3ipV7RNolC7Uozc0jUBC/61XSlA= +sigs.k8s.io/kustomize/kyaml v0.19.0/go.mod h1:FeKD5jEOH+FbZPpqUghBP8mrLjJ3+zD3/rf9NNu1cwY= sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= diff --git a/cmd/example-backend/main.go b/cmd/backend/main.go similarity index 91% rename from cmd/example-backend/main.go rename to cmd/backend/main.go index 49a548335..f55a9401c 100644 --- a/cmd/example-backend/main.go +++ b/cmd/backend/main.go @@ -31,8 +31,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - backend "github.com/kube-bind/kube-bind/contrib/example-backend" - "github.com/kube-bind/kube-bind/contrib/example-backend/options" + backend "github.com/kube-bind/kube-bind/backend" + "github.com/kube-bind/kube-bind/backend/options" ) func main() { @@ -64,7 +64,7 @@ func run(ctx context.Context) error { ver = ver[i+5:] // example: v1.25.2+kubectl-bind-v0.0.7-52-g8fee0baeaff3aa } logger := klog.FromContext(ctx) - logger.Info("Starting example-backend", "version", ver) + logger.Info("Starting backend", "version", ver) // create server completed, err := options.Complete() diff --git a/contrib/example-backend/config.go b/contrib/example-backend/config.go deleted file mode 100644 index 2caa36498..000000000 --- a/contrib/example-backend/config.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2022 The Kube Bind 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. -*/ - -package backend - -import ( - "fmt" - - "github.com/kcp-dev/multicluster-provider/apiexport" - "k8s.io/client-go/rest" - "k8s.io/client-go/tools/clientcmd" - "sigs.k8s.io/multicluster-runtime/pkg/multicluster" - - "github.com/kube-bind/kube-bind/contrib/example-backend/options" -) - -type Config struct { - Options *options.CompletedOptions - - Provider multicluster.Provider - - ClientConfig *rest.Config -} - -func NewConfig(options *options.CompletedOptions) (*Config, error) { - config := &Config{ - Options: options, - } - - // create clients - rules := clientcmd.NewDefaultClientConfigLoadingRules() - rules.ExplicitPath = options.KubeConfig - var err error - config.ClientConfig, err = clientcmd.NewNonInteractiveDeferredLoadingClientConfig(rules, nil).ClientConfig() - if err != nil { - return nil, err - } - config.ClientConfig = rest.CopyConfig(config.ClientConfig) - config.ClientConfig = rest.AddUserAgent(config.ClientConfig, "kube-bind-backend") - - switch options.Provider { - case "kcp": - provider, err := apiexport.New(config.ClientConfig, apiexport.Options{}) - if err != nil { - return nil, fmt.Errorf("error setting up kcp provider: %w", err) - } - config.Provider = provider - default: - config.Provider = nil - } - - return config, nil -} diff --git a/deploy/crd/kube-bind.io_apiconversions.yaml b/deploy/crd/kube-bind.io_apiconversions.yaml index 5101a551d..0fd755b3d 100644 --- a/deploy/crd/kube-bind.io_apiconversions.yaml +++ b/deploy/crd/kube-bind.io_apiconversions.yaml @@ -1,4 +1,3 @@ ---- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -6,6 +5,8 @@ metadata: controller-gen.kubebuilder.io/version: v0.16.5 name: apiconversions.kube-bind.io spec: + conversion: + strategy: None group: kube-bind.io names: categories: diff --git a/deploy/crd/kube-bind.io_apiresourceschemas.yaml b/deploy/crd/kube-bind.io_apiresourceschemas.yaml index 0ec757520..6e3875153 100644 --- a/deploy/crd/kube-bind.io_apiresourceschemas.yaml +++ b/deploy/crd/kube-bind.io_apiresourceschemas.yaml @@ -1,4 +1,3 @@ ---- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -6,6 +5,8 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.3 name: apiresourceschemas.kube-bind.io spec: + conversion: + strategy: None group: kube-bind.io names: categories: diff --git a/deploy/crd/kube-bind.io_apiservicebindings.yaml b/deploy/crd/kube-bind.io_apiservicebindings.yaml index 7505879cb..c68ca4e9f 100644 --- a/deploy/crd/kube-bind.io_apiservicebindings.yaml +++ b/deploy/crd/kube-bind.io_apiservicebindings.yaml @@ -1,4 +1,3 @@ ---- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -6,6 +5,8 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.3 name: apiservicebindings.kube-bind.io spec: + conversion: + strategy: None group: kube-bind.io names: categories: diff --git a/deploy/crd/kube-bind.io_apiserviceexportrequests.yaml b/deploy/crd/kube-bind.io_apiserviceexportrequests.yaml index f0558fb07..b7aaf85c8 100644 --- a/deploy/crd/kube-bind.io_apiserviceexportrequests.yaml +++ b/deploy/crd/kube-bind.io_apiserviceexportrequests.yaml @@ -5,6 +5,8 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.3 name: apiserviceexportrequests.kube-bind.io spec: + conversion: + strategy: None group: kube-bind.io names: categories: diff --git a/deploy/crd/kube-bind.io_apiserviceexports.yaml b/deploy/crd/kube-bind.io_apiserviceexports.yaml index e7fcb626a..6a0a9eed2 100644 --- a/deploy/crd/kube-bind.io_apiserviceexports.yaml +++ b/deploy/crd/kube-bind.io_apiserviceexports.yaml @@ -1,4 +1,3 @@ ---- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -6,6 +5,8 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.3 name: apiserviceexports.kube-bind.io spec: + conversion: + strategy: None group: kube-bind.io names: categories: diff --git a/deploy/crd/kube-bind.io_apiservicenamespaces.yaml b/deploy/crd/kube-bind.io_apiservicenamespaces.yaml index 1f84ff597..5ff91b0d4 100644 --- a/deploy/crd/kube-bind.io_apiservicenamespaces.yaml +++ b/deploy/crd/kube-bind.io_apiservicenamespaces.yaml @@ -1,4 +1,3 @@ ---- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -6,6 +5,8 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.3 name: apiservicenamespaces.kube-bind.io spec: + conversion: + strategy: None group: kube-bind.io names: categories: diff --git a/deploy/crd/kube-bind.io_boundapiresourceschemas.yaml b/deploy/crd/kube-bind.io_boundapiresourceschemas.yaml index 8b917429f..16ba489b1 100644 --- a/deploy/crd/kube-bind.io_boundapiresourceschemas.yaml +++ b/deploy/crd/kube-bind.io_boundapiresourceschemas.yaml @@ -1,4 +1,3 @@ ---- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -6,6 +5,8 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.3 name: boundapiresourceschemas.kube-bind.io spec: + conversion: + strategy: None group: kube-bind.io names: categories: diff --git a/deploy/crd/kube-bind.io_clusterbindings.yaml b/deploy/crd/kube-bind.io_clusterbindings.yaml index d47d26586..b8f11e26d 100644 --- a/deploy/crd/kube-bind.io_clusterbindings.yaml +++ b/deploy/crd/kube-bind.io_clusterbindings.yaml @@ -1,4 +1,3 @@ ---- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: @@ -6,6 +5,8 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.3 name: clusterbindings.kube-bind.io spec: + conversion: + strategy: None group: kube-bind.io names: categories: diff --git a/contrib/manifests/example-backend/insecure/example-backend.yaml b/deploy/manifests/example-backend/insecure/example-backend.yaml similarity index 100% rename from contrib/manifests/example-backend/insecure/example-backend.yaml rename to deploy/manifests/example-backend/insecure/example-backend.yaml diff --git a/contrib/manifests/example-backend/letsencrypt/.gitignore b/deploy/manifests/example-backend/letsencrypt/.gitignore similarity index 100% rename from contrib/manifests/example-backend/letsencrypt/.gitignore rename to deploy/manifests/example-backend/letsencrypt/.gitignore diff --git a/contrib/manifests/example-backend/letsencrypt/cluster-issuer.yaml.tmpl b/deploy/manifests/example-backend/letsencrypt/cluster-issuer.yaml.tmpl similarity index 100% rename from contrib/manifests/example-backend/letsencrypt/cluster-issuer.yaml.tmpl rename to deploy/manifests/example-backend/letsencrypt/cluster-issuer.yaml.tmpl diff --git a/contrib/manifests/example-backend/letsencrypt/dex-config-secret.yaml.tmpl b/deploy/manifests/example-backend/letsencrypt/dex-config-secret.yaml.tmpl similarity index 100% rename from contrib/manifests/example-backend/letsencrypt/dex-config-secret.yaml.tmpl rename to deploy/manifests/example-backend/letsencrypt/dex-config-secret.yaml.tmpl diff --git a/contrib/manifests/example-backend/letsencrypt/example-backend.yaml b/deploy/manifests/example-backend/letsencrypt/example-backend.yaml similarity index 100% rename from contrib/manifests/example-backend/letsencrypt/example-backend.yaml rename to deploy/manifests/example-backend/letsencrypt/example-backend.yaml diff --git a/contrib/manifests/example-backend/letsencrypt/oidc-secret.yaml.tmpl b/deploy/manifests/example-backend/letsencrypt/oidc-secret.yaml.tmpl similarity index 100% rename from contrib/manifests/example-backend/letsencrypt/oidc-secret.yaml.tmpl rename to deploy/manifests/example-backend/letsencrypt/oidc-secret.yaml.tmpl diff --git a/deploy/patches/kube-bind.io_apiconversions.yaml-patch b/deploy/patches/kube-bind.io_apiconversions.yaml-patch new file mode 100644 index 000000000..aed790a21 --- /dev/null +++ b/deploy/patches/kube-bind.io_apiconversions.yaml-patch @@ -0,0 +1,5 @@ +# schema's Convert functions directly, but the CRD still needs to define a conversion. +- op: add + path: /spec/conversion + value: + strategy: None diff --git a/deploy/patches/kube-bind.io_apiresourceschemas.yaml-patch b/deploy/patches/kube-bind.io_apiresourceschemas.yaml-patch new file mode 100644 index 000000000..15feab278 --- /dev/null +++ b/deploy/patches/kube-bind.io_apiresourceschemas.yaml-patch @@ -0,0 +1,5 @@ +# schema's Convert functions directly, but the CRD still needs to define a conversion. +- op: add + path: /spec/conversion + value: + strategy: None \ No newline at end of file diff --git a/deploy/patches/kube-bind.io_apiservicebindings.yaml-patch b/deploy/patches/kube-bind.io_apiservicebindings.yaml-patch new file mode 100644 index 000000000..15feab278 --- /dev/null +++ b/deploy/patches/kube-bind.io_apiservicebindings.yaml-patch @@ -0,0 +1,5 @@ +# schema's Convert functions directly, but the CRD still needs to define a conversion. +- op: add + path: /spec/conversion + value: + strategy: None \ No newline at end of file diff --git a/deploy/patches/kube-bind.io_apiserviceexportrequests.yaml-patch b/deploy/patches/kube-bind.io_apiserviceexportrequests.yaml-patch index 4aa3602b9..5aac78147 100644 --- a/deploy/patches/kube-bind.io_apiserviceexportrequests.yaml-patch +++ b/deploy/patches/kube-bind.io_apiserviceexportrequests.yaml-patch @@ -1,3 +1,9 @@ +# schema's Convert functions directly, but the CRD still needs to define a conversion. +- op: add + path: /spec/conversion + value: + strategy: None + - op: add path: /spec/versions/name=v1alpha1/schema/openAPIV3Schema/properties/status/default value: {} diff --git a/deploy/patches/kube-bind.io_apiserviceexports.yaml-patch b/deploy/patches/kube-bind.io_apiserviceexports.yaml-patch new file mode 100644 index 000000000..15feab278 --- /dev/null +++ b/deploy/patches/kube-bind.io_apiserviceexports.yaml-patch @@ -0,0 +1,5 @@ +# schema's Convert functions directly, but the CRD still needs to define a conversion. +- op: add + path: /spec/conversion + value: + strategy: None \ No newline at end of file diff --git a/deploy/patches/kube-bind.io_apiservicenamespaces.yaml-patch b/deploy/patches/kube-bind.io_apiservicenamespaces.yaml-patch new file mode 100644 index 000000000..15feab278 --- /dev/null +++ b/deploy/patches/kube-bind.io_apiservicenamespaces.yaml-patch @@ -0,0 +1,5 @@ +# schema's Convert functions directly, but the CRD still needs to define a conversion. +- op: add + path: /spec/conversion + value: + strategy: None \ No newline at end of file diff --git a/deploy/patches/kube-bind.io_boundapiresourceschemas.yaml-patch b/deploy/patches/kube-bind.io_boundapiresourceschemas.yaml-patch new file mode 100644 index 000000000..15feab278 --- /dev/null +++ b/deploy/patches/kube-bind.io_boundapiresourceschemas.yaml-patch @@ -0,0 +1,5 @@ +# schema's Convert functions directly, but the CRD still needs to define a conversion. +- op: add + path: /spec/conversion + value: + strategy: None \ No newline at end of file diff --git a/deploy/patches/kube-bind.io_clusterbindings.yaml-patch b/deploy/patches/kube-bind.io_clusterbindings.yaml-patch new file mode 100644 index 000000000..15feab278 --- /dev/null +++ b/deploy/patches/kube-bind.io_clusterbindings.yaml-patch @@ -0,0 +1,5 @@ +# schema's Convert functions directly, but the CRD still needs to define a conversion. +- op: add + path: /spec/conversion + value: + strategy: None \ No newline at end of file diff --git a/docs/content/setup/quickstart.md b/docs/content/setup/quickstart.md index 17147c244..1a7256948 100644 --- a/docs/content/setup/quickstart.md +++ b/docs/content/setup/quickstart.md @@ -64,8 +64,8 @@ kubectl apply -f deploy/examples/crd-mangodb.yaml * start the backend binary with the right flags: ```shell -$ make build -$ bin/example-backend \ +make build +bin/backend \ --oidc-issuer-client-secret=ZXhhbXBsZS1hcHAtc2VjcmV0 \ --oidc-issuer-client-id=kube-bind \ --oidc-issuer-url=http://127.0.0.1:5556/dex \ @@ -98,7 +98,7 @@ $ kubectl ws create consumer --enter Now create the APIServiceExportRequest: ```shell -$ ./bin/kubectl-bind http://127.0.0.1:8080/export --dry-run -o yaml > apiserviceexport.yaml +$ ./bin/kubectl-bind http://127.0.0.1:8080/exports --dry-run -o yaml > apiserviceexport.yaml # This will wait for konnector to be ready. Once this gets running - start the konnector bellow # IMPORTANT: Check namespace to be used! $ ./bin/kubectl-bind apiservice --remote-kubeconfig .kcp/provider.kubeconfig -f apiserviceexport.yaml --skip-konnector --remote-namespace diff --git a/docs/generators/cli-doc/go.mod b/docs/generators/cli-doc/go.mod index 3fdc52189..2781d7a75 100644 --- a/docs/generators/cli-doc/go.mod +++ b/docs/generators/cli-doc/go.mod @@ -111,21 +111,21 @@ require ( gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.33.0 // indirect + k8s.io/api v0.33.3 // indirect k8s.io/apiextensions-apiserver v0.33.0 // indirect - k8s.io/apimachinery v0.33.0 // indirect + k8s.io/apimachinery v0.33.3 // indirect k8s.io/apiserver v0.33.0 // indirect k8s.io/cli-runtime v0.32.0 // indirect - k8s.io/client-go v0.33.0 // indirect + k8s.io/client-go v0.33.3 // indirect k8s.io/component-base v0.33.0 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect - k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect + k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect rsc.io/qr v0.2.0 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect - sigs.k8s.io/kustomize/api v0.18.0 // indirect - sigs.k8s.io/kustomize/kyaml v0.18.1 // indirect + sigs.k8s.io/kustomize/api v0.19.0 // indirect + sigs.k8s.io/kustomize/kyaml v0.19.0 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect diff --git a/docs/generators/cli-doc/go.sum b/docs/generators/cli-doc/go.sum index 873bcc788..ed2f801f4 100644 --- a/docs/generators/cli-doc/go.sum +++ b/docs/generators/cli-doc/go.sum @@ -290,8 +290,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 h1:GVIKPyP/kLIyVOgOnTwFOrvQaQUzOzGMCxgFUOEmm24= google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422/go.mod h1:b6h1vNKhxaSoEI+5jc3PJUCustfli/mRab7295pY7rw= google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 h1:3UsHvIr4Wc2aW4brOaSCmcxh9ksica6fHEr8P1XhkYw= @@ -312,18 +312,18 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYs gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.33.0 h1:yTgZVn1XEe6opVpP1FylmNrIFWuDqe2H0V8CT5gxfIU= -k8s.io/api v0.33.0/go.mod h1:CTO61ECK/KU7haa3qq8sarQ0biLq2ju405IZAd9zsiM= +k8s.io/api v0.33.3 h1:SRd5t//hhkI1buzxb288fy2xvjubstenEKL9K51KBI8= +k8s.io/api v0.33.3/go.mod h1:01Y/iLUjNBM3TAvypct7DIj0M0NIZc+PzAHCIo0CYGE= k8s.io/apiextensions-apiserver v0.33.0 h1:d2qpYL7Mngbsc1taA4IjJPRJ9ilnsXIrndH+r9IimOs= k8s.io/apiextensions-apiserver v0.33.0/go.mod h1:VeJ8u9dEEN+tbETo+lFkwaaZPg6uFKLGj5vyNEwwSzc= -k8s.io/apimachinery v0.33.0 h1:1a6kHrJxb2hs4t8EE5wuR/WxKDwGN1FKH3JvDtA0CIQ= -k8s.io/apimachinery v0.33.0/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= +k8s.io/apimachinery v0.33.3 h1:4ZSrmNa0c/ZpZJhAgRdcsFcZOw1PQU1bALVQ0B3I5LA= +k8s.io/apimachinery v0.33.3/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= k8s.io/apiserver v0.33.0 h1:QqcM6c+qEEjkOODHppFXRiw/cE2zP85704YrQ9YaBbc= k8s.io/apiserver v0.33.0/go.mod h1:EixYOit0YTxt8zrO2kBU7ixAtxFce9gKGq367nFmqI8= k8s.io/cli-runtime v0.32.0 h1:dP+OZqs7zHPpGQMCGAhectbHU2SNCuZtIimRKTv2T1c= k8s.io/cli-runtime v0.32.0/go.mod h1:Mai8ht2+esoDRK5hr861KRy6z0zHsSTYttNVJXgP3YQ= -k8s.io/client-go v0.33.0 h1:UASR0sAYVUzs2kYuKn/ZakZlcs2bEHaizrrHUZg0G98= -k8s.io/client-go v0.33.0/go.mod h1:kGkd+l/gNGg8GYWAPr0xF1rRKvVWvzh9vmZAMXtaKOg= +k8s.io/client-go v0.33.3 h1:M5AfDnKfYmVJif92ngN532gFqakcGi6RvaOF16efrpA= +k8s.io/client-go v0.33.3/go.mod h1:luqKBQggEf3shbxHY4uVENAxrDISLOarxpTKMiUuujg= k8s.io/component-base v0.33.0 h1:Ot4PyJI+0JAD9covDhwLp9UNkUja209OzsJ4FzScBNk= k8s.io/component-base v0.33.0/go.mod h1:aXYZLbw3kihdkOPMDhWbjGCO6sg+luw554KP51t8qCU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= @@ -332,18 +332,18 @@ k8s.io/kms v0.33.0 h1:fhQSW/vyaWDhMp0vDuO/sLg2RlGZf4F77beSXcB4/eE= k8s.io/kms v0.33.0/go.mod h1:C1I8mjFFBNzfUZXYt9FZVJ8MJl7ynFbGgZFbBzkBJ3E= k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= -k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0= -k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= +k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/qr v0.2.0 h1:6vBLea5/NRMVTz8V66gipeLycZMl/+UlFmk8DvqQ6WY= rsc.io/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= -sigs.k8s.io/kustomize/api v0.18.0 h1:hTzp67k+3NEVInwz5BHyzc9rGxIauoXferXyjv5lWPo= -sigs.k8s.io/kustomize/api v0.18.0/go.mod h1:f8isXnX+8b+SGLHQ6yO4JG1rdkZlvhaCf/uZbLVMb0U= -sigs.k8s.io/kustomize/kyaml v0.18.1 h1:WvBo56Wzw3fjS+7vBjN6TeivvpbW9GmRaWZ9CIVmt4E= -sigs.k8s.io/kustomize/kyaml v0.18.1/go.mod h1:C3L2BFVU1jgcddNBE1TxuVLgS46TjObMwW5FT9FcjYo= +sigs.k8s.io/kustomize/api v0.19.0 h1:F+2HB2mU1MSiR9Hp1NEgoU2q9ItNOaBJl0I4Dlus5SQ= +sigs.k8s.io/kustomize/api v0.19.0/go.mod h1:/BbwnivGVcBh1r+8m3tH1VNxJmHSk1PzP5fkP6lbL1o= +sigs.k8s.io/kustomize/kyaml v0.19.0 h1:RFge5qsO1uHhwJsu3ipV7RNolC7Uozc0jUBC/61XSlA= +sigs.k8s.io/kustomize/kyaml v0.19.0/go.mod h1:FeKD5jEOH+FbZPpqUghBP8mrLjJ3+zD3/rf9NNu1cwY= sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= diff --git a/go.mod b/go.mod index e961e2776..e213780db 100644 --- a/go.mod +++ b/go.mod @@ -34,16 +34,16 @@ require ( golang.org/x/oauth2 v0.29.0 google.golang.org/grpc v1.69.2 gopkg.in/headzoo/surf.v1 v1.0.1 - k8s.io/api v0.33.0 + k8s.io/api v0.33.3 k8s.io/apiextensions-apiserver v0.33.0 - k8s.io/apimachinery v0.33.0 + k8s.io/apimachinery v0.33.3 k8s.io/apiserver v0.33.0 k8s.io/cli-runtime v0.32.0 - k8s.io/client-go v0.33.0 + k8s.io/client-go v0.33.3 k8s.io/code-generator v0.33.0 k8s.io/component-base v0.33.0 k8s.io/klog/v2 v2.130.1 - k8s.io/utils v0.0.0-20241210054802-24370beab758 + k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 sigs.k8s.io/controller-runtime v0.21.0 sigs.k8s.io/controller-tools v0.16.1 sigs.k8s.io/multicluster-runtime v0.21.0-alpha.8 @@ -59,7 +59,6 @@ require ( github.com/PuerkitoBio/goquery v1.8.0 // indirect github.com/andybalholm/cascadia v1.3.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bombsimon/logrusr/v3 v3.1.0 // indirect @@ -88,7 +87,6 @@ require ( github.com/google/btree v1.1.3 // indirect github.com/google/cel-go v0.23.2 // indirect github.com/google/gnostic-models v0.6.9 // indirect - github.com/google/gofuzz v1.2.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect @@ -152,6 +150,7 @@ require ( golang.org/x/tools v0.32.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 // indirect google.golang.org/protobuf v1.36.5 // indirect @@ -165,8 +164,8 @@ require ( rsc.io/qr v0.2.0 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect - sigs.k8s.io/kustomize/api v0.18.0 // indirect - sigs.k8s.io/kustomize/kyaml v0.18.1 // indirect + sigs.k8s.io/kustomize/api v0.19.0 // indirect + sigs.k8s.io/kustomize/kyaml v0.19.0 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect ) @@ -174,14 +173,17 @@ require ( // Matches multicluster-runtime v0.21.0-alpha.8 replace ( github.com/google/cel-go => github.com/google/cel-go v0.22.0 - k8s.io/api => k8s.io/api v0.32.3 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.32.3 - k8s.io/apimachinery => k8s.io/apimachinery v0.32.3 - k8s.io/apiserver => k8s.io/apiserver v0.32.3 - k8s.io/cli-runtime => k8s.io/cli-runtime v0.32.3 - k8s.io/client-go => k8s.io/client-go v0.32.3 - k8s.io/code-generator => k8s.io/code-generator v0.32.3 - k8s.io/component-base => k8s.io/component-base v0.32.3 - sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.20.4 - sigs.k8s.io/multicluster-runtime => sigs.k8s.io/multicluster-runtime v0.20.4-alpha.7 + github.com/kcp-dev/apimachinery/v2 => github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20250728122101-adbf20db3e51 + github.com/kcp-dev/multicluster-provider => github.com/mjudeikis/kcp-multicluster-provider v0.0.0-20250818102159-3d31cbb06ebe + k8s.io/api => k8s.io/api v0.33.0 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.33.0 + k8s.io/apimachinery => k8s.io/apimachinery v0.33.0 + k8s.io/apiserver => k8s.io/apiserver v0.33.0 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.33.0 + k8s.io/client-go => k8s.io/client-go v0.33.0 + k8s.io/code-generator => k8s.io/code-generator v0.33.0 + k8s.io/component-base => k8s.io/component-base v0.33.0 + sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.21.0 + //sigs.k8s.io/multicluster-runtime => sigs.k8s.io/multicluster-runtime v0.20.4-alpha.7 + sigs.k8s.io/multicluster-runtime => github.com/mjudeikis/sigs-multicluster-runtime v0.0.0-20250818101434-d8ebc45e169b ) diff --git a/go.sum b/go.sum index 46fceeda0..20cd8aca5 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,6 @@ github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x0 github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= @@ -78,8 +76,8 @@ github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnD github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= +github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= @@ -107,8 +105,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= +github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= @@ -131,8 +129,8 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20250512171935-ebb573a40077 h1:lDi9nZ75ypmRJwDFXUN70Cdu8+HxAjPU1kcnn+l4MvI= -github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20250512171935-ebb573a40077/go.mod h1:jnMZxVnCuKlkIXc4J1Qtmy1Lyo171CDF/RQhNAo0tvA= +github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20250728122101-adbf20db3e51 h1:l38RDS+VUMx9etvyaCgJIZa4nM7FaNevNubWN0kDZY4= +github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20250728122101-adbf20db3e51/go.mod h1:rF1jfvUfPjFXs+HV/LN1BtPzAz1bfjJOwVa+hAVfroQ= github.com/kcp-dev/code-generator/v3 v3.0.0-20250707080944-4094fb87e20f h1:Qfpk7+Y5gwWV8FNY6zu+l5hbKWlFZ6oJqgL67RoCEJg= github.com/kcp-dev/code-generator/v3 v3.0.0-20250707080944-4094fb87e20f/go.mod h1:1EZhJqiFvXq1N0xKJnJOf8kQ++wuwLkqFGIRVSoVACk= github.com/kcp-dev/kcp/pkg/apis v0.11.0 h1:K6p+tNHNcvfACCPLcHgY0EMLeaIwR1jS491FyLfXMII= @@ -141,8 +139,6 @@ github.com/kcp-dev/kcp/sdk v0.28.0 h1:AOgGrgpqhrplbXMSbcvjFwCqwg4UlysTwIFZ0LvFxl github.com/kcp-dev/kcp/sdk v0.28.0/go.mod h1:8oZpWxkoMu2TDpx5DgdIGDigByKHKkeqVMA4GiWneoI= github.com/kcp-dev/logicalcluster/v3 v3.0.5 h1:JbYakokb+5Uinz09oTXomSUJVQsqfxEvU4RyHUYxHOU= github.com/kcp-dev/logicalcluster/v3 v3.0.5/go.mod h1:EWBUBxdr49fUB1cLMO4nOdBWmYifLbP1LfoL20KkXYY= -github.com/kcp-dev/multicluster-provider v0.1.0 h1:LS4z4d6AbsYg7Lj9Hlmkbv1M+ZIyw4laNpSsUgF3tRI= -github.com/kcp-dev/multicluster-provider v0.1.0/go.mod h1:8a53s17AhgsEq5mL7VDHZ30eflhu7sFS0isHG1zRz0Y= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= @@ -170,6 +166,10 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mdp/qrterminal/v3 v3.2.0 h1:qteQMXO3oyTK4IHwj2mWsKYYRBOp1Pj2WRYFYYNTCdk= github.com/mdp/qrterminal/v3 v3.2.0/go.mod h1:XGGuua4Lefrl7TLEsSONiD+UEjQXJZ4mPzF+gWYIJkk= +github.com/mjudeikis/kcp-multicluster-provider v0.0.0-20250818102159-3d31cbb06ebe h1:rSMxNO43EhRCu49OxJrcueT3x8QJdtDgg9QNsjj8UCI= +github.com/mjudeikis/kcp-multicluster-provider v0.0.0-20250818102159-3d31cbb06ebe/go.mod h1:AQbVcrm76lpSFQ/8Gkbf0ev1eTqbk+dynDw6IW8oprA= +github.com/mjudeikis/sigs-multicluster-runtime v0.0.0-20250818101434-d8ebc45e169b h1:rWXhKkj+BFmR08VYCRVW1/5n+PgKAzcrueYVPjN3K/g= +github.com/mjudeikis/sigs-multicluster-runtime v0.0.0-20250818101434-d8ebc45e169b/go.mod h1:CpBzLMLQKdm+UCchd2FiGPiDdCxM5dgCCPKuaQ6Fsv0= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -257,16 +257,16 @@ go.etcd.io/etcd/api/v3 v3.5.21 h1:A6O2/JDb3tvHhiIz3xf9nJ7REHvtEFJJ3veW3FbCnS8= go.etcd.io/etcd/api/v3 v3.5.21/go.mod h1:c3aH5wcvXv/9dqIw2Y810LDXJfhSYdHQ0vxmP3CCHVY= go.etcd.io/etcd/client/pkg/v3 v3.5.21 h1:lPBu71Y7osQmzlflM9OfeIV2JlmpBjqBNlLtcoBqUTc= go.etcd.io/etcd/client/pkg/v3 v3.5.21/go.mod h1:BgqT/IXPjK9NkeSDjbzwsHySX3yIle2+ndz28nVsjUs= -go.etcd.io/etcd/client/v2 v2.305.16 h1:kQrn9o5czVNaukf2A2At43cE9ZtWauOtf9vRZuiKXow= -go.etcd.io/etcd/client/v2 v2.305.16/go.mod h1:h9YxWCzcdvZENbfzBTFCnoNumr2ax3F19sKMqHFmXHE= +go.etcd.io/etcd/client/v2 v2.305.21 h1:eLiFfexc2mE+pTLz9WwnoEsX5JTTpLCYVivKkmVXIRA= +go.etcd.io/etcd/client/v2 v2.305.21/go.mod h1:OKkn4hlYNf43hpjEM3Ke3aRdUkhSl8xjKjSf8eCq2J8= go.etcd.io/etcd/client/v3 v3.5.21 h1:T6b1Ow6fNjOLOtM0xSoKNQt1ASPCLWrF9XMHcH9pEyY= go.etcd.io/etcd/client/v3 v3.5.21/go.mod h1:mFYy67IOqmbRf/kRUvsHixzo3iG+1OF2W2+jVIQRAnU= -go.etcd.io/etcd/pkg/v3 v3.5.16 h1:cnavs5WSPWeK4TYwPYfmcr3Joz9BH+TZ6qoUtz6/+mc= -go.etcd.io/etcd/pkg/v3 v3.5.16/go.mod h1:+lutCZHG5MBBFI/U4eYT5yL7sJfnexsoM20Y0t2uNuY= -go.etcd.io/etcd/raft/v3 v3.5.16 h1:zBXA3ZUpYs1AwiLGPafYAKKl/CORn/uaxYDwlNwndAk= -go.etcd.io/etcd/raft/v3 v3.5.16/go.mod h1:P4UP14AxofMJ/54boWilabqqWoW9eLodl6I5GdGzazI= -go.etcd.io/etcd/server/v3 v3.5.16 h1:d0/SAdJ3vVsZvF8IFVb1k8zqMZ+heGcNfft71ul9GWE= -go.etcd.io/etcd/server/v3 v3.5.16/go.mod h1:ynhyZZpdDp1Gq49jkUg5mfkDWZwXnn3eIqCqtJnrD/s= +go.etcd.io/etcd/pkg/v3 v3.5.21 h1:jUItxeKyrDuVuWhdh0HtjUANwyuzcb7/FAeUfABmQsk= +go.etcd.io/etcd/pkg/v3 v3.5.21/go.mod h1:wpZx8Egv1g4y+N7JAsqi2zoUiBIUWznLjqJbylDjWgU= +go.etcd.io/etcd/raft/v3 v3.5.21 h1:dOmE0mT55dIUsX77TKBLq+RgyumsQuYeiRQnW/ylugk= +go.etcd.io/etcd/raft/v3 v3.5.21/go.mod h1:fmcuY5R2SNkklU4+fKVBQi2biVp5vafMrWUEj4TJ4Cs= +go.etcd.io/etcd/server/v3 v3.5.21 h1:9w0/k12majtgarGmlMVuhwXRI2ob3/d1Ik3X5TKo0yU= +go.etcd.io/etcd/server/v3 v3.5.21/go.mod h1:G1mOzdwuzKT1VRL7SqRchli/qcFrtLBTAQ4lV20sXXo= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 h1:PS8wXpbyaDJQ2VDHHncMe9Vct0Zn1fEjpsjrLxGJoSc= @@ -359,8 +359,8 @@ gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuB google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 h1:GVIKPyP/kLIyVOgOnTwFOrvQaQUzOzGMCxgFUOEmm24= google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422/go.mod h1:b6h1vNKhxaSoEI+5jc3PJUCustfli/mRab7295pY7rw= google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 h1:3UsHvIr4Wc2aW4brOaSCmcxh9ksica6fHEr8P1XhkYw= @@ -391,48 +391,46 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls= -k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k= -k8s.io/apiextensions-apiserver v0.32.3 h1:4D8vy+9GWerlErCwVIbcQjsWunF9SUGNu7O7hiQTyPY= -k8s.io/apiextensions-apiserver v0.32.3/go.mod h1:8YwcvVRMVzw0r1Stc7XfGAzB/SIVLunqApySV5V7Dss= -k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U= -k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/apiserver v0.32.3 h1:kOw2KBuHOA+wetX1MkmrxgBr648ksz653j26ESuWNY8= -k8s.io/apiserver v0.32.3/go.mod h1:q1x9B8E/WzShF49wh3ADOh6muSfpmFL0I2t+TG0Zdgc= -k8s.io/cli-runtime v0.32.3 h1:khLF2ivU2T6Q77H97atx3REY9tXiA3OLOjWJxUrdvss= -k8s.io/cli-runtime v0.32.3/go.mod h1:vZT6dZq7mZAca53rwUfdFSZjdtLyfF61mkf/8q+Xjak= -k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU= -k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY= -k8s.io/code-generator v0.32.3 h1:31p2TVzC9+hVdSkAFruAk3JY+iSfzrJ83Qij1yZutyw= -k8s.io/code-generator v0.32.3/go.mod h1:+mbiYID5NLsBuqxjQTygKM/DAdKpAjvBzrJd64NU1G8= -k8s.io/component-base v0.32.3 h1:98WJvvMs3QZ2LYHBzvltFSeJjEx7t5+8s71P7M74u8k= -k8s.io/component-base v0.32.3/go.mod h1:LWi9cR+yPAv7cu2X9rZanTiFKB2kHA+JjmhkKjCZRpI= +k8s.io/api v0.33.0 h1:yTgZVn1XEe6opVpP1FylmNrIFWuDqe2H0V8CT5gxfIU= +k8s.io/api v0.33.0/go.mod h1:CTO61ECK/KU7haa3qq8sarQ0biLq2ju405IZAd9zsiM= +k8s.io/apiextensions-apiserver v0.33.0 h1:d2qpYL7Mngbsc1taA4IjJPRJ9ilnsXIrndH+r9IimOs= +k8s.io/apiextensions-apiserver v0.33.0/go.mod h1:VeJ8u9dEEN+tbETo+lFkwaaZPg6uFKLGj5vyNEwwSzc= +k8s.io/apimachinery v0.33.0 h1:1a6kHrJxb2hs4t8EE5wuR/WxKDwGN1FKH3JvDtA0CIQ= +k8s.io/apimachinery v0.33.0/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= +k8s.io/apiserver v0.33.0 h1:QqcM6c+qEEjkOODHppFXRiw/cE2zP85704YrQ9YaBbc= +k8s.io/apiserver v0.33.0/go.mod h1:EixYOit0YTxt8zrO2kBU7ixAtxFce9gKGq367nFmqI8= +k8s.io/cli-runtime v0.33.0 h1:Lbl/pq/1o8BaIuyn+aVLdEPHVN665tBAXUePs8wjX7c= +k8s.io/cli-runtime v0.33.0/go.mod h1:QcA+r43HeUM9jXFJx7A+yiTPfCooau/iCcP1wQh4NFw= +k8s.io/client-go v0.33.0 h1:UASR0sAYVUzs2kYuKn/ZakZlcs2bEHaizrrHUZg0G98= +k8s.io/client-go v0.33.0/go.mod h1:kGkd+l/gNGg8GYWAPr0xF1rRKvVWvzh9vmZAMXtaKOg= +k8s.io/code-generator v0.33.0 h1:B212FVl6EFqNmlgdOZYWNi77yBv+ed3QgQsMR8YQCw4= +k8s.io/code-generator v0.33.0/go.mod h1:KnJRokGxjvbBQkSJkbVuBbu6z4B0rC7ynkpY5Aw6m9o= +k8s.io/component-base v0.33.0 h1:Ot4PyJI+0JAD9covDhwLp9UNkUja209OzsJ4FzScBNk= +k8s.io/component-base v0.33.0/go.mod h1:aXYZLbw3kihdkOPMDhWbjGCO6sg+luw554KP51t8qCU= k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7 h1:2OX19X59HxDprNCVrWi6jb7LW1PoqTlYqEq5H2oetog= k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kms v0.32.3 h1:HhHw5+pRCzEJp3oFFJ1q5W2N6gAI7YkUg4ay4Z0dgwM= -k8s.io/kms v0.32.3/go.mod h1:Bk2evz/Yvk0oVrvm4MvZbgq8BD34Ksxs2SRHn4/UiOM= +k8s.io/kms v0.33.0 h1:fhQSW/vyaWDhMp0vDuO/sLg2RlGZf4F77beSXcB4/eE= +k8s.io/kms v0.33.0/go.mod h1:C1I8mjFFBNzfUZXYt9FZVJ8MJl7ynFbGgZFbBzkBJ3E= k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= -k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0= -k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= +k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/qr v0.2.0 h1:6vBLea5/NRMVTz8V66gipeLycZMl/+UlFmk8DvqQ6WY= rsc.io/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/controller-runtime v0.20.4 h1:X3c+Odnxz+iPTRobG4tp092+CvBU9UK0t/bRf+n0DGU= -sigs.k8s.io/controller-runtime v0.20.4/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY= +sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8= +sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM= sigs.k8s.io/controller-tools v0.16.1 h1:gvIsZm+2aimFDIBiDKumR7EBkc+oLxljoUVfRbDI6RI= sigs.k8s.io/controller-tools v0.16.1/go.mod h1:0I0xqjR65YTfoO12iR+mZR6s6UAVcUARgXRlsu0ljB0= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= -sigs.k8s.io/kustomize/api v0.18.0 h1:hTzp67k+3NEVInwz5BHyzc9rGxIauoXferXyjv5lWPo= -sigs.k8s.io/kustomize/api v0.18.0/go.mod h1:f8isXnX+8b+SGLHQ6yO4JG1rdkZlvhaCf/uZbLVMb0U= -sigs.k8s.io/kustomize/kyaml v0.18.1 h1:WvBo56Wzw3fjS+7vBjN6TeivvpbW9GmRaWZ9CIVmt4E= -sigs.k8s.io/kustomize/kyaml v0.18.1/go.mod h1:C3L2BFVU1jgcddNBE1TxuVLgS46TjObMwW5FT9FcjYo= -sigs.k8s.io/multicluster-runtime v0.20.4-alpha.7 h1:AFlM/TFQaESxtCRX6scodEKensLhcbfGwXfjJIvoaT8= -sigs.k8s.io/multicluster-runtime v0.20.4-alpha.7/go.mod h1:2N2/c3p08bYC9eDaRs0dllTxgAm5xiLDSkmGZpWKyw4= +sigs.k8s.io/kustomize/api v0.19.0 h1:F+2HB2mU1MSiR9Hp1NEgoU2q9ItNOaBJl0I4Dlus5SQ= +sigs.k8s.io/kustomize/api v0.19.0/go.mod h1:/BbwnivGVcBh1r+8m3tH1VNxJmHSk1PzP5fkP6lbL1o= +sigs.k8s.io/kustomize/kyaml v0.19.0 h1:RFge5qsO1uHhwJsu3ipV7RNolC7Uozc0jUBC/61XSlA= +sigs.k8s.io/kustomize/kyaml v0.19.0/go.mod h1:FeKD5jEOH+FbZPpqUghBP8mrLjJ3+zD3/rf9NNu1cwY= sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= diff --git a/hack/release.sh b/hack/release.sh index f61746ce3..14377af40 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -46,7 +46,6 @@ fi git tag -a $VERSION_TAG -s -m "$RELEASE_COMMENT" git tag -a sdk/apis/$VERSION_TAG -s -m "$RELEASE_COMMENT" git tag -a sdk/client/$VERSION_TAG -s -m "$RELEASE_COMMENT" -git tag -a sdk/kcp/$VERSION_TAG -s -m "$RELEASE_COMMENT" # Check if the tag was created successfully if [ $? -ne 0 ]; then @@ -58,7 +57,6 @@ fi git push $REMOTE_NAME $VERSION_TAG git push $REMOTE_NAME sdk/apis/$VERSION_TAG git push $REMOTE_NAME sdk/client/$VERSION_TAG -git push $REMOTE_NAME sdk/kcp/$VERSION_TAG # Check if the push was successful if [ $? -ne 0 ]; then diff --git a/hack/update-codegen-clients-kcp.sh b/hack/update-codegen-clients-kcp.sh deleted file mode 100755 index 54f24a100..000000000 --- a/hack/update-codegen-clients-kcp.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2021 The Kube Bind 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. - -set -o errexit -set -o nounset -set -o pipefail -set -o xtrace - -export GOPATH=$(go env GOPATH) - -SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -pushd "${SCRIPT_ROOT}" -BOILERPLATE_HEADER="$( pwd )/hack/boilerplate/boilerplate.generatego.txt" -popd -CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; go list -f '{{.Dir}}' -m k8s.io/code-generator)} -CLUSTER_CODEGEN_PKG=${CLUSTER_CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; go list -f '{{.Dir}}' -m github.com/kcp-dev/code-generator/v3)} -OPENAPI_PKG=${OPENAPI_PKG:-$(cd "${SCRIPT_ROOT}"; go list -f '{{.Dir}}' -m k8s.io/kube-openapi)} - -go install "${CODEGEN_PKG}"/cmd/applyconfiguration-gen -go install "${CODEGEN_PKG}"/cmd/client-gen - -# TODO: This is hack to allow CI to pass -chmod +x "${CODEGEN_PKG}"/generate-internal-groups.sh - -source "${CODEGEN_PKG}/kube_codegen.sh" -source "${CLUSTER_CODEGEN_PKG}/cluster_codegen.sh" - -rm -rf ${SCRIPT_ROOT}/sdk/kcp/{clientset,applyconfiguration,listers,informers} -mkdir -p ${SCRIPT_ROOT}/sdk/kcp/{clientset,applyconfiguration,listers,informers} - -"$GOPATH"/bin/applyconfiguration-gen \ - --go-header-file ./hack/boilerplate/boilerplate.generatego.txt \ - --output-pkg github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration \ - --output-dir "sdk/kcp/applyconfiguration" \ - github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1 \ - github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2 \ - github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1 \ - k8s.io/apimachinery/pkg/apis/meta/v1 \ - k8s.io/apimachinery/pkg/runtime \ - k8s.io/apimachinery/pkg/version - -"$GOPATH"/bin/client-gen \ - --input github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1 \ - --input github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2 \ - --input-base="" \ - --apply-configuration-package=github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration \ - --clientset-name "versioned" \ - --output-pkg github.com/kube-bind/kube-bind/sdk/kcp/clientset \ - --go-header-file ./hack/boilerplate/boilerplate.generatego.txt \ - --output-dir "sdk/kcp/clientset" - - -# Install cluster codegen tools -# HACK: for some reason using bash wrapper does not work due to go mod structure. -# we need to install them directly. If you read this - feel free to fix it. -go install github.com/kcp-dev/code-generator/v3/cmd/cluster-client-gen -go install github.com/kcp-dev/code-generator/v3/cmd/cluster-informer-gen -go install github.com/kcp-dev/code-generator/v3/cmd/cluster-lister-gen - -GOBIN=$(go env GOPATH)/bin - -# Generate cluster client -${GOBIN}/cluster-client-gen \ - -v 0 \ - --go-header-file "${BOILERPLATE_HEADER}" \ - --output-dir "sdk/kcp/clientset/versioned" \ - --output-pkg github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned \ - --input-base "" \ - --single-cluster-versioned-clientset-pkg github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned \ - --single-cluster-applyconfigurations-pkg github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration \ - --input github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1 \ - --input github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2 - -# Generate cluster listers -${GOBIN}/cluster-lister-gen \ - -v 0 \ - --go-header-file "${BOILERPLATE_HEADER}" \ - --output-dir "sdk/kcp/listers" \ - --output-pkg github.com/kube-bind/kube-bind/sdk/kcp/listers \ - github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1 \ - github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2 - -# Generate cluster informers -${GOBIN}/cluster-informer-gen \ - -v 0 \ - --go-header-file "${BOILERPLATE_HEADER}" \ - --output-dir "sdk/kcp/informers/externalversions" \ - --output-pkg github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions \ - --versioned-clientset-pkg github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned \ - --listers-pkg github.com/kube-bind/kube-bind/sdk/kcp/listers \ - --single-cluster-versioned-clientset-pkg github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned \ - github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1 \ - github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2 \ No newline at end of file diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 3e4486b4b..467c7fb69 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -25,7 +25,7 @@ if [[ -z "${MAKELEVEL:-}" ]]; then fi "$(dirname "${BASH_SOURCE[0]}")/update-codegen-clients.sh" -"$(dirname "${BASH_SOURCE[0]}")/update-codegen-clients-kcp.sh" +REPO_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) # Update generated CRD YAML cd sdk/apis @@ -45,3 +45,6 @@ for CRD in *.yaml; do mv "${CRD}.patched" "${CRD}" fi done + +cd ../../kcp +make codegen diff --git a/hack/verify-codegen-clients.sh b/hack/verify-codegen-clients.sh index 8c3fdb010..1938b33b9 100755 --- a/hack/verify-codegen-clients.sh +++ b/hack/verify-codegen-clients.sh @@ -22,7 +22,6 @@ set -o nounset set -o pipefail "$( dirname "${BASH_SOURCE[0]}")/update-codegen-clients.sh" -"$( dirname "${BASH_SOURCE[0]}")/update-codegen-clients-kcp.sh" if ! git diff --quiet --exit-code -- sdk/; then cat << EOF ERROR: This check enforces that the client code is generated correctly. diff --git a/kcp/Makefile b/kcp/Makefile new file mode 100644 index 000000000..51f974076 --- /dev/null +++ b/kcp/Makefile @@ -0,0 +1,58 @@ +# Copyright 2025 The Kube Bind 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. + +# We need bash for some conditional logic below. +SHELL := /usr/bin/env bash -e + +GO_INSTALL = ../hack/go-install.sh + +ROOT_DIR=$(abspath ..) +TOOLS_DIR=../hack/tools +TOOLS_GOBIN_DIR := $(abspath $(TOOLS_DIR)) +GOBIN_DIR=$(abspath ../bin ) +PATH := $(GOBIN_DIR):$(TOOLS_GOBIN_DIR):$(PATH) +TMPDIR := $(shell mktemp -d) + +# Detect the path used for the install target +ifeq (,$(shell go env GOBIN)) +INSTALL_GOBIN=$(shell go env GOPATH)/bin +else +INSTALL_GOBIN=$(shell go env GOBIN) +endif + + +KCP_APIGEN_VER := v0.28.0 +KCP_APIGEN_BIN := apigen +KCP_APIGEN_GEN := $(TOOLS_GOBIN_DIR)/$(KCP_APIGEN_BIN)-$(KCP_APIGEN_VER) +export KCP_APIGEN_GEN # so hack scripts can use it + +all: build +.PHONY: all + +.PHONY: require-% +require-%: + @if ! command -v $* 1> /dev/null 2>&1; then echo "$* not found in \$$PATH"; exit 1; fi + +# KCP tool installation targets +$(KCP_APIGEN_GEN): + GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) github.com/kcp-dev/kcp/sdk/cmd/apigen $(KCP_APIGEN_BIN) $(KCP_APIGEN_VER) + + +# KCP runtime targets +run-kcp: $(KCP) ## Start KCP server + $(KCP) start -v=8 + +# Generate KCP API resources +codegen: $(KCP_APIGEN_GEN) ## Generate KCP API resources from CRDs + ./hack/update-kcp-codegen.sh diff --git a/kcp/README.md b/kcp/README.md new file mode 100644 index 000000000..ae4fe179e --- /dev/null +++ b/kcp/README.md @@ -0,0 +1,115 @@ +# kcp + +kcp folder contains isolated set of tooling to bootstrap the kube-bind to allow it to work with kcp instance. +It is split into separate package to avoid vendoring pollution. + +kcp requires initial setup to be run before it can be used. +This includes setting up workspace/provider and setting up all the APIResourceSchemas and APIExports. + +It was its own GO module to avoid kcp dependencies in the main kube-bind module. + +This is not required if you are doing deeper integration, and controlling the setup with your own scripts. + +It will do the following: +1. Create a provider workspace: +``` +:root:kube-bind +``` +2. Create apiexport inside the workspace: +``` +:root:kube-bind/apiexport/kube-bind.io +``` + + +# How to run + +1. Start kcp +2. Bootstrap kcp: +```bash +cp .kcp/admin.kubeconfig .kcp/provider.kubeconfig +export KUBECONFIG=.kcp/provider.kubeconfig +./bin/kcp-init --kcp-kubeconfig $KUBECONFIG +``` +3. Run the backend: +``` +k ws use :root:kube-bind + +bin/backend \ + --multicluster-runtime-provider kcp \ + --server-url=$(kubectl get apiexportendpointslice kube-bind.io -o jsonpath="{.status.endpoints[0].url}") \ + --oidc-issuer-client-secret=ZXhhbXBsZS1hcHAtc2VjcmV0 \ + --oidc-issuer-client-id=kube-bind \ + --oidc-issuer-url=http://127.0.0.1:5556/dex \ + --oidc-callback-url=http://127.0.0.1:8080/callback \ + --pretty-name="BigCorp.com" \ + --namespace-prefix="kube-bind-" \ + --cookie-signing-key=bGMHz7SR9XcI9JdDB68VmjQErrjbrAR9JdVqjAOKHzE= \ + --cookie-encryption-key=wadqi4u+w0bqnSrVFtM38Pz2ykYVIeeadhzT34XlC1Y= +``` + + +4. Copy the kubeconfig to the consumer: +```bash +cp .kcp/admin.kubeconfig .kcp/sub-provider.kubeconfig +export KUBECONFIG=.kcp/sub-provider.kubeconfig +k ws use :root +``` + +5. Run `kubectl ws create sub-provider --enter` +6. Bind the APIExport to the workspace +```bash +kubectl kcp bind apiexport root:kube-bind:kube-bind.io --accept-permission-claim clusterrolebindings.rbac.authorization.k8s.io \ + --accept-permission-claim clusterroles.rbac.authorization.k8s.io \ + --accept-permission-claim customresourcedefinitions.apiextensions.k8s.io \ + --accept-permission-claim serviceaccounts.core \ + --accept-permission-claim configmaps.core \ + --accept-permission-claim secrets.core \ + --accept-permission-claim namespaces.core \ + --accept-permission-claim serviceaccounts.rbac.authorization.k8s.io \ + --accept-permission-claim roles.rbac.authorization.k8s.io \ + --accept-permission-claim rolebindings.rbac.authorization.k8s.io +``` + +7. Create CRD: +```bash +kubectl apply -f deploy/examples/crd-mongodb.yaml +``` + +8. Get LogicalCluster: + +```bash +kubectl get logicalcluster +# NAME PHASE URL AGE +# cluster Ready https://192.168.2.166:6443/clusters/2xh2v3gzjhn4tmve +``` + +9. Now we gonna initiate consumer: +```bash +cp .kcp/admin.kubeconfig .kcp/consumer.kubeconfig +export KUBECONFIG=.kcp/consumer.kubeconfig +kubectl ws use :root +kubectl ws create consumer --enter +``` + +10. Bind the thing: + +```bash +./bin/kubectl-bind http://127.0.0.1:8080/clusters/2xh2v3gzjhn4tmve/exports --dry-run -o yaml > apiserviceexport.yaml + +# we need dedicated secret for that +kubectl get secret kubeconfig-wvvsb -n kube-bind -o jsonpath='{.data.kubeconfig}' | base64 -d > remote.kubeconfig + +./bin/kubectl-bind apiservice --remote-kubeconfig remote.kubeconfig -f apiserviceexport.yaml --skip-konnector --remote-namespace kube-bind-m5zx4 + +export KUBECONFIG=.kcp/consumer.kubeconfig +go run ./cmd/konnector/ --lease-namespace default + +## Debug + +```bash +cp .kcp/admin.kubeconfig .kcp/debug.kubeconfig +export KUBECONFIG=.kcp/debug.kubeconfig +k ws use :root:kube-bind + +k -s "$(kubectl get apiexportendpointslice kube-bind.io -o jsonpath="{.status.endpoints[0].url}")/clusters/*" api-resources +k -s "$(kubectl get apiexportendpointslice kube-bind.io -o jsonpath="{.status.endpoints[0].url}")/clusters/*" get crd \ No newline at end of file diff --git a/kcp/bootstrap/config.go b/kcp/bootstrap/config.go new file mode 100644 index 000000000..38da0e3ea --- /dev/null +++ b/kcp/bootstrap/config.go @@ -0,0 +1,86 @@ +/* +Copyright 2022 The Kube Bind 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. +*/ + +package bootstrap + +import ( + "net/url" + + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" + kcpdynamic "github.com/kcp-dev/client-go/dynamic" + kcpclusterclientset "github.com/kcp-dev/kcp/sdk/client/clientset/versioned/cluster" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + + "github.com/kube-bind/kube-bind/kcp/bootstrap/options" +) + +type Config struct { + Options *options.CompletedOptions + + ClientConfig *rest.Config + KcpClusterClient kcpclusterclientset.ClusterInterface + ApiextensionsClient kcpapiextensionsclientset.ClusterInterface + DynamicClusterClient kcpdynamic.ClusterInterface +} + +func NewConfig(options *options.CompletedOptions) (*Config, error) { + config := &Config{ + Options: options, + } + + kcpClientConfigOverrides := &clientcmd.ConfigOverrides{ + CurrentContext: options.KCPContext, + } + var err error + config.ClientConfig, err = clientcmd.NewNonInteractiveDeferredLoadingClientConfig( + &clientcmd.ClientConfigLoadingRules{ExplicitPath: options.KCPKubeConfig}, + kcpClientConfigOverrides).ClientConfig() + if err != nil { + return nil, err + } + config.ClientConfig = rest.CopyConfig(config.ClientConfig) + config.ClientConfig = rest.AddUserAgent(config.ClientConfig, "kube-bind-kcp-init") + + config.ClientConfig, err = newKCPRestConfig(config.ClientConfig) + if err != nil { + return nil, err + } + + if config.KcpClusterClient, err = kcpclusterclientset.NewForConfig(config.ClientConfig); err != nil { + return nil, err + } + if config.ApiextensionsClient, err = kcpapiextensionsclientset.NewForConfig(config.ClientConfig); err != nil { + return nil, err + } + if config.DynamicClusterClient, err = kcpdynamic.NewForConfig(config.ClientConfig); err != nil { + return nil, err + } + + return config, nil +} + +func newKCPRestConfig(restConfig *rest.Config) (*rest.Config, error) { + clusterConfig := rest.CopyConfig(restConfig) + u, err := url.Parse(restConfig.Host) + if err != nil { + return nil, err + } + u.Path = "" + clusterConfig.Host = u.String() + clusterConfig.UserAgent = rest.DefaultKubernetesUserAgent() + return clusterConfig, nil +} diff --git a/kcp/bootstrap/config/config/bootstrap.go b/kcp/bootstrap/config/config/bootstrap.go new file mode 100644 index 000000000..0e168511e --- /dev/null +++ b/kcp/bootstrap/config/config/bootstrap.go @@ -0,0 +1,51 @@ +/* +Copyright 2025 The Kube Bind 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. +*/ + +package config + +import ( + "context" + "embed" + + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" + kcpdynamic "github.com/kcp-dev/client-go/dynamic" + confighelpers "github.com/kcp-dev/kcp/config/helpers" + "github.com/kcp-dev/kcp/sdk/apis/core" + kcpclientset "github.com/kcp-dev/kcp/sdk/client/clientset/versioned/cluster" + "github.com/kcp-dev/logicalcluster/v3" + "k8s.io/apimachinery/pkg/util/sets" +) + +//go:embed *.yaml +var fs embed.FS + +// RootClusterName is the workspace to host common faros APIs. +var RootClusterName = logicalcluster.NewPath("root") + +// Bootstrap creates resources in this package by continuously retrying the list. +// This is blocking, i.e. it only returns (with error) when the context is closed or with nil when +// the bootstrapping is successfully completed. +func Bootstrap( + ctx context.Context, + kcpClientSet kcpclientset.ClusterInterface, + apiExtensionClusterClient kcpapiextensionsclientset.ClusterInterface, + dynamicClusterClient kcpdynamic.ClusterInterface, + batteriesIncluded sets.Set[string], +) error { + rootDiscoveryClient := apiExtensionClusterClient.Cluster(core.RootCluster.Path()).Discovery() + rootDynamicClient := dynamicClusterClient.Cluster(core.RootCluster.Path()) + return confighelpers.Bootstrap(ctx, rootDiscoveryClient, rootDynamicClient, batteriesIncluded, fs) +} diff --git a/kcp/bootstrap/config/config/clusterworkspace-kube-bind-provider.yaml b/kcp/bootstrap/config/config/clusterworkspace-kube-bind-provider.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/kcp/bootstrap/config/config/clusterworkspace-kube-bind.yaml b/kcp/bootstrap/config/config/clusterworkspace-kube-bind.yaml new file mode 100644 index 000000000..0212e1112 --- /dev/null +++ b/kcp/bootstrap/config/config/clusterworkspace-kube-bind.yaml @@ -0,0 +1,10 @@ +apiVersion: tenancy.kcp.io/v1alpha1 +kind: Workspace +metadata: + name: kube-bind + annotations: + bootstrap.kcp.io/create-only: "true" +spec: + type: + name: organization + path: root diff --git a/kcp/bootstrap/config/core/bootstrap.go b/kcp/bootstrap/config/core/bootstrap.go new file mode 100644 index 000000000..57b8dbd4b --- /dev/null +++ b/kcp/bootstrap/config/core/bootstrap.go @@ -0,0 +1,51 @@ +/* +Copyright 2025 The Kube Bind 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. +*/ + +package core + +import ( + "context" + + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" + kcpdynamic "github.com/kcp-dev/client-go/dynamic" + kcpclientset "github.com/kcp-dev/kcp/sdk/client/clientset/versioned/cluster" + "github.com/kcp-dev/logicalcluster/v3" + "k8s.io/apimachinery/pkg/util/sets" + + "github.com/kube-bind/kube-bind/kcp/bootstrap/config/core/resources" +) + +var ( + // KubeBindRootClusterName is the workspace to host common APIs. + KubeBindRootClusterName = logicalcluster.NewPath("root:kube-bind") +) + +// Bootstrap creates resources in this package by continuously retrying the list. +// This is blocking, i.e. it only returns (with error) when the context is closed or with nil when +// the bootstrapping is successfully completed. +func Bootstrap( + ctx context.Context, + kcpClientSet kcpclientset.ClusterInterface, + apiExtensionClusterClient kcpapiextensionsclientset.ClusterInterface, + dynamicClusterClient kcpdynamic.ClusterInterface, + batteriesIncluded sets.Set[string], +) error { + computeDiscoveryClient := apiExtensionClusterClient.Cluster(KubeBindRootClusterName).Discovery() + computeDynamicClient := dynamicClusterClient.Cluster(KubeBindRootClusterName) + + crdClient := apiExtensionClusterClient.ApiextensionsV1().Cluster(KubeBindRootClusterName).CustomResourceDefinitions() + return resources.Bootstrap(ctx, kcpClientSet, computeDiscoveryClient, computeDynamicClient, crdClient, batteriesIncluded) +} diff --git a/kcp/bootstrap/config/core/resources/1-namespace.yaml b/kcp/bootstrap/config/core/resources/1-namespace.yaml new file mode 100644 index 000000000..c94b326fe --- /dev/null +++ b/kcp/bootstrap/config/core/resources/1-namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: controllers + annotations: + bootstrap.kcp.io/create-only: "true" diff --git a/kcp/bootstrap/config/core/resources/2-clusterrolebinding.yaml b/kcp/bootstrap/config/core/resources/2-clusterrolebinding.yaml new file mode 100644 index 000000000..e811fdaa6 --- /dev/null +++ b/kcp/bootstrap/config/core/resources/2-clusterrolebinding.yaml @@ -0,0 +1,14 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kube-bind-service-account-binding + annotations: + bootstrap.kcp.io/create-only: "true" +subjects: +- kind: ServiceAccount + name: admin-service-account + namespace: default +roleRef: + kind: ClusterRole + name: cluster-admin + apiGroup: rbac.authorization.k8s.io \ No newline at end of file diff --git a/kcp/bootstrap/config/core/resources/3-serviceaccount.yaml b/kcp/bootstrap/config/core/resources/3-serviceaccount.yaml new file mode 100644 index 000000000..d2153a459 --- /dev/null +++ b/kcp/bootstrap/config/core/resources/3-serviceaccount.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kube-bind-controller + namespace: default + annotations: + bootstrap.kcp.io/create-only: "true" \ No newline at end of file diff --git a/kcp/bootstrap/config/core/resources/4-legaycsecret.yaml b/kcp/bootstrap/config/core/resources/4-legaycsecret.yaml new file mode 100644 index 000000000..f2534eb8e --- /dev/null +++ b/kcp/bootstrap/config/core/resources/4-legaycsecret.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Secret +metadata: + name: kube-bind-controller-secret + namespace: default + annotations: + bootstrap.kcp.io/create-only: "true" + kubernetes.io/service-account.name: kube-bind-controller +type: kubernetes.io/service-account-token \ No newline at end of file diff --git a/kcp/bootstrap/config/core/resources/bootstrap.go b/kcp/bootstrap/config/core/resources/bootstrap.go new file mode 100644 index 000000000..ba05aa175 --- /dev/null +++ b/kcp/bootstrap/config/core/resources/bootstrap.go @@ -0,0 +1,46 @@ +/* +Copyright 2025 The Kube Bind 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. +*/ + +package resources + +import ( + "context" + "embed" + + confighelpers "github.com/kcp-dev/kcp/config/helpers" + kcpclientcluster "github.com/kcp-dev/kcp/sdk/client/clientset/versioned/cluster" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/discovery" + "k8s.io/client-go/dynamic" +) + +//go:embed *.yaml +var kubeFS embed.FS + +// Bootstrap creates resources in this package by continuously retrying the list. +// This is blocking, i.e. it only returns (with error) when the context is closed or with nil when +// the bootstrapping is successfully completed. +func Bootstrap( + ctx context.Context, + kcpClient kcpclientcluster.ClusterInterface, + discoveryClient discovery.DiscoveryInterface, + dynamicClient dynamic.Interface, + crdClient apiextensionsv1.CustomResourceDefinitionInterface, + batteriesIncluded sets.Set[string]) error { + // create resources in core cluster + return confighelpers.Bootstrap(ctx, discoveryClient, dynamicClient, batteriesIncluded, kubeFS, confighelpers.ReplaceOption()) +} diff --git a/kcp/bootstrap/config/kcp b/kcp/bootstrap/config/kcp new file mode 120000 index 000000000..fbc41d9bb --- /dev/null +++ b/kcp/bootstrap/config/kcp @@ -0,0 +1 @@ +../../deploy/ \ No newline at end of file diff --git a/kcp/bootstrap/options/options.go b/kcp/bootstrap/options/options.go new file mode 100644 index 000000000..fbc4ef89b --- /dev/null +++ b/kcp/bootstrap/options/options.go @@ -0,0 +1,81 @@ +/* +Copyright 2022 The Kube Bind 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. +*/ + +package options + +import ( + "fmt" + + "github.com/spf13/pflag" + "k8s.io/component-base/logs" + logsv1 "k8s.io/component-base/logs/api/v1" +) + +type Options struct { + Logs *logs.Options + + ExtraOptions +} +type ExtraOptions struct { + KCPKubeConfig string + KCPContext string +} + +type completedOptions struct { + Logs *logs.Options + + ExtraOptions +} + +type CompletedOptions struct { + *completedOptions +} + +func NewOptions() *Options { + // Default to -v=2 + logs := logs.NewOptions() + logs.Verbosity = logsv1.VerbosityLevel(2) + + return &Options{ + Logs: logs, + ExtraOptions: ExtraOptions{}, + } +} + +func (options *Options) AddFlags(fs *pflag.FlagSet) { + logsv1.AddFlags(options.Logs, fs) + + fs.StringVar(&options.KCPKubeConfig, "kcp-kubeconfig", options.KCPKubeConfig, "path to a kcp kubeconfig. Required to bootstrap the server.") + fs.StringVar(&options.KCPContext, "context", options.KCPContext, "Name of the context in the kcp kubeconfig file to use") + +} + +func (options *Options) Complete() (*CompletedOptions, error) { + if options.KCPKubeConfig == "" { + return nil, fmt.Errorf("kcp kubeconfig must be specified") + } + + return &CompletedOptions{ + completedOptions: &completedOptions{ + Logs: options.Logs, + ExtraOptions: options.ExtraOptions, + }, + }, nil +} + +func (options *CompletedOptions) Validate() error { + return nil +} diff --git a/kcp/bootstrap/server.go b/kcp/bootstrap/server.go new file mode 100644 index 000000000..69f8463c3 --- /dev/null +++ b/kcp/bootstrap/server.go @@ -0,0 +1,80 @@ +/* +Copyright 2025 The Kube Bind 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. +*/ + +package bootstrap + +import ( + "context" + + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/klog/v2" + + bootstrapconfig "github.com/kube-bind/kube-bind/kcp/bootstrap/config/config" + bootstrapcore "github.com/kube-bind/kube-bind/kcp/bootstrap/config/core" + bootstrapkubebind "github.com/kube-bind/kube-bind/kcp/bootstrap/config/kcp" +) + +type Server struct { + Config *Config +} + +func NewServer(ctx context.Context, config *Config) (*Server, error) { + s := &Server{ + Config: config, + } + + return s, nil +} + +func (s *Server) Start(ctx context.Context) error { + fakeBatteries := sets.New("") + logger := klog.FromContext(ctx) + + if err := bootstrapconfig.Bootstrap( + ctx, + s.Config.KcpClusterClient, + s.Config.ApiextensionsClient, + s.Config.DynamicClusterClient, + fakeBatteries, + ); err != nil { + logger.Error(err, "failed to bootstrap initial config workspace") + return nil // don't klog.Fatal. This only happens when context is cancelled. + } + + if err := bootstrapcore.Bootstrap( + ctx, + s.Config.KcpClusterClient, + s.Config.ApiextensionsClient, + s.Config.DynamicClusterClient, + fakeBatteries, + ); err != nil { + logger.Error(err, "failed to bootstrap core workspace") + return nil // don't klog.Fatal. This only happens when context is cancelled. + } + + if err := bootstrapkubebind.Bootstrap( + ctx, + s.Config.KcpClusterClient, + s.Config.ApiextensionsClient, + s.Config.DynamicClusterClient, + fakeBatteries, + ); err != nil { + logger.Error(err, "failed to bootstrap workspace") + return nil // don't klog.Fatal. This only happens when context is cancelled. + } + + return nil +} diff --git a/kcp/cmd/kcp-init/main.go b/kcp/cmd/kcp-init/main.go new file mode 100644 index 000000000..fc4cee8cd --- /dev/null +++ b/kcp/cmd/kcp-init/main.go @@ -0,0 +1,77 @@ +/* +Copyright 2025 The Kube Bind 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. +*/ + +package main + +import ( + "context" + "fmt" + "os" + + "github.com/spf13/pflag" + genericapiserver "k8s.io/apiserver/pkg/server" + logsv1 "k8s.io/component-base/logs/api/v1" + "k8s.io/klog/v2" + + bootstrap "github.com/kube-bind/kube-bind/kcp/bootstrap" + "github.com/kube-bind/kube-bind/kcp/bootstrap/options" +) + +func main() { + ctx := genericapiserver.SetupSignalContext() + if err := run(ctx); err != nil { + fmt.Fprintf(os.Stderr, "Error: %v", err) // nolint: errcheck + os.Exit(1) + } +} + +func run(ctx context.Context) error { + defer klog.Flush() + + options := options.NewOptions() + options.AddFlags(pflag.CommandLine) + pflag.Parse() + + logger := klog.FromContext(ctx) + logger.Info("Bootstrapping api") + + // setup logging first + if err := logsv1.ValidateAndApply(options.Logs, nil); err != nil { + return err + } + + // create init server + completed, err := options.Complete() + if err != nil { + return err + } + if err := completed.Validate(); err != nil { + return err + } + + // start server + config, err := bootstrap.NewConfig(completed) + if err != nil { + return err + } + + server, err := bootstrap.NewServer(ctx, config) + if err != nil { + return err + } + + return server.Start(ctx) +} diff --git a/kcp/deploy/bootstrap.go b/kcp/deploy/bootstrap.go new file mode 100644 index 000000000..86d02c335 --- /dev/null +++ b/kcp/deploy/bootstrap.go @@ -0,0 +1,275 @@ +/* +Copyright 2025 The Kube Bind 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. +*/ + +package kubebind + +import ( + "context" + "time" + + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" + kcpdynamic "github.com/kcp-dev/client-go/dynamic" + apisv1alpha2 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha2" + kcpclient "github.com/kcp-dev/kcp/sdk/client/clientset/versioned" + kcpclientset "github.com/kcp-dev/kcp/sdk/client/clientset/versioned/cluster" + "github.com/kcp-dev/logicalcluster/v3" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/klog/v2" + + "github.com/kube-bind/kube-bind/kcp/bootstrap/config/kcp/resources" +) + +var ( + // KubeBindRootClusterName is the workspace to host common APIs. + KubeBindRootClusterName = logicalcluster.NewPath("root:kube-bind") +) + +// Bootstrap creates resources in this package by continuously retrying the list. +// This is blocking, i.e. it only returns (with error) when the context is closed or with nil when +// the bootstrapping is successfully completed. +func Bootstrap( + ctx context.Context, + kcpClientSet kcpclientset.ClusterInterface, + apiExtensionClusterClient kcpapiextensionsclientset.ClusterInterface, + dynamicClusterClient kcpdynamic.ClusterInterface, + batteriesIncluded sets.Set[string], +) error { + computeDiscoveryClient := apiExtensionClusterClient.Cluster(KubeBindRootClusterName).Discovery() + computeDynamicClient := dynamicClusterClient.Cluster(KubeBindRootClusterName) + + crdClient := apiExtensionClusterClient.ApiextensionsV1().Cluster(KubeBindRootClusterName).CustomResourceDefinitions() + kcpClient := kcpClientSet.Cluster(KubeBindRootClusterName) + + err := resources.Bootstrap(ctx, kcpClientSet, computeDiscoveryClient, computeDynamicClient, crdClient, batteriesIncluded) + if err != nil { + return err + } + + // create recursive apibinding so we can start controllers. + // this is a temporary solution until we have a better way to bootstrap controllers. + return bindAPIExport(ctx, kcpClient, "kube-bind.io", KubeBindRootClusterName) +} + +func bindAPIExport(ctx context.Context, kcpClient kcpclient.Interface, exportName string, clusterPath logicalcluster.Path) error { + logger := klog.FromContext(ctx) + + binding := &apisv1alpha2.APIBinding{ + ObjectMeta: metav1.ObjectMeta{ + Name: exportName, + }, + Spec: apisv1alpha2.APIBindingSpec{ + Reference: apisv1alpha2.BindingReference{ + Export: &apisv1alpha2.ExportBindingReference{ + Path: clusterPath.String(), + Name: exportName, + }, + }, + }, + } + + binding.Spec.PermissionClaims = []apisv1alpha2.AcceptablePermissionClaim{ + { + ScopedPermissionClaim: apisv1alpha2.ScopedPermissionClaim{ + PermissionClaim: apisv1alpha2.PermissionClaim{ + GroupResource: apisv1alpha2.GroupResource{ + Group: "rbac.authorization.k8s.io", + Resource: "clusterrolebindings", + }, + Verbs: []string{"*"}, + }, + Selector: apisv1alpha2.PermissionClaimSelector{ + MatchAll: true, + }, + }, + State: apisv1alpha2.ClaimAccepted, + }, + { + ScopedPermissionClaim: apisv1alpha2.ScopedPermissionClaim{ + PermissionClaim: apisv1alpha2.PermissionClaim{ + GroupResource: apisv1alpha2.GroupResource{ + Group: "rbac.authorization.k8s.io", + Resource: "clusterroles", + }, + Verbs: []string{"*"}, + }, + Selector: apisv1alpha2.PermissionClaimSelector{ + MatchAll: true, + }, + }, + State: apisv1alpha2.ClaimAccepted, + }, + { + ScopedPermissionClaim: apisv1alpha2.ScopedPermissionClaim{ + PermissionClaim: apisv1alpha2.PermissionClaim{ + GroupResource: apisv1alpha2.GroupResource{ + Group: "rbac.authorization.k8s.io", + Resource: "roles", + }, + Verbs: []string{"*"}, + }, + Selector: apisv1alpha2.PermissionClaimSelector{ + MatchAll: true, + }, + }, + State: apisv1alpha2.ClaimAccepted, + }, + { + ScopedPermissionClaim: apisv1alpha2.ScopedPermissionClaim{ + PermissionClaim: apisv1alpha2.PermissionClaim{ + GroupResource: apisv1alpha2.GroupResource{ + Group: "rbac.authorization.k8s.io", + Resource: "rolebindings", + }, + Verbs: []string{"*"}, + }, + Selector: apisv1alpha2.PermissionClaimSelector{ + MatchAll: true, + }, + }, + State: apisv1alpha2.ClaimAccepted, + }, + { + ScopedPermissionClaim: apisv1alpha2.ScopedPermissionClaim{ + PermissionClaim: apisv1alpha2.PermissionClaim{ + GroupResource: apisv1alpha2.GroupResource{ + Group: "", + Resource: "serviceaccounts", + }, + Verbs: []string{"*"}, + }, + Selector: apisv1alpha2.PermissionClaimSelector{ + MatchAll: true, + }, + }, + State: apisv1alpha2.ClaimAccepted, + }, + { + ScopedPermissionClaim: apisv1alpha2.ScopedPermissionClaim{ + PermissionClaim: apisv1alpha2.PermissionClaim{ + GroupResource: apisv1alpha2.GroupResource{ + Group: "", + Resource: "configmaps", + }, + Verbs: []string{"*"}, + }, + Selector: apisv1alpha2.PermissionClaimSelector{ + MatchAll: true, + }, + }, + State: apisv1alpha2.ClaimAccepted, + }, + { + ScopedPermissionClaim: apisv1alpha2.ScopedPermissionClaim{ + PermissionClaim: apisv1alpha2.PermissionClaim{ + GroupResource: apisv1alpha2.GroupResource{ + Group: "", + Resource: "secrets", + }, + Verbs: []string{"*"}, + }, + Selector: apisv1alpha2.PermissionClaimSelector{ + MatchAll: true, + }, + }, + State: apisv1alpha2.ClaimAccepted, + }, + { + ScopedPermissionClaim: apisv1alpha2.ScopedPermissionClaim{ + PermissionClaim: apisv1alpha2.PermissionClaim{ + GroupResource: apisv1alpha2.GroupResource{ + Group: apisv1alpha2.SchemeGroupVersion.Group, + Resource: "apiexports", + }, + Verbs: []string{"*"}, + }, + Selector: apisv1alpha2.PermissionClaimSelector{ + MatchAll: true, + }, + }, + State: apisv1alpha2.ClaimAccepted, + }, + { + ScopedPermissionClaim: apisv1alpha2.ScopedPermissionClaim{ + PermissionClaim: apisv1alpha2.PermissionClaim{ + GroupResource: apisv1alpha2.GroupResource{ + Group: "apiextensions.k8s.io", + Resource: "customresourcedefinitions", + }, + Verbs: []string{"*"}, + }, + Selector: apisv1alpha2.PermissionClaimSelector{ + MatchAll: true, + }, + }, + State: apisv1alpha2.ClaimAccepted, + }, + { + ScopedPermissionClaim: apisv1alpha2.ScopedPermissionClaim{ + PermissionClaim: apisv1alpha2.PermissionClaim{ + GroupResource: apisv1alpha2.GroupResource{ + Group: "", + Resource: "namespaces", + }, + Verbs: []string{"*"}, + }, + Selector: apisv1alpha2.PermissionClaimSelector{ + MatchAll: true, + }, + }, + State: apisv1alpha2.ClaimAccepted, + }, + } + + _, err := kcpClient.ApisV1alpha2().APIBindings().Create(ctx, binding, metav1.CreateOptions{}) + if err == nil { + return nil + } + if !apierrors.IsAlreadyExists(err) { + return err + } + + if err := wait.PollUntilContextCancel(ctx, time.Second, true, func(ctx context.Context) (bool, error) { + existing, err := kcpClient.ApisV1alpha2().APIBindings().Get(ctx, exportName, metav1.GetOptions{}) + if err != nil { + logger.Error(err, "error getting APIBinding", "name", exportName) + // Always keep trying. Don't ever return an error out of this function. + return false, nil + } + + logger.V(2).Info("Updating API binding") + existing.Spec = binding.Spec + + _, err = kcpClient.ApisV1alpha2().APIBindings().Update(ctx, existing, metav1.UpdateOptions{}) + if err == nil { + return true, nil + } + if apierrors.IsConflict(err) { + logger.V(2).Info("API binding update conflict, retrying") + return false, nil + } + + logger.Error(err, "error updating APIBinding") + // Always keep trying. Don't ever return an error out of this function. + return false, nil + }); err != nil { + return err + } + + return nil +} diff --git a/kcp/deploy/resources/apiexport-kube-bind.io.yaml b/kcp/deploy/resources/apiexport-kube-bind.io.yaml new file mode 100644 index 000000000..e3f8463c9 --- /dev/null +++ b/kcp/deploy/resources/apiexport-kube-bind.io.yaml @@ -0,0 +1,81 @@ +apiVersion: apis.kcp.io/v1alpha2 +kind: APIExport +metadata: + creationTimestamp: null + name: kube-bind.io +spec: + permissionClaims: + - group: rbac.authorization.k8s.io + resource: clusterrolebindings + verbs: + - '*' + - group: rbac.authorization.k8s.io + resource: clusterroles + verbs: + - '*' + - group: rbac.authorization.k8s.io + resource: roles + verbs: + - '*' + - group: rbac.authorization.k8s.io + resource: rolebindings + verbs: + - '*' + - resource: serviceaccounts + verbs: + - '*' + - resource: configmaps + verbs: + - '*' + - resource: secrets + verbs: + - '*' + - resource: namespaces + verbs: + - '*' + - group: apiextensions.k8s.io + resource: customresourcedefinitions + verbs: + - '*' + resources: + - group: kube-bind.io + name: apiconversions + schema: v250809-5ed76a1.apiconversions.kube-bind.io + storage: + crd: {} + - group: kube-bind.io + name: apiresourceschemas + schema: v250809-5ed76a1.apiresourceschemas.kube-bind.io + storage: + crd: {} + - group: kube-bind.io + name: apiservicebindings + schema: v250809-5ed76a1.apiservicebindings.kube-bind.io + storage: + crd: {} + - group: kube-bind.io + name: apiserviceexportrequests + schema: v250809-5ed76a1.apiserviceexportrequests.kube-bind.io + storage: + crd: {} + - group: kube-bind.io + name: apiserviceexports + schema: v250809-5ed76a1.apiserviceexports.kube-bind.io + storage: + crd: {} + - group: kube-bind.io + name: apiservicenamespaces + schema: v250809-5ed76a1.apiservicenamespaces.kube-bind.io + storage: + crd: {} + - group: kube-bind.io + name: boundapiresourceschemas + schema: v250809-5ed76a1.boundapiresourceschemas.kube-bind.io + storage: + crd: {} + - group: kube-bind.io + name: clusterbindings + schema: v250809-5ed76a1.clusterbindings.kube-bind.io + storage: + crd: {} +status: {} diff --git a/kcp/deploy/resources/apiresourceschema-apiconversions.kube-bind.io.yaml b/kcp/deploy/resources/apiresourceschema-apiconversions.kube-bind.io.yaml new file mode 100644 index 000000000..31e61fece --- /dev/null +++ b/kcp/deploy/resources/apiresourceschema-apiconversions.kube-bind.io.yaml @@ -0,0 +1,123 @@ +apiVersion: apis.kcp.io/v1alpha1 +kind: APIResourceSchema +metadata: + creationTimestamp: null + name: v250809-5ed76a1.apiconversions.kube-bind.io +spec: + conversion: + strategy: None + group: kube-bind.io + names: + categories: + - kcp + kind: APIConversion + listKind: APIConversionList + plural: apiconversions + singular: apiconversion + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + description: |- + APIConversion contains rules to convert between different API versions in an APIResourceSchema. The name must match + the name of the APIResourceSchema for the conversions to take effect. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: Spec holds the desired state. + properties: + conversions: + description: conversions specify rules to convert between different + API versions in an APIResourceSchema. + items: + description: |- + APIVersionConversion contains rules to convert between two specific API versions in an + APIResourceSchema. Additionally, to avoid data loss when round-tripping from a version that + contains a new field to one that doesn't and back again, you can specify a list of fields to + preserve (these are stored in annotations). + properties: + from: + description: from is the source version. + minLength: 1 + pattern: ^v[1-9][0-9]*([a-z]+[1-9][0-9]*)?$ + type: string + preserve: + description: |- + preserve contains a list of JSONPath expressions to fields to preserve in the originating version + of the object, relative to its root, such as '.spec.name.first'. + items: + type: string + type: array + rules: + description: rules contains field-specific conversion expressions. + items: + description: APIConversionRule specifies how to convert a single + field. + properties: + destination: + description: |- + destination is a JSONPath expression to the field in the target version of the object, relative to + its root, such as '.spec.name.first'. + minLength: 1 + type: string + field: + description: |- + field is a JSONPath expression to the field in the originating version of the object, relative to its root, such + as '.spec.name.first'. + minLength: 1 + type: string + transformation: + description: |- + transformation is an optional CEL expression used to execute user-specified rules to transform the + originating field -- identified by 'self' -- to the destination field. + type: string + required: + - destination + - field + type: object + type: array + x-kubernetes-list-map-keys: + - destination + x-kubernetes-list-type: map + to: + description: to is the target version. + minLength: 1 + pattern: ^v[1-9][0-9]*([a-z]+[1-9][0-9]*)?$ + type: string + required: + - from + - rules + - to + type: object + type: array + x-kubernetes-list-map-keys: + - from + - to + x-kubernetes-list-type: map + required: + - conversions + type: object + type: object + served: true + storage: true + subresources: {} diff --git a/kcp/deploy/resources/apiresourceschema-apiresourceschemas.kube-bind.io.yaml b/kcp/deploy/resources/apiresourceschema-apiresourceschemas.kube-bind.io.yaml new file mode 100644 index 000000000..ff7a771db --- /dev/null +++ b/kcp/deploy/resources/apiresourceschema-apiresourceschemas.kube-bind.io.yaml @@ -0,0 +1,360 @@ +apiVersion: apis.kcp.io/v1alpha1 +kind: APIResourceSchema +metadata: + creationTimestamp: null + name: v250809-5ed76a1.apiresourceschemas.kube-bind.io +spec: + conversion: + strategy: None + group: kube-bind.io + names: + categories: + - kube-bindings + kind: APIResourceSchema + listKind: APIResourceSchemaList + plural: apiresourceschemas + shortNames: + - as + singular: apiresourceschema + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + description: APIResourceSchema + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + properties: + conversion: + description: conversion defines conversion settings for the defined + custom resource. + properties: + strategy: + description: |- + strategy specifies how custom resources are converted between versions. Allowed values are: + - `"None"`: The converter only change the apiVersion and would not touch any other field in the custom resource. + - `"Webhook"`: API Server will call to an external webhook to do the conversion. Additional information + is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set. + enum: + - None + - Webhook + type: string + webhook: + description: webhook describes how to call the conversion webhook. + Required when `strategy` is set to `"Webhook"`. + properties: + clientConfig: + description: clientConfig is the instructions for how to call + the webhook if strategy is `Webhook`. + properties: + caBundle: + description: |- + caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. + If unspecified, system trust roots on the apiserver are used. + format: byte + type: string + url: + description: |- + url gives the location of the webhook, in standard URL form + (`scheme://host:port/path`). + + Please note that using `localhost` or `127.0.0.1` as a `host` is + risky unless you take great care to run this webhook on all hosts + which run an apiserver which might need to make calls to this + webhook. Such installs are likely to be non-portable, i.e., not easy + to turn up in a new cluster. + + The scheme must be "https"; the URL must begin with "https://". + + A path is optional, and if present may be any string permissible in + a URL. You may use the path to pass an arbitrary string to the + webhook, for example, a cluster identifier. + + Attempting to use a user or basic auth e.g. "user:password@" is not + allowed. Fragments ("#...") and query parameters ("?...") are not + allowed, either. + format: uri + type: string + type: object + conversionReviewVersions: + description: |- + conversionReviewVersions is an ordered list of preferred `ConversionReview` + versions the Webhook expects. The API server will use the first version in + the list which it supports. If none of the versions specified in this list + are supported by API server, conversion will fail for the custom resource. + If a persisted Webhook configuration specifies allowed versions and does not + include any versions known to the API Server, calls to the webhook will fail. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + type: object + x-kubernetes-validations: + - message: Webhook must be specified if strategy=Webhook + rule: (self.strategy == 'None' && !has(self.webhook)) || (self.strategy + == 'Webhook' && has(self.webhook)) + group: + description: "group is the API group of the defined custom resource. + Empty string means the\ncore API group. \tThe resources are served + under `/apis//...` or `/api` for the core group." + type: string + informerScope: + allOf: + - enum: + - Cluster + - Namespaced + - enum: + - Cluster + - Namespaced + description: |- + InformerScope indicates whether the informer for defined custom resource is cluster- or namespace-scoped. + Allowed values are `Cluster` and `Namespaced`. + type: string + names: + description: names specify the resource and kind names for the custom + resource. + properties: + categories: + description: |- + categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). + This is published in API discovery documents, and used by clients to support invocations like + `kubectl get all`. + items: + type: string + type: array + x-kubernetes-list-type: atomic + kind: + description: |- + kind is the serialized kind of the resource. It is normally CamelCase and singular. + Custom resource instances will use this value as the `kind` attribute in API calls. + type: string + listKind: + description: listKind is the serialized kind of the list for this + resource. Defaults to "`kind`List". + type: string + plural: + description: |- + plural is the plural name of the resource to serve. + The custom resources are served under `/apis///.../`. + Must match the name of the CustomResourceDefinition (in the form `.`). + Must be all lowercase. + type: string + shortNames: + description: |- + shortNames are short names for the resource, exposed in API discovery documents, + and used by clients to support invocations like `kubectl get `. + It must be all lowercase. + items: + type: string + type: array + x-kubernetes-list-type: atomic + singular: + description: singular is the singular name of the resource. It must + be all lowercase. Defaults to lowercased `kind`. + type: string + required: + - kind + - plural + type: object + scope: + description: |- + scope indicates whether the defined custom resource is cluster- or namespace-scoped. + Allowed values are `Cluster` and `Namespaced`. + enum: + - Cluster + - Namespaced + type: string + versions: + description: |- + versions is the API version of the defined custom resource. + + Note: the OpenAPI v3 schemas must be equal for all versions until CEL + version migration is supported. + items: + description: APIResourceVersion describes one API version of a resource. + properties: + additionalPrinterColumns: + description: |- + additionalPrinterColumns specifies additional columns returned in Table output. + See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. + If no columns are specified, a single column displaying the age of the custom resource is used. + items: + description: CustomResourceColumnDefinition specifies a column + for server side printing. + properties: + description: + description: description is a human readable description + of this column. + type: string + format: + description: |- + format is an optional OpenAPI type definition for this column. The 'name' format is applied + to the primary identifier column to assist in clients identifying column is the resource name. + See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. + type: string + jsonPath: + description: |- + jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against + each custom resource to produce the value for this column. + type: string + name: + description: name is a human readable name for the column. + type: string + priority: + description: |- + priority is an integer defining the relative importance of this column compared to others. Lower + numbers are considered higher priority. Columns that may be omitted in limited space scenarios + should be given a priority greater than 0. + format: int32 + type: integer + type: + description: |- + type is an OpenAPI type definition for this column. + See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. + type: string + required: + - jsonPath + - name + - type + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + deprecated: + description: |- + deprecated indicates this version of the custom resource API is deprecated. + When set to true, API requests to this version receive a warning header in the server response. + Defaults to false. + type: boolean + deprecationWarning: + description: |- + deprecationWarning overrides the default warning returned to API clients. + May only be set when `deprecated` is true. + The default warning indicates this version is deprecated and recommends use + of the newest served version of equal or greater stability, if one exists. + type: string + name: + description: |- + name is the version name, e.g. “v1”, “v2beta1”, etc. + The custom resources are served under this version at `/apis///...` if `served` is true. + minLength: 1 + pattern: ^v[1-9][0-9]*([a-z]+[1-9][0-9]*)?$ + type: string + schema: + description: |- + schema describes the structural schema used for validation, pruning, and defaulting + of this version of the custom resource. + properties: + openAPIV3Schema: + description: openAPIV3Schema is the OpenAPI v3 schema to use + for validation and pruning. + type: object + x-kubernetes-map-type: atomic + x-kubernetes-preserve-unknown-fields: true + required: + - openAPIV3Schema + type: object + x-kubernetes-map-type: atomic + x-kubernetes-preserve-unknown-fields: true + served: + default: true + description: served is a flag enabling/disabling this version + from being served via REST APIs + type: boolean + storage: + description: |- + storage indicates this version should be used when persisting custom resources to storage. + There must be exactly one version with storage=true. + type: boolean + subresources: + description: subresources specify what subresources this version + of the defined custom resource have. + properties: + scale: + description: scale indicates the custom resource should serve + a `/scale` subresource that returns an `autoscaling/v1` + Scale object. + properties: + labelSelectorPath: + description: |- + labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. + Only JSON paths without the array notation are allowed. + Must be a JSON Path under `.status` or `.spec`. + Must be set to work with HorizontalPodAutoscaler. + The field pointed by this JSON path must be a string field (not a complex selector struct) + which contains a serialized label selector in string form. + More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource + If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` + subresource will default to the empty string. + type: string + specReplicasPath: + description: |- + specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. + Only JSON paths without the array notation are allowed. + Must be a JSON Path under `.spec`. + If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. + type: string + statusReplicasPath: + description: |- + statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. + Only JSON paths without the array notation are allowed. + Must be a JSON Path under `.status`. + If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource + will default to 0. + type: string + required: + - specReplicasPath + - statusReplicasPath + type: object + status: + description: |- + status indicates the custom resource should serve a `/status` subresource. + When enabled: + 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. + 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. + type: object + type: object + required: + - name + - schema + - served + - storage + type: object + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - group + - informerScope + - names + - scope + - versions + type: object + type: object + served: true + storage: true + subresources: {} diff --git a/kcp/deploy/resources/apiresourceschema-apiservicebindings.kube-bind.io.yaml b/kcp/deploy/resources/apiresourceschema-apiservicebindings.kube-bind.io.yaml new file mode 100644 index 000000000..33d76eda1 --- /dev/null +++ b/kcp/deploy/resources/apiresourceschema-apiservicebindings.kube-bind.io.yaml @@ -0,0 +1,313 @@ +apiVersion: apis.kcp.io/v1alpha1 +kind: APIResourceSchema +metadata: + creationTimestamp: null + name: v250809-5ed76a1.apiservicebindings.kube-bind.io +spec: + conversion: + strategy: None + group: kube-bind.io + names: + categories: + - kube-bindings + kind: APIServiceBinding + listKind: APIServiceBindingList + plural: apiservicebindings + shortNames: + - sb + singular: apiservicebinding + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.providerPrettyName + name: Provider + type: string + - jsonPath: .metadata.annotations.kube-bind\.io/resources + name: Resources + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Ready")].status + name: Ready + type: string + - jsonPath: .status.conditions[?(@.type=="Ready")].message + name: Message + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + description: |- + APIServiceBinding binds an API service represented by a APIServiceExport + in a service provider cluster into a consumer cluster. This object lives in + the consumer cluster. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: |- + spec specifies how an API service from a service provider should be bound in the + local consumer cluster. + properties: + kubeconfigSecretRef: + description: kubeconfigSecretName is the secret ref that contains the + kubeconfig of the service cluster. + properties: + key: + description: The key of the secret to select from. Must be "kubeconfig". + enum: + - kubeconfig + type: string + name: + description: Name of the referent. + minLength: 1 + type: string + namespace: + description: Namespace of the referent. + minLength: 1 + type: string + required: + - key + - name + - namespace + type: object + x-kubernetes-validations: + - message: kubeconfigSecretRef is immutable + rule: self == oldSelf + required: + - kubeconfigSecretRef + type: object + status: + description: status contains reconciliation information for a service binding. + properties: + conditions: + description: conditions is a list of conditions that apply to the APIServiceBinding. + items: + description: Condition defines an observation of a object operational + state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + providerPrettyName: + description: |- + providerPrettyName is the pretty name of the service provider cluster. This + can be shared among different APIServiceBindings. + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .status.providerPrettyName + name: Provider + type: string + - jsonPath: .metadata.annotations.kube-bind\.io/resources + name: Resources + priority: 1 + type: string + - jsonPath: .status.conditions[?(@.type=="Ready")].status + name: Ready + type: string + - jsonPath: .status.conditions[?(@.type=="Ready")].message + name: Message + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + description: |- + APIServiceBinding binds an API service represented by a APIServiceExport + in a service provider cluster into a consumer cluster. This object lives in + the consumer cluster. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: |- + spec specifies how an API service from a service provider should be bound in the + local consumer cluster. + properties: + kubeconfigSecretRef: + description: kubeconfigSecretName is the secret ref that contains the + kubeconfig of the service cluster. + properties: + key: + description: The key of the secret to select from. Must be "kubeconfig". + enum: + - kubeconfig + type: string + name: + description: Name of the referent. + minLength: 1 + type: string + namespace: + description: Namespace of the referent. + minLength: 1 + type: string + required: + - key + - name + - namespace + type: object + x-kubernetes-validations: + - message: kubeconfigSecretRef is immutable + rule: self == oldSelf + required: + - kubeconfigSecretRef + type: object + status: + description: status contains reconciliation information for a service binding. + properties: + boundSchemas: + description: |- + BoundSchemas contains references to all BoundAPIResourceSchema objects + associated with this APIServiceBinding, tracking consumer usage status. + items: + description: BoundSchemaReference contains a reference to a BoundAPIResourceSchema + with status information. + properties: + group: + default: "" + description: |- + group is the name of an API group. + For core groups this is the empty string '""'. + pattern: ^(|[a-z0-9]([-a-z0-9]*[a-z0-9](\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)?)$ + type: string + resource: + description: |- + resource is the name of the resource. + Note: it is worth noting that you can not ask for permissions for resource provided by a CRD + not provided by an service binding export. + pattern: ^[a-z][-a-z0-9]*[a-z0-9]$ + type: string + required: + - resource + type: object + minItems: 1 + type: array + conditions: + description: conditions is a list of conditions that apply to the APIServiceBinding. + items: + description: Condition defines an observation of a object operational + state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + providerPrettyName: + description: |- + providerPrettyName is the pretty name of the service provider cluster. This + can be shared among different APIServiceBindings. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/kcp/deploy/resources/apiresourceschema-apiserviceexportrequests.kube-bind.io.yaml b/kcp/deploy/resources/apiresourceschema-apiserviceexportrequests.kube-bind.io.yaml new file mode 100644 index 000000000..d1d26d448 --- /dev/null +++ b/kcp/deploy/resources/apiresourceschema-apiserviceexportrequests.kube-bind.io.yaml @@ -0,0 +1,330 @@ +apiVersion: apis.kcp.io/v1alpha1 +kind: APIResourceSchema +metadata: + creationTimestamp: null + name: v250809-5ed76a1.apiserviceexportrequests.kube-bind.io +spec: + conversion: + strategy: None + group: kube-bind.io + names: + categories: + - kube-bindings + kind: APIServiceExportRequest + listKind: APIServiceExportRequestList + plural: apiserviceexportrequests + singular: apiserviceexportrequest + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=="Ready")].status + name: Ready + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + description: |- + APIServiceExportRequest is represents a request session of kubectl-bind-apiservice. + + The service provider can prune these objects after some time. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: |- + spec specifies how an API service from a service provider should be bound in the + local consumer cluster. + properties: + parameters: + description: |- + parameters holds service provider specific parameters for this binding + request. + type: object + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-validations: + - message: parameters are immutable + rule: self == oldSelf + resources: + description: resources is a list of resources that should be exported. + items: + properties: + group: + default: "" + description: |- + group is the name of an API group. + For core groups this is the empty string '""'. + pattern: ^(|[a-z0-9]([-a-z0-9]*[a-z0-9](\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)?)$ + type: string + resource: + description: |- + resource is the name of the resource. + Note: it is worth noting that you can not ask for permissions for resource provided by a CRD + not provided by an service binding export. + pattern: ^[a-z][-a-z0-9]*[a-z0-9]$ + type: string + versions: + description: |- + versions is a list of versions that should be exported. If this is empty + a sensible default is chosen by the service provider. + items: + type: string + type: array + required: + - resource + type: object + minItems: 1 + type: array + x-kubernetes-validations: + - message: resources are immutable + rule: self == oldSelf + required: + - resources + type: object + status: + default: {} + description: status contains reconciliation information for a service binding. + properties: + conditions: + description: |- + conditions is a list of conditions that apply to the ClusterBinding. It is + updated by the konnector and the service provider. + items: + description: Condition defines an observation of a object operational + state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + phase: + default: Pending + description: |- + phase is the current phase of the binding request. It starts in Pending + and transitions to Succeeded or Failed. See the condition for detailed + information. + enum: + - Pending + - Failed + - Succeeded + type: string + terminalMessage: + description: |- + terminalMessage is a human readable message that describes the reason + for the current phase. + type: string + type: object + required: + - spec + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=="Ready")].status + name: Ready + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + description: |- + APIServiceExportRequest is represents a request session of kubectl-bind-apiservice. + + The service provider can prune these objects after some time. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: |- + spec specifies how an API service from a service provider should be bound in the + local consumer cluster. + properties: + parameters: + description: |- + parameters holds service provider specific parameters for this binding + request. + type: object + x-kubernetes-preserve-unknown-fields: true + x-kubernetes-validations: + - message: parameters are immutable + rule: self == oldSelf + resources: + description: resources is a list of resources that should be exported. + items: + properties: + group: + default: "" + description: |- + group is the name of an API group. + For core groups this is the empty string '""'. + pattern: ^(|[a-z0-9]([-a-z0-9]*[a-z0-9](\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)?)$ + type: string + resource: + description: |- + resource is the name of the resource. + Note: it is worth noting that you can not ask for permissions for resource provided by a CRD + not provided by an service binding export. + pattern: ^[a-z][-a-z0-9]*[a-z0-9]$ + type: string + versions: + description: |- + versions is a list of versions that should be exported. If this is empty + a sensible default is chosen by the service provider. + items: + type: string + type: array + required: + - resource + type: object + minItems: 1 + type: array + x-kubernetes-validations: + - message: resources are immutable + rule: self == oldSelf + required: + - resources + type: object + status: + default: {} + description: status contains reconciliation information for a service binding. + properties: + conditions: + description: |- + conditions is a list of conditions that apply to the ClusterBinding. It is + updated by the konnector and the service provider. + items: + description: Condition defines an observation of a object operational + state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + phase: + default: Pending + description: |- + phase is the current phase of the binding request. It starts in Pending + and transitions to Succeeded or Failed. See the condition for detailed + information. + enum: + - Pending + - Failed + - Succeeded + type: string + terminalMessage: + description: |- + terminalMessage is a human readable message that describes the reason + for the current phase. + type: string + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/kcp/deploy/resources/apiresourceschema-apiserviceexports.kube-bind.io.yaml b/kcp/deploy/resources/apiresourceschema-apiserviceexports.kube-bind.io.yaml new file mode 100644 index 000000000..8eb68ef26 --- /dev/null +++ b/kcp/deploy/resources/apiresourceschema-apiserviceexports.kube-bind.io.yaml @@ -0,0 +1,630 @@ +apiVersion: apis.kcp.io/v1alpha1 +kind: APIResourceSchema +metadata: + creationTimestamp: null + name: v250809-5ed76a1.apiserviceexports.kube-bind.io +spec: + conversion: + strategy: None + group: kube-bind.io + names: + categories: + - kube-bindings + kind: APIServiceExport + listKind: APIServiceExportList + plural: apiserviceexports + singular: apiserviceexport + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=="Established")].status + name: Established + priority: 5 + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + description: |- + APIServiceExport specifies the resource to be exported. It is mostly a CRD: + - the spec is a CRD spec, but without webhooks + - the status reflects that on the consumer cluster + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec specifies the resource. + properties: + clusterScopedIsolation: + description: |- + ClusterScopedIsolation specifies how cluster scoped service objects are isolated between multiple consumers on the provider side. + It can be "Prefixed", "Namespaced", or "None". + enum: + - Prefixed + - Namespaced + - None + type: string + group: + description: "group is the API group of the defined custom resource. + Empty string means the\ncore API group. \tThe resources are served + under `/apis//...` or `/api` for the core group." + type: string + informerScope: + description: |- + informerScope is the scope of the APIServiceExport. It can be either Cluster or Namespace. + + Cluster: The konnector has permission to watch all namespaces at once and cluster-scoped resources. + This is more efficient than watching each namespace individually. + Namespaced: The konnector has permission to watch only single namespaces. + This is more resource intensive. And it means cluster-scoped resources cannot be exported. + enum: + - Cluster + - Namespaced + type: string + x-kubernetes-validations: + - message: informerScope is immutable + rule: self == oldSelf + names: + description: names specify the resource and kind names for the custom + resource. + properties: + categories: + description: |- + categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). + This is published in API discovery documents, and used by clients to support invocations like + `kubectl get all`. + items: + type: string + type: array + x-kubernetes-list-type: atomic + kind: + description: |- + kind is the serialized kind of the resource. It is normally CamelCase and singular. + Custom resource instances will use this value as the `kind` attribute in API calls. + type: string + listKind: + description: listKind is the serialized kind of the list for this + resource. Defaults to "`kind`List". + type: string + plural: + description: |- + plural is the plural name of the resource to serve. + The custom resources are served under `/apis///.../`. + Must match the name of the CustomResourceDefinition (in the form `.`). + Must be all lowercase. + type: string + shortNames: + description: |- + shortNames are short names for the resource, exposed in API discovery documents, + and used by clients to support invocations like `kubectl get `. + It must be all lowercase. + items: + type: string + type: array + x-kubernetes-list-type: atomic + singular: + description: singular is the singular name of the resource. It must + be all lowercase. Defaults to lowercased `kind`. + type: string + required: + - kind + - plural + type: object + scope: + description: |- + scope indicates whether the defined custom resource is cluster- or namespace-scoped. + Allowed values are `Cluster` and `Namespaced`. + enum: + - Cluster + - Namespaced + type: string + versions: + description: |- + versions is the API version of the defined custom resource. + + Note: the OpenAPI v3 schemas must be equal for all versions until CEL + version migration is supported. + items: + description: APIServiceExportVersion describes one API version of + a resource. + properties: + additionalPrinterColumns: + description: |- + additionalPrinterColumns specifies additional columns returned in Table output. + See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. + If no columns are specified, a single column displaying the age of the custom resource is used. + items: + description: CustomResourceColumnDefinition specifies a column + for server side printing. + properties: + description: + description: description is a human readable description + of this column. + type: string + format: + description: |- + format is an optional OpenAPI type definition for this column. The 'name' format is applied + to the primary identifier column to assist in clients identifying column is the resource name. + See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. + type: string + jsonPath: + description: |- + jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against + each custom resource to produce the value for this column. + type: string + name: + description: name is a human readable name for the column. + type: string + priority: + description: |- + priority is an integer defining the relative importance of this column compared to others. Lower + numbers are considered higher priority. Columns that may be omitted in limited space scenarios + should be given a priority greater than 0. + format: int32 + type: integer + type: + description: |- + type is an OpenAPI type definition for this column. + See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. + type: string + required: + - jsonPath + - name + - type + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + deprecated: + description: |- + deprecated indicates this version of the custom resource API is deprecated. + When set to true, API requests to this version receive a warning header in the server response. + Defaults to false. + type: boolean + deprecationWarning: + description: |- + deprecationWarning overrides the default warning returned to API clients. + May only be set when `deprecated` is true. + The default warning indicates this version is deprecated and recommends use + of the newest served version of equal or greater stability, if one exists. + type: string + name: + description: |- + name is the version name, e.g. “v1”, “v2beta1”, etc. + The custom resources are served under this version at `/apis///...` if `served` is true. + minLength: 1 + pattern: ^v[1-9][0-9]*([a-z]+[1-9][0-9]*)?$ + type: string + schema: + description: |- + schema describes the structural schema used for validation, pruning, and defaulting + of this version of the custom resource. + properties: + openAPIV3Schema: + description: openAPIV3Schema is the OpenAPI v3 schema to use + for validation and pruning. + type: object + x-kubernetes-map-type: atomic + x-kubernetes-preserve-unknown-fields: true + required: + - openAPIV3Schema + type: object + served: + default: true + description: served is a flag enabling/disabling this version + from being served via REST APIs + type: boolean + storage: + description: |- + storage indicates this version should be used when persisting custom resources to storage. + There must be exactly one version with storage=true. + type: boolean + subresources: + description: subresources specify what subresources this version + of the defined custom resource have. + properties: + scale: + description: scale indicates the custom resource should serve + a `/scale` subresource that returns an `autoscaling/v1` + Scale object. + properties: + labelSelectorPath: + description: |- + labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. + Only JSON paths without the array notation are allowed. + Must be a JSON Path under `.status` or `.spec`. + Must be set to work with HorizontalPodAutoscaler. + The field pointed by this JSON path must be a string field (not a complex selector struct) + which contains a serialized label selector in string form. + More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource + If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` + subresource will default to the empty string. + type: string + specReplicasPath: + description: |- + specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. + Only JSON paths without the array notation are allowed. + Must be a JSON Path under `.spec`. + If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. + type: string + statusReplicasPath: + description: |- + statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. + Only JSON paths without the array notation are allowed. + Must be a JSON Path under `.status`. + If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource + will default to 0. + type: string + required: + - specReplicasPath + - statusReplicasPath + type: object + status: + description: |- + status indicates the custom resource should serve a `/status` subresource. + When enabled: + 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. + 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. + type: object + type: object + required: + - name + - schema + - served + - storage + type: object + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - group + - informerScope + - names + - scope + - versions + type: object + x-kubernetes-validations: + - message: informerScope must be Cluster for cluster-scoped resources + rule: self.scope == "Namespaced" || self.informerScope == "Cluster" + - message: clusterScopedIsolation must be defined for cluster-scoped resources + rule: self.scope == "Namespaced" || has(self.clusterScopedIsolation) + - message: clusterScopedIsolation is not relevant for namespaced resources + rule: self.scope == "Cluster" || !has(self.clusterScopedIsolation) + status: + description: status contains reconciliation information for the resource. + properties: + acceptedNames: + description: |- + acceptedNames are the names that are actually being used to serve discovery. + They may be different than the names in spec. + properties: + categories: + description: |- + categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). + This is published in API discovery documents, and used by clients to support invocations like + `kubectl get all`. + items: + type: string + type: array + x-kubernetes-list-type: atomic + kind: + description: |- + kind is the serialized kind of the resource. It is normally CamelCase and singular. + Custom resource instances will use this value as the `kind` attribute in API calls. + type: string + listKind: + description: listKind is the serialized kind of the list for this + resource. Defaults to "`kind`List". + type: string + plural: + description: |- + plural is the plural name of the resource to serve. + The custom resources are served under `/apis///.../`. + Must match the name of the CustomResourceDefinition (in the form `.`). + Must be all lowercase. + type: string + shortNames: + description: |- + shortNames are short names for the resource, exposed in API discovery documents, + and used by clients to support invocations like `kubectl get `. + It must be all lowercase. + items: + type: string + type: array + x-kubernetes-list-type: atomic + singular: + description: singular is the singular name of the resource. It must + be all lowercase. Defaults to lowercased `kind`. + type: string + required: + - kind + - plural + type: object + conditions: + description: |- + conditions is a list of conditions that apply to the APIServiceExport. It is + updated by the konnector on the consumer cluster. + items: + description: Condition defines an observation of a object operational + state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + storedVersions: + description: |- + storedVersions lists all versions of CustomResources that were ever persisted. Tracking these + versions allows a migration path for stored versions in etcd. The field is mutable + so a migration controller can finish a migration to another version (ensuring + no old objects are left in storage), and then remove the rest of the + versions from this list. + Versions may not be removed from `spec.versions` while they exist in this list. + items: + type: string + type: array + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: informerScope is immutable + rule: self.metadata.name == self.spec.names.plural+"."+self.spec.group + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=="Established")].status + name: Established + priority: 5 + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + description: |- + APIServiceExport specifies the resource to be exported. It is mostly a CRD: + - the spec is a CRD spec, but without webhooks + - the status reflects that on the consumer cluster + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec specifies the resource. + properties: + clusterScopedIsolation: + description: |- + ClusterScopedIsolation specifies how cluster scoped service objects are isolated between multiple consumers on the provider side. + It can be "Prefixed", "Namespaced", or "None". + enum: + - Prefixed + - Namespaced + - None + type: string + informerScope: + description: |- + informerScope is the scope of the APIServiceExport. It can be either Cluster or Namespace. + + Cluster: The konnector has permission to watch all namespaces at once and cluster-scoped resources. + This is more efficient than watching each namespace individually. + Namespaced: The konnector has permission to watch only single namespaces. + This is more resource intensive. And it means cluster-scoped resources cannot be exported. + enum: + - Cluster + - Namespaced + type: string + x-kubernetes-validations: + - message: informerScope is immutable + rule: self == oldSelf + resources: + description: resources specifies the API resources to export + items: + description: APIResourceSchemaReference is a list of references to + APIResourceSchemas. + properties: + name: + description: Name is the name of the resource to export + type: string + type: + description: |- + Type of the resource to export + Currently only APIResourceSchema is supported + enum: + - APIResourceSchema + type: string + required: + - name + - type + type: object + type: array + required: + - informerScope + - resources + type: object + status: + description: status contains reconciliation information for the resource. + properties: + acceptedNames: + description: |- + acceptedNames are the names that are actually being used to serve discovery. + They may be different than the names in spec. + properties: + categories: + description: |- + categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). + This is published in API discovery documents, and used by clients to support invocations like + `kubectl get all`. + items: + type: string + type: array + x-kubernetes-list-type: atomic + kind: + description: |- + kind is the serialized kind of the resource. It is normally CamelCase and singular. + Custom resource instances will use this value as the `kind` attribute in API calls. + type: string + listKind: + description: listKind is the serialized kind of the list for this + resource. Defaults to "`kind`List". + type: string + plural: + description: |- + plural is the plural name of the resource to serve. + The custom resources are served under `/apis///.../`. + Must match the name of the CustomResourceDefinition (in the form `.`). + Must be all lowercase. + type: string + shortNames: + description: |- + shortNames are short names for the resource, exposed in API discovery documents, + and used by clients to support invocations like `kubectl get `. + It must be all lowercase. + items: + type: string + type: array + x-kubernetes-list-type: atomic + singular: + description: singular is the singular name of the resource. It must + be all lowercase. Defaults to lowercased `kind`. + type: string + required: + - kind + - plural + type: object + conditions: + description: |- + conditions is a list of conditions that apply to the APIServiceExport. It is + updated by the konnector on the consumer cluster. + items: + description: Condition defines an observation of a object operational + state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + storedVersions: + description: |- + storedVersions lists all versions of CustomResources that were ever persisted. Tracking these + versions allows a migration path for stored versions in etcd. The field is mutable + so a migration controller can finish a migration to another version (ensuring + no old objects are left in storage), and then remove the rest of the + versions from this list. + Versions may not be removed from `spec.versions` while they exist in this list. + items: + type: string + type: array + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/kcp/deploy/resources/apiresourceschema-apiservicenamespaces.kube-bind.io.yaml b/kcp/deploy/resources/apiresourceschema-apiservicenamespaces.kube-bind.io.yaml new file mode 100644 index 000000000..764e11fcc --- /dev/null +++ b/kcp/deploy/resources/apiresourceschema-apiservicenamespaces.kube-bind.io.yaml @@ -0,0 +1,120 @@ +apiVersion: apis.kcp.io/v1alpha1 +kind: APIResourceSchema +metadata: + creationTimestamp: null + name: v250809-5ed76a1.apiservicenamespaces.kube-bind.io +spec: + conversion: + strategy: None + group: kube-bind.io + names: + categories: + - kube-bindings + kind: APIServiceNamespace + listKind: APIServiceNamespaceList + plural: apiservicenamespaces + singular: apiservicenamespace + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.namespace + name: Namespace + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + description: |- + APIServiceNamespace defines how consumer namespaces map to service namespaces. + These objects are created by the konnector, and a service namespace is then + created by the service provider. + + The name of the APIServiceNamespace equals the namespace name in the consumer + cluster. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec specifies a service namespace. + type: object + status: + description: status contains reconciliation information for a service namespace + properties: + namespace: + description: |- + namespace is the service provider namespace name that will be bound to the + consumer namespace named like this object. + type: string + type: object + type: object + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .status.namespace + name: Namespace + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + description: |- + APIServiceNamespace defines how consumer namespaces map to service namespaces. + These objects are created by the konnector, and a service namespace is then + created by the service provider. + + The name of the APIServiceNamespace equals the namespace name in the consumer + cluster. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec specifies a service namespace. + type: object + status: + description: status contains reconciliation information for a service namespace + properties: + namespace: + description: |- + namespace is the service provider namespace name that will be bound to the + consumer namespace named like this object. + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/kcp/deploy/resources/apiresourceschema-boundapiresourceschemas.kube-bind.io.yaml b/kcp/deploy/resources/apiresourceschema-boundapiresourceschemas.kube-bind.io.yaml new file mode 100644 index 000000000..279671445 --- /dev/null +++ b/kcp/deploy/resources/apiresourceschema-boundapiresourceschemas.kube-bind.io.yaml @@ -0,0 +1,476 @@ +apiVersion: apis.kcp.io/v1alpha1 +kind: APIResourceSchema +metadata: + creationTimestamp: null + name: v250809-5ed76a1.boundapiresourceschemas.kube-bind.io +spec: + conversion: + strategy: None + group: kube-bind.io + names: + categories: + - kube-bindings + kind: BoundAPIResourceSchema + listKind: BoundAPIResourceSchemaList + plural: boundapiresourceschemas + shortNames: + - bas + singular: boundapiresourceschema + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + description: BoundAPIResourceSchema + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: BoundAPIResourceSchemaSpec defines the desired state of the + BoundAPIResourceSchema. + properties: + conversion: + description: conversion defines conversion settings for the defined + custom resource. + properties: + strategy: + description: |- + strategy specifies how custom resources are converted between versions. Allowed values are: + - `"None"`: The converter only change the apiVersion and would not touch any other field in the custom resource. + - `"Webhook"`: API Server will call to an external webhook to do the conversion. Additional information + is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set. + enum: + - None + - Webhook + type: string + webhook: + description: webhook describes how to call the conversion webhook. + Required when `strategy` is set to `"Webhook"`. + properties: + clientConfig: + description: clientConfig is the instructions for how to call + the webhook if strategy is `Webhook`. + properties: + caBundle: + description: |- + caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. + If unspecified, system trust roots on the apiserver are used. + format: byte + type: string + url: + description: |- + url gives the location of the webhook, in standard URL form + (`scheme://host:port/path`). + + Please note that using `localhost` or `127.0.0.1` as a `host` is + risky unless you take great care to run this webhook on all hosts + which run an apiserver which might need to make calls to this + webhook. Such installs are likely to be non-portable, i.e., not easy + to turn up in a new cluster. + + The scheme must be "https"; the URL must begin with "https://". + + A path is optional, and if present may be any string permissible in + a URL. You may use the path to pass an arbitrary string to the + webhook, for example, a cluster identifier. + + Attempting to use a user or basic auth e.g. "user:password@" is not + allowed. Fragments ("#...") and query parameters ("?...") are not + allowed, either. + format: uri + type: string + type: object + conversionReviewVersions: + description: |- + conversionReviewVersions is an ordered list of preferred `ConversionReview` + versions the Webhook expects. The API server will use the first version in + the list which it supports. If none of the versions specified in this list + are supported by API server, conversion will fail for the custom resource. + If a persisted Webhook configuration specifies allowed versions and does not + include any versions known to the API Server, calls to the webhook will fail. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + type: object + x-kubernetes-validations: + - message: Webhook must be specified if strategy=Webhook + rule: (self.strategy == 'None' && !has(self.webhook)) || (self.strategy + == 'Webhook' && has(self.webhook)) + group: + description: "group is the API group of the defined custom resource. + Empty string means the\ncore API group. \tThe resources are served + under `/apis//...` or `/api` for the core group." + type: string + informerScope: + allOf: + - enum: + - Cluster + - Namespaced + - enum: + - Cluster + - Namespaced + description: |- + InformerScope indicates whether the informer for defined custom resource is cluster- or namespace-scoped. + Allowed values are `Cluster` and `Namespaced`. + type: string + names: + description: names specify the resource and kind names for the custom + resource. + properties: + categories: + description: |- + categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). + This is published in API discovery documents, and used by clients to support invocations like + `kubectl get all`. + items: + type: string + type: array + x-kubernetes-list-type: atomic + kind: + description: |- + kind is the serialized kind of the resource. It is normally CamelCase and singular. + Custom resource instances will use this value as the `kind` attribute in API calls. + type: string + listKind: + description: listKind is the serialized kind of the list for this + resource. Defaults to "`kind`List". + type: string + plural: + description: |- + plural is the plural name of the resource to serve. + The custom resources are served under `/apis///.../`. + Must match the name of the CustomResourceDefinition (in the form `.`). + Must be all lowercase. + type: string + shortNames: + description: |- + shortNames are short names for the resource, exposed in API discovery documents, + and used by clients to support invocations like `kubectl get `. + It must be all lowercase. + items: + type: string + type: array + x-kubernetes-list-type: atomic + singular: + description: singular is the singular name of the resource. It must + be all lowercase. Defaults to lowercased `kind`. + type: string + required: + - kind + - plural + type: object + scope: + description: |- + scope indicates whether the defined custom resource is cluster- or namespace-scoped. + Allowed values are `Cluster` and `Namespaced`. + enum: + - Cluster + - Namespaced + type: string + versions: + description: |- + versions is the API version of the defined custom resource. + + Note: the OpenAPI v3 schemas must be equal for all versions until CEL + version migration is supported. + items: + description: APIResourceVersion describes one API version of a resource. + properties: + additionalPrinterColumns: + description: |- + additionalPrinterColumns specifies additional columns returned in Table output. + See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. + If no columns are specified, a single column displaying the age of the custom resource is used. + items: + description: CustomResourceColumnDefinition specifies a column + for server side printing. + properties: + description: + description: description is a human readable description + of this column. + type: string + format: + description: |- + format is an optional OpenAPI type definition for this column. The 'name' format is applied + to the primary identifier column to assist in clients identifying column is the resource name. + See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. + type: string + jsonPath: + description: |- + jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against + each custom resource to produce the value for this column. + type: string + name: + description: name is a human readable name for the column. + type: string + priority: + description: |- + priority is an integer defining the relative importance of this column compared to others. Lower + numbers are considered higher priority. Columns that may be omitted in limited space scenarios + should be given a priority greater than 0. + format: int32 + type: integer + type: + description: |- + type is an OpenAPI type definition for this column. + See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. + type: string + required: + - jsonPath + - name + - type + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + deprecated: + description: |- + deprecated indicates this version of the custom resource API is deprecated. + When set to true, API requests to this version receive a warning header in the server response. + Defaults to false. + type: boolean + deprecationWarning: + description: |- + deprecationWarning overrides the default warning returned to API clients. + May only be set when `deprecated` is true. + The default warning indicates this version is deprecated and recommends use + of the newest served version of equal or greater stability, if one exists. + type: string + name: + description: |- + name is the version name, e.g. “v1”, “v2beta1”, etc. + The custom resources are served under this version at `/apis///...` if `served` is true. + minLength: 1 + pattern: ^v[1-9][0-9]*([a-z]+[1-9][0-9]*)?$ + type: string + schema: + description: |- + schema describes the structural schema used for validation, pruning, and defaulting + of this version of the custom resource. + properties: + openAPIV3Schema: + description: openAPIV3Schema is the OpenAPI v3 schema to use + for validation and pruning. + type: object + x-kubernetes-map-type: atomic + x-kubernetes-preserve-unknown-fields: true + required: + - openAPIV3Schema + type: object + x-kubernetes-map-type: atomic + x-kubernetes-preserve-unknown-fields: true + served: + default: true + description: served is a flag enabling/disabling this version + from being served via REST APIs + type: boolean + storage: + description: |- + storage indicates this version should be used when persisting custom resources to storage. + There must be exactly one version with storage=true. + type: boolean + subresources: + description: subresources specify what subresources this version + of the defined custom resource have. + properties: + scale: + description: scale indicates the custom resource should serve + a `/scale` subresource that returns an `autoscaling/v1` + Scale object. + properties: + labelSelectorPath: + description: |- + labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. + Only JSON paths without the array notation are allowed. + Must be a JSON Path under `.status` or `.spec`. + Must be set to work with HorizontalPodAutoscaler. + The field pointed by this JSON path must be a string field (not a complex selector struct) + which contains a serialized label selector in string form. + More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource + If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` + subresource will default to the empty string. + type: string + specReplicasPath: + description: |- + specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. + Only JSON paths without the array notation are allowed. + Must be a JSON Path under `.spec`. + If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. + type: string + statusReplicasPath: + description: |- + statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. + Only JSON paths without the array notation are allowed. + Must be a JSON Path under `.status`. + If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource + will default to 0. + type: string + required: + - specReplicasPath + - statusReplicasPath + type: object + status: + description: |- + status indicates the custom resource should serve a `/status` subresource. + When enabled: + 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. + 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. + type: object + type: object + required: + - name + - schema + - served + - storage + type: object + minItems: 1 + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - group + - informerScope + - names + - scope + - versions + type: object + status: + description: BoundAPIResourceSchemaStatus defines the observed state of + the BoundAPIResourceSchema. + properties: + acceptedNames: + description: |- + acceptedNames are the names that are actually being used to serve discovery. + They may be different than the names in spec. + properties: + categories: + description: |- + categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). + This is published in API discovery documents, and used by clients to support invocations like + `kubectl get all`. + items: + type: string + type: array + x-kubernetes-list-type: atomic + kind: + description: |- + kind is the serialized kind of the resource. It is normally CamelCase and singular. + Custom resource instances will use this value as the `kind` attribute in API calls. + type: string + listKind: + description: listKind is the serialized kind of the list for this + resource. Defaults to "`kind`List". + type: string + plural: + description: |- + plural is the plural name of the resource to serve. + The custom resources are served under `/apis///.../`. + Must match the name of the CustomResourceDefinition (in the form `.`). + Must be all lowercase. + type: string + shortNames: + description: |- + shortNames are short names for the resource, exposed in API discovery documents, + and used by clients to support invocations like `kubectl get `. + It must be all lowercase. + items: + type: string + type: array + x-kubernetes-list-type: atomic + singular: + description: singular is the singular name of the resource. It must + be all lowercase. Defaults to lowercased `kind`. + type: string + required: + - kind + - plural + type: object + conditions: + description: Conditions represent the latest available observations + of the object's state. + items: + description: Condition defines an observation of a object operational + state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + instantiations: + description: Instantiations tracks the number of instances of the resource + on the consumer side. + type: integer + storedVersions: + description: |- + storedVersions lists all versions of CustomResources that were ever persisted. Tracking these + versions allows a migration path for stored versions in etcd. The field is mutable + so a migration controller can finish a migration to another version (ensuring + no old objects are left in storage), and then remove the rest of the + versions from this list. + Versions may not be removed from `spec.versions` while they exist in this list. + items: + type: string + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/kcp/deploy/resources/apiresourceschema-clusterbindings.kube-bind.io.yaml b/kcp/deploy/resources/apiresourceschema-clusterbindings.kube-bind.io.yaml new file mode 100644 index 000000000..b9189319c --- /dev/null +++ b/kcp/deploy/resources/apiresourceschema-clusterbindings.kube-bind.io.yaml @@ -0,0 +1,328 @@ +apiVersion: apis.kcp.io/v1alpha1 +kind: APIResourceSchema +metadata: + creationTimestamp: null + name: v250809-5ed76a1.clusterbindings.kube-bind.io +spec: + conversion: + strategy: None + group: kube-bind.io + names: + categories: + - kube-bindings + kind: ClusterBinding + listKind: ClusterBindingList + plural: clusterbindings + singular: clusterbinding + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.konnectorVersion + name: Konnector Version + type: string + - jsonPath: .status.lastHeartbeatTime + name: Last Heartbeat + type: date + - jsonPath: .status.conditions[?(@.type=="Ready")].status + name: Ready + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + description: |- + ClusterBinding represents a bound consumer cluster. It lives in a service + provider cluster and is a singleton named "cluster" per namespace. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec represents the data in the newly created ClusterBinding. + properties: + kubeconfigSecretRef: + description: kubeconfigSecretName is the secret ref that contains the + kubeconfig of the service cluster. + properties: + key: + description: The key of the secret to select from. Must be "kubeconfig". + enum: + - kubeconfig + type: string + name: + description: Name of the referent. + minLength: 1 + type: string + required: + - key + - name + type: object + x-kubernetes-validations: + - message: kubeconfigSecretRef is immutable + rule: self == oldSelf + providerPrettyName: + description: |- + providerPrettyName is the pretty name of the service provider cluster. This + can be shared among different ServiceBindings. + minLength: 1 + type: string + serviceProviderSpec: + description: |- + serviceProviderSpec contains all the data and information about the service which has been bound to the service + binding request. The service providers decide what they need and what to configure based on what then include in + this field, such as service region, type, tiers, etc... + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - kubeconfigSecretRef + - providerPrettyName + type: object + status: + description: status contains reconciliation information for the service + binding. + properties: + conditions: + description: |- + conditions is a list of conditions that apply to the ClusterBinding. It is + updated by the konnector and the service provider. + items: + description: Condition defines an observation of a object operational + state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + heartbeatInterval: + description: |- + heartbeatInterval is the maximal interval between heartbeats that the + konnector promises to send. The service provider can assume that the + konnector is not unhealthy if it does not receive a heartbeat within + this time. + type: string + konnectorVersion: + description: |- + konnectorVersion is the version of the konnector that is running on the + consumer cluster. + type: string + lastHeartbeatTime: + description: lastHeartbeatTime is the last time the konnector updated + the status. + format: date-time + type: string + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: cluster binding name should be cluster + rule: self.metadata.name == "cluster" + served: true + storage: false + subresources: + status: {} + - additionalPrinterColumns: + - jsonPath: .status.konnectorVersion + name: Konnector Version + type: string + - jsonPath: .status.lastHeartbeatTime + name: Last Heartbeat + type: date + - jsonPath: .status.conditions[?(@.type=="Ready")].status + name: Ready + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha2 + schema: + description: |- + ClusterBinding represents a bound consumer cluster. It lives in a service + provider cluster and is a singleton named "cluster" per namespace. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec represents the data in the newly created ClusterBinding. + properties: + kubeconfigSecretRef: + description: kubeconfigSecretName is the secret ref that contains the + kubeconfig of the service cluster. + properties: + key: + description: The key of the secret to select from. Must be "kubeconfig". + enum: + - kubeconfig + type: string + name: + description: Name of the referent. + minLength: 1 + type: string + required: + - key + - name + type: object + x-kubernetes-validations: + - message: kubeconfigSecretRef is immutable + rule: self == oldSelf + providerPrettyName: + description: |- + providerPrettyName is the pretty name of the service provider cluster. This + can be shared among different ServiceBindings. + minLength: 1 + type: string + serviceProviderSpec: + description: |- + serviceProviderSpec contains all the data and information about the service which has been bound to the service + binding request. The service providers decide what they need and what to configure based on what then include in + this field, such as service region, type, tiers, etc... + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - kubeconfigSecretRef + - providerPrettyName + type: object + status: + description: status contains reconciliation information for the service + binding. + properties: + conditions: + description: |- + conditions is a list of conditions that apply to the ClusterBinding. It is + updated by the konnector and the service provider. + items: + description: Condition defines an observation of a object operational + state. + properties: + lastTransitionTime: + description: |- + Last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when + the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + A human readable message indicating details about the transition. + This field may be empty. + type: string + reason: + description: |- + The reason for the condition's last transition in CamelCase. + The specific API may choose whether or not this field is considered a guaranteed API. + This field may not be empty. + type: string + severity: + description: |- + Severity provides an explicit classification of Reason code, so the users or machines can immediately + understand the current situation and act accordingly. + The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: |- + Type of condition in CamelCase or in foo.example.com/CamelCase. + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + heartbeatInterval: + description: |- + heartbeatInterval is the maximal interval between heartbeats that the + konnector promises to send. The service provider can assume that the + konnector is not unhealthy if it does not receive a heartbeat within + this time. + type: string + konnectorVersion: + description: |- + konnectorVersion is the version of the konnector that is running on the + consumer cluster. + type: string + lastHeartbeatTime: + description: lastHeartbeatTime is the last time the konnector updated + the status. + format: date-time + type: string + type: object + required: + - spec + type: object + x-kubernetes-validations: + - message: cluster binding name should be cluster + rule: self.metadata.name == "cluster" + served: true + storage: true + subresources: + status: {} diff --git a/kcp/deploy/resources/bootstrap.go b/kcp/deploy/resources/bootstrap.go new file mode 100644 index 000000000..b27177f69 --- /dev/null +++ b/kcp/deploy/resources/bootstrap.go @@ -0,0 +1,47 @@ +/* +Copyright 2025 The Kube Bind 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. +*/ + +package resources + +import ( + "context" + "embed" + + confighelpers "github.com/kcp-dev/kcp/config/helpers" + kcpclientcluster "github.com/kcp-dev/kcp/sdk/client/clientset/versioned/cluster" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/discovery" + "k8s.io/client-go/dynamic" +) + +//go:embed *.yaml +var kubeFS embed.FS + +// Bootstrap creates resources in this package by continuously retrying the list. +// This is blocking, i.e. it only returns (with error) when the context is closed or with nil when +// the bootstrapping is successfully completed. +func Bootstrap( + ctx context.Context, + kcpClient kcpclientcluster.ClusterInterface, + discoveryClient discovery.DiscoveryInterface, + dynamicClient dynamic.Interface, + crdClient apiextensionsv1.CustomResourceDefinitionInterface, + batteriesIncluded sets.Set[string], +) error { + // create resources in core cluster + return confighelpers.Bootstrap(ctx, discoveryClient, dynamicClient, batteriesIncluded, kubeFS, confighelpers.ReplaceOption()) +} diff --git a/kcp/dex-config-dev.yaml b/kcp/dex-config-dev.yaml new file mode 100644 index 000000000..9e2bdbe91 --- /dev/null +++ b/kcp/dex-config-dev.yaml @@ -0,0 +1,149 @@ +# DEPRECATED: use config.yaml.dist and config.dev.yaml examples in the repository root. +# TODO: keep this until all references are updated. + +# The base path of dex and the external name of the OpenID Connect service. +# This is the canonical URL that all clients MUST use to refer to dex. If a +# path is provided, dex's HTTP service will listen at a non-root URL. +issuer: http://127.0.0.1:5556/dex + +# The storage configuration determines where dex stores its state. Supported +# options include SQL flavors and Kubernetes third party resources. +# +# See the documentation (https://dexidp.io/docs/storage/) for further information. +storage: + type: memory + config: + file: examples/dex.db + + # type: mysql + # config: + # host: localhost + # port: 3306 + # database: dex + # user: mysql + # password: mysql + # ssl: + # mode: "false" + + # type: postgres + # config: + # host: localhost + # port: 5432 + # database: dex + # user: postgres + # password: postgres + # ssl: + # mode: disable + + # type: etcd + # config: + # endpoints: + # - http://localhost:2379 + # namespace: dex/ + + # type: kubernetes + # config: + # kubeConfigFile: $HOME/.kube/config + +# Configuration for the HTTP endpoints. +web: + http: 0.0.0.0:5556 + # Uncomment for HTTPS options. + # https: 127.0.0.1:5554 + # tlsCert: /etc/dex/tls.crt + # tlsKey: /etc/dex/tls.key + +# Configuration for dex appearance +# frontend: +# issuer: dex +# logoURL: theme/logo.png +# dir: web/ +# theme: light + +# Configuration for telemetry +telemetry: + http: 0.0.0.0:5558 + # enableProfiling: true + +# Uncomment this block to enable the gRPC API. This values MUST be different +# from the HTTP endpoints. +grpc: + addr: 127.0.0.1:5557 +# tlsCert: examples/grpc-client/server.crt +# tlsKey: examples/grpc-client/server.key +# tlsClientCA: examples/grpc-client/ca.crt + +# Uncomment this block to enable configuration for the expiration time durations. +# Is possible to specify units using only s, m and h suffixes. +# expiry: +# deviceRequests: "5m" +# signingKeys: "6h" +# idTokens: "24h" +# refreshTokens: +# reuseInterval: "3s" +# validIfNotUsedFor: "2160h" # 90 days +# absoluteLifetime: "3960h" # 165 days + +# Options for controlling the logger. +# logger: +# level: "debug" +# format: "text" # can also be "json" + +# Default values shown below +oauth2: + # use ["code", "token", "id_token"] to enable implicit flow for web-only clients +# responseTypes: [ "code" ] # also allowed are "token" and "id_token" + # By default, Dex will ask for approval to share data with application + # (approval for sharing data from connected IdP to Dex is separate process on IdP) + skipApprovalScreen: true + # If only one authentication method is enabled, the default behavior is to + # go directly to it. For connected IdPs, this redirects the browser away + # from application to upstream provider such as the Google login page +# alwaysShowLoginScreen: false + # Uncomment the passwordConnector to use a specific connector for password grants +# passwordConnector: local + +# Instead of reading from an external storage, use this list of clients. +# +# If this option isn't chosen clients may be added through the gRPC API. +staticClients: +- id: kube-bind + redirectURIs: + - 'http://127.0.0.1:8080/callback' + name: 'Kube Bind' + secret: ZXhhbXBsZS1hcHAtc2VjcmV0 + +# - id: example-device-client +# redirectURIs: +# - /device/callback +# name: 'Static Client for Device Flow' +# public: true +connectors: +- type: mockCallback + id: mock + name: Example +# - type: google +# id: google +# name: Google +# config: +# issuer: https://accounts.google.com +# # Connector config values starting with a "$" will read from the environment. +# clientID: $GOOGLE_CLIENT_ID +# clientSecret: $GOOGLE_CLIENT_SECRET +# redirectURI: http://127.0.0.1:5556/dex/callback +# hostedDomains: +# - $GOOGLE_HOSTED_DOMAIN + +# Let dex keep a list of passwords which can be used to login to dex. +# enablePasswordDB: true + +# A static list of passwords to login the end user. By identifying here, dex +# won't look in its underlying storage for passwords. +# +# If this option isn't chosen users may be added through the gRPC API. +# staticPasswords: +# - email: "admin@example.com" +# # bcrypt hash of the string "password": $(echo password | htpasswd -BinC 10 admin | cut -d: -f2) +# hash: "$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W" +# username: "admin" +# userID: "08a8684b-db88-4b73-90a9-3cd1661f5466" diff --git a/kcp/go.mod b/kcp/go.mod new file mode 100644 index 000000000..ef779ae68 --- /dev/null +++ b/kcp/go.mod @@ -0,0 +1,143 @@ +module github.com/kube-bind/kube-bind/kcp + +go 1.24.0 + +replace github.com/kube-bind/kube-bind => ../ + +require ( + github.com/kcp-dev/client-go v0.0.0-20250728134101-0355faa9361b + github.com/kcp-dev/kcp v0.28.0 + github.com/kcp-dev/kcp/sdk v0.28.0 + github.com/kcp-dev/logicalcluster/v3 v3.0.5 + github.com/spf13/pflag v1.0.7 + k8s.io/apiextensions-apiserver v0.33.3 + k8s.io/apimachinery v0.33.3 + k8s.io/apiserver v0.33.3 + k8s.io/client-go v0.33.3 + k8s.io/component-base v0.33.3 + k8s.io/klog/v2 v2.130.1 +) + +require ( + cel.dev/expr v0.19.1 // indirect + github.com/NYTimes/gziphandler v1.1.1 // indirect + github.com/antlr4-go/antlr/v4 v4.13.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/coreos/go-semver v0.3.1 // indirect + github.com/coreos/go-systemd/v22 v22.5.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/btree v1.1.3 // indirect + github.com/google/cel-go v0.23.2 // indirect + github.com/google/gnostic-models v0.6.9 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20250728122101-adbf20db3e51 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect + github.com/mailru/easyjson v0.9.0 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/onsi/gomega v1.36.2 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/prometheus/client_golang v1.22.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.62.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + github.com/spf13/cobra v1.9.1 // indirect + github.com/stoewer/go-strcase v1.3.0 // indirect + github.com/x448/float16 v0.8.4 // indirect + go.etcd.io/etcd/api/v3 v3.5.21 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.21 // indirect + go.etcd.io/etcd/client/v3 v3.5.21 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect + go.opentelemetry.io/otel v1.33.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 // indirect + go.opentelemetry.io/otel/metric v1.33.0 // indirect + go.opentelemetry.io/otel/sdk v1.33.0 // indirect + go.opentelemetry.io/otel/trace v1.33.0 // indirect + go.opentelemetry.io/proto/otlp v1.5.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.38.0 // indirect + golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect + golang.org/x/net v0.40.0 // indirect + golang.org/x/oauth2 v0.29.0 // indirect + golang.org/x/sync v0.14.0 // indirect + golang.org/x/sys v0.33.0 // indirect + golang.org/x/term v0.32.0 // indirect + golang.org/x/text v0.25.0 // indirect + golang.org/x/time v0.11.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 // indirect + google.golang.org/grpc v1.69.2 // indirect + google.golang.org/protobuf v1.36.5 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/api v0.33.3 // indirect + k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect + k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect + sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect + sigs.k8s.io/randfill v1.0.0 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect +) + +replace ( + github.com/google/cel-go => github.com/google/cel-go v0.22.1 + k8s.io/api => github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/apiextensions-apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/apimachinery => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/cli-runtime => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/client-go => github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/cloud-provider => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/cluster-bootstrap => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/code-generator => github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/component-base => github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/component-helpers => github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/controller-manager => github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/cri-api => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/cri-client => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-client v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/csi-translation-lib => github.com/kcp-dev/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/dynamic-resource-allocation => github.com/kcp-dev/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/endpointslice => github.com/kcp-dev/kubernetes/staging/src/k8s.io/endpointslice v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/externaljwt => github.com/kcp-dev/kubernetes/staging/src/k8s.io/externaljwt v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/kms => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/kube-aggregator => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/kube-controller-manager => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/kube-proxy => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-proxy v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/kube-scheduler => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-scheduler v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/kubectl => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/kubelet => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/kubernetes => github.com/kcp-dev/kubernetes v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/metrics => github.com/kcp-dev/kubernetes/staging/src/k8s.io/metrics v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/mount-utils => github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/pod-security-admission => github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/sample-apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-apiserver v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/sample-cli-plugin => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-cli-plugin v0.0.0-20250816165010-ffe1d7c8649b + k8s.io/sample-controller => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-controller v0.0.0-20250816165010-ffe1d7c8649b +) diff --git a/kcp/go.sum b/kcp/go.sum new file mode 100644 index 000000000..72a6d12a7 --- /dev/null +++ b/kcp/go.sum @@ -0,0 +1,308 @@ +cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= +cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= +github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= +github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= +github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/cel-go v0.22.1 h1:AfVXx3chM2qwoSbM7Da8g8hX8OVSkBFwX+rz2+PcK40= +github.com/google/cel-go v0.22.1/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= +github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= +github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= +github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= +github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 h1:VNqngBF40hVlDloBruUehVYC3ArSgIyScOAyMRqBxRg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1/go.mod h1:RBRO7fro65R6tjKzYgLAFo0t1QEXY1Dp+i/bvpRiqiQ= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= +github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20250728122101-adbf20db3e51 h1:l38RDS+VUMx9etvyaCgJIZa4nM7FaNevNubWN0kDZY4= +github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20250728122101-adbf20db3e51/go.mod h1:rF1jfvUfPjFXs+HV/LN1BtPzAz1bfjJOwVa+hAVfroQ= +github.com/kcp-dev/client-go v0.0.0-20250728134101-0355faa9361b h1:2LGrXvY9sc4l5yjKIbMZ86GEou7NyrHhA4qBPaeFfxs= +github.com/kcp-dev/client-go v0.0.0-20250728134101-0355faa9361b/go.mod h1:QdO8AaGAZPr/rIZ1iVanCM3tUOiiuX897GWv7WTByLE= +github.com/kcp-dev/kcp v0.28.0 h1:J3oaOPqc4A2Q+wZveL0iVElAuOLivFmKTCpaKVx8iXA= +github.com/kcp-dev/kcp v0.28.0/go.mod h1:q28Fx8sU/KA8kz8HGwtaqA7Iom8oR90ydoPK39jMaxo= +github.com/kcp-dev/kcp/sdk v0.28.0 h1:AOgGrgpqhrplbXMSbcvjFwCqwg4UlysTwIFZ0LvFxlk= +github.com/kcp-dev/kcp/sdk v0.28.0/go.mod h1:8oZpWxkoMu2TDpx5DgdIGDigByKHKkeqVMA4GiWneoI= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20250816165010-ffe1d7c8649b h1:CyQuxPfhWg8KdwfmY5aE6KABsh/QhkDXTH2msezxCFY= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20250816165010-ffe1d7c8649b/go.mod h1:uiagPCm7MlCfQpIm2xwPTRf8727wbCZCMgHI9uHcMpg= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20250816165010-ffe1d7c8649b h1:5SZfhKCAqq6lu+tOOf33CDGhSty9guXc90CAfQXk3bw= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20250816165010-ffe1d7c8649b/go.mod h1:nIZXHR86Y+pIXu55PyfrUKhx5ISDzW/kjHpdOr2tKgY= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20250816165010-ffe1d7c8649b h1:cJfP+GeRW8O1/49MKUoJ6xbiFiMMOEr/DSrt2y9r0hc= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20250816165010-ffe1d7c8649b/go.mod h1:6XMZJoNYwuMArBvS2acFkTR1KqyHSp2QXRLRx9eTk5w= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20250816165010-ffe1d7c8649b h1:C21pLvKT2MUE38+ZNDXeucEbRdb7rewRpBp4C5lzz6M= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20250816165010-ffe1d7c8649b/go.mod h1:STCgTiD+xCCHsfLOPHn5sNVsyktakX/ctW3dMv3erh0= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20250816165010-ffe1d7c8649b h1:kEieYK/XCUycPf5DCEUZNPvDVHr4ao+rxZvdOQXlMQk= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20250816165010-ffe1d7c8649b/go.mod h1:omt22adyHpxAelVTfG1bssg+xoAUc+Cg+0CXn0Oaim0= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20250816165010-ffe1d7c8649b h1:OazHpbyl1+WvViAUEZw2PxMZNrd5LOPDD+bhnfL5cQM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20250816165010-ffe1d7c8649b/go.mod h1:Z+AmCbP/esJzSqF5Otj149NR+8fqJHWBgokGrRp0a1c= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20250816165010-ffe1d7c8649b h1:Rs46P65F5+hroq+W8r+XGH1aO1j+PvibWgePmUXykAM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20250816165010-ffe1d7c8649b/go.mod h1:kwWmCq21qHjyuqQeIaShb3CUcfgX89fWTgjEbDle9XM= +github.com/kcp-dev/logicalcluster/v3 v3.0.5 h1:JbYakokb+5Uinz09oTXomSUJVQsqfxEvU4RyHUYxHOU= +github.com/kcp-dev/logicalcluster/v3 v3.0.5/go.mod h1:EWBUBxdr49fUB1cLMO4nOdBWmYifLbP1LfoL20KkXYY= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= +github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= +github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/onsi/ginkgo/v2 v2.22.1 h1:QW7tbJAUDyVDVOM5dFa7qaybo+CRfR7bemlQUN6Z8aM= +github.com/onsi/ginkgo/v2 v2.22.1/go.mod h1:S6aTpoRsSq2cZOd+pssHAlKW/Q/jZt6cPrPlnj4a1xM= +github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= +github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= +github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= +github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= +github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= +github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M= +github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= +github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= +github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 h1:S2dVYn90KE98chqDkyE9Z4N61UnQd+KOfgp5Iu53llk= +github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0= +go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I= +go.etcd.io/etcd/api/v3 v3.5.21 h1:A6O2/JDb3tvHhiIz3xf9nJ7REHvtEFJJ3veW3FbCnS8= +go.etcd.io/etcd/api/v3 v3.5.21/go.mod h1:c3aH5wcvXv/9dqIw2Y810LDXJfhSYdHQ0vxmP3CCHVY= +go.etcd.io/etcd/client/pkg/v3 v3.5.21 h1:lPBu71Y7osQmzlflM9OfeIV2JlmpBjqBNlLtcoBqUTc= +go.etcd.io/etcd/client/pkg/v3 v3.5.21/go.mod h1:BgqT/IXPjK9NkeSDjbzwsHySX3yIle2+ndz28nVsjUs= +go.etcd.io/etcd/client/v2 v2.305.21 h1:eLiFfexc2mE+pTLz9WwnoEsX5JTTpLCYVivKkmVXIRA= +go.etcd.io/etcd/client/v2 v2.305.21/go.mod h1:OKkn4hlYNf43hpjEM3Ke3aRdUkhSl8xjKjSf8eCq2J8= +go.etcd.io/etcd/client/v3 v3.5.21 h1:T6b1Ow6fNjOLOtM0xSoKNQt1ASPCLWrF9XMHcH9pEyY= +go.etcd.io/etcd/client/v3 v3.5.21/go.mod h1:mFYy67IOqmbRf/kRUvsHixzo3iG+1OF2W2+jVIQRAnU= +go.etcd.io/etcd/pkg/v3 v3.5.21 h1:jUItxeKyrDuVuWhdh0HtjUANwyuzcb7/FAeUfABmQsk= +go.etcd.io/etcd/pkg/v3 v3.5.21/go.mod h1:wpZx8Egv1g4y+N7JAsqi2zoUiBIUWznLjqJbylDjWgU= +go.etcd.io/etcd/raft/v3 v3.5.21 h1:dOmE0mT55dIUsX77TKBLq+RgyumsQuYeiRQnW/ylugk= +go.etcd.io/etcd/raft/v3 v3.5.21/go.mod h1:fmcuY5R2SNkklU4+fKVBQi2biVp5vafMrWUEj4TJ4Cs= +go.etcd.io/etcd/server/v3 v3.5.21 h1:9w0/k12majtgarGmlMVuhwXRI2ob3/d1Ik3X5TKo0yU= +go.etcd.io/etcd/server/v3 v3.5.21/go.mod h1:G1mOzdwuzKT1VRL7SqRchli/qcFrtLBTAQ4lV20sXXo= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 h1:PS8wXpbyaDJQ2VDHHncMe9Vct0Zn1fEjpsjrLxGJoSc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0/go.mod h1:HDBUsEjOuRC0EzKZ1bSaRGZWUBAzo+MhAcUUORSr4D0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= +go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= +go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA= +go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ= +go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M= +go.opentelemetry.io/otel/sdk v1.33.0 h1:iax7M131HuAm9QkZotNHEfstof92xM+N8sr3uHXc2IM= +go.opentelemetry.io/otel/sdk v1.33.0/go.mod h1:A1Q5oi7/9XaMlIWzPSxLRWOI8nG3FnzHJNbiENQuihM= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= +go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= +go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= +go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= +golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= +golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= +golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= +golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= +golang.org/x/oauth2 v0.29.0 h1:WdYw2tdTK1S8olAzWHdgeqfy+Mtm9XNhv/xJsY65d98= +golang.org/x/oauth2 v0.29.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= +golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= +golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= +golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= +golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= +golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= +golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= +google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 h1:GVIKPyP/kLIyVOgOnTwFOrvQaQUzOzGMCxgFUOEmm24= +google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422/go.mod h1:b6h1vNKhxaSoEI+5jc3PJUCustfli/mRab7295pY7rw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 h1:3UsHvIr4Wc2aW4brOaSCmcxh9ksica6fHEr8P1XhkYw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422/go.mod h1:3ENsm/5D1mzDyhpzeRi1NR784I0BcofWBoSc5QqqMK4= +google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= +google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= +google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= +k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= +k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= +k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= +sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= +sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/kcp/hack/update-kcp-codegen.sh b/kcp/hack/update-kcp-codegen.sh new file mode 100755 index 000000000..c2b5b79f9 --- /dev/null +++ b/kcp/hack/update-kcp-codegen.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# Copyright 2025 The Kube Bind 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. + +set -o errexit +set -o nounset +set -o pipefail +set -o xtrace + +if [[ -z "${MAKELEVEL:-}" ]]; then + echo 'You must invoke this script via make' + exit 1 +fi + +REPO_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd) + +# Generate KCP API resources from CRDs +( + ${KCP_APIGEN_GEN} --input-dir "${REPO_ROOT}"/deploy/crd --output-dir "${REPO_ROOT}"/kcp/deploy/resources +) \ No newline at end of file diff --git a/sdk/client/clientset/versioned/fake/clientset_generated.go b/sdk/client/clientset/versioned/fake/clientset_generated.go index 8d15d2197..e4a69e9f6 100644 --- a/sdk/client/clientset/versioned/fake/clientset_generated.go +++ b/sdk/client/clientset/versioned/fake/clientset_generated.go @@ -19,6 +19,7 @@ limitations under the License. package fake import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -52,9 +53,13 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + var opts metav1.ListOptions + if watchActcion, ok := action.(testing.WatchActionImpl); ok { + opts = watchActcion.ListOptions + } gvr := action.GetResource() ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) + watch, err := o.Watch(gvr, ns, opts) if err != nil { return false, nil, err } diff --git a/sdk/client/clientset/versioned/typed/kubebind/v1alpha1/kubebind_client.go b/sdk/client/clientset/versioned/typed/kubebind/v1alpha1/kubebind_client.go index 124ec4ae8..66c01f849 100644 --- a/sdk/client/clientset/versioned/typed/kubebind/v1alpha1/kubebind_client.go +++ b/sdk/client/clientset/versioned/typed/kubebind/v1alpha1/kubebind_client.go @@ -66,9 +66,7 @@ func (c *KubeBindV1alpha1Client) ClusterBindings(namespace string) ClusterBindin // where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*KubeBindV1alpha1Client, error) { config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } + setConfigDefaults(&config) httpClient, err := rest.HTTPClientFor(&config) if err != nil { return nil, err @@ -80,9 +78,7 @@ func NewForConfig(c *rest.Config) (*KubeBindV1alpha1Client, error) { // Note the http client provided takes precedence over the configured transport values. func NewForConfigAndClient(c *rest.Config, h *http.Client) (*KubeBindV1alpha1Client, error) { config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } + setConfigDefaults(&config) client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err @@ -105,7 +101,7 @@ func New(c rest.Interface) *KubeBindV1alpha1Client { return &KubeBindV1alpha1Client{c} } -func setConfigDefaults(config *rest.Config) error { +func setConfigDefaults(config *rest.Config) { gv := kubebindv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" @@ -114,8 +110,6 @@ func setConfigDefaults(config *rest.Config) error { if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() } - - return nil } // RESTClient returns a RESTClient that is used to communicate diff --git a/sdk/client/clientset/versioned/typed/kubebind/v1alpha2/kubebind_client.go b/sdk/client/clientset/versioned/typed/kubebind/v1alpha2/kubebind_client.go index cd547ba10..72842b593 100644 --- a/sdk/client/clientset/versioned/typed/kubebind/v1alpha2/kubebind_client.go +++ b/sdk/client/clientset/versioned/typed/kubebind/v1alpha2/kubebind_client.go @@ -76,9 +76,7 @@ func (c *KubeBindV1alpha2Client) ClusterBindings(namespace string) ClusterBindin // where httpClient was generated with rest.HTTPClientFor(c). func NewForConfig(c *rest.Config) (*KubeBindV1alpha2Client, error) { config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } + setConfigDefaults(&config) httpClient, err := rest.HTTPClientFor(&config) if err != nil { return nil, err @@ -90,9 +88,7 @@ func NewForConfig(c *rest.Config) (*KubeBindV1alpha2Client, error) { // Note the http client provided takes precedence over the configured transport values. func NewForConfigAndClient(c *rest.Config, h *http.Client) (*KubeBindV1alpha2Client, error) { config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } + setConfigDefaults(&config) client, err := rest.RESTClientForConfigAndClient(&config, h) if err != nil { return nil, err @@ -115,7 +111,7 @@ func New(c rest.Interface) *KubeBindV1alpha2Client { return &KubeBindV1alpha2Client{c} } -func setConfigDefaults(config *rest.Config) error { +func setConfigDefaults(config *rest.Config) { gv := kubebindv1alpha2.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" @@ -124,8 +120,6 @@ func setConfigDefaults(config *rest.Config) error { if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() } - - return nil } // RESTClient returns a RESTClient that is used to communicate diff --git a/sdk/client/informers/externalversions/kubebind/v1alpha1/apiservicebinding.go b/sdk/client/informers/externalversions/kubebind/v1alpha1/apiservicebinding.go index a3e42a405..a741f710e 100644 --- a/sdk/client/informers/externalversions/kubebind/v1alpha1/apiservicebinding.go +++ b/sdk/client/informers/externalversions/kubebind/v1alpha1/apiservicebinding.go @@ -62,13 +62,25 @@ func NewFilteredAPIServiceBindingInformer(client versioned.Interface, resyncPeri if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceBindings().List(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceBindings().List(context.Background(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceBindings().Watch(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceBindings().Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha1().APIServiceBindings().List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha1().APIServiceBindings().Watch(ctx, options) }, }, &apiskubebindv1alpha1.APIServiceBinding{}, diff --git a/sdk/client/informers/externalversions/kubebind/v1alpha1/apiserviceexport.go b/sdk/client/informers/externalversions/kubebind/v1alpha1/apiserviceexport.go index fe77fb185..a62c3bf89 100644 --- a/sdk/client/informers/externalversions/kubebind/v1alpha1/apiserviceexport.go +++ b/sdk/client/informers/externalversions/kubebind/v1alpha1/apiserviceexport.go @@ -63,13 +63,25 @@ func NewFilteredAPIServiceExportInformer(client versioned.Interface, namespace s if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceExports(namespace).List(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceExports(namespace).List(context.Background(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceExports(namespace).Watch(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceExports(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha1().APIServiceExports(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha1().APIServiceExports(namespace).Watch(ctx, options) }, }, &apiskubebindv1alpha1.APIServiceExport{}, diff --git a/sdk/client/informers/externalversions/kubebind/v1alpha1/apiserviceexportrequest.go b/sdk/client/informers/externalversions/kubebind/v1alpha1/apiserviceexportrequest.go index 29218946f..e04b7cd64 100644 --- a/sdk/client/informers/externalversions/kubebind/v1alpha1/apiserviceexportrequest.go +++ b/sdk/client/informers/externalversions/kubebind/v1alpha1/apiserviceexportrequest.go @@ -63,13 +63,25 @@ func NewFilteredAPIServiceExportRequestInformer(client versioned.Interface, name if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceExportRequests(namespace).List(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceExportRequests(namespace).List(context.Background(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceExportRequests(namespace).Watch(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceExportRequests(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha1().APIServiceExportRequests(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha1().APIServiceExportRequests(namespace).Watch(ctx, options) }, }, &apiskubebindv1alpha1.APIServiceExportRequest{}, diff --git a/sdk/client/informers/externalversions/kubebind/v1alpha1/apiservicenamespace.go b/sdk/client/informers/externalversions/kubebind/v1alpha1/apiservicenamespace.go index b4a2dbd6e..107774251 100644 --- a/sdk/client/informers/externalversions/kubebind/v1alpha1/apiservicenamespace.go +++ b/sdk/client/informers/externalversions/kubebind/v1alpha1/apiservicenamespace.go @@ -63,13 +63,25 @@ func NewFilteredAPIServiceNamespaceInformer(client versioned.Interface, namespac if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceNamespaces(namespace).List(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceNamespaces(namespace).List(context.Background(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceNamespaces(namespace).Watch(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceNamespaces(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha1().APIServiceNamespaces(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha1().APIServiceNamespaces(namespace).Watch(ctx, options) }, }, &apiskubebindv1alpha1.APIServiceNamespace{}, diff --git a/sdk/client/informers/externalversions/kubebind/v1alpha1/clusterbinding.go b/sdk/client/informers/externalversions/kubebind/v1alpha1/clusterbinding.go index d289cc9da..558ced766 100644 --- a/sdk/client/informers/externalversions/kubebind/v1alpha1/clusterbinding.go +++ b/sdk/client/informers/externalversions/kubebind/v1alpha1/clusterbinding.go @@ -63,13 +63,25 @@ func NewFilteredClusterBindingInformer(client versioned.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().ClusterBindings(namespace).List(context.TODO(), options) + return client.KubeBindV1alpha1().ClusterBindings(namespace).List(context.Background(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().ClusterBindings(namespace).Watch(context.TODO(), options) + return client.KubeBindV1alpha1().ClusterBindings(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha1().ClusterBindings(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha1().ClusterBindings(namespace).Watch(ctx, options) }, }, &apiskubebindv1alpha1.ClusterBinding{}, diff --git a/sdk/client/informers/externalversions/kubebind/v1alpha2/apiresourceschema.go b/sdk/client/informers/externalversions/kubebind/v1alpha2/apiresourceschema.go index 733fc2855..06ecc7db0 100644 --- a/sdk/client/informers/externalversions/kubebind/v1alpha2/apiresourceschema.go +++ b/sdk/client/informers/externalversions/kubebind/v1alpha2/apiresourceschema.go @@ -62,13 +62,25 @@ func NewFilteredAPIResourceSchemaInformer(client versioned.Interface, resyncPeri if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIResourceSchemas().List(context.TODO(), options) + return client.KubeBindV1alpha2().APIResourceSchemas().List(context.Background(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIResourceSchemas().Watch(context.TODO(), options) + return client.KubeBindV1alpha2().APIResourceSchemas().Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().APIResourceSchemas().List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().APIResourceSchemas().Watch(ctx, options) }, }, &apiskubebindv1alpha2.APIResourceSchema{}, diff --git a/sdk/client/informers/externalversions/kubebind/v1alpha2/apiservicebinding.go b/sdk/client/informers/externalversions/kubebind/v1alpha2/apiservicebinding.go index e4b03f488..434055c28 100644 --- a/sdk/client/informers/externalversions/kubebind/v1alpha2/apiservicebinding.go +++ b/sdk/client/informers/externalversions/kubebind/v1alpha2/apiservicebinding.go @@ -62,13 +62,25 @@ func NewFilteredAPIServiceBindingInformer(client versioned.Interface, resyncPeri if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceBindings().List(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceBindings().List(context.Background(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceBindings().Watch(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceBindings().Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().APIServiceBindings().List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().APIServiceBindings().Watch(ctx, options) }, }, &apiskubebindv1alpha2.APIServiceBinding{}, diff --git a/sdk/client/informers/externalversions/kubebind/v1alpha2/apiserviceexport.go b/sdk/client/informers/externalversions/kubebind/v1alpha2/apiserviceexport.go index a66cde403..f0da75aa3 100644 --- a/sdk/client/informers/externalversions/kubebind/v1alpha2/apiserviceexport.go +++ b/sdk/client/informers/externalversions/kubebind/v1alpha2/apiserviceexport.go @@ -63,13 +63,25 @@ func NewFilteredAPIServiceExportInformer(client versioned.Interface, namespace s if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceExports(namespace).List(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceExports(namespace).List(context.Background(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceExports(namespace).Watch(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceExports(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().APIServiceExports(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().APIServiceExports(namespace).Watch(ctx, options) }, }, &apiskubebindv1alpha2.APIServiceExport{}, diff --git a/sdk/client/informers/externalversions/kubebind/v1alpha2/apiserviceexportrequest.go b/sdk/client/informers/externalversions/kubebind/v1alpha2/apiserviceexportrequest.go index 8306d7d3e..90fa19f21 100644 --- a/sdk/client/informers/externalversions/kubebind/v1alpha2/apiserviceexportrequest.go +++ b/sdk/client/informers/externalversions/kubebind/v1alpha2/apiserviceexportrequest.go @@ -63,13 +63,25 @@ func NewFilteredAPIServiceExportRequestInformer(client versioned.Interface, name if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceExportRequests(namespace).List(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceExportRequests(namespace).List(context.Background(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceExportRequests(namespace).Watch(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceExportRequests(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().APIServiceExportRequests(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().APIServiceExportRequests(namespace).Watch(ctx, options) }, }, &apiskubebindv1alpha2.APIServiceExportRequest{}, diff --git a/sdk/client/informers/externalversions/kubebind/v1alpha2/apiservicenamespace.go b/sdk/client/informers/externalversions/kubebind/v1alpha2/apiservicenamespace.go index 60da890db..317085fba 100644 --- a/sdk/client/informers/externalversions/kubebind/v1alpha2/apiservicenamespace.go +++ b/sdk/client/informers/externalversions/kubebind/v1alpha2/apiservicenamespace.go @@ -63,13 +63,25 @@ func NewFilteredAPIServiceNamespaceInformer(client versioned.Interface, namespac if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceNamespaces(namespace).List(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceNamespaces(namespace).List(context.Background(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceNamespaces(namespace).Watch(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceNamespaces(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().APIServiceNamespaces(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().APIServiceNamespaces(namespace).Watch(ctx, options) }, }, &apiskubebindv1alpha2.APIServiceNamespace{}, diff --git a/sdk/client/informers/externalversions/kubebind/v1alpha2/boundapiresourceschema.go b/sdk/client/informers/externalversions/kubebind/v1alpha2/boundapiresourceschema.go index a8ce3b5a2..4a0a451f6 100644 --- a/sdk/client/informers/externalversions/kubebind/v1alpha2/boundapiresourceschema.go +++ b/sdk/client/informers/externalversions/kubebind/v1alpha2/boundapiresourceschema.go @@ -63,13 +63,25 @@ func NewFilteredBoundAPIResourceSchemaInformer(client versioned.Interface, names if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().BoundAPIResourceSchemas(namespace).List(context.TODO(), options) + return client.KubeBindV1alpha2().BoundAPIResourceSchemas(namespace).List(context.Background(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().BoundAPIResourceSchemas(namespace).Watch(context.TODO(), options) + return client.KubeBindV1alpha2().BoundAPIResourceSchemas(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().BoundAPIResourceSchemas(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().BoundAPIResourceSchemas(namespace).Watch(ctx, options) }, }, &apiskubebindv1alpha2.BoundAPIResourceSchema{}, diff --git a/sdk/client/informers/externalversions/kubebind/v1alpha2/clusterbinding.go b/sdk/client/informers/externalversions/kubebind/v1alpha2/clusterbinding.go index 30f5326bd..5bc237519 100644 --- a/sdk/client/informers/externalversions/kubebind/v1alpha2/clusterbinding.go +++ b/sdk/client/informers/externalversions/kubebind/v1alpha2/clusterbinding.go @@ -63,13 +63,25 @@ func NewFilteredClusterBindingInformer(client versioned.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().ClusterBindings(namespace).List(context.TODO(), options) + return client.KubeBindV1alpha2().ClusterBindings(namespace).List(context.Background(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().ClusterBindings(namespace).Watch(context.TODO(), options) + return client.KubeBindV1alpha2().ClusterBindings(namespace).Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().ClusterBindings(namespace).List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.KubeBindV1alpha2().ClusterBindings(namespace).Watch(ctx, options) }, }, &apiskubebindv1alpha2.ClusterBinding{}, diff --git a/sdk/kcp/applyconfiguration/conditions/v1alpha1/condition.go b/sdk/kcp/applyconfiguration/conditions/v1alpha1/condition.go deleted file mode 100644 index 068fa78b9..000000000 --- a/sdk/kcp/applyconfiguration/conditions/v1alpha1/condition.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - conditionsv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" -) - -// ConditionApplyConfiguration represents a declarative configuration of the Condition type for use -// with apply. -type ConditionApplyConfiguration struct { - Type *conditionsv1alpha1.ConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - Severity *conditionsv1alpha1.ConditionSeverity `json:"severity,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` -} - -// ConditionApplyConfiguration constructs a declarative configuration of the Condition type for use with -// apply. -func Condition() *ConditionApplyConfiguration { - return &ConditionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithType(value conditionsv1alpha1.ConditionType) *ConditionApplyConfiguration { - b.Type = &value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *ConditionApplyConfiguration { - b.Status = &value - return b -} - -// WithSeverity sets the Severity field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Severity field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithSeverity(value conditionsv1alpha1.ConditionSeverity) *ConditionApplyConfiguration { - b.Severity = &value - return b -} - -// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastTransitionTime field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *ConditionApplyConfiguration { - b.LastTransitionTime = &value - return b -} - -// WithReason sets the Reason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Reason field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithReason(value string) *ConditionApplyConfiguration { - b.Reason = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithMessage(value string) *ConditionApplyConfiguration { - b.Message = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/internal/internal.go b/sdk/kcp/applyconfiguration/internal/internal.go deleted file mode 100644 index b36ddc7d9..000000000 --- a/sdk/kcp/applyconfiguration/internal/internal.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package internal - -import ( - fmt "fmt" - sync "sync" - - typed "sigs.k8s.io/structured-merge-diff/v4/typed" -) - -func Parser() *typed.Parser { - parserOnce.Do(func() { - var err error - parser, err = typed.NewParser(schemaYAML) - if err != nil { - panic(fmt.Sprintf("Failed to parse schema: %v", err)) - } - }) - return parser -} - -var parserOnce sync.Once -var parser *typed.Parser -var schemaYAML = typed.YAMLObject(`types: -- name: __untyped_atomic_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic -- name: __untyped_deduced_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -`) diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebinding.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebinding.go deleted file mode 100644 index 57bb9321a..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebinding.go +++ /dev/null @@ -1,225 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - - v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" -) - -// APIServiceBindingApplyConfiguration represents a declarative configuration of the APIServiceBinding type for use -// with apply. -type APIServiceBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *APIServiceBindingSpecApplyConfiguration `json:"spec,omitempty"` - Status *APIServiceBindingStatusApplyConfiguration `json:"status,omitempty"` -} - -// APIServiceBinding constructs a declarative configuration of the APIServiceBinding type for use with -// apply. -func APIServiceBinding(name string) *APIServiceBindingApplyConfiguration { - b := &APIServiceBindingApplyConfiguration{} - b.WithName(name) - b.WithKind("APIServiceBinding") - b.WithAPIVersion("kube-bind.io/v1alpha1") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithKind(value string) *APIServiceBindingApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithAPIVersion(value string) *APIServiceBindingApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithName(value string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithGenerateName(value string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithNamespace(value string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithUID(value types.UID) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithResourceVersion(value string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithGeneration(value int64) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *APIServiceBindingApplyConfiguration) WithLabels(entries map[string]string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *APIServiceBindingApplyConfiguration) WithAnnotations(entries map[string]string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *APIServiceBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *APIServiceBindingApplyConfiguration) WithFinalizers(values ...string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *APIServiceBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithSpec(value *APIServiceBindingSpecApplyConfiguration) *APIServiceBindingApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithStatus(value *APIServiceBindingStatusApplyConfiguration) *APIServiceBindingApplyConfiguration { - b.Status = value - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *APIServiceBindingApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingspec.go deleted file mode 100644 index 906edecb5..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingspec.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// APIServiceBindingSpecApplyConfiguration represents a declarative configuration of the APIServiceBindingSpec type for use -// with apply. -type APIServiceBindingSpecApplyConfiguration struct { - KubeconfigSecretRef *ClusterSecretKeyRefApplyConfiguration `json:"kubeconfigSecretRef,omitempty"` -} - -// APIServiceBindingSpecApplyConfiguration constructs a declarative configuration of the APIServiceBindingSpec type for use with -// apply. -func APIServiceBindingSpec() *APIServiceBindingSpecApplyConfiguration { - return &APIServiceBindingSpecApplyConfiguration{} -} - -// WithKubeconfigSecretRef sets the KubeconfigSecretRef field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KubeconfigSecretRef field is set to the value of the last call. -func (b *APIServiceBindingSpecApplyConfiguration) WithKubeconfigSecretRef(value *ClusterSecretKeyRefApplyConfiguration) *APIServiceBindingSpecApplyConfiguration { - b.KubeconfigSecretRef = value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingstatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingstatus.go deleted file mode 100644 index 39c1b3545..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingstatus.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - conditionsv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" -) - -// APIServiceBindingStatusApplyConfiguration represents a declarative configuration of the APIServiceBindingStatus type for use -// with apply. -type APIServiceBindingStatusApplyConfiguration struct { - ProviderPrettyName *string `json:"providerPrettyName,omitempty"` - Conditions *conditionsv1alpha1.Conditions `json:"conditions,omitempty"` -} - -// APIServiceBindingStatusApplyConfiguration constructs a declarative configuration of the APIServiceBindingStatus type for use with -// apply. -func APIServiceBindingStatus() *APIServiceBindingStatusApplyConfiguration { - return &APIServiceBindingStatusApplyConfiguration{} -} - -// WithProviderPrettyName sets the ProviderPrettyName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProviderPrettyName field is set to the value of the last call. -func (b *APIServiceBindingStatusApplyConfiguration) WithProviderPrettyName(value string) *APIServiceBindingStatusApplyConfiguration { - b.ProviderPrettyName = &value - return b -} - -// WithConditions sets the Conditions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conditions field is set to the value of the last call. -func (b *APIServiceBindingStatusApplyConfiguration) WithConditions(value conditionsv1alpha1.Conditions) *APIServiceBindingStatusApplyConfiguration { - b.Conditions = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexport.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexport.go deleted file mode 100644 index 390b0121f..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexport.go +++ /dev/null @@ -1,226 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - - v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" -) - -// APIServiceExportApplyConfiguration represents a declarative configuration of the APIServiceExport type for use -// with apply. -type APIServiceExportApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *APIServiceExportSpecApplyConfiguration `json:"spec,omitempty"` - Status *APIServiceExportStatusApplyConfiguration `json:"status,omitempty"` -} - -// APIServiceExport constructs a declarative configuration of the APIServiceExport type for use with -// apply. -func APIServiceExport(name, namespace string) *APIServiceExportApplyConfiguration { - b := &APIServiceExportApplyConfiguration{} - b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("APIServiceExport") - b.WithAPIVersion("kube-bind.io/v1alpha1") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithKind(value string) *APIServiceExportApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithAPIVersion(value string) *APIServiceExportApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithName(value string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithGenerateName(value string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithNamespace(value string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithUID(value types.UID) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithResourceVersion(value string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithGeneration(value int64) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithCreationTimestamp(value metav1.Time) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *APIServiceExportApplyConfiguration) WithLabels(entries map[string]string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *APIServiceExportApplyConfiguration) WithAnnotations(entries map[string]string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *APIServiceExportApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *APIServiceExportApplyConfiguration) WithFinalizers(values ...string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *APIServiceExportApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithSpec(value *APIServiceExportSpecApplyConfiguration) *APIServiceExportApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithStatus(value *APIServiceExportStatusApplyConfiguration) *APIServiceExportApplyConfiguration { - b.Status = value - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *APIServiceExportApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportcrdspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportcrdspec.go deleted file mode 100644 index 694798522..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportcrdspec.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" -) - -// APIServiceExportCRDSpecApplyConfiguration represents a declarative configuration of the APIServiceExportCRDSpec type for use -// with apply. -type APIServiceExportCRDSpecApplyConfiguration struct { - Group *string `json:"group,omitempty"` - Names *v1.CustomResourceDefinitionNames `json:"names,omitempty"` - Scope *v1.ResourceScope `json:"scope,omitempty"` - Versions []APIServiceExportVersionApplyConfiguration `json:"versions,omitempty"` -} - -// APIServiceExportCRDSpecApplyConfiguration constructs a declarative configuration of the APIServiceExportCRDSpec type for use with -// apply. -func APIServiceExportCRDSpec() *APIServiceExportCRDSpecApplyConfiguration { - return &APIServiceExportCRDSpecApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *APIServiceExportCRDSpecApplyConfiguration) WithGroup(value string) *APIServiceExportCRDSpecApplyConfiguration { - b.Group = &value - return b -} - -// WithNames sets the Names field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Names field is set to the value of the last call. -func (b *APIServiceExportCRDSpecApplyConfiguration) WithNames(value v1.CustomResourceDefinitionNames) *APIServiceExportCRDSpecApplyConfiguration { - b.Names = &value - return b -} - -// WithScope sets the Scope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scope field is set to the value of the last call. -func (b *APIServiceExportCRDSpecApplyConfiguration) WithScope(value v1.ResourceScope) *APIServiceExportCRDSpecApplyConfiguration { - b.Scope = &value - return b -} - -// WithVersions adds the given value to the Versions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Versions field. -func (b *APIServiceExportCRDSpecApplyConfiguration) WithVersions(values ...*APIServiceExportVersionApplyConfiguration) *APIServiceExportCRDSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithVersions") - } - b.Versions = append(b.Versions, *values[i]) - } - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequest.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequest.go deleted file mode 100644 index a5777c587..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequest.go +++ /dev/null @@ -1,226 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - - v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" -) - -// APIServiceExportRequestApplyConfiguration represents a declarative configuration of the APIServiceExportRequest type for use -// with apply. -type APIServiceExportRequestApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *APIServiceExportRequestSpecApplyConfiguration `json:"spec,omitempty"` - Status *APIServiceExportRequestStatusApplyConfiguration `json:"status,omitempty"` -} - -// APIServiceExportRequest constructs a declarative configuration of the APIServiceExportRequest type for use with -// apply. -func APIServiceExportRequest(name, namespace string) *APIServiceExportRequestApplyConfiguration { - b := &APIServiceExportRequestApplyConfiguration{} - b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("APIServiceExportRequest") - b.WithAPIVersion("kube-bind.io/v1alpha1") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithKind(value string) *APIServiceExportRequestApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithAPIVersion(value string) *APIServiceExportRequestApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithName(value string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithGenerateName(value string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithNamespace(value string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithUID(value types.UID) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithResourceVersion(value string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithGeneration(value int64) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithCreationTimestamp(value metav1.Time) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *APIServiceExportRequestApplyConfiguration) WithLabels(entries map[string]string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *APIServiceExportRequestApplyConfiguration) WithAnnotations(entries map[string]string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *APIServiceExportRequestApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *APIServiceExportRequestApplyConfiguration) WithFinalizers(values ...string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *APIServiceExportRequestApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithSpec(value *APIServiceExportRequestSpecApplyConfiguration) *APIServiceExportRequestApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithStatus(value *APIServiceExportRequestStatusApplyConfiguration) *APIServiceExportRequestApplyConfiguration { - b.Status = value - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *APIServiceExportRequestApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestresource.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestresource.go deleted file mode 100644 index 07d3fbdd8..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestresource.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// APIServiceExportRequestResourceApplyConfiguration represents a declarative configuration of the APIServiceExportRequestResource type for use -// with apply. -type APIServiceExportRequestResourceApplyConfiguration struct { - GroupResourceApplyConfiguration `json:",inline"` - Versions []string `json:"versions,omitempty"` -} - -// APIServiceExportRequestResourceApplyConfiguration constructs a declarative configuration of the APIServiceExportRequestResource type for use with -// apply. -func APIServiceExportRequestResource() *APIServiceExportRequestResourceApplyConfiguration { - return &APIServiceExportRequestResourceApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *APIServiceExportRequestResourceApplyConfiguration) WithGroup(value string) *APIServiceExportRequestResourceApplyConfiguration { - b.GroupResourceApplyConfiguration.Group = &value - return b -} - -// WithResource sets the Resource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Resource field is set to the value of the last call. -func (b *APIServiceExportRequestResourceApplyConfiguration) WithResource(value string) *APIServiceExportRequestResourceApplyConfiguration { - b.GroupResourceApplyConfiguration.Resource = &value - return b -} - -// WithVersions adds the given value to the Versions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Versions field. -func (b *APIServiceExportRequestResourceApplyConfiguration) WithVersions(values ...string) *APIServiceExportRequestResourceApplyConfiguration { - for i := range values { - b.Versions = append(b.Versions, values[i]) - } - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestspec.go deleted file mode 100644 index 18ab1a8dd..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestspec.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// APIServiceExportRequestSpecApplyConfiguration represents a declarative configuration of the APIServiceExportRequestSpec type for use -// with apply. -type APIServiceExportRequestSpecApplyConfiguration struct { - Parameters *runtime.RawExtension `json:"parameters,omitempty"` - Resources []APIServiceExportRequestResourceApplyConfiguration `json:"resources,omitempty"` -} - -// APIServiceExportRequestSpecApplyConfiguration constructs a declarative configuration of the APIServiceExportRequestSpec type for use with -// apply. -func APIServiceExportRequestSpec() *APIServiceExportRequestSpecApplyConfiguration { - return &APIServiceExportRequestSpecApplyConfiguration{} -} - -// WithParameters sets the Parameters field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Parameters field is set to the value of the last call. -func (b *APIServiceExportRequestSpecApplyConfiguration) WithParameters(value runtime.RawExtension) *APIServiceExportRequestSpecApplyConfiguration { - b.Parameters = &value - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *APIServiceExportRequestSpecApplyConfiguration) WithResources(values ...*APIServiceExportRequestResourceApplyConfiguration) *APIServiceExportRequestSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequeststatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequeststatus.go deleted file mode 100644 index 6bee9da58..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequeststatus.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - conditionsv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" -) - -// APIServiceExportRequestStatusApplyConfiguration represents a declarative configuration of the APIServiceExportRequestStatus type for use -// with apply. -type APIServiceExportRequestStatusApplyConfiguration struct { - Phase *kubebindv1alpha1.APIServiceExportRequestPhase `json:"phase,omitempty"` - TerminalMessage *string `json:"terminalMessage,omitempty"` - Conditions *conditionsv1alpha1.Conditions `json:"conditions,omitempty"` -} - -// APIServiceExportRequestStatusApplyConfiguration constructs a declarative configuration of the APIServiceExportRequestStatus type for use with -// apply. -func APIServiceExportRequestStatus() *APIServiceExportRequestStatusApplyConfiguration { - return &APIServiceExportRequestStatusApplyConfiguration{} -} - -// WithPhase sets the Phase field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Phase field is set to the value of the last call. -func (b *APIServiceExportRequestStatusApplyConfiguration) WithPhase(value kubebindv1alpha1.APIServiceExportRequestPhase) *APIServiceExportRequestStatusApplyConfiguration { - b.Phase = &value - return b -} - -// WithTerminalMessage sets the TerminalMessage field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TerminalMessage field is set to the value of the last call. -func (b *APIServiceExportRequestStatusApplyConfiguration) WithTerminalMessage(value string) *APIServiceExportRequestStatusApplyConfiguration { - b.TerminalMessage = &value - return b -} - -// WithConditions sets the Conditions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conditions field is set to the value of the last call. -func (b *APIServiceExportRequestStatusApplyConfiguration) WithConditions(value conditionsv1alpha1.Conditions) *APIServiceExportRequestStatusApplyConfiguration { - b.Conditions = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportschema.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportschema.go deleted file mode 100644 index 45e564063..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportschema.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// APIServiceExportSchemaApplyConfiguration represents a declarative configuration of the APIServiceExportSchema type for use -// with apply. -type APIServiceExportSchemaApplyConfiguration struct { - OpenAPIV3Schema *runtime.RawExtension `json:"openAPIV3Schema,omitempty"` -} - -// APIServiceExportSchemaApplyConfiguration constructs a declarative configuration of the APIServiceExportSchema type for use with -// apply. -func APIServiceExportSchema() *APIServiceExportSchemaApplyConfiguration { - return &APIServiceExportSchemaApplyConfiguration{} -} - -// WithOpenAPIV3Schema sets the OpenAPIV3Schema field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OpenAPIV3Schema field is set to the value of the last call. -func (b *APIServiceExportSchemaApplyConfiguration) WithOpenAPIV3Schema(value runtime.RawExtension) *APIServiceExportSchemaApplyConfiguration { - b.OpenAPIV3Schema = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportspec.go deleted file mode 100644 index a1bf933b6..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportspec.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" -) - -// APIServiceExportSpecApplyConfiguration represents a declarative configuration of the APIServiceExportSpec type for use -// with apply. -type APIServiceExportSpecApplyConfiguration struct { - APIServiceExportCRDSpecApplyConfiguration `json:",inline"` - InformerScope *kubebindv1alpha1.Scope `json:"informerScope,omitempty"` - ClusterScopedIsolation *kubebindv1alpha1.Isolation `json:"clusterScopedIsolation,omitempty"` -} - -// APIServiceExportSpecApplyConfiguration constructs a declarative configuration of the APIServiceExportSpec type for use with -// apply. -func APIServiceExportSpec() *APIServiceExportSpecApplyConfiguration { - return &APIServiceExportSpecApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *APIServiceExportSpecApplyConfiguration) WithGroup(value string) *APIServiceExportSpecApplyConfiguration { - b.APIServiceExportCRDSpecApplyConfiguration.Group = &value - return b -} - -// WithNames sets the Names field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Names field is set to the value of the last call. -func (b *APIServiceExportSpecApplyConfiguration) WithNames(value v1.CustomResourceDefinitionNames) *APIServiceExportSpecApplyConfiguration { - b.APIServiceExportCRDSpecApplyConfiguration.Names = &value - return b -} - -// WithScope sets the Scope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scope field is set to the value of the last call. -func (b *APIServiceExportSpecApplyConfiguration) WithScope(value v1.ResourceScope) *APIServiceExportSpecApplyConfiguration { - b.APIServiceExportCRDSpecApplyConfiguration.Scope = &value - return b -} - -// WithVersions adds the given value to the Versions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Versions field. -func (b *APIServiceExportSpecApplyConfiguration) WithVersions(values ...*APIServiceExportVersionApplyConfiguration) *APIServiceExportSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithVersions") - } - b.APIServiceExportCRDSpecApplyConfiguration.Versions = append(b.APIServiceExportCRDSpecApplyConfiguration.Versions, *values[i]) - } - return b -} - -// WithInformerScope sets the InformerScope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InformerScope field is set to the value of the last call. -func (b *APIServiceExportSpecApplyConfiguration) WithInformerScope(value kubebindv1alpha1.Scope) *APIServiceExportSpecApplyConfiguration { - b.InformerScope = &value - return b -} - -// WithClusterScopedIsolation sets the ClusterScopedIsolation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterScopedIsolation field is set to the value of the last call. -func (b *APIServiceExportSpecApplyConfiguration) WithClusterScopedIsolation(value kubebindv1alpha1.Isolation) *APIServiceExportSpecApplyConfiguration { - b.ClusterScopedIsolation = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportstatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportstatus.go deleted file mode 100644 index 1f37cfc6a..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportstatus.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - - conditionsv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" -) - -// APIServiceExportStatusApplyConfiguration represents a declarative configuration of the APIServiceExportStatus type for use -// with apply. -type APIServiceExportStatusApplyConfiguration struct { - AcceptedNames *v1.CustomResourceDefinitionNames `json:"acceptedNames,omitempty"` - StoredVersions []string `json:"storedVersions,omitempty"` - Conditions *conditionsv1alpha1.Conditions `json:"conditions,omitempty"` -} - -// APIServiceExportStatusApplyConfiguration constructs a declarative configuration of the APIServiceExportStatus type for use with -// apply. -func APIServiceExportStatus() *APIServiceExportStatusApplyConfiguration { - return &APIServiceExportStatusApplyConfiguration{} -} - -// WithAcceptedNames sets the AcceptedNames field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AcceptedNames field is set to the value of the last call. -func (b *APIServiceExportStatusApplyConfiguration) WithAcceptedNames(value v1.CustomResourceDefinitionNames) *APIServiceExportStatusApplyConfiguration { - b.AcceptedNames = &value - return b -} - -// WithStoredVersions adds the given value to the StoredVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the StoredVersions field. -func (b *APIServiceExportStatusApplyConfiguration) WithStoredVersions(values ...string) *APIServiceExportStatusApplyConfiguration { - for i := range values { - b.StoredVersions = append(b.StoredVersions, values[i]) - } - return b -} - -// WithConditions sets the Conditions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conditions field is set to the value of the last call. -func (b *APIServiceExportStatusApplyConfiguration) WithConditions(value conditionsv1alpha1.Conditions) *APIServiceExportStatusApplyConfiguration { - b.Conditions = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportversion.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportversion.go deleted file mode 100644 index 7bb448d41..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportversion.go +++ /dev/null @@ -1,108 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" -) - -// APIServiceExportVersionApplyConfiguration represents a declarative configuration of the APIServiceExportVersion type for use -// with apply. -type APIServiceExportVersionApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Served *bool `json:"served,omitempty"` - Storage *bool `json:"storage,omitempty"` - Deprecated *bool `json:"deprecated,omitempty"` - DeprecationWarning *string `json:"deprecationWarning,omitempty"` - Schema *APIServiceExportSchemaApplyConfiguration `json:"schema,omitempty"` - Subresources *v1.CustomResourceSubresources `json:"subresources,omitempty"` - AdditionalPrinterColumns []v1.CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty"` -} - -// APIServiceExportVersionApplyConfiguration constructs a declarative configuration of the APIServiceExportVersion type for use with -// apply. -func APIServiceExportVersion() *APIServiceExportVersionApplyConfiguration { - return &APIServiceExportVersionApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIServiceExportVersionApplyConfiguration) WithName(value string) *APIServiceExportVersionApplyConfiguration { - b.Name = &value - return b -} - -// WithServed sets the Served field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Served field is set to the value of the last call. -func (b *APIServiceExportVersionApplyConfiguration) WithServed(value bool) *APIServiceExportVersionApplyConfiguration { - b.Served = &value - return b -} - -// WithStorage sets the Storage field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Storage field is set to the value of the last call. -func (b *APIServiceExportVersionApplyConfiguration) WithStorage(value bool) *APIServiceExportVersionApplyConfiguration { - b.Storage = &value - return b -} - -// WithDeprecated sets the Deprecated field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Deprecated field is set to the value of the last call. -func (b *APIServiceExportVersionApplyConfiguration) WithDeprecated(value bool) *APIServiceExportVersionApplyConfiguration { - b.Deprecated = &value - return b -} - -// WithDeprecationWarning sets the DeprecationWarning field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeprecationWarning field is set to the value of the last call. -func (b *APIServiceExportVersionApplyConfiguration) WithDeprecationWarning(value string) *APIServiceExportVersionApplyConfiguration { - b.DeprecationWarning = &value - return b -} - -// WithSchema sets the Schema field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Schema field is set to the value of the last call. -func (b *APIServiceExportVersionApplyConfiguration) WithSchema(value *APIServiceExportSchemaApplyConfiguration) *APIServiceExportVersionApplyConfiguration { - b.Schema = value - return b -} - -// WithSubresources sets the Subresources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Subresources field is set to the value of the last call. -func (b *APIServiceExportVersionApplyConfiguration) WithSubresources(value v1.CustomResourceSubresources) *APIServiceExportVersionApplyConfiguration { - b.Subresources = &value - return b -} - -// WithAdditionalPrinterColumns adds the given value to the AdditionalPrinterColumns field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AdditionalPrinterColumns field. -func (b *APIServiceExportVersionApplyConfiguration) WithAdditionalPrinterColumns(values ...v1.CustomResourceColumnDefinition) *APIServiceExportVersionApplyConfiguration { - for i := range values { - b.AdditionalPrinterColumns = append(b.AdditionalPrinterColumns, values[i]) - } - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespace.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespace.go deleted file mode 100644 index 485f16d9f..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespace.go +++ /dev/null @@ -1,227 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" -) - -// APIServiceNamespaceApplyConfiguration represents a declarative configuration of the APIServiceNamespace type for use -// with apply. -type APIServiceNamespaceApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *kubebindv1alpha1.APIServiceNamespaceSpec `json:"spec,omitempty"` - Status *APIServiceNamespaceStatusApplyConfiguration `json:"status,omitempty"` -} - -// APIServiceNamespace constructs a declarative configuration of the APIServiceNamespace type for use with -// apply. -func APIServiceNamespace(name, namespace string) *APIServiceNamespaceApplyConfiguration { - b := &APIServiceNamespaceApplyConfiguration{} - b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("APIServiceNamespace") - b.WithAPIVersion("kube-bind.io/v1alpha1") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithKind(value string) *APIServiceNamespaceApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithAPIVersion(value string) *APIServiceNamespaceApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithName(value string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithGenerateName(value string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithNamespace(value string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithUID(value types.UID) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithResourceVersion(value string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithGeneration(value int64) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *APIServiceNamespaceApplyConfiguration) WithLabels(entries map[string]string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *APIServiceNamespaceApplyConfiguration) WithAnnotations(entries map[string]string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *APIServiceNamespaceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *APIServiceNamespaceApplyConfiguration) WithFinalizers(values ...string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *APIServiceNamespaceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithSpec(value kubebindv1alpha1.APIServiceNamespaceSpec) *APIServiceNamespaceApplyConfiguration { - b.Spec = &value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithStatus(value *APIServiceNamespaceStatusApplyConfiguration) *APIServiceNamespaceApplyConfiguration { - b.Status = value - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *APIServiceNamespaceApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespacestatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespacestatus.go deleted file mode 100644 index 8a12263dc..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespacestatus.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// APIServiceNamespaceStatusApplyConfiguration represents a declarative configuration of the APIServiceNamespaceStatus type for use -// with apply. -type APIServiceNamespaceStatusApplyConfiguration struct { - Namespace *string `json:"namespace,omitempty"` -} - -// APIServiceNamespaceStatusApplyConfiguration constructs a declarative configuration of the APIServiceNamespaceStatus type for use with -// apply. -func APIServiceNamespaceStatus() *APIServiceNamespaceStatusApplyConfiguration { - return &APIServiceNamespaceStatusApplyConfiguration{} -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *APIServiceNamespaceStatusApplyConfiguration) WithNamespace(value string) *APIServiceNamespaceStatusApplyConfiguration { - b.Namespace = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbinding.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbinding.go deleted file mode 100644 index d6687874c..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbinding.go +++ /dev/null @@ -1,226 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - - v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" -) - -// ClusterBindingApplyConfiguration represents a declarative configuration of the ClusterBinding type for use -// with apply. -type ClusterBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ClusterBindingSpecApplyConfiguration `json:"spec,omitempty"` - Status *ClusterBindingStatusApplyConfiguration `json:"status,omitempty"` -} - -// ClusterBinding constructs a declarative configuration of the ClusterBinding type for use with -// apply. -func ClusterBinding(name, namespace string) *ClusterBindingApplyConfiguration { - b := &ClusterBindingApplyConfiguration{} - b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("ClusterBinding") - b.WithAPIVersion("kube-bind.io/v1alpha1") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithKind(value string) *ClusterBindingApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithAPIVersion(value string) *ClusterBindingApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithName(value string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithGenerateName(value string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithNamespace(value string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithUID(value types.UID) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithResourceVersion(value string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithGeneration(value int64) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ClusterBindingApplyConfiguration) WithLabels(entries map[string]string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ClusterBindingApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ClusterBindingApplyConfiguration) WithFinalizers(values ...string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ClusterBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithSpec(value *ClusterBindingSpecApplyConfiguration) *ClusterBindingApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithStatus(value *ClusterBindingStatusApplyConfiguration) *ClusterBindingApplyConfiguration { - b.Status = value - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ClusterBindingApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingspec.go deleted file mode 100644 index 7a74c5c4a..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingspec.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// ClusterBindingSpecApplyConfiguration represents a declarative configuration of the ClusterBindingSpec type for use -// with apply. -type ClusterBindingSpecApplyConfiguration struct { - KubeconfigSecretRef *LocalSecretKeyRefApplyConfiguration `json:"kubeconfigSecretRef,omitempty"` - ProviderPrettyName *string `json:"providerPrettyName,omitempty"` - ServiceProviderSpec *runtime.RawExtension `json:"serviceProviderSpec,omitempty"` -} - -// ClusterBindingSpecApplyConfiguration constructs a declarative configuration of the ClusterBindingSpec type for use with -// apply. -func ClusterBindingSpec() *ClusterBindingSpecApplyConfiguration { - return &ClusterBindingSpecApplyConfiguration{} -} - -// WithKubeconfigSecretRef sets the KubeconfigSecretRef field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KubeconfigSecretRef field is set to the value of the last call. -func (b *ClusterBindingSpecApplyConfiguration) WithKubeconfigSecretRef(value *LocalSecretKeyRefApplyConfiguration) *ClusterBindingSpecApplyConfiguration { - b.KubeconfigSecretRef = value - return b -} - -// WithProviderPrettyName sets the ProviderPrettyName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProviderPrettyName field is set to the value of the last call. -func (b *ClusterBindingSpecApplyConfiguration) WithProviderPrettyName(value string) *ClusterBindingSpecApplyConfiguration { - b.ProviderPrettyName = &value - return b -} - -// WithServiceProviderSpec sets the ServiceProviderSpec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServiceProviderSpec field is set to the value of the last call. -func (b *ClusterBindingSpecApplyConfiguration) WithServiceProviderSpec(value runtime.RawExtension) *ClusterBindingSpecApplyConfiguration { - b.ServiceProviderSpec = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingstatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingstatus.go deleted file mode 100644 index cae78d590..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingstatus.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - conditionsv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" -) - -// ClusterBindingStatusApplyConfiguration represents a declarative configuration of the ClusterBindingStatus type for use -// with apply. -type ClusterBindingStatusApplyConfiguration struct { - LastHeartbeatTime *v1.Time `json:"lastHeartbeatTime,omitempty"` - HeartbeatInterval *v1.Duration `json:"heartbeatInterval,omitempty"` - KonnectorVersion *string `json:"konnectorVersion,omitempty"` - Conditions *conditionsv1alpha1.Conditions `json:"conditions,omitempty"` -} - -// ClusterBindingStatusApplyConfiguration constructs a declarative configuration of the ClusterBindingStatus type for use with -// apply. -func ClusterBindingStatus() *ClusterBindingStatusApplyConfiguration { - return &ClusterBindingStatusApplyConfiguration{} -} - -// WithLastHeartbeatTime sets the LastHeartbeatTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastHeartbeatTime field is set to the value of the last call. -func (b *ClusterBindingStatusApplyConfiguration) WithLastHeartbeatTime(value v1.Time) *ClusterBindingStatusApplyConfiguration { - b.LastHeartbeatTime = &value - return b -} - -// WithHeartbeatInterval sets the HeartbeatInterval field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HeartbeatInterval field is set to the value of the last call. -func (b *ClusterBindingStatusApplyConfiguration) WithHeartbeatInterval(value v1.Duration) *ClusterBindingStatusApplyConfiguration { - b.HeartbeatInterval = &value - return b -} - -// WithKonnectorVersion sets the KonnectorVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KonnectorVersion field is set to the value of the last call. -func (b *ClusterBindingStatusApplyConfiguration) WithKonnectorVersion(value string) *ClusterBindingStatusApplyConfiguration { - b.KonnectorVersion = &value - return b -} - -// WithConditions sets the Conditions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conditions field is set to the value of the last call. -func (b *ClusterBindingStatusApplyConfiguration) WithConditions(value conditionsv1alpha1.Conditions) *ClusterBindingStatusApplyConfiguration { - b.Conditions = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clustersecretkeyref.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clustersecretkeyref.go deleted file mode 100644 index 864c3f0ec..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clustersecretkeyref.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// ClusterSecretKeyRefApplyConfiguration represents a declarative configuration of the ClusterSecretKeyRef type for use -// with apply. -type ClusterSecretKeyRefApplyConfiguration struct { - LocalSecretKeyRefApplyConfiguration `json:",inline"` - Namespace *string `json:"namespace,omitempty"` -} - -// ClusterSecretKeyRefApplyConfiguration constructs a declarative configuration of the ClusterSecretKeyRef type for use with -// apply. -func ClusterSecretKeyRef() *ClusterSecretKeyRefApplyConfiguration { - return &ClusterSecretKeyRefApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ClusterSecretKeyRefApplyConfiguration) WithName(value string) *ClusterSecretKeyRefApplyConfiguration { - b.LocalSecretKeyRefApplyConfiguration.Name = &value - return b -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *ClusterSecretKeyRefApplyConfiguration) WithKey(value string) *ClusterSecretKeyRefApplyConfiguration { - b.LocalSecretKeyRefApplyConfiguration.Key = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ClusterSecretKeyRefApplyConfiguration) WithNamespace(value string) *ClusterSecretKeyRefApplyConfiguration { - b.Namespace = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/groupresource.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/groupresource.go deleted file mode 100644 index a20ba92f6..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/groupresource.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// GroupResourceApplyConfiguration represents a declarative configuration of the GroupResource type for use -// with apply. -type GroupResourceApplyConfiguration struct { - Group *string `json:"group,omitempty"` - Resource *string `json:"resource,omitempty"` -} - -// GroupResourceApplyConfiguration constructs a declarative configuration of the GroupResource type for use with -// apply. -func GroupResource() *GroupResourceApplyConfiguration { - return &GroupResourceApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *GroupResourceApplyConfiguration) WithGroup(value string) *GroupResourceApplyConfiguration { - b.Group = &value - return b -} - -// WithResource sets the Resource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Resource field is set to the value of the last call. -func (b *GroupResourceApplyConfiguration) WithResource(value string) *GroupResourceApplyConfiguration { - b.Resource = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/localsecretkeyref.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/localsecretkeyref.go deleted file mode 100644 index cc38185ef..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/localsecretkeyref.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// LocalSecretKeyRefApplyConfiguration represents a declarative configuration of the LocalSecretKeyRef type for use -// with apply. -type LocalSecretKeyRefApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Key *string `json:"key,omitempty"` -} - -// LocalSecretKeyRefApplyConfiguration constructs a declarative configuration of the LocalSecretKeyRef type for use with -// apply. -func LocalSecretKeyRef() *LocalSecretKeyRefApplyConfiguration { - return &LocalSecretKeyRefApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *LocalSecretKeyRefApplyConfiguration) WithName(value string) *LocalSecretKeyRefApplyConfiguration { - b.Name = &value - return b -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *LocalSecretKeyRefApplyConfiguration) WithKey(value string) *LocalSecretKeyRefApplyConfiguration { - b.Key = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschema.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschema.go deleted file mode 100644 index 1db7740c8..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschema.go +++ /dev/null @@ -1,216 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - - v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" -) - -// APIResourceSchemaApplyConfiguration represents a declarative configuration of the APIResourceSchema type for use -// with apply. -type APIResourceSchemaApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *APIResourceSchemaSpecApplyConfiguration `json:"spec,omitempty"` -} - -// APIResourceSchema constructs a declarative configuration of the APIResourceSchema type for use with -// apply. -func APIResourceSchema(name string) *APIResourceSchemaApplyConfiguration { - b := &APIResourceSchemaApplyConfiguration{} - b.WithName(name) - b.WithKind("APIResourceSchema") - b.WithAPIVersion("kube-bind.io/v1alpha2") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *APIResourceSchemaApplyConfiguration) WithKind(value string) *APIResourceSchemaApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *APIResourceSchemaApplyConfiguration) WithAPIVersion(value string) *APIResourceSchemaApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIResourceSchemaApplyConfiguration) WithName(value string) *APIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *APIResourceSchemaApplyConfiguration) WithGenerateName(value string) *APIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *APIResourceSchemaApplyConfiguration) WithNamespace(value string) *APIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *APIResourceSchemaApplyConfiguration) WithUID(value types.UID) *APIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *APIResourceSchemaApplyConfiguration) WithResourceVersion(value string) *APIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *APIResourceSchemaApplyConfiguration) WithGeneration(value int64) *APIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *APIResourceSchemaApplyConfiguration) WithCreationTimestamp(value metav1.Time) *APIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *APIResourceSchemaApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *APIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *APIResourceSchemaApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *APIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *APIResourceSchemaApplyConfiguration) WithLabels(entries map[string]string) *APIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *APIResourceSchemaApplyConfiguration) WithAnnotations(entries map[string]string) *APIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *APIResourceSchemaApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *APIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *APIResourceSchemaApplyConfiguration) WithFinalizers(values ...string) *APIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *APIResourceSchemaApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *APIResourceSchemaApplyConfiguration) WithSpec(value *APIResourceSchemaSpecApplyConfiguration) *APIResourceSchemaApplyConfiguration { - b.Spec = value - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *APIResourceSchemaApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemacrdspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemacrdspec.go deleted file mode 100644 index fdcdba0ae..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemacrdspec.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" -) - -// APIResourceSchemaCRDSpecApplyConfiguration represents a declarative configuration of the APIResourceSchemaCRDSpec type for use -// with apply. -type APIResourceSchemaCRDSpecApplyConfiguration struct { - Group *string `json:"group,omitempty"` - Names *v1.CustomResourceDefinitionNames `json:"names,omitempty"` - Scope *v1.ResourceScope `json:"scope,omitempty"` - Versions []APIResourceVersionApplyConfiguration `json:"versions,omitempty"` - Conversion *CustomResourceConversionApplyConfiguration `json:"conversion,omitempty"` -} - -// APIResourceSchemaCRDSpecApplyConfiguration constructs a declarative configuration of the APIResourceSchemaCRDSpec type for use with -// apply. -func APIResourceSchemaCRDSpec() *APIResourceSchemaCRDSpecApplyConfiguration { - return &APIResourceSchemaCRDSpecApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *APIResourceSchemaCRDSpecApplyConfiguration) WithGroup(value string) *APIResourceSchemaCRDSpecApplyConfiguration { - b.Group = &value - return b -} - -// WithNames sets the Names field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Names field is set to the value of the last call. -func (b *APIResourceSchemaCRDSpecApplyConfiguration) WithNames(value v1.CustomResourceDefinitionNames) *APIResourceSchemaCRDSpecApplyConfiguration { - b.Names = &value - return b -} - -// WithScope sets the Scope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scope field is set to the value of the last call. -func (b *APIResourceSchemaCRDSpecApplyConfiguration) WithScope(value v1.ResourceScope) *APIResourceSchemaCRDSpecApplyConfiguration { - b.Scope = &value - return b -} - -// WithVersions adds the given value to the Versions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Versions field. -func (b *APIResourceSchemaCRDSpecApplyConfiguration) WithVersions(values ...*APIResourceVersionApplyConfiguration) *APIResourceSchemaCRDSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithVersions") - } - b.Versions = append(b.Versions, *values[i]) - } - return b -} - -// WithConversion sets the Conversion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conversion field is set to the value of the last call. -func (b *APIResourceSchemaCRDSpecApplyConfiguration) WithConversion(value *CustomResourceConversionApplyConfiguration) *APIResourceSchemaCRDSpecApplyConfiguration { - b.Conversion = value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemareference.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemareference.go deleted file mode 100644 index b232bcb3f..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemareference.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// APIResourceSchemaReferenceApplyConfiguration represents a declarative configuration of the APIResourceSchemaReference type for use -// with apply. -type APIResourceSchemaReferenceApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` -} - -// APIResourceSchemaReferenceApplyConfiguration constructs a declarative configuration of the APIResourceSchemaReference type for use with -// apply. -func APIResourceSchemaReference() *APIResourceSchemaReferenceApplyConfiguration { - return &APIResourceSchemaReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIResourceSchemaReferenceApplyConfiguration) WithName(value string) *APIResourceSchemaReferenceApplyConfiguration { - b.Name = &value - return b -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *APIResourceSchemaReferenceApplyConfiguration) WithType(value string) *APIResourceSchemaReferenceApplyConfiguration { - b.Type = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemaspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemaspec.go deleted file mode 100644 index 10a172fe8..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemaspec.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// APIResourceSchemaSpecApplyConfiguration represents a declarative configuration of the APIResourceSchemaSpec type for use -// with apply. -type APIResourceSchemaSpecApplyConfiguration struct { - InformerScope *kubebindv1alpha2.InformerScope `json:"informerScope,omitempty"` - APIResourceSchemaCRDSpecApplyConfiguration `json:",inline"` -} - -// APIResourceSchemaSpecApplyConfiguration constructs a declarative configuration of the APIResourceSchemaSpec type for use with -// apply. -func APIResourceSchemaSpec() *APIResourceSchemaSpecApplyConfiguration { - return &APIResourceSchemaSpecApplyConfiguration{} -} - -// WithInformerScope sets the InformerScope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InformerScope field is set to the value of the last call. -func (b *APIResourceSchemaSpecApplyConfiguration) WithInformerScope(value kubebindv1alpha2.InformerScope) *APIResourceSchemaSpecApplyConfiguration { - b.InformerScope = &value - return b -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *APIResourceSchemaSpecApplyConfiguration) WithGroup(value string) *APIResourceSchemaSpecApplyConfiguration { - b.APIResourceSchemaCRDSpecApplyConfiguration.Group = &value - return b -} - -// WithNames sets the Names field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Names field is set to the value of the last call. -func (b *APIResourceSchemaSpecApplyConfiguration) WithNames(value v1.CustomResourceDefinitionNames) *APIResourceSchemaSpecApplyConfiguration { - b.APIResourceSchemaCRDSpecApplyConfiguration.Names = &value - return b -} - -// WithScope sets the Scope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scope field is set to the value of the last call. -func (b *APIResourceSchemaSpecApplyConfiguration) WithScope(value v1.ResourceScope) *APIResourceSchemaSpecApplyConfiguration { - b.APIResourceSchemaCRDSpecApplyConfiguration.Scope = &value - return b -} - -// WithVersions adds the given value to the Versions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Versions field. -func (b *APIResourceSchemaSpecApplyConfiguration) WithVersions(values ...*APIResourceVersionApplyConfiguration) *APIResourceSchemaSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithVersions") - } - b.APIResourceSchemaCRDSpecApplyConfiguration.Versions = append(b.APIResourceSchemaCRDSpecApplyConfiguration.Versions, *values[i]) - } - return b -} - -// WithConversion sets the Conversion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conversion field is set to the value of the last call. -func (b *APIResourceSchemaSpecApplyConfiguration) WithConversion(value *CustomResourceConversionApplyConfiguration) *APIResourceSchemaSpecApplyConfiguration { - b.APIResourceSchemaCRDSpecApplyConfiguration.Conversion = value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceversion.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceversion.go deleted file mode 100644 index d6055ad0d..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceversion.go +++ /dev/null @@ -1,108 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" -) - -// APIResourceVersionApplyConfiguration represents a declarative configuration of the APIResourceVersion type for use -// with apply. -type APIResourceVersionApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Served *bool `json:"served,omitempty"` - Storage *bool `json:"storage,omitempty"` - Deprecated *bool `json:"deprecated,omitempty"` - DeprecationWarning *string `json:"deprecationWarning,omitempty"` - Schema *CRDVersionSchemaApplyConfiguration `json:"schema,omitempty"` - Subresources *v1.CustomResourceSubresources `json:"subresources,omitempty"` - AdditionalPrinterColumns []v1.CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty"` -} - -// APIResourceVersionApplyConfiguration constructs a declarative configuration of the APIResourceVersion type for use with -// apply. -func APIResourceVersion() *APIResourceVersionApplyConfiguration { - return &APIResourceVersionApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIResourceVersionApplyConfiguration) WithName(value string) *APIResourceVersionApplyConfiguration { - b.Name = &value - return b -} - -// WithServed sets the Served field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Served field is set to the value of the last call. -func (b *APIResourceVersionApplyConfiguration) WithServed(value bool) *APIResourceVersionApplyConfiguration { - b.Served = &value - return b -} - -// WithStorage sets the Storage field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Storage field is set to the value of the last call. -func (b *APIResourceVersionApplyConfiguration) WithStorage(value bool) *APIResourceVersionApplyConfiguration { - b.Storage = &value - return b -} - -// WithDeprecated sets the Deprecated field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Deprecated field is set to the value of the last call. -func (b *APIResourceVersionApplyConfiguration) WithDeprecated(value bool) *APIResourceVersionApplyConfiguration { - b.Deprecated = &value - return b -} - -// WithDeprecationWarning sets the DeprecationWarning field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeprecationWarning field is set to the value of the last call. -func (b *APIResourceVersionApplyConfiguration) WithDeprecationWarning(value string) *APIResourceVersionApplyConfiguration { - b.DeprecationWarning = &value - return b -} - -// WithSchema sets the Schema field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Schema field is set to the value of the last call. -func (b *APIResourceVersionApplyConfiguration) WithSchema(value *CRDVersionSchemaApplyConfiguration) *APIResourceVersionApplyConfiguration { - b.Schema = value - return b -} - -// WithSubresources sets the Subresources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Subresources field is set to the value of the last call. -func (b *APIResourceVersionApplyConfiguration) WithSubresources(value v1.CustomResourceSubresources) *APIResourceVersionApplyConfiguration { - b.Subresources = &value - return b -} - -// WithAdditionalPrinterColumns adds the given value to the AdditionalPrinterColumns field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AdditionalPrinterColumns field. -func (b *APIResourceVersionApplyConfiguration) WithAdditionalPrinterColumns(values ...v1.CustomResourceColumnDefinition) *APIResourceVersionApplyConfiguration { - for i := range values { - b.AdditionalPrinterColumns = append(b.AdditionalPrinterColumns, values[i]) - } - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebinding.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebinding.go deleted file mode 100644 index 191159c50..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebinding.go +++ /dev/null @@ -1,225 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - - v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" -) - -// APIServiceBindingApplyConfiguration represents a declarative configuration of the APIServiceBinding type for use -// with apply. -type APIServiceBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *APIServiceBindingSpecApplyConfiguration `json:"spec,omitempty"` - Status *APIServiceBindingStatusApplyConfiguration `json:"status,omitempty"` -} - -// APIServiceBinding constructs a declarative configuration of the APIServiceBinding type for use with -// apply. -func APIServiceBinding(name string) *APIServiceBindingApplyConfiguration { - b := &APIServiceBindingApplyConfiguration{} - b.WithName(name) - b.WithKind("APIServiceBinding") - b.WithAPIVersion("kube-bind.io/v1alpha2") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithKind(value string) *APIServiceBindingApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithAPIVersion(value string) *APIServiceBindingApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithName(value string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithGenerateName(value string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithNamespace(value string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithUID(value types.UID) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithResourceVersion(value string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithGeneration(value int64) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *APIServiceBindingApplyConfiguration) WithLabels(entries map[string]string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *APIServiceBindingApplyConfiguration) WithAnnotations(entries map[string]string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *APIServiceBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *APIServiceBindingApplyConfiguration) WithFinalizers(values ...string) *APIServiceBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *APIServiceBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithSpec(value *APIServiceBindingSpecApplyConfiguration) *APIServiceBindingApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *APIServiceBindingApplyConfiguration) WithStatus(value *APIServiceBindingStatusApplyConfiguration) *APIServiceBindingApplyConfiguration { - b.Status = value - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *APIServiceBindingApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingspec.go deleted file mode 100644 index 0da6cff28..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingspec.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// APIServiceBindingSpecApplyConfiguration represents a declarative configuration of the APIServiceBindingSpec type for use -// with apply. -type APIServiceBindingSpecApplyConfiguration struct { - KubeconfigSecretRef *ClusterSecretKeyRefApplyConfiguration `json:"kubeconfigSecretRef,omitempty"` -} - -// APIServiceBindingSpecApplyConfiguration constructs a declarative configuration of the APIServiceBindingSpec type for use with -// apply. -func APIServiceBindingSpec() *APIServiceBindingSpecApplyConfiguration { - return &APIServiceBindingSpecApplyConfiguration{} -} - -// WithKubeconfigSecretRef sets the KubeconfigSecretRef field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KubeconfigSecretRef field is set to the value of the last call. -func (b *APIServiceBindingSpecApplyConfiguration) WithKubeconfigSecretRef(value *ClusterSecretKeyRefApplyConfiguration) *APIServiceBindingSpecApplyConfiguration { - b.KubeconfigSecretRef = value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingstatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingstatus.go deleted file mode 100644 index f01b46205..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingstatus.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - v1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" -) - -// APIServiceBindingStatusApplyConfiguration represents a declarative configuration of the APIServiceBindingStatus type for use -// with apply. -type APIServiceBindingStatusApplyConfiguration struct { - ProviderPrettyName *string `json:"providerPrettyName,omitempty"` - Conditions *v1alpha1.Conditions `json:"conditions,omitempty"` - BoundSchemas []BoundSchemaReferenceApplyConfiguration `json:"boundSchemas,omitempty"` -} - -// APIServiceBindingStatusApplyConfiguration constructs a declarative configuration of the APIServiceBindingStatus type for use with -// apply. -func APIServiceBindingStatus() *APIServiceBindingStatusApplyConfiguration { - return &APIServiceBindingStatusApplyConfiguration{} -} - -// WithProviderPrettyName sets the ProviderPrettyName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProviderPrettyName field is set to the value of the last call. -func (b *APIServiceBindingStatusApplyConfiguration) WithProviderPrettyName(value string) *APIServiceBindingStatusApplyConfiguration { - b.ProviderPrettyName = &value - return b -} - -// WithConditions sets the Conditions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conditions field is set to the value of the last call. -func (b *APIServiceBindingStatusApplyConfiguration) WithConditions(value v1alpha1.Conditions) *APIServiceBindingStatusApplyConfiguration { - b.Conditions = &value - return b -} - -// WithBoundSchemas adds the given value to the BoundSchemas field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the BoundSchemas field. -func (b *APIServiceBindingStatusApplyConfiguration) WithBoundSchemas(values ...*BoundSchemaReferenceApplyConfiguration) *APIServiceBindingStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithBoundSchemas") - } - b.BoundSchemas = append(b.BoundSchemas, *values[i]) - } - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexport.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexport.go deleted file mode 100644 index b07a96a6f..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexport.go +++ /dev/null @@ -1,226 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - - v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" -) - -// APIServiceExportApplyConfiguration represents a declarative configuration of the APIServiceExport type for use -// with apply. -type APIServiceExportApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *APIServiceExportSpecApplyConfiguration `json:"spec,omitempty"` - Status *APIServiceExportStatusApplyConfiguration `json:"status,omitempty"` -} - -// APIServiceExport constructs a declarative configuration of the APIServiceExport type for use with -// apply. -func APIServiceExport(name, namespace string) *APIServiceExportApplyConfiguration { - b := &APIServiceExportApplyConfiguration{} - b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("APIServiceExport") - b.WithAPIVersion("kube-bind.io/v1alpha2") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithKind(value string) *APIServiceExportApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithAPIVersion(value string) *APIServiceExportApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithName(value string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithGenerateName(value string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithNamespace(value string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithUID(value types.UID) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithResourceVersion(value string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithGeneration(value int64) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithCreationTimestamp(value metav1.Time) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *APIServiceExportApplyConfiguration) WithLabels(entries map[string]string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *APIServiceExportApplyConfiguration) WithAnnotations(entries map[string]string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *APIServiceExportApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *APIServiceExportApplyConfiguration) WithFinalizers(values ...string) *APIServiceExportApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *APIServiceExportApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithSpec(value *APIServiceExportSpecApplyConfiguration) *APIServiceExportApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *APIServiceExportApplyConfiguration) WithStatus(value *APIServiceExportStatusApplyConfiguration) *APIServiceExportApplyConfiguration { - b.Status = value - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *APIServiceExportApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequest.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequest.go deleted file mode 100644 index 554cc686e..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequest.go +++ /dev/null @@ -1,226 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - - v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" -) - -// APIServiceExportRequestApplyConfiguration represents a declarative configuration of the APIServiceExportRequest type for use -// with apply. -type APIServiceExportRequestApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *APIServiceExportRequestSpecApplyConfiguration `json:"spec,omitempty"` - Status *APIServiceExportRequestStatusApplyConfiguration `json:"status,omitempty"` -} - -// APIServiceExportRequest constructs a declarative configuration of the APIServiceExportRequest type for use with -// apply. -func APIServiceExportRequest(name, namespace string) *APIServiceExportRequestApplyConfiguration { - b := &APIServiceExportRequestApplyConfiguration{} - b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("APIServiceExportRequest") - b.WithAPIVersion("kube-bind.io/v1alpha2") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithKind(value string) *APIServiceExportRequestApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithAPIVersion(value string) *APIServiceExportRequestApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithName(value string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithGenerateName(value string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithNamespace(value string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithUID(value types.UID) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithResourceVersion(value string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithGeneration(value int64) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithCreationTimestamp(value metav1.Time) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *APIServiceExportRequestApplyConfiguration) WithLabels(entries map[string]string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *APIServiceExportRequestApplyConfiguration) WithAnnotations(entries map[string]string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *APIServiceExportRequestApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *APIServiceExportRequestApplyConfiguration) WithFinalizers(values ...string) *APIServiceExportRequestApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *APIServiceExportRequestApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithSpec(value *APIServiceExportRequestSpecApplyConfiguration) *APIServiceExportRequestApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *APIServiceExportRequestApplyConfiguration) WithStatus(value *APIServiceExportRequestStatusApplyConfiguration) *APIServiceExportRequestApplyConfiguration { - b.Status = value - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *APIServiceExportRequestApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestresource.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestresource.go deleted file mode 100644 index 49aac6301..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestresource.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// APIServiceExportRequestResourceApplyConfiguration represents a declarative configuration of the APIServiceExportRequestResource type for use -// with apply. -type APIServiceExportRequestResourceApplyConfiguration struct { - GroupResourceApplyConfiguration `json:",inline"` - Versions []string `json:"versions,omitempty"` -} - -// APIServiceExportRequestResourceApplyConfiguration constructs a declarative configuration of the APIServiceExportRequestResource type for use with -// apply. -func APIServiceExportRequestResource() *APIServiceExportRequestResourceApplyConfiguration { - return &APIServiceExportRequestResourceApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *APIServiceExportRequestResourceApplyConfiguration) WithGroup(value string) *APIServiceExportRequestResourceApplyConfiguration { - b.GroupResourceApplyConfiguration.Group = &value - return b -} - -// WithResource sets the Resource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Resource field is set to the value of the last call. -func (b *APIServiceExportRequestResourceApplyConfiguration) WithResource(value string) *APIServiceExportRequestResourceApplyConfiguration { - b.GroupResourceApplyConfiguration.Resource = &value - return b -} - -// WithVersions adds the given value to the Versions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Versions field. -func (b *APIServiceExportRequestResourceApplyConfiguration) WithVersions(values ...string) *APIServiceExportRequestResourceApplyConfiguration { - for i := range values { - b.Versions = append(b.Versions, values[i]) - } - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestspec.go deleted file mode 100644 index 16c501cea..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestspec.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// APIServiceExportRequestSpecApplyConfiguration represents a declarative configuration of the APIServiceExportRequestSpec type for use -// with apply. -type APIServiceExportRequestSpecApplyConfiguration struct { - Parameters *runtime.RawExtension `json:"parameters,omitempty"` - Resources []APIServiceExportRequestResourceApplyConfiguration `json:"resources,omitempty"` -} - -// APIServiceExportRequestSpecApplyConfiguration constructs a declarative configuration of the APIServiceExportRequestSpec type for use with -// apply. -func APIServiceExportRequestSpec() *APIServiceExportRequestSpecApplyConfiguration { - return &APIServiceExportRequestSpecApplyConfiguration{} -} - -// WithParameters sets the Parameters field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Parameters field is set to the value of the last call. -func (b *APIServiceExportRequestSpecApplyConfiguration) WithParameters(value runtime.RawExtension) *APIServiceExportRequestSpecApplyConfiguration { - b.Parameters = &value - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *APIServiceExportRequestSpecApplyConfiguration) WithResources(values ...*APIServiceExportRequestResourceApplyConfiguration) *APIServiceExportRequestSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequeststatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequeststatus.go deleted file mode 100644 index 889f5782b..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequeststatus.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - v1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" -) - -// APIServiceExportRequestStatusApplyConfiguration represents a declarative configuration of the APIServiceExportRequestStatus type for use -// with apply. -type APIServiceExportRequestStatusApplyConfiguration struct { - Phase *kubebindv1alpha2.APIServiceExportRequestPhase `json:"phase,omitempty"` - TerminalMessage *string `json:"terminalMessage,omitempty"` - Conditions *v1alpha1.Conditions `json:"conditions,omitempty"` -} - -// APIServiceExportRequestStatusApplyConfiguration constructs a declarative configuration of the APIServiceExportRequestStatus type for use with -// apply. -func APIServiceExportRequestStatus() *APIServiceExportRequestStatusApplyConfiguration { - return &APIServiceExportRequestStatusApplyConfiguration{} -} - -// WithPhase sets the Phase field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Phase field is set to the value of the last call. -func (b *APIServiceExportRequestStatusApplyConfiguration) WithPhase(value kubebindv1alpha2.APIServiceExportRequestPhase) *APIServiceExportRequestStatusApplyConfiguration { - b.Phase = &value - return b -} - -// WithTerminalMessage sets the TerminalMessage field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TerminalMessage field is set to the value of the last call. -func (b *APIServiceExportRequestStatusApplyConfiguration) WithTerminalMessage(value string) *APIServiceExportRequestStatusApplyConfiguration { - b.TerminalMessage = &value - return b -} - -// WithConditions sets the Conditions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conditions field is set to the value of the last call. -func (b *APIServiceExportRequestStatusApplyConfiguration) WithConditions(value v1alpha1.Conditions) *APIServiceExportRequestStatusApplyConfiguration { - b.Conditions = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportspec.go deleted file mode 100644 index 50d25109e..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportspec.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// APIServiceExportSpecApplyConfiguration represents a declarative configuration of the APIServiceExportSpec type for use -// with apply. -type APIServiceExportSpecApplyConfiguration struct { - Resources []APIResourceSchemaReferenceApplyConfiguration `json:"resources,omitempty"` - InformerScope *kubebindv1alpha2.InformerScope `json:"informerScope,omitempty"` - ClusterScopedIsolation *kubebindv1alpha2.Isolation `json:"clusterScopedIsolation,omitempty"` -} - -// APIServiceExportSpecApplyConfiguration constructs a declarative configuration of the APIServiceExportSpec type for use with -// apply. -func APIServiceExportSpec() *APIServiceExportSpecApplyConfiguration { - return &APIServiceExportSpecApplyConfiguration{} -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *APIServiceExportSpecApplyConfiguration) WithResources(values ...*APIResourceSchemaReferenceApplyConfiguration) *APIServiceExportSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} - -// WithInformerScope sets the InformerScope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InformerScope field is set to the value of the last call. -func (b *APIServiceExportSpecApplyConfiguration) WithInformerScope(value kubebindv1alpha2.InformerScope) *APIServiceExportSpecApplyConfiguration { - b.InformerScope = &value - return b -} - -// WithClusterScopedIsolation sets the ClusterScopedIsolation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterScopedIsolation field is set to the value of the last call. -func (b *APIServiceExportSpecApplyConfiguration) WithClusterScopedIsolation(value kubebindv1alpha2.Isolation) *APIServiceExportSpecApplyConfiguration { - b.ClusterScopedIsolation = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportstatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportstatus.go deleted file mode 100644 index 736873217..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportstatus.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - - v1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" -) - -// APIServiceExportStatusApplyConfiguration represents a declarative configuration of the APIServiceExportStatus type for use -// with apply. -type APIServiceExportStatusApplyConfiguration struct { - AcceptedNames *v1.CustomResourceDefinitionNames `json:"acceptedNames,omitempty"` - StoredVersions []string `json:"storedVersions,omitempty"` - Conditions *v1alpha1.Conditions `json:"conditions,omitempty"` -} - -// APIServiceExportStatusApplyConfiguration constructs a declarative configuration of the APIServiceExportStatus type for use with -// apply. -func APIServiceExportStatus() *APIServiceExportStatusApplyConfiguration { - return &APIServiceExportStatusApplyConfiguration{} -} - -// WithAcceptedNames sets the AcceptedNames field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AcceptedNames field is set to the value of the last call. -func (b *APIServiceExportStatusApplyConfiguration) WithAcceptedNames(value v1.CustomResourceDefinitionNames) *APIServiceExportStatusApplyConfiguration { - b.AcceptedNames = &value - return b -} - -// WithStoredVersions adds the given value to the StoredVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the StoredVersions field. -func (b *APIServiceExportStatusApplyConfiguration) WithStoredVersions(values ...string) *APIServiceExportStatusApplyConfiguration { - for i := range values { - b.StoredVersions = append(b.StoredVersions, values[i]) - } - return b -} - -// WithConditions sets the Conditions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conditions field is set to the value of the last call. -func (b *APIServiceExportStatusApplyConfiguration) WithConditions(value v1alpha1.Conditions) *APIServiceExportStatusApplyConfiguration { - b.Conditions = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespace.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespace.go deleted file mode 100644 index f692f5d8d..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespace.go +++ /dev/null @@ -1,227 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" -) - -// APIServiceNamespaceApplyConfiguration represents a declarative configuration of the APIServiceNamespace type for use -// with apply. -type APIServiceNamespaceApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *kubebindv1alpha2.APIServiceNamespaceSpec `json:"spec,omitempty"` - Status *APIServiceNamespaceStatusApplyConfiguration `json:"status,omitempty"` -} - -// APIServiceNamespace constructs a declarative configuration of the APIServiceNamespace type for use with -// apply. -func APIServiceNamespace(name, namespace string) *APIServiceNamespaceApplyConfiguration { - b := &APIServiceNamespaceApplyConfiguration{} - b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("APIServiceNamespace") - b.WithAPIVersion("kube-bind.io/v1alpha2") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithKind(value string) *APIServiceNamespaceApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithAPIVersion(value string) *APIServiceNamespaceApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithName(value string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithGenerateName(value string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithNamespace(value string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithUID(value types.UID) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithResourceVersion(value string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithGeneration(value int64) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *APIServiceNamespaceApplyConfiguration) WithLabels(entries map[string]string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *APIServiceNamespaceApplyConfiguration) WithAnnotations(entries map[string]string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *APIServiceNamespaceApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *APIServiceNamespaceApplyConfiguration) WithFinalizers(values ...string) *APIServiceNamespaceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *APIServiceNamespaceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithSpec(value kubebindv1alpha2.APIServiceNamespaceSpec) *APIServiceNamespaceApplyConfiguration { - b.Spec = &value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *APIServiceNamespaceApplyConfiguration) WithStatus(value *APIServiceNamespaceStatusApplyConfiguration) *APIServiceNamespaceApplyConfiguration { - b.Status = value - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *APIServiceNamespaceApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespacestatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespacestatus.go deleted file mode 100644 index 8b38e0169..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespacestatus.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// APIServiceNamespaceStatusApplyConfiguration represents a declarative configuration of the APIServiceNamespaceStatus type for use -// with apply. -type APIServiceNamespaceStatusApplyConfiguration struct { - Namespace *string `json:"namespace,omitempty"` -} - -// APIServiceNamespaceStatusApplyConfiguration constructs a declarative configuration of the APIServiceNamespaceStatus type for use with -// apply. -func APIServiceNamespaceStatus() *APIServiceNamespaceStatusApplyConfiguration { - return &APIServiceNamespaceStatusApplyConfiguration{} -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *APIServiceNamespaceStatusApplyConfiguration) WithNamespace(value string) *APIServiceNamespaceStatusApplyConfiguration { - b.Namespace = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschema.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschema.go deleted file mode 100644 index 22714dc48..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschema.go +++ /dev/null @@ -1,226 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - - v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" -) - -// BoundAPIResourceSchemaApplyConfiguration represents a declarative configuration of the BoundAPIResourceSchema type for use -// with apply. -type BoundAPIResourceSchemaApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *BoundAPIResourceSchemaSpecApplyConfiguration `json:"spec,omitempty"` - Status *BoundAPIResourceSchemaStatusApplyConfiguration `json:"status,omitempty"` -} - -// BoundAPIResourceSchema constructs a declarative configuration of the BoundAPIResourceSchema type for use with -// apply. -func BoundAPIResourceSchema(name, namespace string) *BoundAPIResourceSchemaApplyConfiguration { - b := &BoundAPIResourceSchemaApplyConfiguration{} - b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("BoundAPIResourceSchema") - b.WithAPIVersion("kube-bind.io/v1alpha2") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithKind(value string) *BoundAPIResourceSchemaApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithAPIVersion(value string) *BoundAPIResourceSchemaApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithName(value string) *BoundAPIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithGenerateName(value string) *BoundAPIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithNamespace(value string) *BoundAPIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithUID(value types.UID) *BoundAPIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithResourceVersion(value string) *BoundAPIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithGeneration(value int64) *BoundAPIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithCreationTimestamp(value metav1.Time) *BoundAPIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *BoundAPIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *BoundAPIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithLabels(entries map[string]string) *BoundAPIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithAnnotations(entries map[string]string) *BoundAPIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *BoundAPIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithFinalizers(values ...string) *BoundAPIResourceSchemaApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *BoundAPIResourceSchemaApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithSpec(value *BoundAPIResourceSchemaSpecApplyConfiguration) *BoundAPIResourceSchemaApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *BoundAPIResourceSchemaApplyConfiguration) WithStatus(value *BoundAPIResourceSchemaStatusApplyConfiguration) *BoundAPIResourceSchemaApplyConfiguration { - b.Status = value - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *BoundAPIResourceSchemaApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemaspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemaspec.go deleted file mode 100644 index 6e0cfcc74..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemaspec.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// BoundAPIResourceSchemaSpecApplyConfiguration represents a declarative configuration of the BoundAPIResourceSchemaSpec type for use -// with apply. -type BoundAPIResourceSchemaSpecApplyConfiguration struct { - InformerScope *kubebindv1alpha2.InformerScope `json:"informerScope,omitempty"` - APIResourceSchemaCRDSpecApplyConfiguration `json:",inline"` -} - -// BoundAPIResourceSchemaSpecApplyConfiguration constructs a declarative configuration of the BoundAPIResourceSchemaSpec type for use with -// apply. -func BoundAPIResourceSchemaSpec() *BoundAPIResourceSchemaSpecApplyConfiguration { - return &BoundAPIResourceSchemaSpecApplyConfiguration{} -} - -// WithInformerScope sets the InformerScope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InformerScope field is set to the value of the last call. -func (b *BoundAPIResourceSchemaSpecApplyConfiguration) WithInformerScope(value kubebindv1alpha2.InformerScope) *BoundAPIResourceSchemaSpecApplyConfiguration { - b.InformerScope = &value - return b -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *BoundAPIResourceSchemaSpecApplyConfiguration) WithGroup(value string) *BoundAPIResourceSchemaSpecApplyConfiguration { - b.APIResourceSchemaCRDSpecApplyConfiguration.Group = &value - return b -} - -// WithNames sets the Names field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Names field is set to the value of the last call. -func (b *BoundAPIResourceSchemaSpecApplyConfiguration) WithNames(value v1.CustomResourceDefinitionNames) *BoundAPIResourceSchemaSpecApplyConfiguration { - b.APIResourceSchemaCRDSpecApplyConfiguration.Names = &value - return b -} - -// WithScope sets the Scope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scope field is set to the value of the last call. -func (b *BoundAPIResourceSchemaSpecApplyConfiguration) WithScope(value v1.ResourceScope) *BoundAPIResourceSchemaSpecApplyConfiguration { - b.APIResourceSchemaCRDSpecApplyConfiguration.Scope = &value - return b -} - -// WithVersions adds the given value to the Versions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Versions field. -func (b *BoundAPIResourceSchemaSpecApplyConfiguration) WithVersions(values ...*APIResourceVersionApplyConfiguration) *BoundAPIResourceSchemaSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithVersions") - } - b.APIResourceSchemaCRDSpecApplyConfiguration.Versions = append(b.APIResourceSchemaCRDSpecApplyConfiguration.Versions, *values[i]) - } - return b -} - -// WithConversion sets the Conversion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conversion field is set to the value of the last call. -func (b *BoundAPIResourceSchemaSpecApplyConfiguration) WithConversion(value *CustomResourceConversionApplyConfiguration) *BoundAPIResourceSchemaSpecApplyConfiguration { - b.APIResourceSchemaCRDSpecApplyConfiguration.Conversion = value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemastatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemastatus.go deleted file mode 100644 index fa16d9c67..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemastatus.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - - v1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/conditions/v1alpha1" -) - -// BoundAPIResourceSchemaStatusApplyConfiguration represents a declarative configuration of the BoundAPIResourceSchemaStatus type for use -// with apply. -type BoundAPIResourceSchemaStatusApplyConfiguration struct { - AcceptedNames *v1.CustomResourceDefinitionNames `json:"acceptedNames,omitempty"` - StoredVersions []string `json:"storedVersions,omitempty"` - Conditions []v1alpha1.ConditionApplyConfiguration `json:"conditions,omitempty"` - Instantiations *int `json:"instantiations,omitempty"` -} - -// BoundAPIResourceSchemaStatusApplyConfiguration constructs a declarative configuration of the BoundAPIResourceSchemaStatus type for use with -// apply. -func BoundAPIResourceSchemaStatus() *BoundAPIResourceSchemaStatusApplyConfiguration { - return &BoundAPIResourceSchemaStatusApplyConfiguration{} -} - -// WithAcceptedNames sets the AcceptedNames field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AcceptedNames field is set to the value of the last call. -func (b *BoundAPIResourceSchemaStatusApplyConfiguration) WithAcceptedNames(value v1.CustomResourceDefinitionNames) *BoundAPIResourceSchemaStatusApplyConfiguration { - b.AcceptedNames = &value - return b -} - -// WithStoredVersions adds the given value to the StoredVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the StoredVersions field. -func (b *BoundAPIResourceSchemaStatusApplyConfiguration) WithStoredVersions(values ...string) *BoundAPIResourceSchemaStatusApplyConfiguration { - for i := range values { - b.StoredVersions = append(b.StoredVersions, values[i]) - } - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *BoundAPIResourceSchemaStatusApplyConfiguration) WithConditions(values ...*v1alpha1.ConditionApplyConfiguration) *BoundAPIResourceSchemaStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithInstantiations sets the Instantiations field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Instantiations field is set to the value of the last call. -func (b *BoundAPIResourceSchemaStatusApplyConfiguration) WithInstantiations(value int) *BoundAPIResourceSchemaStatusApplyConfiguration { - b.Instantiations = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundschemareference.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundschemareference.go deleted file mode 100644 index 95a97aa63..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundschemareference.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// BoundSchemaReferenceApplyConfiguration represents a declarative configuration of the BoundSchemaReference type for use -// with apply. -type BoundSchemaReferenceApplyConfiguration struct { - GroupResourceApplyConfiguration `json:",inline"` -} - -// BoundSchemaReferenceApplyConfiguration constructs a declarative configuration of the BoundSchemaReference type for use with -// apply. -func BoundSchemaReference() *BoundSchemaReferenceApplyConfiguration { - return &BoundSchemaReferenceApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *BoundSchemaReferenceApplyConfiguration) WithGroup(value string) *BoundSchemaReferenceApplyConfiguration { - b.GroupResourceApplyConfiguration.Group = &value - return b -} - -// WithResource sets the Resource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Resource field is set to the value of the last call. -func (b *BoundSchemaReferenceApplyConfiguration) WithResource(value string) *BoundSchemaReferenceApplyConfiguration { - b.GroupResourceApplyConfiguration.Resource = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbinding.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbinding.go deleted file mode 100644 index 35fc4e0a7..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbinding.go +++ /dev/null @@ -1,226 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - - v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" -) - -// ClusterBindingApplyConfiguration represents a declarative configuration of the ClusterBinding type for use -// with apply. -type ClusterBindingApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ClusterBindingSpecApplyConfiguration `json:"spec,omitempty"` - Status *ClusterBindingStatusApplyConfiguration `json:"status,omitempty"` -} - -// ClusterBinding constructs a declarative configuration of the ClusterBinding type for use with -// apply. -func ClusterBinding(name, namespace string) *ClusterBindingApplyConfiguration { - b := &ClusterBindingApplyConfiguration{} - b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("ClusterBinding") - b.WithAPIVersion("kube-bind.io/v1alpha2") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithKind(value string) *ClusterBindingApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithAPIVersion(value string) *ClusterBindingApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithName(value string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithGenerateName(value string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithNamespace(value string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithUID(value types.UID) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithResourceVersion(value string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithGeneration(value int64) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ClusterBindingApplyConfiguration) WithLabels(entries map[string]string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ClusterBindingApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterBindingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ClusterBindingApplyConfiguration) WithFinalizers(values ...string) *ClusterBindingApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ClusterBindingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithSpec(value *ClusterBindingSpecApplyConfiguration) *ClusterBindingApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ClusterBindingApplyConfiguration) WithStatus(value *ClusterBindingStatusApplyConfiguration) *ClusterBindingApplyConfiguration { - b.Status = value - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ClusterBindingApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingspec.go deleted file mode 100644 index e5b01c8e3..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingspec.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// ClusterBindingSpecApplyConfiguration represents a declarative configuration of the ClusterBindingSpec type for use -// with apply. -type ClusterBindingSpecApplyConfiguration struct { - KubeconfigSecretRef *LocalSecretKeyRefApplyConfiguration `json:"kubeconfigSecretRef,omitempty"` - ProviderPrettyName *string `json:"providerPrettyName,omitempty"` - ServiceProviderSpec *runtime.RawExtension `json:"serviceProviderSpec,omitempty"` -} - -// ClusterBindingSpecApplyConfiguration constructs a declarative configuration of the ClusterBindingSpec type for use with -// apply. -func ClusterBindingSpec() *ClusterBindingSpecApplyConfiguration { - return &ClusterBindingSpecApplyConfiguration{} -} - -// WithKubeconfigSecretRef sets the KubeconfigSecretRef field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KubeconfigSecretRef field is set to the value of the last call. -func (b *ClusterBindingSpecApplyConfiguration) WithKubeconfigSecretRef(value *LocalSecretKeyRefApplyConfiguration) *ClusterBindingSpecApplyConfiguration { - b.KubeconfigSecretRef = value - return b -} - -// WithProviderPrettyName sets the ProviderPrettyName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProviderPrettyName field is set to the value of the last call. -func (b *ClusterBindingSpecApplyConfiguration) WithProviderPrettyName(value string) *ClusterBindingSpecApplyConfiguration { - b.ProviderPrettyName = &value - return b -} - -// WithServiceProviderSpec sets the ServiceProviderSpec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServiceProviderSpec field is set to the value of the last call. -func (b *ClusterBindingSpecApplyConfiguration) WithServiceProviderSpec(value runtime.RawExtension) *ClusterBindingSpecApplyConfiguration { - b.ServiceProviderSpec = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingstatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingstatus.go deleted file mode 100644 index 3b9ca2773..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingstatus.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - v1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" -) - -// ClusterBindingStatusApplyConfiguration represents a declarative configuration of the ClusterBindingStatus type for use -// with apply. -type ClusterBindingStatusApplyConfiguration struct { - LastHeartbeatTime *v1.Time `json:"lastHeartbeatTime,omitempty"` - HeartbeatInterval *v1.Duration `json:"heartbeatInterval,omitempty"` - KonnectorVersion *string `json:"konnectorVersion,omitempty"` - Conditions *v1alpha1.Conditions `json:"conditions,omitempty"` -} - -// ClusterBindingStatusApplyConfiguration constructs a declarative configuration of the ClusterBindingStatus type for use with -// apply. -func ClusterBindingStatus() *ClusterBindingStatusApplyConfiguration { - return &ClusterBindingStatusApplyConfiguration{} -} - -// WithLastHeartbeatTime sets the LastHeartbeatTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastHeartbeatTime field is set to the value of the last call. -func (b *ClusterBindingStatusApplyConfiguration) WithLastHeartbeatTime(value v1.Time) *ClusterBindingStatusApplyConfiguration { - b.LastHeartbeatTime = &value - return b -} - -// WithHeartbeatInterval sets the HeartbeatInterval field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HeartbeatInterval field is set to the value of the last call. -func (b *ClusterBindingStatusApplyConfiguration) WithHeartbeatInterval(value v1.Duration) *ClusterBindingStatusApplyConfiguration { - b.HeartbeatInterval = &value - return b -} - -// WithKonnectorVersion sets the KonnectorVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KonnectorVersion field is set to the value of the last call. -func (b *ClusterBindingStatusApplyConfiguration) WithKonnectorVersion(value string) *ClusterBindingStatusApplyConfiguration { - b.KonnectorVersion = &value - return b -} - -// WithConditions sets the Conditions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conditions field is set to the value of the last call. -func (b *ClusterBindingStatusApplyConfiguration) WithConditions(value v1alpha1.Conditions) *ClusterBindingStatusApplyConfiguration { - b.Conditions = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clustersecretkeyref.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clustersecretkeyref.go deleted file mode 100644 index ae4ec3e83..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clustersecretkeyref.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// ClusterSecretKeyRefApplyConfiguration represents a declarative configuration of the ClusterSecretKeyRef type for use -// with apply. -type ClusterSecretKeyRefApplyConfiguration struct { - LocalSecretKeyRefApplyConfiguration `json:",inline"` - Namespace *string `json:"namespace,omitempty"` -} - -// ClusterSecretKeyRefApplyConfiguration constructs a declarative configuration of the ClusterSecretKeyRef type for use with -// apply. -func ClusterSecretKeyRef() *ClusterSecretKeyRefApplyConfiguration { - return &ClusterSecretKeyRefApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ClusterSecretKeyRefApplyConfiguration) WithName(value string) *ClusterSecretKeyRefApplyConfiguration { - b.LocalSecretKeyRefApplyConfiguration.Name = &value - return b -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *ClusterSecretKeyRefApplyConfiguration) WithKey(value string) *ClusterSecretKeyRefApplyConfiguration { - b.LocalSecretKeyRefApplyConfiguration.Key = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ClusterSecretKeyRefApplyConfiguration) WithNamespace(value string) *ClusterSecretKeyRefApplyConfiguration { - b.Namespace = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/crdversionschema.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/crdversionschema.go deleted file mode 100644 index 7133e98c6..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/crdversionschema.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// CRDVersionSchemaApplyConfiguration represents a declarative configuration of the CRDVersionSchema type for use -// with apply. -type CRDVersionSchemaApplyConfiguration struct { - OpenAPIV3Schema *runtime.RawExtension `json:"openAPIV3Schema,omitempty"` -} - -// CRDVersionSchemaApplyConfiguration constructs a declarative configuration of the CRDVersionSchema type for use with -// apply. -func CRDVersionSchema() *CRDVersionSchemaApplyConfiguration { - return &CRDVersionSchemaApplyConfiguration{} -} - -// WithOpenAPIV3Schema sets the OpenAPIV3Schema field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OpenAPIV3Schema field is set to the value of the last call. -func (b *CRDVersionSchemaApplyConfiguration) WithOpenAPIV3Schema(value runtime.RawExtension) *CRDVersionSchemaApplyConfiguration { - b.OpenAPIV3Schema = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/customresourceconversion.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/customresourceconversion.go deleted file mode 100644 index 1d025e1be..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/customresourceconversion.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// CustomResourceConversionApplyConfiguration represents a declarative configuration of the CustomResourceConversion type for use -// with apply. -type CustomResourceConversionApplyConfiguration struct { - Strategy *kubebindv1alpha2.ConversionStrategyType `json:"strategy,omitempty"` - Webhook *WebhookConversionApplyConfiguration `json:"webhook,omitempty"` -} - -// CustomResourceConversionApplyConfiguration constructs a declarative configuration of the CustomResourceConversion type for use with -// apply. -func CustomResourceConversion() *CustomResourceConversionApplyConfiguration { - return &CustomResourceConversionApplyConfiguration{} -} - -// WithStrategy sets the Strategy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Strategy field is set to the value of the last call. -func (b *CustomResourceConversionApplyConfiguration) WithStrategy(value kubebindv1alpha2.ConversionStrategyType) *CustomResourceConversionApplyConfiguration { - b.Strategy = &value - return b -} - -// WithWebhook sets the Webhook field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Webhook field is set to the value of the last call. -func (b *CustomResourceConversionApplyConfiguration) WithWebhook(value *WebhookConversionApplyConfiguration) *CustomResourceConversionApplyConfiguration { - b.Webhook = value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/groupresource.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/groupresource.go deleted file mode 100644 index f8972a0fe..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/groupresource.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// GroupResourceApplyConfiguration represents a declarative configuration of the GroupResource type for use -// with apply. -type GroupResourceApplyConfiguration struct { - Group *string `json:"group,omitempty"` - Resource *string `json:"resource,omitempty"` -} - -// GroupResourceApplyConfiguration constructs a declarative configuration of the GroupResource type for use with -// apply. -func GroupResource() *GroupResourceApplyConfiguration { - return &GroupResourceApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *GroupResourceApplyConfiguration) WithGroup(value string) *GroupResourceApplyConfiguration { - b.Group = &value - return b -} - -// WithResource sets the Resource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Resource field is set to the value of the last call. -func (b *GroupResourceApplyConfiguration) WithResource(value string) *GroupResourceApplyConfiguration { - b.Resource = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/localsecretkeyref.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/localsecretkeyref.go deleted file mode 100644 index 0defbb6a8..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/localsecretkeyref.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// LocalSecretKeyRefApplyConfiguration represents a declarative configuration of the LocalSecretKeyRef type for use -// with apply. -type LocalSecretKeyRefApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Key *string `json:"key,omitempty"` -} - -// LocalSecretKeyRefApplyConfiguration constructs a declarative configuration of the LocalSecretKeyRef type for use with -// apply. -func LocalSecretKeyRef() *LocalSecretKeyRefApplyConfiguration { - return &LocalSecretKeyRefApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *LocalSecretKeyRefApplyConfiguration) WithName(value string) *LocalSecretKeyRefApplyConfiguration { - b.Name = &value - return b -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *LocalSecretKeyRefApplyConfiguration) WithKey(value string) *LocalSecretKeyRefApplyConfiguration { - b.Key = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookclientconfig.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookclientconfig.go deleted file mode 100644 index db3b25af1..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookclientconfig.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// WebhookClientConfigApplyConfiguration represents a declarative configuration of the WebhookClientConfig type for use -// with apply. -type WebhookClientConfigApplyConfiguration struct { - URL *string `json:"url,omitempty"` - CABundle []byte `json:"caBundle,omitempty"` -} - -// WebhookClientConfigApplyConfiguration constructs a declarative configuration of the WebhookClientConfig type for use with -// apply. -func WebhookClientConfig() *WebhookClientConfigApplyConfiguration { - return &WebhookClientConfigApplyConfiguration{} -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *WebhookClientConfigApplyConfiguration) WithURL(value string) *WebhookClientConfigApplyConfiguration { - b.URL = &value - return b -} - -// WithCABundle adds the given value to the CABundle field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the CABundle field. -func (b *WebhookClientConfigApplyConfiguration) WithCABundle(values ...byte) *WebhookClientConfigApplyConfiguration { - for i := range values { - b.CABundle = append(b.CABundle, values[i]) - } - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookconversion.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookconversion.go deleted file mode 100644 index 070612d5e..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookconversion.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// WebhookConversionApplyConfiguration represents a declarative configuration of the WebhookConversion type for use -// with apply. -type WebhookConversionApplyConfiguration struct { - ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` - ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty"` -} - -// WebhookConversionApplyConfiguration constructs a declarative configuration of the WebhookConversion type for use with -// apply. -func WebhookConversion() *WebhookConversionApplyConfiguration { - return &WebhookConversionApplyConfiguration{} -} - -// WithClientConfig sets the ClientConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientConfig field is set to the value of the last call. -func (b *WebhookConversionApplyConfiguration) WithClientConfig(value *WebhookClientConfigApplyConfiguration) *WebhookConversionApplyConfiguration { - b.ClientConfig = value - return b -} - -// WithConversionReviewVersions adds the given value to the ConversionReviewVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ConversionReviewVersions field. -func (b *WebhookConversionApplyConfiguration) WithConversionReviewVersions(values ...string) *WebhookConversionApplyConfiguration { - for i := range values { - b.ConversionReviewVersions = append(b.ConversionReviewVersions, values[i]) - } - return b -} diff --git a/sdk/kcp/applyconfiguration/meta/v1/condition.go b/sdk/kcp/applyconfiguration/meta/v1/condition.go deleted file mode 100644 index b0fca3627..000000000 --- a/sdk/kcp/applyconfiguration/meta/v1/condition.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// ConditionApplyConfiguration represents a declarative configuration of the Condition type for use -// with apply. -type ConditionApplyConfiguration struct { - Type *string `json:"type,omitempty"` - Status *metav1.ConditionStatus `json:"status,omitempty"` - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` -} - -// ConditionApplyConfiguration constructs a declarative configuration of the Condition type for use with -// apply. -func Condition() *ConditionApplyConfiguration { - return &ConditionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithType(value string) *ConditionApplyConfiguration { - b.Type = &value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithStatus(value metav1.ConditionStatus) *ConditionApplyConfiguration { - b.Status = &value - return b -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithObservedGeneration(value int64) *ConditionApplyConfiguration { - b.ObservedGeneration = &value - return b -} - -// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastTransitionTime field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *ConditionApplyConfiguration { - b.LastTransitionTime = &value - return b -} - -// WithReason sets the Reason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Reason field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithReason(value string) *ConditionApplyConfiguration { - b.Reason = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *ConditionApplyConfiguration) WithMessage(value string) *ConditionApplyConfiguration { - b.Message = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/meta/v1/deleteoptions.go b/sdk/kcp/applyconfiguration/meta/v1/deleteoptions.go deleted file mode 100644 index 828833245..000000000 --- a/sdk/kcp/applyconfiguration/meta/v1/deleteoptions.go +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// DeleteOptionsApplyConfiguration represents a declarative configuration of the DeleteOptions type for use -// with apply. -type DeleteOptionsApplyConfiguration struct { - TypeMetaApplyConfiguration `json:",inline"` - GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"` - Preconditions *metav1.Preconditions `json:"preconditions,omitempty"` - OrphanDependents *bool `json:"orphanDependents,omitempty"` - PropagationPolicy *metav1.DeletionPropagation `json:"propagationPolicy,omitempty"` - DryRun []string `json:"dryRun,omitempty"` - IgnoreStoreReadErrorWithClusterBreakingPotential *bool `json:"ignoreStoreReadErrorWithClusterBreakingPotential,omitempty"` -} - -// DeleteOptionsApplyConfiguration constructs a declarative configuration of the DeleteOptions type for use with -// apply. -func DeleteOptions() *DeleteOptionsApplyConfiguration { - b := &DeleteOptionsApplyConfiguration{} - b.WithKind("DeleteOptions") - b.WithAPIVersion("meta.k8s.io/v1") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *DeleteOptionsApplyConfiguration) WithKind(value string) *DeleteOptionsApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *DeleteOptionsApplyConfiguration) WithAPIVersion(value string) *DeleteOptionsApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithGracePeriodSeconds sets the GracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GracePeriodSeconds field is set to the value of the last call. -func (b *DeleteOptionsApplyConfiguration) WithGracePeriodSeconds(value int64) *DeleteOptionsApplyConfiguration { - b.GracePeriodSeconds = &value - return b -} - -// WithPreconditions sets the Preconditions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Preconditions field is set to the value of the last call. -func (b *DeleteOptionsApplyConfiguration) WithPreconditions(value metav1.Preconditions) *DeleteOptionsApplyConfiguration { - b.Preconditions = &value - return b -} - -// WithOrphanDependents sets the OrphanDependents field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OrphanDependents field is set to the value of the last call. -func (b *DeleteOptionsApplyConfiguration) WithOrphanDependents(value bool) *DeleteOptionsApplyConfiguration { - b.OrphanDependents = &value - return b -} - -// WithPropagationPolicy sets the PropagationPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PropagationPolicy field is set to the value of the last call. -func (b *DeleteOptionsApplyConfiguration) WithPropagationPolicy(value metav1.DeletionPropagation) *DeleteOptionsApplyConfiguration { - b.PropagationPolicy = &value - return b -} - -// WithDryRun adds the given value to the DryRun field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the DryRun field. -func (b *DeleteOptionsApplyConfiguration) WithDryRun(values ...string) *DeleteOptionsApplyConfiguration { - for i := range values { - b.DryRun = append(b.DryRun, values[i]) - } - return b -} - -// WithIgnoreStoreReadErrorWithClusterBreakingPotential sets the IgnoreStoreReadErrorWithClusterBreakingPotential field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IgnoreStoreReadErrorWithClusterBreakingPotential field is set to the value of the last call. -func (b *DeleteOptionsApplyConfiguration) WithIgnoreStoreReadErrorWithClusterBreakingPotential(value bool) *DeleteOptionsApplyConfiguration { - b.IgnoreStoreReadErrorWithClusterBreakingPotential = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/meta/v1/labelselector.go b/sdk/kcp/applyconfiguration/meta/v1/labelselector.go deleted file mode 100644 index 74ded1b0a..000000000 --- a/sdk/kcp/applyconfiguration/meta/v1/labelselector.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// LabelSelectorApplyConfiguration represents a declarative configuration of the LabelSelector type for use -// with apply. -type LabelSelectorApplyConfiguration struct { - MatchLabels map[string]string `json:"matchLabels,omitempty"` - MatchExpressions []metav1.LabelSelectorRequirementApplyConfiguration `json:"matchExpressions,omitempty"` -} - -// LabelSelectorApplyConfiguration constructs a declarative configuration of the LabelSelector type for use with -// apply. -func LabelSelector() *LabelSelectorApplyConfiguration { - return &LabelSelectorApplyConfiguration{} -} - -// WithMatchLabels puts the entries into the MatchLabels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the MatchLabels field, -// overwriting an existing map entries in MatchLabels field with the same key. -func (b *LabelSelectorApplyConfiguration) WithMatchLabels(entries map[string]string) *LabelSelectorApplyConfiguration { - if b.MatchLabels == nil && len(entries) > 0 { - b.MatchLabels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.MatchLabels[k] = v - } - return b -} - -// WithMatchExpressions adds the given value to the MatchExpressions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MatchExpressions field. -func (b *LabelSelectorApplyConfiguration) WithMatchExpressions(values ...*metav1.LabelSelectorRequirementApplyConfiguration) *LabelSelectorApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithMatchExpressions") - } - b.MatchExpressions = append(b.MatchExpressions, *values[i]) - } - return b -} diff --git a/sdk/kcp/applyconfiguration/meta/v1/labelselectorrequirement.go b/sdk/kcp/applyconfiguration/meta/v1/labelselectorrequirement.go deleted file mode 100644 index 34212638d..000000000 --- a/sdk/kcp/applyconfiguration/meta/v1/labelselectorrequirement.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// LabelSelectorRequirementApplyConfiguration represents a declarative configuration of the LabelSelectorRequirement type for use -// with apply. -type LabelSelectorRequirementApplyConfiguration struct { - Key *string `json:"key,omitempty"` - Operator *metav1.LabelSelectorOperator `json:"operator,omitempty"` - Values []string `json:"values,omitempty"` -} - -// LabelSelectorRequirementApplyConfiguration constructs a declarative configuration of the LabelSelectorRequirement type for use with -// apply. -func LabelSelectorRequirement() *LabelSelectorRequirementApplyConfiguration { - return &LabelSelectorRequirementApplyConfiguration{} -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *LabelSelectorRequirementApplyConfiguration) WithKey(value string) *LabelSelectorRequirementApplyConfiguration { - b.Key = &value - return b -} - -// WithOperator sets the Operator field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Operator field is set to the value of the last call. -func (b *LabelSelectorRequirementApplyConfiguration) WithOperator(value metav1.LabelSelectorOperator) *LabelSelectorRequirementApplyConfiguration { - b.Operator = &value - return b -} - -// WithValues adds the given value to the Values field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Values field. -func (b *LabelSelectorRequirementApplyConfiguration) WithValues(values ...string) *LabelSelectorRequirementApplyConfiguration { - for i := range values { - b.Values = append(b.Values, values[i]) - } - return b -} diff --git a/sdk/kcp/applyconfiguration/meta/v1/managedfieldsentry.go b/sdk/kcp/applyconfiguration/meta/v1/managedfieldsentry.go deleted file mode 100644 index 2ec39be75..000000000 --- a/sdk/kcp/applyconfiguration/meta/v1/managedfieldsentry.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// ManagedFieldsEntryApplyConfiguration represents a declarative configuration of the ManagedFieldsEntry type for use -// with apply. -type ManagedFieldsEntryApplyConfiguration struct { - Manager *string `json:"manager,omitempty"` - Operation *metav1.ManagedFieldsOperationType `json:"operation,omitempty"` - APIVersion *string `json:"apiVersion,omitempty"` - Time *metav1.Time `json:"time,omitempty"` - FieldsType *string `json:"fieldsType,omitempty"` - FieldsV1 *metav1.FieldsV1 `json:"fieldsV1,omitempty"` - Subresource *string `json:"subresource,omitempty"` -} - -// ManagedFieldsEntryApplyConfiguration constructs a declarative configuration of the ManagedFieldsEntry type for use with -// apply. -func ManagedFieldsEntry() *ManagedFieldsEntryApplyConfiguration { - return &ManagedFieldsEntryApplyConfiguration{} -} - -// WithManager sets the Manager field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Manager field is set to the value of the last call. -func (b *ManagedFieldsEntryApplyConfiguration) WithManager(value string) *ManagedFieldsEntryApplyConfiguration { - b.Manager = &value - return b -} - -// WithOperation sets the Operation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Operation field is set to the value of the last call. -func (b *ManagedFieldsEntryApplyConfiguration) WithOperation(value metav1.ManagedFieldsOperationType) *ManagedFieldsEntryApplyConfiguration { - b.Operation = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ManagedFieldsEntryApplyConfiguration) WithAPIVersion(value string) *ManagedFieldsEntryApplyConfiguration { - b.APIVersion = &value - return b -} - -// WithTime sets the Time field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Time field is set to the value of the last call. -func (b *ManagedFieldsEntryApplyConfiguration) WithTime(value metav1.Time) *ManagedFieldsEntryApplyConfiguration { - b.Time = &value - return b -} - -// WithFieldsType sets the FieldsType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FieldsType field is set to the value of the last call. -func (b *ManagedFieldsEntryApplyConfiguration) WithFieldsType(value string) *ManagedFieldsEntryApplyConfiguration { - b.FieldsType = &value - return b -} - -// WithFieldsV1 sets the FieldsV1 field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FieldsV1 field is set to the value of the last call. -func (b *ManagedFieldsEntryApplyConfiguration) WithFieldsV1(value metav1.FieldsV1) *ManagedFieldsEntryApplyConfiguration { - b.FieldsV1 = &value - return b -} - -// WithSubresource sets the Subresource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Subresource field is set to the value of the last call. -func (b *ManagedFieldsEntryApplyConfiguration) WithSubresource(value string) *ManagedFieldsEntryApplyConfiguration { - b.Subresource = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/meta/v1/objectmeta.go b/sdk/kcp/applyconfiguration/meta/v1/objectmeta.go deleted file mode 100644 index 8066b2aa6..000000000 --- a/sdk/kcp/applyconfiguration/meta/v1/objectmeta.go +++ /dev/null @@ -1,176 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" -) - -// ObjectMetaApplyConfiguration represents a declarative configuration of the ObjectMeta type for use -// with apply. -type ObjectMetaApplyConfiguration struct { - Name *string `json:"name,omitempty"` - GenerateName *string `json:"generateName,omitempty"` - Namespace *string `json:"namespace,omitempty"` - UID *types.UID `json:"uid,omitempty"` - ResourceVersion *string `json:"resourceVersion,omitempty"` - Generation *int64 `json:"generation,omitempty"` - CreationTimestamp *metav1.Time `json:"creationTimestamp,omitempty"` - DeletionTimestamp *metav1.Time `json:"deletionTimestamp,omitempty"` - DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty"` - Labels map[string]string `json:"labels,omitempty"` - Annotations map[string]string `json:"annotations,omitempty"` - OwnerReferences []OwnerReferenceApplyConfiguration `json:"ownerReferences,omitempty"` - Finalizers []string `json:"finalizers,omitempty"` -} - -// ObjectMetaApplyConfiguration constructs a declarative configuration of the ObjectMeta type for use with -// apply. -func ObjectMeta() *ObjectMetaApplyConfiguration { - return &ObjectMetaApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ObjectMetaApplyConfiguration) WithName(value string) *ObjectMetaApplyConfiguration { - b.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ObjectMetaApplyConfiguration) WithGenerateName(value string) *ObjectMetaApplyConfiguration { - b.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ObjectMetaApplyConfiguration) WithNamespace(value string) *ObjectMetaApplyConfiguration { - b.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ObjectMetaApplyConfiguration) WithUID(value types.UID) *ObjectMetaApplyConfiguration { - b.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ObjectMetaApplyConfiguration) WithResourceVersion(value string) *ObjectMetaApplyConfiguration { - b.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ObjectMetaApplyConfiguration) WithGeneration(value int64) *ObjectMetaApplyConfiguration { - b.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ObjectMetaApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ObjectMetaApplyConfiguration { - b.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ObjectMetaApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ObjectMetaApplyConfiguration { - b.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ObjectMetaApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ObjectMetaApplyConfiguration { - b.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ObjectMetaApplyConfiguration) WithLabels(entries map[string]string) *ObjectMetaApplyConfiguration { - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ObjectMetaApplyConfiguration) WithAnnotations(entries map[string]string) *ObjectMetaApplyConfiguration { - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ObjectMetaApplyConfiguration) WithOwnerReferences(values ...*OwnerReferenceApplyConfiguration) *ObjectMetaApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ObjectMetaApplyConfiguration) WithFinalizers(values ...string) *ObjectMetaApplyConfiguration { - for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) - } - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ObjectMetaApplyConfiguration) GetName() *string { - return b.Name -} diff --git a/sdk/kcp/applyconfiguration/meta/v1/ownerreference.go b/sdk/kcp/applyconfiguration/meta/v1/ownerreference.go deleted file mode 100644 index acc635e0e..000000000 --- a/sdk/kcp/applyconfiguration/meta/v1/ownerreference.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - types "k8s.io/apimachinery/pkg/types" -) - -// OwnerReferenceApplyConfiguration represents a declarative configuration of the OwnerReference type for use -// with apply. -type OwnerReferenceApplyConfiguration struct { - APIVersion *string `json:"apiVersion,omitempty"` - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` - UID *types.UID `json:"uid,omitempty"` - Controller *bool `json:"controller,omitempty"` - BlockOwnerDeletion *bool `json:"blockOwnerDeletion,omitempty"` -} - -// OwnerReferenceApplyConfiguration constructs a declarative configuration of the OwnerReference type for use with -// apply. -func OwnerReference() *OwnerReferenceApplyConfiguration { - return &OwnerReferenceApplyConfiguration{} -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *OwnerReferenceApplyConfiguration) WithAPIVersion(value string) *OwnerReferenceApplyConfiguration { - b.APIVersion = &value - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *OwnerReferenceApplyConfiguration) WithKind(value string) *OwnerReferenceApplyConfiguration { - b.Kind = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *OwnerReferenceApplyConfiguration) WithName(value string) *OwnerReferenceApplyConfiguration { - b.Name = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *OwnerReferenceApplyConfiguration) WithUID(value types.UID) *OwnerReferenceApplyConfiguration { - b.UID = &value - return b -} - -// WithController sets the Controller field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Controller field is set to the value of the last call. -func (b *OwnerReferenceApplyConfiguration) WithController(value bool) *OwnerReferenceApplyConfiguration { - b.Controller = &value - return b -} - -// WithBlockOwnerDeletion sets the BlockOwnerDeletion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BlockOwnerDeletion field is set to the value of the last call. -func (b *OwnerReferenceApplyConfiguration) WithBlockOwnerDeletion(value bool) *OwnerReferenceApplyConfiguration { - b.BlockOwnerDeletion = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/meta/v1/typemeta.go b/sdk/kcp/applyconfiguration/meta/v1/typemeta.go deleted file mode 100644 index b977d8cf1..000000000 --- a/sdk/kcp/applyconfiguration/meta/v1/typemeta.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// TypeMetaApplyConfiguration represents a declarative configuration of the TypeMeta type for use -// with apply. -type TypeMetaApplyConfiguration struct { - Kind *string `json:"kind,omitempty"` - APIVersion *string `json:"apiVersion,omitempty"` -} - -// TypeMetaApplyConfiguration constructs a declarative configuration of the TypeMeta type for use with -// apply. -func TypeMeta() *TypeMetaApplyConfiguration { - return &TypeMetaApplyConfiguration{} -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *TypeMetaApplyConfiguration) WithKind(value string) *TypeMetaApplyConfiguration { - b.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *TypeMetaApplyConfiguration) WithAPIVersion(value string) *TypeMetaApplyConfiguration { - b.APIVersion = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/utils.go b/sdk/kcp/applyconfiguration/utils.go deleted file mode 100644 index 4e2c03681..000000000 --- a/sdk/kcp/applyconfiguration/utils.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright The Kube Bind 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 applyconfiguration-gen. DO NOT EDIT. - -package applyconfiguration - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" - testing "k8s.io/client-go/testing" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - v1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - v1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" - conditionsv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/conditions/v1alpha1" - internal "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/internal" - applyconfigurationkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - applyconfigurationmetav1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" -) - -// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no -// apply configuration type exists for the given GroupVersionKind. -func ForKind(kind schema.GroupVersionKind) interface{} { - switch kind { - // Group=conditions, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithKind("Condition"): - return &conditionsv1alpha1.ConditionApplyConfiguration{} - - // Group=kube-bind.io, Version=v1alpha1 - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceBinding"): - return &applyconfigurationkubebindv1alpha1.APIServiceBindingApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceBindingSpec"): - return &applyconfigurationkubebindv1alpha1.APIServiceBindingSpecApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceBindingStatus"): - return &applyconfigurationkubebindv1alpha1.APIServiceBindingStatusApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExport"): - return &applyconfigurationkubebindv1alpha1.APIServiceExportApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExportCRDSpec"): - return &applyconfigurationkubebindv1alpha1.APIServiceExportCRDSpecApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExportRequest"): - return &applyconfigurationkubebindv1alpha1.APIServiceExportRequestApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExportRequestResource"): - return &applyconfigurationkubebindv1alpha1.APIServiceExportRequestResourceApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExportRequestSpec"): - return &applyconfigurationkubebindv1alpha1.APIServiceExportRequestSpecApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExportRequestStatus"): - return &applyconfigurationkubebindv1alpha1.APIServiceExportRequestStatusApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExportSchema"): - return &applyconfigurationkubebindv1alpha1.APIServiceExportSchemaApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExportSpec"): - return &applyconfigurationkubebindv1alpha1.APIServiceExportSpecApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExportStatus"): - return &applyconfigurationkubebindv1alpha1.APIServiceExportStatusApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExportVersion"): - return &applyconfigurationkubebindv1alpha1.APIServiceExportVersionApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceNamespace"): - return &applyconfigurationkubebindv1alpha1.APIServiceNamespaceApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceNamespaceStatus"): - return &applyconfigurationkubebindv1alpha1.APIServiceNamespaceStatusApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("ClusterBinding"): - return &applyconfigurationkubebindv1alpha1.ClusterBindingApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("ClusterBindingSpec"): - return &applyconfigurationkubebindv1alpha1.ClusterBindingSpecApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("ClusterBindingStatus"): - return &applyconfigurationkubebindv1alpha1.ClusterBindingStatusApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("ClusterSecretKeyRef"): - return &applyconfigurationkubebindv1alpha1.ClusterSecretKeyRefApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("GroupResource"): - return &applyconfigurationkubebindv1alpha1.GroupResourceApplyConfiguration{} - case kubebindv1alpha1.SchemeGroupVersion.WithKind("LocalSecretKeyRef"): - return &applyconfigurationkubebindv1alpha1.LocalSecretKeyRefApplyConfiguration{} - - // Group=kube-bind.io, Version=v1alpha2 - case v1alpha2.SchemeGroupVersion.WithKind("APIResourceSchema"): - return &kubebindv1alpha2.APIResourceSchemaApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIResourceSchemaCRDSpec"): - return &kubebindv1alpha2.APIResourceSchemaCRDSpecApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIResourceSchemaReference"): - return &kubebindv1alpha2.APIResourceSchemaReferenceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIResourceSchemaSpec"): - return &kubebindv1alpha2.APIResourceSchemaSpecApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIResourceVersion"): - return &kubebindv1alpha2.APIResourceVersionApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIServiceBinding"): - return &kubebindv1alpha2.APIServiceBindingApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIServiceBindingSpec"): - return &kubebindv1alpha2.APIServiceBindingSpecApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIServiceBindingStatus"): - return &kubebindv1alpha2.APIServiceBindingStatusApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIServiceExport"): - return &kubebindv1alpha2.APIServiceExportApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIServiceExportRequest"): - return &kubebindv1alpha2.APIServiceExportRequestApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIServiceExportRequestResource"): - return &kubebindv1alpha2.APIServiceExportRequestResourceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIServiceExportRequestSpec"): - return &kubebindv1alpha2.APIServiceExportRequestSpecApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIServiceExportRequestStatus"): - return &kubebindv1alpha2.APIServiceExportRequestStatusApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIServiceExportSpec"): - return &kubebindv1alpha2.APIServiceExportSpecApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIServiceExportStatus"): - return &kubebindv1alpha2.APIServiceExportStatusApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIServiceNamespace"): - return &kubebindv1alpha2.APIServiceNamespaceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("APIServiceNamespaceStatus"): - return &kubebindv1alpha2.APIServiceNamespaceStatusApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("BoundAPIResourceSchema"): - return &kubebindv1alpha2.BoundAPIResourceSchemaApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("BoundAPIResourceSchemaSpec"): - return &kubebindv1alpha2.BoundAPIResourceSchemaSpecApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("BoundAPIResourceSchemaStatus"): - return &kubebindv1alpha2.BoundAPIResourceSchemaStatusApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("BoundSchemaReference"): - return &kubebindv1alpha2.BoundSchemaReferenceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ClusterBinding"): - return &kubebindv1alpha2.ClusterBindingApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ClusterBindingSpec"): - return &kubebindv1alpha2.ClusterBindingSpecApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ClusterBindingStatus"): - return &kubebindv1alpha2.ClusterBindingStatusApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ClusterSecretKeyRef"): - return &kubebindv1alpha2.ClusterSecretKeyRefApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("CRDVersionSchema"): - return &kubebindv1alpha2.CRDVersionSchemaApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("CustomResourceConversion"): - return &kubebindv1alpha2.CustomResourceConversionApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("GroupResource"): - return &kubebindv1alpha2.GroupResourceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("LocalSecretKeyRef"): - return &kubebindv1alpha2.LocalSecretKeyRefApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("WebhookClientConfig"): - return &kubebindv1alpha2.WebhookClientConfigApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("WebhookConversion"): - return &kubebindv1alpha2.WebhookConversionApplyConfiguration{} - - // Group=meta.k8s.io, Version=v1 - case v1.SchemeGroupVersion.WithKind("Condition"): - return &metav1.ConditionApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("DeleteOptions"): - return &metav1.DeleteOptionsApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("LabelSelector"): - return &metav1.LabelSelectorApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("LabelSelectorRequirement"): - return &metav1.LabelSelectorRequirementApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("ManagedFieldsEntry"): - return &applyconfigurationmetav1.ManagedFieldsEntryApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("ObjectMeta"): - return &applyconfigurationmetav1.ObjectMetaApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("OwnerReference"): - return &applyconfigurationmetav1.OwnerReferenceApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("TypeMeta"): - return &applyconfigurationmetav1.TypeMetaApplyConfiguration{} - - } - return nil -} - -func NewTypeConverter(scheme *runtime.Scheme) *testing.TypeConverter { - return &testing.TypeConverter{Scheme: scheme, TypeResolver: internal.Parser()} -} diff --git a/sdk/kcp/clientset/versioned/clientset.go b/sdk/kcp/clientset/versioned/clientset.go deleted file mode 100644 index 2b9379f71..000000000 --- a/sdk/kcp/clientset/versioned/clientset.go +++ /dev/null @@ -1,155 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package versioned - -import ( - fmt "fmt" - http "net/http" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" - - client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -type ClusterInterface interface { - Cluster(logicalcluster.Path) client.Interface - Discovery() discovery.DiscoveryInterface - KubeBindV1alpha1() kubebindv1alpha1.KubeBindV1alpha1ClusterInterface - KubeBindV1alpha2() kubebindv1alpha2.KubeBindV1alpha2ClusterInterface -} - -// ClusterClientset contains the cluster clients for groups. -type ClusterClientset struct { - *discovery.DiscoveryClient - clientCache kcpclient.Cache[*client.Clientset] - kubeBindV1alpha1 *kubebindv1alpha1.KubeBindV1alpha1ClusterClient - kubeBindV1alpha2 *kubebindv1alpha2.KubeBindV1alpha2ClusterClient -} - -// Discovery retrieves the DiscoveryClient. -func (c *ClusterClientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// KubeBindV1alpha1 retrieves the KubeBindV1alpha1ClusterClient. -func (c *ClusterClientset) KubeBindV1alpha1() kubebindv1alpha1.KubeBindV1alpha1ClusterInterface { - return c.kubeBindV1alpha1 -} - -// KubeBindV1alpha2 retrieves the KubeBindV1alpha2ClusterClient. -func (c *ClusterClientset) KubeBindV1alpha2() kubebindv1alpha2.KubeBindV1alpha2ClusterInterface { - return c.kubeBindV1alpha2 -} - -// Cluster scopes this clientset to one cluster. -func (c *ClusterClientset) Cluster(clusterPath logicalcluster.Path) client.Interface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - return c.clientCache.ClusterOrDie(clusterPath) -} - -// NewForConfig creates a new ClusterClientset 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) (*ClusterClientset, 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 ClusterClientset 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) (*ClusterClientset, 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) - } - - cache := kcpclient.NewCache(c, httpClient, &kcpclient.Constructor[*client.Clientset]{ - NewForConfigAndClient: client.NewForConfigAndClient, - }) - if _, err := cache.Cluster(logicalcluster.Name("root").Path()); err != nil { - return nil, err - } - - var cs ClusterClientset - cs.clientCache = cache - var err error - cs.kubeBindV1alpha1, err = kubebindv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - cs.kubeBindV1alpha2, err = kubebindv1alpha2.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new ClusterClientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ClusterClientset { - cs, err := NewForConfig(c) - if err != nil { - panic(err) - } - return cs -} - -// New creates a new ClusterClientset for the given RESTClient. -func New(c *rest.Config) *ClusterClientset { - var cs ClusterClientset - cs.kubeBindV1alpha1 = kubebindv1alpha1.NewForConfigOrDie(c) - cs.kubeBindV1alpha2 = kubebindv1alpha2.NewForConfigOrDie(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) - return &cs -} diff --git a/sdk/kcp/clientset/versioned/fake/clientset.go b/sdk/kcp/clientset/versioned/fake/clientset.go deleted file mode 100644 index cebc15662..000000000 --- a/sdk/kcp/clientset/versioned/fake/clientset.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcpfakediscovery "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/discovery/fake" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/discovery" - - applyconfiguration "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - kcpclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - kcpclientscheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" - kcpkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" - kcpfakekubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake" - kcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" - kcpfakekubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any field management, validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -// -// DEPRECATED: NewClientset replaces this with support for field management, which significantly improves -// server side apply testing. NewClientset is only available when apply configurations are generated (e.g. -// via --with-applyconfig). -func NewSimpleClientset(objects ...runtime.Object) *ClusterClientset { - o := kcptesting.NewObjectTracker(kcpclientscheme.Scheme, kcpclientscheme.Codecs.UniversalDecoder()) - o.AddAll(objects...) - - cs := &ClusterClientset{Fake: kcptesting.Fake{}, tracker: o} - cs.discovery = &kcpfakediscovery.FakeDiscovery{Fake: &cs.Fake, ClusterPath: logicalcluster.Wildcard} - cs.AddReactor("*", "*", kcptesting.ObjectReaction(o)) - cs.AddWatchReactor("*", kcptesting.WatchReaction(o)) - - return cs -} - -// ClusterClientset contains the clients for groups. -type ClusterClientset struct { - kcptesting.Fake - discovery *kcpfakediscovery.FakeDiscovery - tracker kcptesting.ObjectTracker -} - -var _ kcpclientset.ClusterInterface = (*ClusterClientset)(nil) - -// Discovery retrieves the DiscoveryClient -func (c *ClusterClientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *ClusterClientset) Tracker() kcptesting.ObjectTracker { - return c.tracker -} - -// Cluster scopes this clientset to one cluster. -func (c *ClusterClientset) Cluster(clusterPath logicalcluster.Path) clientset.Interface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - return &Clientset{ - Fake: &c.Fake, - discovery: &kcpfakediscovery.FakeDiscovery{Fake: &c.Fake, ClusterPath: clusterPath}, - tracker: c.tracker.Cluster(clusterPath), - clusterPath: clusterPath, - } -} - -// KubeBindV1alpha1 retrieves the KubeBindV1alpha1ClusterClient -func (c *ClusterClientset) KubeBindV1alpha1() kcpkubebindv1alpha1.KubeBindV1alpha1ClusterInterface { - return &kcpfakekubebindv1alpha1.KubeBindV1alpha1ClusterClient{Fake: &c.Fake} -} - -// KubeBindV1alpha2 retrieves the KubeBindV1alpha2ClusterClient -func (c *ClusterClientset) KubeBindV1alpha2() kcpkubebindv1alpha2.KubeBindV1alpha2ClusterInterface { - return &kcpfakekubebindv1alpha2.KubeBindV1alpha2ClusterClient{Fake: &c.Fake} -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - *kcptesting.Fake - discovery *kcpfakediscovery.FakeDiscovery - tracker kcptesting.ScopedObjectTracker - clusterPath logicalcluster.Path -} - -var ( - _ clientset.Interface = &Clientset{} - _ kcptesting.FakeScopedClient = &Clientset{} -) - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() kcptesting.ScopedObjectTracker { - return c.tracker -} - -// NewClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewClientset(objects ...runtime.Object) *ClusterClientset { - o := kcptesting.NewFieldManagedObjectTracker( - kcpclientscheme.Scheme, - kcpclientscheme.Codecs.UniversalDecoder(), - applyconfiguration.NewTypeConverter(kcpclientscheme.Scheme), - ) - o.AddAll(objects...) - - cs := &ClusterClientset{Fake: kcptesting.Fake{}, tracker: o} - cs.discovery = &kcpfakediscovery.FakeDiscovery{Fake: &cs.Fake, ClusterPath: logicalcluster.Wildcard} - cs.AddReactor("*", "*", kcptesting.ObjectReaction(o)) - cs.AddWatchReactor("*", kcptesting.WatchReaction(o)) - - return cs -} - -// KubeBindV1alpha1 retrieves the KubeBindV1alpha1Client -func (c *Clientset) KubeBindV1alpha1() kubebindv1alpha1.KubeBindV1alpha1Interface { - return &kcpfakekubebindv1alpha1.KubeBindV1alpha1Client{Fake: c.Fake, ClusterPath: c.clusterPath} -} - -// KubeBindV1alpha2 retrieves the KubeBindV1alpha2Client -func (c *Clientset) KubeBindV1alpha2() kubebindv1alpha2.KubeBindV1alpha2Interface { - return &kcpfakekubebindv1alpha2.KubeBindV1alpha2Client{Fake: c.Fake, ClusterPath: c.clusterPath} -} diff --git a/sdk/kcp/clientset/versioned/fake/clientset_generated.go b/sdk/kcp/clientset/versioned/fake/clientset_generated.go deleted file mode 100644 index 3ac2202a7..000000000 --- a/sdk/kcp/clientset/versioned/fake/clientset_generated.go +++ /dev/null @@ -1,130 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/discovery" - fakediscovery "k8s.io/client-go/discovery/fake" - "k8s.io/client-go/testing" - - applyconfiguration "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" - fakekubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" - fakekubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake" -) - -// NewSimpleClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any field management, validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -// -// DEPRECATED: NewClientset replaces this with support for field management, which significantly improves -// server side apply testing. NewClientset is only available when apply configurations are generated (e.g. -// via --with-applyconfig). -func NewSimpleClientset(objects ...runtime.Object) *Clientset { - o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -// Clientset implements clientset.Interface. Meant to be embedded into a -// struct to get a default implementation. This makes faking out just the method -// you want to test easier. -type Clientset struct { - testing.Fake - discovery *fakediscovery.FakeDiscovery - tracker testing.ObjectTracker -} - -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - return c.discovery -} - -func (c *Clientset) Tracker() testing.ObjectTracker { - return c.tracker -} - -// NewClientset returns a clientset that will respond with the provided objects. -// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement -// for a real clientset and is mostly useful in simple unit tests. -func NewClientset(objects ...runtime.Object) *Clientset { - o := testing.NewFieldManagedObjectTracker( - scheme, - codecs.UniversalDecoder(), - applyconfiguration.NewTypeConverter(scheme), - ) - for _, obj := range objects { - if err := o.Add(obj); err != nil { - panic(err) - } - } - - cs := &Clientset{tracker: o} - cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} - cs.AddReactor("*", "*", testing.ObjectReaction(o)) - cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { - gvr := action.GetResource() - ns := action.GetNamespace() - watch, err := o.Watch(gvr, ns) - if err != nil { - return false, nil, err - } - return true, watch, nil - }) - - return cs -} - -var ( - _ clientset.Interface = &Clientset{} - _ testing.FakeClient = &Clientset{} -) - -// KubeBindV1alpha1 retrieves the KubeBindV1alpha1Client -func (c *Clientset) KubeBindV1alpha1() kubebindv1alpha1.KubeBindV1alpha1Interface { - return &fakekubebindv1alpha1.FakeKubeBindV1alpha1{Fake: &c.Fake} -} - -// KubeBindV1alpha2 retrieves the KubeBindV1alpha2Client -func (c *Clientset) KubeBindV1alpha2() kubebindv1alpha2.KubeBindV1alpha2Interface { - return &fakekubebindv1alpha2.FakeKubeBindV1alpha2{Fake: &c.Fake} -} diff --git a/sdk/kcp/clientset/versioned/fake/doc.go b/sdk/kcp/clientset/versioned/fake/doc.go deleted file mode 100644 index 0127325b6..000000000 --- a/sdk/kcp/clientset/versioned/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -// This package has the automatically generated fake clientset. -package fake diff --git a/sdk/kcp/clientset/versioned/fake/register.go b/sdk/kcp/clientset/versioned/fake/register.go deleted file mode 100644 index eb2aeb50a..000000000 --- a/sdk/kcp/clientset/versioned/fake/register.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -var scheme = runtime.NewScheme() -var codecs = serializer.NewCodecFactory(scheme) - -var localSchemeBuilder = runtime.SchemeBuilder{ - kubebindv1alpha1.AddToScheme, - kubebindv1alpha2.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(scheme)) -} diff --git a/sdk/kcp/clientset/versioned/scheme/doc.go b/sdk/kcp/clientset/versioned/scheme/doc.go deleted file mode 100644 index 15f30da06..000000000 --- a/sdk/kcp/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/sdk/kcp/clientset/versioned/scheme/register.go b/sdk/kcp/clientset/versioned/scheme/register.go deleted file mode 100644 index 508797228..000000000 --- a/sdk/kcp/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package scheme - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - kubebindv1alpha1.AddToScheme, - kubebindv1alpha2.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiservicebinding.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiservicebinding.go deleted file mode 100644 index a27137991..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiservicebinding.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" -) - -// APIServiceBindingsClusterGetter has a method to return a APIServiceBindingClusterInterface. -// A group's cluster client should implement this interface. -type APIServiceBindingsClusterGetter interface { - APIServiceBindings() APIServiceBindingClusterInterface -} - -// APIServiceBindingClusterInterface can operate on APIServiceBindings across all clusters, -// or scope down to one cluster and return a APIServiceBindingInterface. -type APIServiceBindingClusterInterface interface { - Cluster(logicalcluster.Path) APIServiceBindingInterface - List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha1.APIServiceBindingList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - APIServiceBindingClusterExpansion -} - -type aPIServiceBindingsClusterInterface struct { - clientCache kcpclient.Cache[*KubeBindV1alpha1Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceBindingsClusterInterface) Cluster(clusterPath logicalcluster.Path) APIServiceBindingInterface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return c.clientCache.ClusterOrDie(clusterPath).APIServiceBindings() -} - -// List returns the entire collection of all APIServiceBindings across all clusters. -func (c *aPIServiceBindingsClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha1.APIServiceBindingList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceBindings().List(ctx, opts) -} - -// Watch begins to watch all APIServiceBindings across all clusters. -func (c *aPIServiceBindingsClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceBindings().Watch(ctx, opts) -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiserviceexport.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiserviceexport.go deleted file mode 100644 index 9950120ba..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiserviceexport.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" -) - -// APIServiceExportsClusterGetter has a method to return a APIServiceExportClusterInterface. -// A group's cluster client should implement this interface. -type APIServiceExportsClusterGetter interface { - APIServiceExports() APIServiceExportClusterInterface -} - -// APIServiceExportClusterInterface can operate on APIServiceExports across all clusters, -// or scope down to one cluster and return a APIServiceExportsNamespacer. -type APIServiceExportClusterInterface interface { - Cluster(logicalcluster.Path) APIServiceExportsNamespacer - List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha1.APIServiceExportList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - APIServiceExportClusterExpansion -} - -type aPIServiceExportsClusterInterface struct { - clientCache kcpclient.Cache[*KubeBindV1alpha1Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceExportsClusterInterface) Cluster(clusterPath logicalcluster.Path) APIServiceExportsNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceExportsNamespacer{clientCache: c.clientCache, clusterPath: clusterPath} -} - -// List returns the entire collection of all APIServiceExports across all clusters. -func (c *aPIServiceExportsClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha1.APIServiceExportList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExports(v1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all APIServiceExports across all clusters. -func (c *aPIServiceExportsClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExports(v1.NamespaceAll).Watch(ctx, opts) -} - -// APIServiceExportsNamespacer can scope to objects within a namespace, returning a APIServiceExportInterface. -type APIServiceExportsNamespacer interface { - Namespace(string) APIServiceExportInterface -} - -type aPIServiceExportsNamespacer struct { - clientCache kcpclient.Cache[*KubeBindV1alpha1Client] - clusterPath logicalcluster.Path -} - -func (n *aPIServiceExportsNamespacer) Namespace(namespace string) APIServiceExportInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).APIServiceExports(namespace) -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiserviceexportrequest.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiserviceexportrequest.go deleted file mode 100644 index 004af9e22..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiserviceexportrequest.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" -) - -// APIServiceExportRequestsClusterGetter has a method to return a APIServiceExportRequestClusterInterface. -// A group's cluster client should implement this interface. -type APIServiceExportRequestsClusterGetter interface { - APIServiceExportRequests() APIServiceExportRequestClusterInterface -} - -// APIServiceExportRequestClusterInterface can operate on APIServiceExportRequests across all clusters, -// or scope down to one cluster and return a APIServiceExportRequestsNamespacer. -type APIServiceExportRequestClusterInterface interface { - Cluster(logicalcluster.Path) APIServiceExportRequestsNamespacer - List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha1.APIServiceExportRequestList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - APIServiceExportRequestClusterExpansion -} - -type aPIServiceExportRequestsClusterInterface struct { - clientCache kcpclient.Cache[*KubeBindV1alpha1Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceExportRequestsClusterInterface) Cluster(clusterPath logicalcluster.Path) APIServiceExportRequestsNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceExportRequestsNamespacer{clientCache: c.clientCache, clusterPath: clusterPath} -} - -// List returns the entire collection of all APIServiceExportRequests across all clusters. -func (c *aPIServiceExportRequestsClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha1.APIServiceExportRequestList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExportRequests(v1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all APIServiceExportRequests across all clusters. -func (c *aPIServiceExportRequestsClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExportRequests(v1.NamespaceAll).Watch(ctx, opts) -} - -// APIServiceExportRequestsNamespacer can scope to objects within a namespace, returning a APIServiceExportRequestInterface. -type APIServiceExportRequestsNamespacer interface { - Namespace(string) APIServiceExportRequestInterface -} - -type aPIServiceExportRequestsNamespacer struct { - clientCache kcpclient.Cache[*KubeBindV1alpha1Client] - clusterPath logicalcluster.Path -} - -func (n *aPIServiceExportRequestsNamespacer) Namespace(namespace string) APIServiceExportRequestInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).APIServiceExportRequests(namespace) -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiservicenamespace.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiservicenamespace.go deleted file mode 100644 index a15c3fc79..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiservicenamespace.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" -) - -// APIServiceNamespacesClusterGetter has a method to return a APIServiceNamespaceClusterInterface. -// A group's cluster client should implement this interface. -type APIServiceNamespacesClusterGetter interface { - APIServiceNamespaces() APIServiceNamespaceClusterInterface -} - -// APIServiceNamespaceClusterInterface can operate on APIServiceNamespaces across all clusters, -// or scope down to one cluster and return a APIServiceNamespacesNamespacer. -type APIServiceNamespaceClusterInterface interface { - Cluster(logicalcluster.Path) APIServiceNamespacesNamespacer - List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha1.APIServiceNamespaceList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - APIServiceNamespaceClusterExpansion -} - -type aPIServiceNamespacesClusterInterface struct { - clientCache kcpclient.Cache[*KubeBindV1alpha1Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceNamespacesClusterInterface) Cluster(clusterPath logicalcluster.Path) APIServiceNamespacesNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceNamespacesNamespacer{clientCache: c.clientCache, clusterPath: clusterPath} -} - -// List returns the entire collection of all APIServiceNamespaces across all clusters. -func (c *aPIServiceNamespacesClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha1.APIServiceNamespaceList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceNamespaces(v1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all APIServiceNamespaces across all clusters. -func (c *aPIServiceNamespacesClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceNamespaces(v1.NamespaceAll).Watch(ctx, opts) -} - -// APIServiceNamespacesNamespacer can scope to objects within a namespace, returning a APIServiceNamespaceInterface. -type APIServiceNamespacesNamespacer interface { - Namespace(string) APIServiceNamespaceInterface -} - -type aPIServiceNamespacesNamespacer struct { - clientCache kcpclient.Cache[*KubeBindV1alpha1Client] - clusterPath logicalcluster.Path -} - -func (n *aPIServiceNamespacesNamespacer) Namespace(namespace string) APIServiceNamespaceInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).APIServiceNamespaces(namespace) -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/clusterbinding.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/clusterbinding.go deleted file mode 100644 index 52f4cc120..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/clusterbinding.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" -) - -// ClusterBindingsClusterGetter has a method to return a ClusterBindingClusterInterface. -// A group's cluster client should implement this interface. -type ClusterBindingsClusterGetter interface { - ClusterBindings() ClusterBindingClusterInterface -} - -// ClusterBindingClusterInterface can operate on ClusterBindings across all clusters, -// or scope down to one cluster and return a ClusterBindingsNamespacer. -type ClusterBindingClusterInterface interface { - Cluster(logicalcluster.Path) ClusterBindingsNamespacer - List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha1.ClusterBindingList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - ClusterBindingClusterExpansion -} - -type clusterBindingsClusterInterface struct { - clientCache kcpclient.Cache[*KubeBindV1alpha1Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *clusterBindingsClusterInterface) Cluster(clusterPath logicalcluster.Path) ClusterBindingsNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &clusterBindingsNamespacer{clientCache: c.clientCache, clusterPath: clusterPath} -} - -// List returns the entire collection of all ClusterBindings across all clusters. -func (c *clusterBindingsClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha1.ClusterBindingList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ClusterBindings(v1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all ClusterBindings across all clusters. -func (c *clusterBindingsClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ClusterBindings(v1.NamespaceAll).Watch(ctx, opts) -} - -// ClusterBindingsNamespacer can scope to objects within a namespace, returning a ClusterBindingInterface. -type ClusterBindingsNamespacer interface { - Namespace(string) ClusterBindingInterface -} - -type clusterBindingsNamespacer struct { - clientCache kcpclient.Cache[*KubeBindV1alpha1Client] - clusterPath logicalcluster.Path -} - -func (n *clusterBindingsNamespacer) Namespace(namespace string) ClusterBindingInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).ClusterBindings(namespace) -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/doc.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/doc.go deleted file mode 100644 index 4e3061938..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiservicebinding.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiservicebinding.go deleted file mode 100644 index edf06f04f..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiservicebinding.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - v1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - typedkcpkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" - typedkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -// aPIServiceBindingClusterClient implements APIServiceBindingClusterInterface -type aPIServiceBindingClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*kubebindv1alpha1.APIServiceBinding, *kubebindv1alpha1.APIServiceBindingList] - Fake *kcptesting.Fake -} - -func newFakeAPIServiceBindingClusterClient(fake *KubeBindV1alpha1ClusterClient) typedkcpkubebindv1alpha1.APIServiceBindingClusterInterface { - return &aPIServiceBindingClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*kubebindv1alpha1.APIServiceBinding, *kubebindv1alpha1.APIServiceBindingList]( - fake.Fake, - kubebindv1alpha1.SchemeGroupVersion.WithResource("apiservicebindings"), - kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceBinding"), - func() *kubebindv1alpha1.APIServiceBinding { return &kubebindv1alpha1.APIServiceBinding{} }, - func() *kubebindv1alpha1.APIServiceBindingList { return &kubebindv1alpha1.APIServiceBindingList{} }, - func(dst, src *kubebindv1alpha1.APIServiceBindingList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha1.APIServiceBindingList) []*kubebindv1alpha1.APIServiceBinding { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha1.APIServiceBindingList, items []*kubebindv1alpha1.APIServiceBinding) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *aPIServiceBindingClusterClient) Cluster(cluster logicalcluster.Path) typedkubebindv1alpha1.APIServiceBindingInterface { - return newFakeAPIServiceBindingClient(c.Fake, cluster) -} - -// aPIServiceBindingScopedClient implements APIServiceBindingInterface -type aPIServiceBindingScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*kubebindv1alpha1.APIServiceBinding, *kubebindv1alpha1.APIServiceBindingList, *v1alpha1.APIServiceBindingApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeAPIServiceBindingClient(fake *kcptesting.Fake, clusterPath logicalcluster.Path) typedkubebindv1alpha1.APIServiceBindingInterface { - return &aPIServiceBindingScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*kubebindv1alpha1.APIServiceBinding, *kubebindv1alpha1.APIServiceBindingList, *v1alpha1.APIServiceBindingApplyConfiguration]( - fake, - clusterPath, - "", - kubebindv1alpha1.SchemeGroupVersion.WithResource("apiservicebindings"), - kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceBinding"), - func() *kubebindv1alpha1.APIServiceBinding { return &kubebindv1alpha1.APIServiceBinding{} }, - func() *kubebindv1alpha1.APIServiceBindingList { return &kubebindv1alpha1.APIServiceBindingList{} }, - func(dst, src *kubebindv1alpha1.APIServiceBindingList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha1.APIServiceBindingList) []*kubebindv1alpha1.APIServiceBinding { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha1.APIServiceBindingList, items []*kubebindv1alpha1.APIServiceBinding) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiserviceexport.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiserviceexport.go deleted file mode 100644 index 74686a123..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiserviceexport.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - v1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - typedkcpkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" - typedkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -// aPIServiceExportClusterClient implements APIServiceExportClusterInterface -type aPIServiceExportClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*kubebindv1alpha1.APIServiceExport, *kubebindv1alpha1.APIServiceExportList] - Fake *kcptesting.Fake -} - -func newFakeAPIServiceExportClusterClient(fake *KubeBindV1alpha1ClusterClient) typedkcpkubebindv1alpha1.APIServiceExportClusterInterface { - return &aPIServiceExportClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*kubebindv1alpha1.APIServiceExport, *kubebindv1alpha1.APIServiceExportList]( - fake.Fake, - kubebindv1alpha1.SchemeGroupVersion.WithResource("apiserviceexports"), - kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExport"), - func() *kubebindv1alpha1.APIServiceExport { return &kubebindv1alpha1.APIServiceExport{} }, - func() *kubebindv1alpha1.APIServiceExportList { return &kubebindv1alpha1.APIServiceExportList{} }, - func(dst, src *kubebindv1alpha1.APIServiceExportList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha1.APIServiceExportList) []*kubebindv1alpha1.APIServiceExport { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha1.APIServiceExportList, items []*kubebindv1alpha1.APIServiceExport) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *aPIServiceExportClusterClient) Cluster(cluster logicalcluster.Path) typedkcpkubebindv1alpha1.APIServiceExportsNamespacer { - return &aPIServiceExportNamespacer{Fake: c.Fake, ClusterPath: cluster} -} - -type aPIServiceExportNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *aPIServiceExportNamespacer) Namespace(namespace string) typedkubebindv1alpha1.APIServiceExportInterface { - return newFakeAPIServiceExportClient(n.Fake, namespace, n.ClusterPath) -} - -// aPIServiceExportScopedClient implements APIServiceExportInterface -type aPIServiceExportScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*kubebindv1alpha1.APIServiceExport, *kubebindv1alpha1.APIServiceExportList, *v1alpha1.APIServiceExportApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeAPIServiceExportClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedkubebindv1alpha1.APIServiceExportInterface { - return &aPIServiceExportScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*kubebindv1alpha1.APIServiceExport, *kubebindv1alpha1.APIServiceExportList, *v1alpha1.APIServiceExportApplyConfiguration]( - fake, - clusterPath, - namespace, - kubebindv1alpha1.SchemeGroupVersion.WithResource("apiserviceexports"), - kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExport"), - func() *kubebindv1alpha1.APIServiceExport { return &kubebindv1alpha1.APIServiceExport{} }, - func() *kubebindv1alpha1.APIServiceExportList { return &kubebindv1alpha1.APIServiceExportList{} }, - func(dst, src *kubebindv1alpha1.APIServiceExportList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha1.APIServiceExportList) []*kubebindv1alpha1.APIServiceExport { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha1.APIServiceExportList, items []*kubebindv1alpha1.APIServiceExport) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiserviceexportrequest.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiserviceexportrequest.go deleted file mode 100644 index 31c60ae56..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiserviceexportrequest.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - v1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - typedkcpkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" - typedkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -// aPIServiceExportRequestClusterClient implements APIServiceExportRequestClusterInterface -type aPIServiceExportRequestClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*kubebindv1alpha1.APIServiceExportRequest, *kubebindv1alpha1.APIServiceExportRequestList] - Fake *kcptesting.Fake -} - -func newFakeAPIServiceExportRequestClusterClient(fake *KubeBindV1alpha1ClusterClient) typedkcpkubebindv1alpha1.APIServiceExportRequestClusterInterface { - return &aPIServiceExportRequestClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*kubebindv1alpha1.APIServiceExportRequest, *kubebindv1alpha1.APIServiceExportRequestList]( - fake.Fake, - kubebindv1alpha1.SchemeGroupVersion.WithResource("apiserviceexportrequests"), - kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExportRequest"), - func() *kubebindv1alpha1.APIServiceExportRequest { return &kubebindv1alpha1.APIServiceExportRequest{} }, - func() *kubebindv1alpha1.APIServiceExportRequestList { - return &kubebindv1alpha1.APIServiceExportRequestList{} - }, - func(dst, src *kubebindv1alpha1.APIServiceExportRequestList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha1.APIServiceExportRequestList) []*kubebindv1alpha1.APIServiceExportRequest { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha1.APIServiceExportRequestList, items []*kubebindv1alpha1.APIServiceExportRequest) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *aPIServiceExportRequestClusterClient) Cluster(cluster logicalcluster.Path) typedkcpkubebindv1alpha1.APIServiceExportRequestsNamespacer { - return &aPIServiceExportRequestNamespacer{Fake: c.Fake, ClusterPath: cluster} -} - -type aPIServiceExportRequestNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *aPIServiceExportRequestNamespacer) Namespace(namespace string) typedkubebindv1alpha1.APIServiceExportRequestInterface { - return newFakeAPIServiceExportRequestClient(n.Fake, namespace, n.ClusterPath) -} - -// aPIServiceExportRequestScopedClient implements APIServiceExportRequestInterface -type aPIServiceExportRequestScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*kubebindv1alpha1.APIServiceExportRequest, *kubebindv1alpha1.APIServiceExportRequestList, *v1alpha1.APIServiceExportRequestApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeAPIServiceExportRequestClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedkubebindv1alpha1.APIServiceExportRequestInterface { - return &aPIServiceExportRequestScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*kubebindv1alpha1.APIServiceExportRequest, *kubebindv1alpha1.APIServiceExportRequestList, *v1alpha1.APIServiceExportRequestApplyConfiguration]( - fake, - clusterPath, - namespace, - kubebindv1alpha1.SchemeGroupVersion.WithResource("apiserviceexportrequests"), - kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceExportRequest"), - func() *kubebindv1alpha1.APIServiceExportRequest { return &kubebindv1alpha1.APIServiceExportRequest{} }, - func() *kubebindv1alpha1.APIServiceExportRequestList { - return &kubebindv1alpha1.APIServiceExportRequestList{} - }, - func(dst, src *kubebindv1alpha1.APIServiceExportRequestList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha1.APIServiceExportRequestList) []*kubebindv1alpha1.APIServiceExportRequest { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha1.APIServiceExportRequestList, items []*kubebindv1alpha1.APIServiceExportRequest) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiservicenamespace.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiservicenamespace.go deleted file mode 100644 index 72ac35173..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiservicenamespace.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - v1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - typedkcpkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" - typedkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -// aPIServiceNamespaceClusterClient implements APIServiceNamespaceClusterInterface -type aPIServiceNamespaceClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*kubebindv1alpha1.APIServiceNamespace, *kubebindv1alpha1.APIServiceNamespaceList] - Fake *kcptesting.Fake -} - -func newFakeAPIServiceNamespaceClusterClient(fake *KubeBindV1alpha1ClusterClient) typedkcpkubebindv1alpha1.APIServiceNamespaceClusterInterface { - return &aPIServiceNamespaceClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*kubebindv1alpha1.APIServiceNamespace, *kubebindv1alpha1.APIServiceNamespaceList]( - fake.Fake, - kubebindv1alpha1.SchemeGroupVersion.WithResource("apiservicenamespaces"), - kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceNamespace"), - func() *kubebindv1alpha1.APIServiceNamespace { return &kubebindv1alpha1.APIServiceNamespace{} }, - func() *kubebindv1alpha1.APIServiceNamespaceList { return &kubebindv1alpha1.APIServiceNamespaceList{} }, - func(dst, src *kubebindv1alpha1.APIServiceNamespaceList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha1.APIServiceNamespaceList) []*kubebindv1alpha1.APIServiceNamespace { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha1.APIServiceNamespaceList, items []*kubebindv1alpha1.APIServiceNamespace) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *aPIServiceNamespaceClusterClient) Cluster(cluster logicalcluster.Path) typedkcpkubebindv1alpha1.APIServiceNamespacesNamespacer { - return &aPIServiceNamespaceNamespacer{Fake: c.Fake, ClusterPath: cluster} -} - -type aPIServiceNamespaceNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *aPIServiceNamespaceNamespacer) Namespace(namespace string) typedkubebindv1alpha1.APIServiceNamespaceInterface { - return newFakeAPIServiceNamespaceClient(n.Fake, namespace, n.ClusterPath) -} - -// aPIServiceNamespaceScopedClient implements APIServiceNamespaceInterface -type aPIServiceNamespaceScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*kubebindv1alpha1.APIServiceNamespace, *kubebindv1alpha1.APIServiceNamespaceList, *v1alpha1.APIServiceNamespaceApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeAPIServiceNamespaceClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedkubebindv1alpha1.APIServiceNamespaceInterface { - return &aPIServiceNamespaceScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*kubebindv1alpha1.APIServiceNamespace, *kubebindv1alpha1.APIServiceNamespaceList, *v1alpha1.APIServiceNamespaceApplyConfiguration]( - fake, - clusterPath, - namespace, - kubebindv1alpha1.SchemeGroupVersion.WithResource("apiservicenamespaces"), - kubebindv1alpha1.SchemeGroupVersion.WithKind("APIServiceNamespace"), - func() *kubebindv1alpha1.APIServiceNamespace { return &kubebindv1alpha1.APIServiceNamespace{} }, - func() *kubebindv1alpha1.APIServiceNamespaceList { return &kubebindv1alpha1.APIServiceNamespaceList{} }, - func(dst, src *kubebindv1alpha1.APIServiceNamespaceList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha1.APIServiceNamespaceList) []*kubebindv1alpha1.APIServiceNamespace { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha1.APIServiceNamespaceList, items []*kubebindv1alpha1.APIServiceNamespace) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/clusterbinding.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/clusterbinding.go deleted file mode 100644 index 54c32a0f8..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/clusterbinding.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - v1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - typedkcpkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" - typedkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -// clusterBindingClusterClient implements ClusterBindingClusterInterface -type clusterBindingClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*kubebindv1alpha1.ClusterBinding, *kubebindv1alpha1.ClusterBindingList] - Fake *kcptesting.Fake -} - -func newFakeClusterBindingClusterClient(fake *KubeBindV1alpha1ClusterClient) typedkcpkubebindv1alpha1.ClusterBindingClusterInterface { - return &clusterBindingClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*kubebindv1alpha1.ClusterBinding, *kubebindv1alpha1.ClusterBindingList]( - fake.Fake, - kubebindv1alpha1.SchemeGroupVersion.WithResource("clusterbindings"), - kubebindv1alpha1.SchemeGroupVersion.WithKind("ClusterBinding"), - func() *kubebindv1alpha1.ClusterBinding { return &kubebindv1alpha1.ClusterBinding{} }, - func() *kubebindv1alpha1.ClusterBindingList { return &kubebindv1alpha1.ClusterBindingList{} }, - func(dst, src *kubebindv1alpha1.ClusterBindingList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha1.ClusterBindingList) []*kubebindv1alpha1.ClusterBinding { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha1.ClusterBindingList, items []*kubebindv1alpha1.ClusterBinding) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *clusterBindingClusterClient) Cluster(cluster logicalcluster.Path) typedkcpkubebindv1alpha1.ClusterBindingsNamespacer { - return &clusterBindingNamespacer{Fake: c.Fake, ClusterPath: cluster} -} - -type clusterBindingNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *clusterBindingNamespacer) Namespace(namespace string) typedkubebindv1alpha1.ClusterBindingInterface { - return newFakeClusterBindingClient(n.Fake, namespace, n.ClusterPath) -} - -// clusterBindingScopedClient implements ClusterBindingInterface -type clusterBindingScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*kubebindv1alpha1.ClusterBinding, *kubebindv1alpha1.ClusterBindingList, *v1alpha1.ClusterBindingApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeClusterBindingClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedkubebindv1alpha1.ClusterBindingInterface { - return &clusterBindingScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*kubebindv1alpha1.ClusterBinding, *kubebindv1alpha1.ClusterBindingList, *v1alpha1.ClusterBindingApplyConfiguration]( - fake, - clusterPath, - namespace, - kubebindv1alpha1.SchemeGroupVersion.WithResource("clusterbindings"), - kubebindv1alpha1.SchemeGroupVersion.WithKind("ClusterBinding"), - func() *kubebindv1alpha1.ClusterBinding { return &kubebindv1alpha1.ClusterBinding{} }, - func() *kubebindv1alpha1.ClusterBindingList { return &kubebindv1alpha1.ClusterBindingList{} }, - func(dst, src *kubebindv1alpha1.ClusterBindingList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha1.ClusterBindingList) []*kubebindv1alpha1.ClusterBinding { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha1.ClusterBindingList, items []*kubebindv1alpha1.ClusterBinding) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/doc.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/doc.go deleted file mode 100644 index 3c4dfa810..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -// Package fake has the automatically generated cluster clients. -package fake diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiservicebinding.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiservicebinding.go deleted file mode 100644 index 95f3cd026..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiservicebinding.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - gentype "k8s.io/client-go/gentype" - - v1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - typedkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -// fakeAPIServiceBindings implements APIServiceBindingInterface -type fakeAPIServiceBindings struct { - *gentype.FakeClientWithListAndApply[*v1alpha1.APIServiceBinding, *v1alpha1.APIServiceBindingList, *kubebindv1alpha1.APIServiceBindingApplyConfiguration] - Fake *FakeKubeBindV1alpha1 -} - -func newFakeAPIServiceBindings(fake *FakeKubeBindV1alpha1) typedkubebindv1alpha1.APIServiceBindingInterface { - return &fakeAPIServiceBindings{ - gentype.NewFakeClientWithListAndApply[*v1alpha1.APIServiceBinding, *v1alpha1.APIServiceBindingList, *kubebindv1alpha1.APIServiceBindingApplyConfiguration]( - fake.Fake, - "", - v1alpha1.SchemeGroupVersion.WithResource("apiservicebindings"), - v1alpha1.SchemeGroupVersion.WithKind("APIServiceBinding"), - func() *v1alpha1.APIServiceBinding { return &v1alpha1.APIServiceBinding{} }, - func() *v1alpha1.APIServiceBindingList { return &v1alpha1.APIServiceBindingList{} }, - func(dst, src *v1alpha1.APIServiceBindingList) { dst.ListMeta = src.ListMeta }, - func(list *v1alpha1.APIServiceBindingList) []*v1alpha1.APIServiceBinding { - return gentype.ToPointerSlice(list.Items) - }, - func(list *v1alpha1.APIServiceBindingList, items []*v1alpha1.APIServiceBinding) { - list.Items = gentype.FromPointerSlice(items) - }, - ), - fake, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiserviceexport.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiserviceexport.go deleted file mode 100644 index b0ee06271..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiserviceexport.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - gentype "k8s.io/client-go/gentype" - - v1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - typedkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -// fakeAPIServiceExports implements APIServiceExportInterface -type fakeAPIServiceExports struct { - *gentype.FakeClientWithListAndApply[*v1alpha1.APIServiceExport, *v1alpha1.APIServiceExportList, *kubebindv1alpha1.APIServiceExportApplyConfiguration] - Fake *FakeKubeBindV1alpha1 -} - -func newFakeAPIServiceExports(fake *FakeKubeBindV1alpha1, namespace string) typedkubebindv1alpha1.APIServiceExportInterface { - return &fakeAPIServiceExports{ - gentype.NewFakeClientWithListAndApply[*v1alpha1.APIServiceExport, *v1alpha1.APIServiceExportList, *kubebindv1alpha1.APIServiceExportApplyConfiguration]( - fake.Fake, - namespace, - v1alpha1.SchemeGroupVersion.WithResource("apiserviceexports"), - v1alpha1.SchemeGroupVersion.WithKind("APIServiceExport"), - func() *v1alpha1.APIServiceExport { return &v1alpha1.APIServiceExport{} }, - func() *v1alpha1.APIServiceExportList { return &v1alpha1.APIServiceExportList{} }, - func(dst, src *v1alpha1.APIServiceExportList) { dst.ListMeta = src.ListMeta }, - func(list *v1alpha1.APIServiceExportList) []*v1alpha1.APIServiceExport { - return gentype.ToPointerSlice(list.Items) - }, - func(list *v1alpha1.APIServiceExportList, items []*v1alpha1.APIServiceExport) { - list.Items = gentype.FromPointerSlice(items) - }, - ), - fake, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiserviceexportrequest.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiserviceexportrequest.go deleted file mode 100644 index e49e01476..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiserviceexportrequest.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - gentype "k8s.io/client-go/gentype" - - v1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - typedkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -// fakeAPIServiceExportRequests implements APIServiceExportRequestInterface -type fakeAPIServiceExportRequests struct { - *gentype.FakeClientWithListAndApply[*v1alpha1.APIServiceExportRequest, *v1alpha1.APIServiceExportRequestList, *kubebindv1alpha1.APIServiceExportRequestApplyConfiguration] - Fake *FakeKubeBindV1alpha1 -} - -func newFakeAPIServiceExportRequests(fake *FakeKubeBindV1alpha1, namespace string) typedkubebindv1alpha1.APIServiceExportRequestInterface { - return &fakeAPIServiceExportRequests{ - gentype.NewFakeClientWithListAndApply[*v1alpha1.APIServiceExportRequest, *v1alpha1.APIServiceExportRequestList, *kubebindv1alpha1.APIServiceExportRequestApplyConfiguration]( - fake.Fake, - namespace, - v1alpha1.SchemeGroupVersion.WithResource("apiserviceexportrequests"), - v1alpha1.SchemeGroupVersion.WithKind("APIServiceExportRequest"), - func() *v1alpha1.APIServiceExportRequest { return &v1alpha1.APIServiceExportRequest{} }, - func() *v1alpha1.APIServiceExportRequestList { return &v1alpha1.APIServiceExportRequestList{} }, - func(dst, src *v1alpha1.APIServiceExportRequestList) { dst.ListMeta = src.ListMeta }, - func(list *v1alpha1.APIServiceExportRequestList) []*v1alpha1.APIServiceExportRequest { - return gentype.ToPointerSlice(list.Items) - }, - func(list *v1alpha1.APIServiceExportRequestList, items []*v1alpha1.APIServiceExportRequest) { - list.Items = gentype.FromPointerSlice(items) - }, - ), - fake, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiservicenamespace.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiservicenamespace.go deleted file mode 100644 index 577869303..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiservicenamespace.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - gentype "k8s.io/client-go/gentype" - - v1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - typedkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -// fakeAPIServiceNamespaces implements APIServiceNamespaceInterface -type fakeAPIServiceNamespaces struct { - *gentype.FakeClientWithListAndApply[*v1alpha1.APIServiceNamespace, *v1alpha1.APIServiceNamespaceList, *kubebindv1alpha1.APIServiceNamespaceApplyConfiguration] - Fake *FakeKubeBindV1alpha1 -} - -func newFakeAPIServiceNamespaces(fake *FakeKubeBindV1alpha1, namespace string) typedkubebindv1alpha1.APIServiceNamespaceInterface { - return &fakeAPIServiceNamespaces{ - gentype.NewFakeClientWithListAndApply[*v1alpha1.APIServiceNamespace, *v1alpha1.APIServiceNamespaceList, *kubebindv1alpha1.APIServiceNamespaceApplyConfiguration]( - fake.Fake, - namespace, - v1alpha1.SchemeGroupVersion.WithResource("apiservicenamespaces"), - v1alpha1.SchemeGroupVersion.WithKind("APIServiceNamespace"), - func() *v1alpha1.APIServiceNamespace { return &v1alpha1.APIServiceNamespace{} }, - func() *v1alpha1.APIServiceNamespaceList { return &v1alpha1.APIServiceNamespaceList{} }, - func(dst, src *v1alpha1.APIServiceNamespaceList) { dst.ListMeta = src.ListMeta }, - func(list *v1alpha1.APIServiceNamespaceList) []*v1alpha1.APIServiceNamespace { - return gentype.ToPointerSlice(list.Items) - }, - func(list *v1alpha1.APIServiceNamespaceList, items []*v1alpha1.APIServiceNamespace) { - list.Items = gentype.FromPointerSlice(items) - }, - ), - fake, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_clusterbinding.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_clusterbinding.go deleted file mode 100644 index 3e5673bb3..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_clusterbinding.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - gentype "k8s.io/client-go/gentype" - - v1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - typedkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -// fakeClusterBindings implements ClusterBindingInterface -type fakeClusterBindings struct { - *gentype.FakeClientWithListAndApply[*v1alpha1.ClusterBinding, *v1alpha1.ClusterBindingList, *kubebindv1alpha1.ClusterBindingApplyConfiguration] - Fake *FakeKubeBindV1alpha1 -} - -func newFakeClusterBindings(fake *FakeKubeBindV1alpha1, namespace string) typedkubebindv1alpha1.ClusterBindingInterface { - return &fakeClusterBindings{ - gentype.NewFakeClientWithListAndApply[*v1alpha1.ClusterBinding, *v1alpha1.ClusterBindingList, *kubebindv1alpha1.ClusterBindingApplyConfiguration]( - fake.Fake, - namespace, - v1alpha1.SchemeGroupVersion.WithResource("clusterbindings"), - v1alpha1.SchemeGroupVersion.WithKind("ClusterBinding"), - func() *v1alpha1.ClusterBinding { return &v1alpha1.ClusterBinding{} }, - func() *v1alpha1.ClusterBindingList { return &v1alpha1.ClusterBindingList{} }, - func(dst, src *v1alpha1.ClusterBindingList) { dst.ListMeta = src.ListMeta }, - func(list *v1alpha1.ClusterBindingList) []*v1alpha1.ClusterBinding { - return gentype.ToPointerSlice(list.Items) - }, - func(list *v1alpha1.ClusterBindingList, items []*v1alpha1.ClusterBinding) { - list.Items = gentype.FromPointerSlice(items) - }, - ), - fake, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_kubebind_client.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_kubebind_client.go deleted file mode 100644 index d537a6a84..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_kubebind_client.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - - v1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -type FakeKubeBindV1alpha1 struct { - *testing.Fake -} - -func (c *FakeKubeBindV1alpha1) APIServiceBindings() v1alpha1.APIServiceBindingInterface { - return newFakeAPIServiceBindings(c) -} - -func (c *FakeKubeBindV1alpha1) APIServiceExports(namespace string) v1alpha1.APIServiceExportInterface { - return newFakeAPIServiceExports(c, namespace) -} - -func (c *FakeKubeBindV1alpha1) APIServiceExportRequests(namespace string) v1alpha1.APIServiceExportRequestInterface { - return newFakeAPIServiceExportRequests(c, namespace) -} - -func (c *FakeKubeBindV1alpha1) APIServiceNamespaces(namespace string) v1alpha1.APIServiceNamespaceInterface { - return newFakeAPIServiceNamespaces(c, namespace) -} - -func (c *FakeKubeBindV1alpha1) ClusterBindings(namespace string) v1alpha1.ClusterBindingInterface { - return newFakeClusterBindings(c, namespace) -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeKubeBindV1alpha1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/kubebind_client.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/kubebind_client.go deleted file mode 100644 index bf6610040..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/kubebind_client.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - rest "k8s.io/client-go/rest" - - kcpkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -var _ kcpkubebindv1alpha1.KubeBindV1alpha1ClusterInterface = (*KubeBindV1alpha1ClusterClient)(nil) - -type KubeBindV1alpha1ClusterClient struct { - *kcptesting.Fake -} - -func (c *KubeBindV1alpha1ClusterClient) Cluster(clusterPath logicalcluster.Path) kubebindv1alpha1.KubeBindV1alpha1Interface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - return &KubeBindV1alpha1Client{Fake: c.Fake, ClusterPath: clusterPath} -} - -func (c *KubeBindV1alpha1ClusterClient) APIServiceBindings() kcpkubebindv1alpha1.APIServiceBindingClusterInterface { - return newFakeAPIServiceBindingClusterClient(c) -} - -func (c *KubeBindV1alpha1ClusterClient) APIServiceExports() kcpkubebindv1alpha1.APIServiceExportClusterInterface { - return newFakeAPIServiceExportClusterClient(c) -} - -func (c *KubeBindV1alpha1ClusterClient) APIServiceExportRequests() kcpkubebindv1alpha1.APIServiceExportRequestClusterInterface { - return newFakeAPIServiceExportRequestClusterClient(c) -} - -func (c *KubeBindV1alpha1ClusterClient) APIServiceNamespaces() kcpkubebindv1alpha1.APIServiceNamespaceClusterInterface { - return newFakeAPIServiceNamespaceClusterClient(c) -} - -func (c *KubeBindV1alpha1ClusterClient) ClusterBindings() kcpkubebindv1alpha1.ClusterBindingClusterInterface { - return newFakeClusterBindingClusterClient(c) -} - -type KubeBindV1alpha1Client struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (c *KubeBindV1alpha1Client) APIServiceBindings() kubebindv1alpha1.APIServiceBindingInterface { - return newFakeAPIServiceBindingClient(c.Fake, c.ClusterPath) -} - -func (c *KubeBindV1alpha1Client) APIServiceExports(namespace string) kubebindv1alpha1.APIServiceExportInterface { - return newFakeAPIServiceExportClient(c.Fake, namespace, c.ClusterPath) -} - -func (c *KubeBindV1alpha1Client) APIServiceExportRequests(namespace string) kubebindv1alpha1.APIServiceExportRequestInterface { - return newFakeAPIServiceExportRequestClient(c.Fake, namespace, c.ClusterPath) -} - -func (c *KubeBindV1alpha1Client) APIServiceNamespaces(namespace string) kubebindv1alpha1.APIServiceNamespaceInterface { - return newFakeAPIServiceNamespaceClient(c.Fake, namespace, c.ClusterPath) -} - -func (c *KubeBindV1alpha1Client) ClusterBindings(namespace string) kubebindv1alpha1.ClusterBindingInterface { - return newFakeClusterBindingClient(c.Fake, namespace, c.ClusterPath) -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *KubeBindV1alpha1Client) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/generated_expansion.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/generated_expansion.go deleted file mode 100644 index 1733e4c0b..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha1 - -type APIServiceBindingClusterExpansion interface{} - -type APIServiceExportClusterExpansion interface{} - -type APIServiceExportRequestClusterExpansion interface{} - -type APIServiceNamespaceClusterExpansion interface{} - -type ClusterBindingClusterExpansion interface{} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/kubebind_client.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/kubebind_client.go deleted file mode 100644 index 11f1bdea3..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/kubebind_client.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - http "net/http" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - rest "k8s.io/client-go/rest" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" -) - -type KubeBindV1alpha1ClusterInterface interface { - KubeBindV1alpha1ClusterScoper - APIServiceBindingsClusterGetter - APIServiceExportsClusterGetter - APIServiceExportRequestsClusterGetter - APIServiceNamespacesClusterGetter - ClusterBindingsClusterGetter -} - -type KubeBindV1alpha1ClusterScoper interface { - Cluster(logicalcluster.Path) KubeBindV1alpha1Interface -} - -// KubeBindV1alpha1ClusterClient is used to interact with features provided by the kube-bind.io group. -type KubeBindV1alpha1ClusterClient struct { - clientCache kcpclient.Cache[*KubeBindV1alpha1Client] -} - -func (c *KubeBindV1alpha1ClusterClient) Cluster(clusterPath logicalcluster.Path) KubeBindV1alpha1Interface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - return c.clientCache.ClusterOrDie(clusterPath) -} - -func (c *KubeBindV1alpha1ClusterClient) APIServiceBindings() APIServiceBindingClusterInterface { - return &aPIServiceBindingsClusterInterface{clientCache: c.clientCache} -} - -func (c *KubeBindV1alpha1ClusterClient) APIServiceExports() APIServiceExportClusterInterface { - return &aPIServiceExportsClusterInterface{clientCache: c.clientCache} -} - -func (c *KubeBindV1alpha1ClusterClient) APIServiceExportRequests() APIServiceExportRequestClusterInterface { - return &aPIServiceExportRequestsClusterInterface{clientCache: c.clientCache} -} - -func (c *KubeBindV1alpha1ClusterClient) APIServiceNamespaces() APIServiceNamespaceClusterInterface { - return &aPIServiceNamespacesClusterInterface{clientCache: c.clientCache} -} - -func (c *KubeBindV1alpha1ClusterClient) ClusterBindings() ClusterBindingClusterInterface { - return &clusterBindingsClusterInterface{clientCache: c.clientCache} -} - -// NewForConfig creates a new KubeBindV1alpha1ClusterClient for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*KubeBindV1alpha1ClusterClient, error) { - config := *c - setConfigDefaults(&config) - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new KubeBindV1alpha1ClusterClient 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) (*KubeBindV1alpha1ClusterClient, error) { - cache := kcpclient.NewCache(c, h, &kcpclient.Constructor[*KubeBindV1alpha1Client]{ - NewForConfigAndClient: NewForConfigAndClient, - }) - if _, err := cache.Cluster(logicalcluster.Name("root").Path()); err != nil { - return nil, err - } - - return &KubeBindV1alpha1ClusterClient{clientCache: cache}, nil -} - -// NewForConfigOrDie creates a new KubeBindV1alpha1ClusterClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *KubeBindV1alpha1ClusterClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -func setConfigDefaults(config *rest.Config) { - gv := kubebindv1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiresourceschema.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiresourceschema.go deleted file mode 100644 index fa40cfa1b..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiresourceschema.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// APIResourceSchemasClusterGetter has a method to return a APIResourceSchemaClusterInterface. -// A group's cluster client should implement this interface. -type APIResourceSchemasClusterGetter interface { - APIResourceSchemas() APIResourceSchemaClusterInterface -} - -// APIResourceSchemaClusterInterface can operate on APIResourceSchemas across all clusters, -// or scope down to one cluster and return a APIResourceSchemaInterface. -type APIResourceSchemaClusterInterface interface { - Cluster(logicalcluster.Path) APIResourceSchemaInterface - List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.APIResourceSchemaList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - APIResourceSchemaClusterExpansion -} - -type aPIResourceSchemasClusterInterface struct { - clientCache kcpclient.Cache[*KubeBindV1alpha2Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIResourceSchemasClusterInterface) Cluster(clusterPath logicalcluster.Path) APIResourceSchemaInterface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return c.clientCache.ClusterOrDie(clusterPath).APIResourceSchemas() -} - -// List returns the entire collection of all APIResourceSchemas across all clusters. -func (c *aPIResourceSchemasClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.APIResourceSchemaList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIResourceSchemas().List(ctx, opts) -} - -// Watch begins to watch all APIResourceSchemas across all clusters. -func (c *aPIResourceSchemasClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIResourceSchemas().Watch(ctx, opts) -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiservicebinding.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiservicebinding.go deleted file mode 100644 index bf94aade3..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiservicebinding.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// APIServiceBindingsClusterGetter has a method to return a APIServiceBindingClusterInterface. -// A group's cluster client should implement this interface. -type APIServiceBindingsClusterGetter interface { - APIServiceBindings() APIServiceBindingClusterInterface -} - -// APIServiceBindingClusterInterface can operate on APIServiceBindings across all clusters, -// or scope down to one cluster and return a APIServiceBindingInterface. -type APIServiceBindingClusterInterface interface { - Cluster(logicalcluster.Path) APIServiceBindingInterface - List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.APIServiceBindingList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - APIServiceBindingClusterExpansion -} - -type aPIServiceBindingsClusterInterface struct { - clientCache kcpclient.Cache[*KubeBindV1alpha2Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceBindingsClusterInterface) Cluster(clusterPath logicalcluster.Path) APIServiceBindingInterface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return c.clientCache.ClusterOrDie(clusterPath).APIServiceBindings() -} - -// List returns the entire collection of all APIServiceBindings across all clusters. -func (c *aPIServiceBindingsClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.APIServiceBindingList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceBindings().List(ctx, opts) -} - -// Watch begins to watch all APIServiceBindings across all clusters. -func (c *aPIServiceBindingsClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceBindings().Watch(ctx, opts) -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiserviceexport.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiserviceexport.go deleted file mode 100644 index a395cb114..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiserviceexport.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// APIServiceExportsClusterGetter has a method to return a APIServiceExportClusterInterface. -// A group's cluster client should implement this interface. -type APIServiceExportsClusterGetter interface { - APIServiceExports() APIServiceExportClusterInterface -} - -// APIServiceExportClusterInterface can operate on APIServiceExports across all clusters, -// or scope down to one cluster and return a APIServiceExportsNamespacer. -type APIServiceExportClusterInterface interface { - Cluster(logicalcluster.Path) APIServiceExportsNamespacer - List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.APIServiceExportList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - APIServiceExportClusterExpansion -} - -type aPIServiceExportsClusterInterface struct { - clientCache kcpclient.Cache[*KubeBindV1alpha2Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceExportsClusterInterface) Cluster(clusterPath logicalcluster.Path) APIServiceExportsNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceExportsNamespacer{clientCache: c.clientCache, clusterPath: clusterPath} -} - -// List returns the entire collection of all APIServiceExports across all clusters. -func (c *aPIServiceExportsClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.APIServiceExportList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExports(v1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all APIServiceExports across all clusters. -func (c *aPIServiceExportsClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExports(v1.NamespaceAll).Watch(ctx, opts) -} - -// APIServiceExportsNamespacer can scope to objects within a namespace, returning a APIServiceExportInterface. -type APIServiceExportsNamespacer interface { - Namespace(string) APIServiceExportInterface -} - -type aPIServiceExportsNamespacer struct { - clientCache kcpclient.Cache[*KubeBindV1alpha2Client] - clusterPath logicalcluster.Path -} - -func (n *aPIServiceExportsNamespacer) Namespace(namespace string) APIServiceExportInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).APIServiceExports(namespace) -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiserviceexportrequest.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiserviceexportrequest.go deleted file mode 100644 index e87cb4ca8..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiserviceexportrequest.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// APIServiceExportRequestsClusterGetter has a method to return a APIServiceExportRequestClusterInterface. -// A group's cluster client should implement this interface. -type APIServiceExportRequestsClusterGetter interface { - APIServiceExportRequests() APIServiceExportRequestClusterInterface -} - -// APIServiceExportRequestClusterInterface can operate on APIServiceExportRequests across all clusters, -// or scope down to one cluster and return a APIServiceExportRequestsNamespacer. -type APIServiceExportRequestClusterInterface interface { - Cluster(logicalcluster.Path) APIServiceExportRequestsNamespacer - List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.APIServiceExportRequestList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - APIServiceExportRequestClusterExpansion -} - -type aPIServiceExportRequestsClusterInterface struct { - clientCache kcpclient.Cache[*KubeBindV1alpha2Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceExportRequestsClusterInterface) Cluster(clusterPath logicalcluster.Path) APIServiceExportRequestsNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceExportRequestsNamespacer{clientCache: c.clientCache, clusterPath: clusterPath} -} - -// List returns the entire collection of all APIServiceExportRequests across all clusters. -func (c *aPIServiceExportRequestsClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.APIServiceExportRequestList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExportRequests(v1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all APIServiceExportRequests across all clusters. -func (c *aPIServiceExportRequestsClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExportRequests(v1.NamespaceAll).Watch(ctx, opts) -} - -// APIServiceExportRequestsNamespacer can scope to objects within a namespace, returning a APIServiceExportRequestInterface. -type APIServiceExportRequestsNamespacer interface { - Namespace(string) APIServiceExportRequestInterface -} - -type aPIServiceExportRequestsNamespacer struct { - clientCache kcpclient.Cache[*KubeBindV1alpha2Client] - clusterPath logicalcluster.Path -} - -func (n *aPIServiceExportRequestsNamespacer) Namespace(namespace string) APIServiceExportRequestInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).APIServiceExportRequests(namespace) -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiservicenamespace.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiservicenamespace.go deleted file mode 100644 index a3f756cf3..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiservicenamespace.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// APIServiceNamespacesClusterGetter has a method to return a APIServiceNamespaceClusterInterface. -// A group's cluster client should implement this interface. -type APIServiceNamespacesClusterGetter interface { - APIServiceNamespaces() APIServiceNamespaceClusterInterface -} - -// APIServiceNamespaceClusterInterface can operate on APIServiceNamespaces across all clusters, -// or scope down to one cluster and return a APIServiceNamespacesNamespacer. -type APIServiceNamespaceClusterInterface interface { - Cluster(logicalcluster.Path) APIServiceNamespacesNamespacer - List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.APIServiceNamespaceList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - APIServiceNamespaceClusterExpansion -} - -type aPIServiceNamespacesClusterInterface struct { - clientCache kcpclient.Cache[*KubeBindV1alpha2Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceNamespacesClusterInterface) Cluster(clusterPath logicalcluster.Path) APIServiceNamespacesNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceNamespacesNamespacer{clientCache: c.clientCache, clusterPath: clusterPath} -} - -// List returns the entire collection of all APIServiceNamespaces across all clusters. -func (c *aPIServiceNamespacesClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.APIServiceNamespaceList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceNamespaces(v1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all APIServiceNamespaces across all clusters. -func (c *aPIServiceNamespacesClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceNamespaces(v1.NamespaceAll).Watch(ctx, opts) -} - -// APIServiceNamespacesNamespacer can scope to objects within a namespace, returning a APIServiceNamespaceInterface. -type APIServiceNamespacesNamespacer interface { - Namespace(string) APIServiceNamespaceInterface -} - -type aPIServiceNamespacesNamespacer struct { - clientCache kcpclient.Cache[*KubeBindV1alpha2Client] - clusterPath logicalcluster.Path -} - -func (n *aPIServiceNamespacesNamespacer) Namespace(namespace string) APIServiceNamespaceInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).APIServiceNamespaces(namespace) -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/boundapiresourceschema.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/boundapiresourceschema.go deleted file mode 100644 index 8c34119b7..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/boundapiresourceschema.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// BoundAPIResourceSchemasClusterGetter has a method to return a BoundAPIResourceSchemaClusterInterface. -// A group's cluster client should implement this interface. -type BoundAPIResourceSchemasClusterGetter interface { - BoundAPIResourceSchemas() BoundAPIResourceSchemaClusterInterface -} - -// BoundAPIResourceSchemaClusterInterface can operate on BoundAPIResourceSchemas across all clusters, -// or scope down to one cluster and return a BoundAPIResourceSchemasNamespacer. -type BoundAPIResourceSchemaClusterInterface interface { - Cluster(logicalcluster.Path) BoundAPIResourceSchemasNamespacer - List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.BoundAPIResourceSchemaList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - BoundAPIResourceSchemaClusterExpansion -} - -type boundAPIResourceSchemasClusterInterface struct { - clientCache kcpclient.Cache[*KubeBindV1alpha2Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *boundAPIResourceSchemasClusterInterface) Cluster(clusterPath logicalcluster.Path) BoundAPIResourceSchemasNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &boundAPIResourceSchemasNamespacer{clientCache: c.clientCache, clusterPath: clusterPath} -} - -// List returns the entire collection of all BoundAPIResourceSchemas across all clusters. -func (c *boundAPIResourceSchemasClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.BoundAPIResourceSchemaList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).BoundAPIResourceSchemas(v1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all BoundAPIResourceSchemas across all clusters. -func (c *boundAPIResourceSchemasClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).BoundAPIResourceSchemas(v1.NamespaceAll).Watch(ctx, opts) -} - -// BoundAPIResourceSchemasNamespacer can scope to objects within a namespace, returning a BoundAPIResourceSchemaInterface. -type BoundAPIResourceSchemasNamespacer interface { - Namespace(string) BoundAPIResourceSchemaInterface -} - -type boundAPIResourceSchemasNamespacer struct { - clientCache kcpclient.Cache[*KubeBindV1alpha2Client] - clusterPath logicalcluster.Path -} - -func (n *boundAPIResourceSchemasNamespacer) Namespace(namespace string) BoundAPIResourceSchemaInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).BoundAPIResourceSchemas(namespace) -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/clusterbinding.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/clusterbinding.go deleted file mode 100644 index 621431bc2..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/clusterbinding.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// ClusterBindingsClusterGetter has a method to return a ClusterBindingClusterInterface. -// A group's cluster client should implement this interface. -type ClusterBindingsClusterGetter interface { - ClusterBindings() ClusterBindingClusterInterface -} - -// ClusterBindingClusterInterface can operate on ClusterBindings across all clusters, -// or scope down to one cluster and return a ClusterBindingsNamespacer. -type ClusterBindingClusterInterface interface { - Cluster(logicalcluster.Path) ClusterBindingsNamespacer - List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.ClusterBindingList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - ClusterBindingClusterExpansion -} - -type clusterBindingsClusterInterface struct { - clientCache kcpclient.Cache[*KubeBindV1alpha2Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *clusterBindingsClusterInterface) Cluster(clusterPath logicalcluster.Path) ClusterBindingsNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &clusterBindingsNamespacer{clientCache: c.clientCache, clusterPath: clusterPath} -} - -// List returns the entire collection of all ClusterBindings across all clusters. -func (c *clusterBindingsClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*kubebindv1alpha2.ClusterBindingList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ClusterBindings(v1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all ClusterBindings across all clusters. -func (c *clusterBindingsClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ClusterBindings(v1.NamespaceAll).Watch(ctx, opts) -} - -// ClusterBindingsNamespacer can scope to objects within a namespace, returning a ClusterBindingInterface. -type ClusterBindingsNamespacer interface { - Namespace(string) ClusterBindingInterface -} - -type clusterBindingsNamespacer struct { - clientCache kcpclient.Cache[*KubeBindV1alpha2Client] - clusterPath logicalcluster.Path -} - -func (n *clusterBindingsNamespacer) Namespace(namespace string) ClusterBindingInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).ClusterBindings(namespace) -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/doc.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/doc.go deleted file mode 100644 index ad8fe059e..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha2 diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiresourceschema.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiresourceschema.go deleted file mode 100644 index 0639dec43..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiresourceschema.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - v1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// aPIResourceSchemaClusterClient implements APIResourceSchemaClusterInterface -type aPIResourceSchemaClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*kubebindv1alpha2.APIResourceSchema, *kubebindv1alpha2.APIResourceSchemaList] - Fake *kcptesting.Fake -} - -func newFakeAPIResourceSchemaClusterClient(fake *KubeBindV1alpha2ClusterClient) typedkcpkubebindv1alpha2.APIResourceSchemaClusterInterface { - return &aPIResourceSchemaClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*kubebindv1alpha2.APIResourceSchema, *kubebindv1alpha2.APIResourceSchemaList]( - fake.Fake, - kubebindv1alpha2.SchemeGroupVersion.WithResource("apiresourceschemas"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("APIResourceSchema"), - func() *kubebindv1alpha2.APIResourceSchema { return &kubebindv1alpha2.APIResourceSchema{} }, - func() *kubebindv1alpha2.APIResourceSchemaList { return &kubebindv1alpha2.APIResourceSchemaList{} }, - func(dst, src *kubebindv1alpha2.APIResourceSchemaList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.APIResourceSchemaList) []*kubebindv1alpha2.APIResourceSchema { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.APIResourceSchemaList, items []*kubebindv1alpha2.APIResourceSchema) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *aPIResourceSchemaClusterClient) Cluster(cluster logicalcluster.Path) typedkubebindv1alpha2.APIResourceSchemaInterface { - return newFakeAPIResourceSchemaClient(c.Fake, cluster) -} - -// aPIResourceSchemaScopedClient implements APIResourceSchemaInterface -type aPIResourceSchemaScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*kubebindv1alpha2.APIResourceSchema, *kubebindv1alpha2.APIResourceSchemaList, *v1alpha2.APIResourceSchemaApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeAPIResourceSchemaClient(fake *kcptesting.Fake, clusterPath logicalcluster.Path) typedkubebindv1alpha2.APIResourceSchemaInterface { - return &aPIResourceSchemaScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*kubebindv1alpha2.APIResourceSchema, *kubebindv1alpha2.APIResourceSchemaList, *v1alpha2.APIResourceSchemaApplyConfiguration]( - fake, - clusterPath, - "", - kubebindv1alpha2.SchemeGroupVersion.WithResource("apiresourceschemas"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("APIResourceSchema"), - func() *kubebindv1alpha2.APIResourceSchema { return &kubebindv1alpha2.APIResourceSchema{} }, - func() *kubebindv1alpha2.APIResourceSchemaList { return &kubebindv1alpha2.APIResourceSchemaList{} }, - func(dst, src *kubebindv1alpha2.APIResourceSchemaList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.APIResourceSchemaList) []*kubebindv1alpha2.APIResourceSchema { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.APIResourceSchemaList, items []*kubebindv1alpha2.APIResourceSchema) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiservicebinding.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiservicebinding.go deleted file mode 100644 index 2de7b8a8d..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiservicebinding.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - v1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// aPIServiceBindingClusterClient implements APIServiceBindingClusterInterface -type aPIServiceBindingClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*kubebindv1alpha2.APIServiceBinding, *kubebindv1alpha2.APIServiceBindingList] - Fake *kcptesting.Fake -} - -func newFakeAPIServiceBindingClusterClient(fake *KubeBindV1alpha2ClusterClient) typedkcpkubebindv1alpha2.APIServiceBindingClusterInterface { - return &aPIServiceBindingClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*kubebindv1alpha2.APIServiceBinding, *kubebindv1alpha2.APIServiceBindingList]( - fake.Fake, - kubebindv1alpha2.SchemeGroupVersion.WithResource("apiservicebindings"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("APIServiceBinding"), - func() *kubebindv1alpha2.APIServiceBinding { return &kubebindv1alpha2.APIServiceBinding{} }, - func() *kubebindv1alpha2.APIServiceBindingList { return &kubebindv1alpha2.APIServiceBindingList{} }, - func(dst, src *kubebindv1alpha2.APIServiceBindingList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.APIServiceBindingList) []*kubebindv1alpha2.APIServiceBinding { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.APIServiceBindingList, items []*kubebindv1alpha2.APIServiceBinding) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *aPIServiceBindingClusterClient) Cluster(cluster logicalcluster.Path) typedkubebindv1alpha2.APIServiceBindingInterface { - return newFakeAPIServiceBindingClient(c.Fake, cluster) -} - -// aPIServiceBindingScopedClient implements APIServiceBindingInterface -type aPIServiceBindingScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*kubebindv1alpha2.APIServiceBinding, *kubebindv1alpha2.APIServiceBindingList, *v1alpha2.APIServiceBindingApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeAPIServiceBindingClient(fake *kcptesting.Fake, clusterPath logicalcluster.Path) typedkubebindv1alpha2.APIServiceBindingInterface { - return &aPIServiceBindingScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*kubebindv1alpha2.APIServiceBinding, *kubebindv1alpha2.APIServiceBindingList, *v1alpha2.APIServiceBindingApplyConfiguration]( - fake, - clusterPath, - "", - kubebindv1alpha2.SchemeGroupVersion.WithResource("apiservicebindings"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("APIServiceBinding"), - func() *kubebindv1alpha2.APIServiceBinding { return &kubebindv1alpha2.APIServiceBinding{} }, - func() *kubebindv1alpha2.APIServiceBindingList { return &kubebindv1alpha2.APIServiceBindingList{} }, - func(dst, src *kubebindv1alpha2.APIServiceBindingList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.APIServiceBindingList) []*kubebindv1alpha2.APIServiceBinding { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.APIServiceBindingList, items []*kubebindv1alpha2.APIServiceBinding) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiserviceexport.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiserviceexport.go deleted file mode 100644 index 5b136a804..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiserviceexport.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - v1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// aPIServiceExportClusterClient implements APIServiceExportClusterInterface -type aPIServiceExportClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*kubebindv1alpha2.APIServiceExport, *kubebindv1alpha2.APIServiceExportList] - Fake *kcptesting.Fake -} - -func newFakeAPIServiceExportClusterClient(fake *KubeBindV1alpha2ClusterClient) typedkcpkubebindv1alpha2.APIServiceExportClusterInterface { - return &aPIServiceExportClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*kubebindv1alpha2.APIServiceExport, *kubebindv1alpha2.APIServiceExportList]( - fake.Fake, - kubebindv1alpha2.SchemeGroupVersion.WithResource("apiserviceexports"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("APIServiceExport"), - func() *kubebindv1alpha2.APIServiceExport { return &kubebindv1alpha2.APIServiceExport{} }, - func() *kubebindv1alpha2.APIServiceExportList { return &kubebindv1alpha2.APIServiceExportList{} }, - func(dst, src *kubebindv1alpha2.APIServiceExportList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.APIServiceExportList) []*kubebindv1alpha2.APIServiceExport { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.APIServiceExportList, items []*kubebindv1alpha2.APIServiceExport) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *aPIServiceExportClusterClient) Cluster(cluster logicalcluster.Path) typedkcpkubebindv1alpha2.APIServiceExportsNamespacer { - return &aPIServiceExportNamespacer{Fake: c.Fake, ClusterPath: cluster} -} - -type aPIServiceExportNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *aPIServiceExportNamespacer) Namespace(namespace string) typedkubebindv1alpha2.APIServiceExportInterface { - return newFakeAPIServiceExportClient(n.Fake, namespace, n.ClusterPath) -} - -// aPIServiceExportScopedClient implements APIServiceExportInterface -type aPIServiceExportScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*kubebindv1alpha2.APIServiceExport, *kubebindv1alpha2.APIServiceExportList, *v1alpha2.APIServiceExportApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeAPIServiceExportClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedkubebindv1alpha2.APIServiceExportInterface { - return &aPIServiceExportScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*kubebindv1alpha2.APIServiceExport, *kubebindv1alpha2.APIServiceExportList, *v1alpha2.APIServiceExportApplyConfiguration]( - fake, - clusterPath, - namespace, - kubebindv1alpha2.SchemeGroupVersion.WithResource("apiserviceexports"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("APIServiceExport"), - func() *kubebindv1alpha2.APIServiceExport { return &kubebindv1alpha2.APIServiceExport{} }, - func() *kubebindv1alpha2.APIServiceExportList { return &kubebindv1alpha2.APIServiceExportList{} }, - func(dst, src *kubebindv1alpha2.APIServiceExportList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.APIServiceExportList) []*kubebindv1alpha2.APIServiceExport { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.APIServiceExportList, items []*kubebindv1alpha2.APIServiceExport) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiserviceexportrequest.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiserviceexportrequest.go deleted file mode 100644 index e162aa5bf..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiserviceexportrequest.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - v1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// aPIServiceExportRequestClusterClient implements APIServiceExportRequestClusterInterface -type aPIServiceExportRequestClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*kubebindv1alpha2.APIServiceExportRequest, *kubebindv1alpha2.APIServiceExportRequestList] - Fake *kcptesting.Fake -} - -func newFakeAPIServiceExportRequestClusterClient(fake *KubeBindV1alpha2ClusterClient) typedkcpkubebindv1alpha2.APIServiceExportRequestClusterInterface { - return &aPIServiceExportRequestClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*kubebindv1alpha2.APIServiceExportRequest, *kubebindv1alpha2.APIServiceExportRequestList]( - fake.Fake, - kubebindv1alpha2.SchemeGroupVersion.WithResource("apiserviceexportrequests"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("APIServiceExportRequest"), - func() *kubebindv1alpha2.APIServiceExportRequest { return &kubebindv1alpha2.APIServiceExportRequest{} }, - func() *kubebindv1alpha2.APIServiceExportRequestList { - return &kubebindv1alpha2.APIServiceExportRequestList{} - }, - func(dst, src *kubebindv1alpha2.APIServiceExportRequestList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.APIServiceExportRequestList) []*kubebindv1alpha2.APIServiceExportRequest { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.APIServiceExportRequestList, items []*kubebindv1alpha2.APIServiceExportRequest) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *aPIServiceExportRequestClusterClient) Cluster(cluster logicalcluster.Path) typedkcpkubebindv1alpha2.APIServiceExportRequestsNamespacer { - return &aPIServiceExportRequestNamespacer{Fake: c.Fake, ClusterPath: cluster} -} - -type aPIServiceExportRequestNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *aPIServiceExportRequestNamespacer) Namespace(namespace string) typedkubebindv1alpha2.APIServiceExportRequestInterface { - return newFakeAPIServiceExportRequestClient(n.Fake, namespace, n.ClusterPath) -} - -// aPIServiceExportRequestScopedClient implements APIServiceExportRequestInterface -type aPIServiceExportRequestScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*kubebindv1alpha2.APIServiceExportRequest, *kubebindv1alpha2.APIServiceExportRequestList, *v1alpha2.APIServiceExportRequestApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeAPIServiceExportRequestClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedkubebindv1alpha2.APIServiceExportRequestInterface { - return &aPIServiceExportRequestScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*kubebindv1alpha2.APIServiceExportRequest, *kubebindv1alpha2.APIServiceExportRequestList, *v1alpha2.APIServiceExportRequestApplyConfiguration]( - fake, - clusterPath, - namespace, - kubebindv1alpha2.SchemeGroupVersion.WithResource("apiserviceexportrequests"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("APIServiceExportRequest"), - func() *kubebindv1alpha2.APIServiceExportRequest { return &kubebindv1alpha2.APIServiceExportRequest{} }, - func() *kubebindv1alpha2.APIServiceExportRequestList { - return &kubebindv1alpha2.APIServiceExportRequestList{} - }, - func(dst, src *kubebindv1alpha2.APIServiceExportRequestList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.APIServiceExportRequestList) []*kubebindv1alpha2.APIServiceExportRequest { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.APIServiceExportRequestList, items []*kubebindv1alpha2.APIServiceExportRequest) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiservicenamespace.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiservicenamespace.go deleted file mode 100644 index 01bf9d590..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiservicenamespace.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - v1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// aPIServiceNamespaceClusterClient implements APIServiceNamespaceClusterInterface -type aPIServiceNamespaceClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*kubebindv1alpha2.APIServiceNamespace, *kubebindv1alpha2.APIServiceNamespaceList] - Fake *kcptesting.Fake -} - -func newFakeAPIServiceNamespaceClusterClient(fake *KubeBindV1alpha2ClusterClient) typedkcpkubebindv1alpha2.APIServiceNamespaceClusterInterface { - return &aPIServiceNamespaceClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*kubebindv1alpha2.APIServiceNamespace, *kubebindv1alpha2.APIServiceNamespaceList]( - fake.Fake, - kubebindv1alpha2.SchemeGroupVersion.WithResource("apiservicenamespaces"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("APIServiceNamespace"), - func() *kubebindv1alpha2.APIServiceNamespace { return &kubebindv1alpha2.APIServiceNamespace{} }, - func() *kubebindv1alpha2.APIServiceNamespaceList { return &kubebindv1alpha2.APIServiceNamespaceList{} }, - func(dst, src *kubebindv1alpha2.APIServiceNamespaceList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.APIServiceNamespaceList) []*kubebindv1alpha2.APIServiceNamespace { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.APIServiceNamespaceList, items []*kubebindv1alpha2.APIServiceNamespace) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *aPIServiceNamespaceClusterClient) Cluster(cluster logicalcluster.Path) typedkcpkubebindv1alpha2.APIServiceNamespacesNamespacer { - return &aPIServiceNamespaceNamespacer{Fake: c.Fake, ClusterPath: cluster} -} - -type aPIServiceNamespaceNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *aPIServiceNamespaceNamespacer) Namespace(namespace string) typedkubebindv1alpha2.APIServiceNamespaceInterface { - return newFakeAPIServiceNamespaceClient(n.Fake, namespace, n.ClusterPath) -} - -// aPIServiceNamespaceScopedClient implements APIServiceNamespaceInterface -type aPIServiceNamespaceScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*kubebindv1alpha2.APIServiceNamespace, *kubebindv1alpha2.APIServiceNamespaceList, *v1alpha2.APIServiceNamespaceApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeAPIServiceNamespaceClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedkubebindv1alpha2.APIServiceNamespaceInterface { - return &aPIServiceNamespaceScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*kubebindv1alpha2.APIServiceNamespace, *kubebindv1alpha2.APIServiceNamespaceList, *v1alpha2.APIServiceNamespaceApplyConfiguration]( - fake, - clusterPath, - namespace, - kubebindv1alpha2.SchemeGroupVersion.WithResource("apiservicenamespaces"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("APIServiceNamespace"), - func() *kubebindv1alpha2.APIServiceNamespace { return &kubebindv1alpha2.APIServiceNamespace{} }, - func() *kubebindv1alpha2.APIServiceNamespaceList { return &kubebindv1alpha2.APIServiceNamespaceList{} }, - func(dst, src *kubebindv1alpha2.APIServiceNamespaceList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.APIServiceNamespaceList) []*kubebindv1alpha2.APIServiceNamespace { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.APIServiceNamespaceList, items []*kubebindv1alpha2.APIServiceNamespace) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/boundapiresourceschema.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/boundapiresourceschema.go deleted file mode 100644 index 825250c18..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/boundapiresourceschema.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - v1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// boundAPIResourceSchemaClusterClient implements BoundAPIResourceSchemaClusterInterface -type boundAPIResourceSchemaClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*kubebindv1alpha2.BoundAPIResourceSchema, *kubebindv1alpha2.BoundAPIResourceSchemaList] - Fake *kcptesting.Fake -} - -func newFakeBoundAPIResourceSchemaClusterClient(fake *KubeBindV1alpha2ClusterClient) typedkcpkubebindv1alpha2.BoundAPIResourceSchemaClusterInterface { - return &boundAPIResourceSchemaClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*kubebindv1alpha2.BoundAPIResourceSchema, *kubebindv1alpha2.BoundAPIResourceSchemaList]( - fake.Fake, - kubebindv1alpha2.SchemeGroupVersion.WithResource("boundapiresourceschemas"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("BoundAPIResourceSchema"), - func() *kubebindv1alpha2.BoundAPIResourceSchema { return &kubebindv1alpha2.BoundAPIResourceSchema{} }, - func() *kubebindv1alpha2.BoundAPIResourceSchemaList { - return &kubebindv1alpha2.BoundAPIResourceSchemaList{} - }, - func(dst, src *kubebindv1alpha2.BoundAPIResourceSchemaList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.BoundAPIResourceSchemaList) []*kubebindv1alpha2.BoundAPIResourceSchema { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.BoundAPIResourceSchemaList, items []*kubebindv1alpha2.BoundAPIResourceSchema) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *boundAPIResourceSchemaClusterClient) Cluster(cluster logicalcluster.Path) typedkcpkubebindv1alpha2.BoundAPIResourceSchemasNamespacer { - return &boundAPIResourceSchemaNamespacer{Fake: c.Fake, ClusterPath: cluster} -} - -type boundAPIResourceSchemaNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *boundAPIResourceSchemaNamespacer) Namespace(namespace string) typedkubebindv1alpha2.BoundAPIResourceSchemaInterface { - return newFakeBoundAPIResourceSchemaClient(n.Fake, namespace, n.ClusterPath) -} - -// boundAPIResourceSchemaScopedClient implements BoundAPIResourceSchemaInterface -type boundAPIResourceSchemaScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*kubebindv1alpha2.BoundAPIResourceSchema, *kubebindv1alpha2.BoundAPIResourceSchemaList, *v1alpha2.BoundAPIResourceSchemaApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeBoundAPIResourceSchemaClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedkubebindv1alpha2.BoundAPIResourceSchemaInterface { - return &boundAPIResourceSchemaScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*kubebindv1alpha2.BoundAPIResourceSchema, *kubebindv1alpha2.BoundAPIResourceSchemaList, *v1alpha2.BoundAPIResourceSchemaApplyConfiguration]( - fake, - clusterPath, - namespace, - kubebindv1alpha2.SchemeGroupVersion.WithResource("boundapiresourceschemas"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("BoundAPIResourceSchema"), - func() *kubebindv1alpha2.BoundAPIResourceSchema { return &kubebindv1alpha2.BoundAPIResourceSchema{} }, - func() *kubebindv1alpha2.BoundAPIResourceSchemaList { - return &kubebindv1alpha2.BoundAPIResourceSchemaList{} - }, - func(dst, src *kubebindv1alpha2.BoundAPIResourceSchemaList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.BoundAPIResourceSchemaList) []*kubebindv1alpha2.BoundAPIResourceSchema { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.BoundAPIResourceSchemaList, items []*kubebindv1alpha2.BoundAPIResourceSchema) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/clusterbinding.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/clusterbinding.go deleted file mode 100644 index 86f65d28d..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/clusterbinding.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - v1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// clusterBindingClusterClient implements ClusterBindingClusterInterface -type clusterBindingClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*kubebindv1alpha2.ClusterBinding, *kubebindv1alpha2.ClusterBindingList] - Fake *kcptesting.Fake -} - -func newFakeClusterBindingClusterClient(fake *KubeBindV1alpha2ClusterClient) typedkcpkubebindv1alpha2.ClusterBindingClusterInterface { - return &clusterBindingClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*kubebindv1alpha2.ClusterBinding, *kubebindv1alpha2.ClusterBindingList]( - fake.Fake, - kubebindv1alpha2.SchemeGroupVersion.WithResource("clusterbindings"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("ClusterBinding"), - func() *kubebindv1alpha2.ClusterBinding { return &kubebindv1alpha2.ClusterBinding{} }, - func() *kubebindv1alpha2.ClusterBindingList { return &kubebindv1alpha2.ClusterBindingList{} }, - func(dst, src *kubebindv1alpha2.ClusterBindingList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.ClusterBindingList) []*kubebindv1alpha2.ClusterBinding { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.ClusterBindingList, items []*kubebindv1alpha2.ClusterBinding) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *clusterBindingClusterClient) Cluster(cluster logicalcluster.Path) typedkcpkubebindv1alpha2.ClusterBindingsNamespacer { - return &clusterBindingNamespacer{Fake: c.Fake, ClusterPath: cluster} -} - -type clusterBindingNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *clusterBindingNamespacer) Namespace(namespace string) typedkubebindv1alpha2.ClusterBindingInterface { - return newFakeClusterBindingClient(n.Fake, namespace, n.ClusterPath) -} - -// clusterBindingScopedClient implements ClusterBindingInterface -type clusterBindingScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*kubebindv1alpha2.ClusterBinding, *kubebindv1alpha2.ClusterBindingList, *v1alpha2.ClusterBindingApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeClusterBindingClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedkubebindv1alpha2.ClusterBindingInterface { - return &clusterBindingScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*kubebindv1alpha2.ClusterBinding, *kubebindv1alpha2.ClusterBindingList, *v1alpha2.ClusterBindingApplyConfiguration]( - fake, - clusterPath, - namespace, - kubebindv1alpha2.SchemeGroupVersion.WithResource("clusterbindings"), - kubebindv1alpha2.SchemeGroupVersion.WithKind("ClusterBinding"), - func() *kubebindv1alpha2.ClusterBinding { return &kubebindv1alpha2.ClusterBinding{} }, - func() *kubebindv1alpha2.ClusterBindingList { return &kubebindv1alpha2.ClusterBindingList{} }, - func(dst, src *kubebindv1alpha2.ClusterBindingList) { dst.ListMeta = src.ListMeta }, - func(list *kubebindv1alpha2.ClusterBindingList) []*kubebindv1alpha2.ClusterBinding { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *kubebindv1alpha2.ClusterBindingList, items []*kubebindv1alpha2.ClusterBinding) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/doc.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/doc.go deleted file mode 100644 index 3c4dfa810..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -// Package fake has the automatically generated cluster clients. -package fake diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiresourceschema.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiresourceschema.go deleted file mode 100644 index 69f866331..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiresourceschema.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - gentype "k8s.io/client-go/gentype" - - v1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// fakeAPIResourceSchemas implements APIResourceSchemaInterface -type fakeAPIResourceSchemas struct { - *gentype.FakeClientWithListAndApply[*v1alpha2.APIResourceSchema, *v1alpha2.APIResourceSchemaList, *kubebindv1alpha2.APIResourceSchemaApplyConfiguration] - Fake *FakeKubeBindV1alpha2 -} - -func newFakeAPIResourceSchemas(fake *FakeKubeBindV1alpha2) typedkubebindv1alpha2.APIResourceSchemaInterface { - return &fakeAPIResourceSchemas{ - gentype.NewFakeClientWithListAndApply[*v1alpha2.APIResourceSchema, *v1alpha2.APIResourceSchemaList, *kubebindv1alpha2.APIResourceSchemaApplyConfiguration]( - fake.Fake, - "", - v1alpha2.SchemeGroupVersion.WithResource("apiresourceschemas"), - v1alpha2.SchemeGroupVersion.WithKind("APIResourceSchema"), - func() *v1alpha2.APIResourceSchema { return &v1alpha2.APIResourceSchema{} }, - func() *v1alpha2.APIResourceSchemaList { return &v1alpha2.APIResourceSchemaList{} }, - func(dst, src *v1alpha2.APIResourceSchemaList) { dst.ListMeta = src.ListMeta }, - func(list *v1alpha2.APIResourceSchemaList) []*v1alpha2.APIResourceSchema { - return gentype.ToPointerSlice(list.Items) - }, - func(list *v1alpha2.APIResourceSchemaList, items []*v1alpha2.APIResourceSchema) { - list.Items = gentype.FromPointerSlice(items) - }, - ), - fake, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiservicebinding.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiservicebinding.go deleted file mode 100644 index c15b43ce2..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiservicebinding.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - gentype "k8s.io/client-go/gentype" - - v1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// fakeAPIServiceBindings implements APIServiceBindingInterface -type fakeAPIServiceBindings struct { - *gentype.FakeClientWithListAndApply[*v1alpha2.APIServiceBinding, *v1alpha2.APIServiceBindingList, *kubebindv1alpha2.APIServiceBindingApplyConfiguration] - Fake *FakeKubeBindV1alpha2 -} - -func newFakeAPIServiceBindings(fake *FakeKubeBindV1alpha2) typedkubebindv1alpha2.APIServiceBindingInterface { - return &fakeAPIServiceBindings{ - gentype.NewFakeClientWithListAndApply[*v1alpha2.APIServiceBinding, *v1alpha2.APIServiceBindingList, *kubebindv1alpha2.APIServiceBindingApplyConfiguration]( - fake.Fake, - "", - v1alpha2.SchemeGroupVersion.WithResource("apiservicebindings"), - v1alpha2.SchemeGroupVersion.WithKind("APIServiceBinding"), - func() *v1alpha2.APIServiceBinding { return &v1alpha2.APIServiceBinding{} }, - func() *v1alpha2.APIServiceBindingList { return &v1alpha2.APIServiceBindingList{} }, - func(dst, src *v1alpha2.APIServiceBindingList) { dst.ListMeta = src.ListMeta }, - func(list *v1alpha2.APIServiceBindingList) []*v1alpha2.APIServiceBinding { - return gentype.ToPointerSlice(list.Items) - }, - func(list *v1alpha2.APIServiceBindingList, items []*v1alpha2.APIServiceBinding) { - list.Items = gentype.FromPointerSlice(items) - }, - ), - fake, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiserviceexport.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiserviceexport.go deleted file mode 100644 index d99e7662a..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiserviceexport.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - gentype "k8s.io/client-go/gentype" - - v1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// fakeAPIServiceExports implements APIServiceExportInterface -type fakeAPIServiceExports struct { - *gentype.FakeClientWithListAndApply[*v1alpha2.APIServiceExport, *v1alpha2.APIServiceExportList, *kubebindv1alpha2.APIServiceExportApplyConfiguration] - Fake *FakeKubeBindV1alpha2 -} - -func newFakeAPIServiceExports(fake *FakeKubeBindV1alpha2, namespace string) typedkubebindv1alpha2.APIServiceExportInterface { - return &fakeAPIServiceExports{ - gentype.NewFakeClientWithListAndApply[*v1alpha2.APIServiceExport, *v1alpha2.APIServiceExportList, *kubebindv1alpha2.APIServiceExportApplyConfiguration]( - fake.Fake, - namespace, - v1alpha2.SchemeGroupVersion.WithResource("apiserviceexports"), - v1alpha2.SchemeGroupVersion.WithKind("APIServiceExport"), - func() *v1alpha2.APIServiceExport { return &v1alpha2.APIServiceExport{} }, - func() *v1alpha2.APIServiceExportList { return &v1alpha2.APIServiceExportList{} }, - func(dst, src *v1alpha2.APIServiceExportList) { dst.ListMeta = src.ListMeta }, - func(list *v1alpha2.APIServiceExportList) []*v1alpha2.APIServiceExport { - return gentype.ToPointerSlice(list.Items) - }, - func(list *v1alpha2.APIServiceExportList, items []*v1alpha2.APIServiceExport) { - list.Items = gentype.FromPointerSlice(items) - }, - ), - fake, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiserviceexportrequest.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiserviceexportrequest.go deleted file mode 100644 index 5fafe4714..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiserviceexportrequest.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - gentype "k8s.io/client-go/gentype" - - v1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// fakeAPIServiceExportRequests implements APIServiceExportRequestInterface -type fakeAPIServiceExportRequests struct { - *gentype.FakeClientWithListAndApply[*v1alpha2.APIServiceExportRequest, *v1alpha2.APIServiceExportRequestList, *kubebindv1alpha2.APIServiceExportRequestApplyConfiguration] - Fake *FakeKubeBindV1alpha2 -} - -func newFakeAPIServiceExportRequests(fake *FakeKubeBindV1alpha2, namespace string) typedkubebindv1alpha2.APIServiceExportRequestInterface { - return &fakeAPIServiceExportRequests{ - gentype.NewFakeClientWithListAndApply[*v1alpha2.APIServiceExportRequest, *v1alpha2.APIServiceExportRequestList, *kubebindv1alpha2.APIServiceExportRequestApplyConfiguration]( - fake.Fake, - namespace, - v1alpha2.SchemeGroupVersion.WithResource("apiserviceexportrequests"), - v1alpha2.SchemeGroupVersion.WithKind("APIServiceExportRequest"), - func() *v1alpha2.APIServiceExportRequest { return &v1alpha2.APIServiceExportRequest{} }, - func() *v1alpha2.APIServiceExportRequestList { return &v1alpha2.APIServiceExportRequestList{} }, - func(dst, src *v1alpha2.APIServiceExportRequestList) { dst.ListMeta = src.ListMeta }, - func(list *v1alpha2.APIServiceExportRequestList) []*v1alpha2.APIServiceExportRequest { - return gentype.ToPointerSlice(list.Items) - }, - func(list *v1alpha2.APIServiceExportRequestList, items []*v1alpha2.APIServiceExportRequest) { - list.Items = gentype.FromPointerSlice(items) - }, - ), - fake, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiservicenamespace.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiservicenamespace.go deleted file mode 100644 index 7236cb901..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiservicenamespace.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - gentype "k8s.io/client-go/gentype" - - v1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// fakeAPIServiceNamespaces implements APIServiceNamespaceInterface -type fakeAPIServiceNamespaces struct { - *gentype.FakeClientWithListAndApply[*v1alpha2.APIServiceNamespace, *v1alpha2.APIServiceNamespaceList, *kubebindv1alpha2.APIServiceNamespaceApplyConfiguration] - Fake *FakeKubeBindV1alpha2 -} - -func newFakeAPIServiceNamespaces(fake *FakeKubeBindV1alpha2, namespace string) typedkubebindv1alpha2.APIServiceNamespaceInterface { - return &fakeAPIServiceNamespaces{ - gentype.NewFakeClientWithListAndApply[*v1alpha2.APIServiceNamespace, *v1alpha2.APIServiceNamespaceList, *kubebindv1alpha2.APIServiceNamespaceApplyConfiguration]( - fake.Fake, - namespace, - v1alpha2.SchemeGroupVersion.WithResource("apiservicenamespaces"), - v1alpha2.SchemeGroupVersion.WithKind("APIServiceNamespace"), - func() *v1alpha2.APIServiceNamespace { return &v1alpha2.APIServiceNamespace{} }, - func() *v1alpha2.APIServiceNamespaceList { return &v1alpha2.APIServiceNamespaceList{} }, - func(dst, src *v1alpha2.APIServiceNamespaceList) { dst.ListMeta = src.ListMeta }, - func(list *v1alpha2.APIServiceNamespaceList) []*v1alpha2.APIServiceNamespace { - return gentype.ToPointerSlice(list.Items) - }, - func(list *v1alpha2.APIServiceNamespaceList, items []*v1alpha2.APIServiceNamespace) { - list.Items = gentype.FromPointerSlice(items) - }, - ), - fake, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_boundapiresourceschema.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_boundapiresourceschema.go deleted file mode 100644 index 166cbd889..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_boundapiresourceschema.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - gentype "k8s.io/client-go/gentype" - - v1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// fakeBoundAPIResourceSchemas implements BoundAPIResourceSchemaInterface -type fakeBoundAPIResourceSchemas struct { - *gentype.FakeClientWithListAndApply[*v1alpha2.BoundAPIResourceSchema, *v1alpha2.BoundAPIResourceSchemaList, *kubebindv1alpha2.BoundAPIResourceSchemaApplyConfiguration] - Fake *FakeKubeBindV1alpha2 -} - -func newFakeBoundAPIResourceSchemas(fake *FakeKubeBindV1alpha2, namespace string) typedkubebindv1alpha2.BoundAPIResourceSchemaInterface { - return &fakeBoundAPIResourceSchemas{ - gentype.NewFakeClientWithListAndApply[*v1alpha2.BoundAPIResourceSchema, *v1alpha2.BoundAPIResourceSchemaList, *kubebindv1alpha2.BoundAPIResourceSchemaApplyConfiguration]( - fake.Fake, - namespace, - v1alpha2.SchemeGroupVersion.WithResource("boundapiresourceschemas"), - v1alpha2.SchemeGroupVersion.WithKind("BoundAPIResourceSchema"), - func() *v1alpha2.BoundAPIResourceSchema { return &v1alpha2.BoundAPIResourceSchema{} }, - func() *v1alpha2.BoundAPIResourceSchemaList { return &v1alpha2.BoundAPIResourceSchemaList{} }, - func(dst, src *v1alpha2.BoundAPIResourceSchemaList) { dst.ListMeta = src.ListMeta }, - func(list *v1alpha2.BoundAPIResourceSchemaList) []*v1alpha2.BoundAPIResourceSchema { - return gentype.ToPointerSlice(list.Items) - }, - func(list *v1alpha2.BoundAPIResourceSchemaList, items []*v1alpha2.BoundAPIResourceSchema) { - list.Items = gentype.FromPointerSlice(items) - }, - ), - fake, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_clusterbinding.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_clusterbinding.go deleted file mode 100644 index 718c8902b..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_clusterbinding.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - gentype "k8s.io/client-go/gentype" - - v1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - typedkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -// fakeClusterBindings implements ClusterBindingInterface -type fakeClusterBindings struct { - *gentype.FakeClientWithListAndApply[*v1alpha2.ClusterBinding, *v1alpha2.ClusterBindingList, *kubebindv1alpha2.ClusterBindingApplyConfiguration] - Fake *FakeKubeBindV1alpha2 -} - -func newFakeClusterBindings(fake *FakeKubeBindV1alpha2, namespace string) typedkubebindv1alpha2.ClusterBindingInterface { - return &fakeClusterBindings{ - gentype.NewFakeClientWithListAndApply[*v1alpha2.ClusterBinding, *v1alpha2.ClusterBindingList, *kubebindv1alpha2.ClusterBindingApplyConfiguration]( - fake.Fake, - namespace, - v1alpha2.SchemeGroupVersion.WithResource("clusterbindings"), - v1alpha2.SchemeGroupVersion.WithKind("ClusterBinding"), - func() *v1alpha2.ClusterBinding { return &v1alpha2.ClusterBinding{} }, - func() *v1alpha2.ClusterBindingList { return &v1alpha2.ClusterBindingList{} }, - func(dst, src *v1alpha2.ClusterBindingList) { dst.ListMeta = src.ListMeta }, - func(list *v1alpha2.ClusterBindingList) []*v1alpha2.ClusterBinding { - return gentype.ToPointerSlice(list.Items) - }, - func(list *v1alpha2.ClusterBindingList, items []*v1alpha2.ClusterBinding) { - list.Items = gentype.FromPointerSlice(items) - }, - ), - fake, - } -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_kubebind_client.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_kubebind_client.go deleted file mode 100644 index 0be3be76e..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_kubebind_client.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright The Kube Bind 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 client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" - - v1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -type FakeKubeBindV1alpha2 struct { - *testing.Fake -} - -func (c *FakeKubeBindV1alpha2) APIResourceSchemas() v1alpha2.APIResourceSchemaInterface { - return newFakeAPIResourceSchemas(c) -} - -func (c *FakeKubeBindV1alpha2) APIServiceBindings() v1alpha2.APIServiceBindingInterface { - return newFakeAPIServiceBindings(c) -} - -func (c *FakeKubeBindV1alpha2) APIServiceExports(namespace string) v1alpha2.APIServiceExportInterface { - return newFakeAPIServiceExports(c, namespace) -} - -func (c *FakeKubeBindV1alpha2) APIServiceExportRequests(namespace string) v1alpha2.APIServiceExportRequestInterface { - return newFakeAPIServiceExportRequests(c, namespace) -} - -func (c *FakeKubeBindV1alpha2) APIServiceNamespaces(namespace string) v1alpha2.APIServiceNamespaceInterface { - return newFakeAPIServiceNamespaces(c, namespace) -} - -func (c *FakeKubeBindV1alpha2) BoundAPIResourceSchemas(namespace string) v1alpha2.BoundAPIResourceSchemaInterface { - return newFakeBoundAPIResourceSchemas(c, namespace) -} - -func (c *FakeKubeBindV1alpha2) ClusterBindings(namespace string) v1alpha2.ClusterBindingInterface { - return newFakeClusterBindings(c, namespace) -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeKubeBindV1alpha2) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/kubebind_client.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/kubebind_client.go deleted file mode 100644 index 73af32ee3..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/kubebind_client.go +++ /dev/null @@ -1,109 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" - rest "k8s.io/client-go/rest" - - kcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -var _ kcpkubebindv1alpha2.KubeBindV1alpha2ClusterInterface = (*KubeBindV1alpha2ClusterClient)(nil) - -type KubeBindV1alpha2ClusterClient struct { - *kcptesting.Fake -} - -func (c *KubeBindV1alpha2ClusterClient) Cluster(clusterPath logicalcluster.Path) kubebindv1alpha2.KubeBindV1alpha2Interface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - return &KubeBindV1alpha2Client{Fake: c.Fake, ClusterPath: clusterPath} -} - -func (c *KubeBindV1alpha2ClusterClient) APIResourceSchemas() kcpkubebindv1alpha2.APIResourceSchemaClusterInterface { - return newFakeAPIResourceSchemaClusterClient(c) -} - -func (c *KubeBindV1alpha2ClusterClient) APIServiceBindings() kcpkubebindv1alpha2.APIServiceBindingClusterInterface { - return newFakeAPIServiceBindingClusterClient(c) -} - -func (c *KubeBindV1alpha2ClusterClient) APIServiceExports() kcpkubebindv1alpha2.APIServiceExportClusterInterface { - return newFakeAPIServiceExportClusterClient(c) -} - -func (c *KubeBindV1alpha2ClusterClient) APIServiceExportRequests() kcpkubebindv1alpha2.APIServiceExportRequestClusterInterface { - return newFakeAPIServiceExportRequestClusterClient(c) -} - -func (c *KubeBindV1alpha2ClusterClient) APIServiceNamespaces() kcpkubebindv1alpha2.APIServiceNamespaceClusterInterface { - return newFakeAPIServiceNamespaceClusterClient(c) -} - -func (c *KubeBindV1alpha2ClusterClient) BoundAPIResourceSchemas() kcpkubebindv1alpha2.BoundAPIResourceSchemaClusterInterface { - return newFakeBoundAPIResourceSchemaClusterClient(c) -} - -func (c *KubeBindV1alpha2ClusterClient) ClusterBindings() kcpkubebindv1alpha2.ClusterBindingClusterInterface { - return newFakeClusterBindingClusterClient(c) -} - -type KubeBindV1alpha2Client struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (c *KubeBindV1alpha2Client) APIResourceSchemas() kubebindv1alpha2.APIResourceSchemaInterface { - return newFakeAPIResourceSchemaClient(c.Fake, c.ClusterPath) -} - -func (c *KubeBindV1alpha2Client) APIServiceBindings() kubebindv1alpha2.APIServiceBindingInterface { - return newFakeAPIServiceBindingClient(c.Fake, c.ClusterPath) -} - -func (c *KubeBindV1alpha2Client) APIServiceExports(namespace string) kubebindv1alpha2.APIServiceExportInterface { - return newFakeAPIServiceExportClient(c.Fake, namespace, c.ClusterPath) -} - -func (c *KubeBindV1alpha2Client) APIServiceExportRequests(namespace string) kubebindv1alpha2.APIServiceExportRequestInterface { - return newFakeAPIServiceExportRequestClient(c.Fake, namespace, c.ClusterPath) -} - -func (c *KubeBindV1alpha2Client) APIServiceNamespaces(namespace string) kubebindv1alpha2.APIServiceNamespaceInterface { - return newFakeAPIServiceNamespaceClient(c.Fake, namespace, c.ClusterPath) -} - -func (c *KubeBindV1alpha2Client) BoundAPIResourceSchemas(namespace string) kubebindv1alpha2.BoundAPIResourceSchemaInterface { - return newFakeBoundAPIResourceSchemaClient(c.Fake, namespace, c.ClusterPath) -} - -func (c *KubeBindV1alpha2Client) ClusterBindings(namespace string) kubebindv1alpha2.ClusterBindingInterface { - return newFakeClusterBindingClient(c.Fake, namespace, c.ClusterPath) -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *KubeBindV1alpha2Client) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/generated_expansion.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/generated_expansion.go deleted file mode 100644 index 4c1bb3238..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/generated_expansion.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha2 - -type APIResourceSchemaClusterExpansion interface{} - -type APIServiceBindingClusterExpansion interface{} - -type APIServiceExportClusterExpansion interface{} - -type APIServiceExportRequestClusterExpansion interface{} - -type APIServiceNamespaceClusterExpansion interface{} - -type BoundAPIResourceSchemaClusterExpansion interface{} - -type ClusterBindingClusterExpansion interface{} diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/kubebind_client.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/kubebind_client.go deleted file mode 100644 index 7b01f377f..000000000 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/kubebind_client.go +++ /dev/null @@ -1,132 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-client-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - http "net/http" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - rest "k8s.io/client-go/rest" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" -) - -type KubeBindV1alpha2ClusterInterface interface { - KubeBindV1alpha2ClusterScoper - APIResourceSchemasClusterGetter - APIServiceBindingsClusterGetter - APIServiceExportsClusterGetter - APIServiceExportRequestsClusterGetter - APIServiceNamespacesClusterGetter - BoundAPIResourceSchemasClusterGetter - ClusterBindingsClusterGetter -} - -type KubeBindV1alpha2ClusterScoper interface { - Cluster(logicalcluster.Path) KubeBindV1alpha2Interface -} - -// KubeBindV1alpha2ClusterClient is used to interact with features provided by the kube-bind.io group. -type KubeBindV1alpha2ClusterClient struct { - clientCache kcpclient.Cache[*KubeBindV1alpha2Client] -} - -func (c *KubeBindV1alpha2ClusterClient) Cluster(clusterPath logicalcluster.Path) KubeBindV1alpha2Interface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - return c.clientCache.ClusterOrDie(clusterPath) -} - -func (c *KubeBindV1alpha2ClusterClient) APIResourceSchemas() APIResourceSchemaClusterInterface { - return &aPIResourceSchemasClusterInterface{clientCache: c.clientCache} -} - -func (c *KubeBindV1alpha2ClusterClient) APIServiceBindings() APIServiceBindingClusterInterface { - return &aPIServiceBindingsClusterInterface{clientCache: c.clientCache} -} - -func (c *KubeBindV1alpha2ClusterClient) APIServiceExports() APIServiceExportClusterInterface { - return &aPIServiceExportsClusterInterface{clientCache: c.clientCache} -} - -func (c *KubeBindV1alpha2ClusterClient) APIServiceExportRequests() APIServiceExportRequestClusterInterface { - return &aPIServiceExportRequestsClusterInterface{clientCache: c.clientCache} -} - -func (c *KubeBindV1alpha2ClusterClient) APIServiceNamespaces() APIServiceNamespaceClusterInterface { - return &aPIServiceNamespacesClusterInterface{clientCache: c.clientCache} -} - -func (c *KubeBindV1alpha2ClusterClient) BoundAPIResourceSchemas() BoundAPIResourceSchemaClusterInterface { - return &boundAPIResourceSchemasClusterInterface{clientCache: c.clientCache} -} - -func (c *KubeBindV1alpha2ClusterClient) ClusterBindings() ClusterBindingClusterInterface { - return &clusterBindingsClusterInterface{clientCache: c.clientCache} -} - -// NewForConfig creates a new KubeBindV1alpha2ClusterClient for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*KubeBindV1alpha2ClusterClient, error) { - config := *c - setConfigDefaults(&config) - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new KubeBindV1alpha2ClusterClient 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) (*KubeBindV1alpha2ClusterClient, error) { - cache := kcpclient.NewCache(c, h, &kcpclient.Constructor[*KubeBindV1alpha2Client]{ - NewForConfigAndClient: NewForConfigAndClient, - }) - if _, err := cache.Cluster(logicalcluster.Name("root").Path()); err != nil { - return nil, err - } - - return &KubeBindV1alpha2ClusterClient{clientCache: cache}, nil -} - -// NewForConfigOrDie creates a new KubeBindV1alpha2ClusterClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *KubeBindV1alpha2ClusterClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -func setConfigDefaults(config *rest.Config) { - gv := kubebindv1alpha2.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } -} diff --git a/sdk/kcp/go.mod b/sdk/kcp/go.mod deleted file mode 100644 index 65e13053e..000000000 --- a/sdk/kcp/go.mod +++ /dev/null @@ -1,53 +0,0 @@ -module github.com/kube-bind/kube-bind/sdk/kcp - -go 1.23.0 - -toolchain go1.23.4 - -require ( - github.com/kube-bind/kube-bind/sdk/apis v0.0.0-20250620125133-1a40ef5c5d27 - k8s.io/api v0.32.0 - k8s.io/apiextensions-apiserver v0.32.0 - k8s.io/apimachinery v0.32.0 - k8s.io/client-go v0.32.0 - sigs.k8s.io/structured-merge-diff/v4 v4.5.0 -) - -require ( - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.23.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.4 // indirect - github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.6.0 // indirect - github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/x448/float16 v0.8.4 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/term v0.25.0 // indirect - golang.org/x/text v0.19.0 // indirect - golang.org/x/time v0.7.0 // indirect - google.golang.org/protobuf v1.35.1 // indirect - gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect - gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect - k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect - sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect -) diff --git a/sdk/kcp/go.sum b/sdk/kcp/go.sum deleted file mode 100644 index 464dd694b..000000000 --- a/sdk/kcp/go.sum +++ /dev/null @@ -1,158 +0,0 @@ -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= -github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= -github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kube-bind/kube-bind/sdk/apis v0.0.0-20250620125133-1a40ef5c5d27 h1:8RDkGnYk8I9rEnJ28a95HWyScRYB3jDTyrWg8DeNCP4= -github.com/kube-bind/kube-bind/sdk/apis v0.0.0-20250620125133-1a40ef5c5d27/go.mod h1:COUBv76wlboisdscwddVH/L2hIG65RAAe1ZC7SG31VA= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= -github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= -github.com/onsi/gomega v1.36.1 h1:bJDPBO7ibjxcbHMgSCoo4Yj18UWbKDlLwX1x9sybDcw= -github.com/onsi/gomega v1.36.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= -github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= -github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= -golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= -golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= -google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= -gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.32.0 h1:OL9JpbvAU5ny9ga2fb24X8H6xQlVp+aJMFlgtQjR9CE= -k8s.io/api v0.32.0/go.mod h1:4LEwHZEf6Q/cG96F3dqR965sYOfmPM7rq81BLgsE0p0= -k8s.io/apiextensions-apiserver v0.32.0 h1:S0Xlqt51qzzqjKPxfgX1xh4HBZE+p8KKBq+k2SWNOE0= -k8s.io/apiextensions-apiserver v0.32.0/go.mod h1:86hblMvN5yxMvZrZFX2OhIHAuFIMJIZ19bTvzkP+Fmw= -k8s.io/apimachinery v0.32.0 h1:cFSE7N3rmEEtv4ei5X6DaJPHHX0C+upp+v5lVPiEwpg= -k8s.io/apimachinery v0.32.0/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/client-go v0.32.0 h1:DimtMcnN/JIKZcrSrstiwvvZvLjG0aSxy8PxN8IChp8= -k8s.io/client-go v0.32.0/go.mod h1:boDWvdM1Drk4NJj/VddSLnx59X3OPgwrOo0vGbtq9+8= -k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= -k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= -k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= -k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0= -k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= -sigs.k8s.io/structured-merge-diff/v4 v4.5.0 h1:nbCitCK2hfnhyiKo6uf2HxUPTCodY6Qaf85SbDIaMBk= -sigs.k8s.io/structured-merge-diff/v4 v4.5.0/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/sdk/kcp/informers/externalversions/factory.go b/sdk/kcp/informers/externalversions/factory.go deleted file mode 100644 index 1f32993e4..000000000 --- a/sdk/kcp/informers/externalversions/factory.go +++ /dev/null @@ -1,433 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package externalversions - -import ( - reflect "reflect" - sync "sync" - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" - - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebind "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/kubebind" -) - -// SharedInformerOption defines the functional option type for SharedInformerFactory. -type SharedInformerOption func(*SharedInformerOptions) *SharedInformerOptions - -type SharedInformerOptions struct { - customResync map[reflect.Type]time.Duration - tweakListOptions internalinterfaces.TweakListOptionsFunc - transform cache.TransformFunc - namespace string -} - -type sharedInformerFactory struct { - client versioned.ClusterInterface - tweakListOptions internalinterfaces.TweakListOptionsFunc - lock sync.Mutex - defaultResync time.Duration - customResync map[reflect.Type]time.Duration - transform cache.TransformFunc - - informers map[reflect.Type]kcpcache.ScopeableSharedIndexInformer - // startedInformers is used for tracking which informers have been started. - // This allows Start() to be called multiple times safely. - startedInformers map[reflect.Type]bool - // wg tracks how many goroutines were started. - wg sync.WaitGroup - // shuttingDown is true when Shutdown has been called. It may still be running - // because it needs to wait for goroutines. - shuttingDown bool -} - -// WithCustomResyncConfig sets a custom resync period for the specified informer types. -func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { - return func(opts *SharedInformerOptions) *SharedInformerOptions { - for k, v := range resyncConfig { - opts.customResync[reflect.TypeOf(k)] = v - } - return opts - } -} - -// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. -func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { - return func(opts *SharedInformerOptions) *SharedInformerOptions { - opts.tweakListOptions = tweakListOptions - return opts - } -} - -// WithTransform sets a transform on all informers. -func WithTransform(transform cache.TransformFunc) SharedInformerOption { - return func(opts *SharedInformerOptions) *SharedInformerOptions { - opts.transform = transform - return opts - } -} - -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. -func NewSharedInformerFactory(client versioned.ClusterInterface, defaultResync time.Duration) SharedInformerFactory { - return NewSharedInformerFactoryWithOptions(client, defaultResync) -} - -// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. -// Listers obtained via this SharedInformerFactory will be subject to the same filters -// as specified here. -// Deprecated: Please use NewSharedInformerFactoryWithOptions instead -func NewFilteredSharedInformerFactory(client versioned.ClusterInterface, defaultResync time.Duration, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { - return NewSharedInformerFactoryWithOptions(client, defaultResync, WithTweakListOptions(tweakListOptions)) -} - -// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. -func NewSharedInformerFactoryWithOptions(client versioned.ClusterInterface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { - factory := &sharedInformerFactory{ - client: client, - defaultResync: defaultResync, - informers: make(map[reflect.Type]kcpcache.ScopeableSharedIndexInformer), - startedInformers: make(map[reflect.Type]bool), - customResync: make(map[reflect.Type]time.Duration), - } - - opts := &SharedInformerOptions{ - customResync: make(map[reflect.Type]time.Duration), - } - - // Apply all options - for _, opt := range options { - opts = opt(opts) - } - - // Forward options to the factory - factory.customResync = opts.customResync - factory.tweakListOptions = opts.tweakListOptions - factory.transform = opts.transform - - return factory -} - -func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { - f.lock.Lock() - defer f.lock.Unlock() - - if f.shuttingDown { - return - } - - for informerType, informer := range f.informers { - if !f.startedInformers[informerType] { - f.wg.Add(1) - // We need a new variable in each loop iteration, - // otherwise the goroutine would use the loop variable - // and that keeps changing. - informer := informer - go func() { - defer f.wg.Done() - informer.Run(stopCh) - }() - f.startedInformers[informerType] = true - } - } -} - -func (f *sharedInformerFactory) Shutdown() { - f.lock.Lock() - f.shuttingDown = true - f.lock.Unlock() - - // Will return immediately if there is nothing to wait for. - f.wg.Wait() -} - -func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { - informers := func() map[reflect.Type]kcpcache.ScopeableSharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informers := map[reflect.Type]kcpcache.ScopeableSharedIndexInformer{} - for informerType, informer := range f.informers { - if f.startedInformers[informerType] { - informers[informerType] = informer - } - } - return informers - }() - - res := map[reflect.Type]bool{} - for informType, informer := range informers { - res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) - } - - return res -} - -// InformerFor returns the ScopeableSharedIndexInformer for obj using an internal client. -func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) kcpcache.ScopeableSharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informerType := reflect.TypeOf(obj) - informer, exists := f.informers[informerType] - if exists { - return informer - } - - resyncPeriod, exists := f.customResync[informerType] - if !exists { - resyncPeriod = f.defaultResync - } - - informer = newFunc(f.client, resyncPeriod) - informer.SetTransform(f.transform) - f.informers[informerType] = informer - - return informer -} - -type ScopedDynamicSharedInformerFactory interface { - // ForResource gives generic access to a shared informer of the matching type. - ForResource(resource schema.GroupVersionResource) (GenericInformer, error) - - // Start initializes all requested informers. They are handled in goroutines - // which run until the stop channel gets closed. - Start(stopCh <-chan struct{}) -} - -// SharedInformerFactory provides shared informers for resources in all known -// API group versions. -// -// It is typically used like this: -// -// ctx, cancel := context.Background() -// defer cancel() -// factory := NewSharedInformerFactory(client, resyncPeriod) -// defer factory.WaitForStop() // Returns immediately if nothing was started. -// genericInformer := factory.ForResource(resource) -// typedInformer := factory.SomeAPIGroup().V1().SomeType() -// factory.Start(ctx.Done()) // Start processing these informers. -// synced := factory.WaitForCacheSync(ctx.Done()) -// for v, ok := range synced { -// if !ok { -// fmt.Fprintf(os.Stderr, "caches failed to sync: %v", v) -// return -// } -// } -// -// // Creating informers can also be created after Start, but then -// // Start must be called again: -// anotherGenericInformer := factory.ForResource(resource) -// factory.Start(ctx.Done()) -type SharedInformerFactory interface { - internalinterfaces.SharedInformerFactory - - Cluster(logicalcluster.Name) ScopedDynamicSharedInformerFactory - - // Start initializes all requested informers. They are handled in goroutines - // which run until the stop channel gets closed. - // Warning: Start does not block. When run in a go-routine, it will race with a later WaitForCacheSync. - Start(stopCh <-chan struct{}) - - // Shutdown marks a factory as shutting down. At that point no new - // informers can be started anymore and Start will return without - // doing anything. - // - // In addition, Shutdown blocks until all goroutines have terminated. For that - // to happen, the close channel(s) that they were started with must be closed, - // either before Shutdown gets called or while it is waiting. - // - // Shutdown may be called multiple times, even concurrently. All such calls will - // block until all goroutines have terminated. - Shutdown() - - // WaitForCacheSync blocks until all started informers' caches were synced - // or the stop channel gets closed. - WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - - // ForResource gives generic access to a shared informer of the matching type. - ForResource(resource schema.GroupVersionResource) (GenericClusterInformer, error) - - // InformerFor returns the SharedIndexInformer for obj using an internal - // client. - InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) kcpcache.ScopeableSharedIndexInformer - - KubeBind() kubebind.ClusterInterface -} - -func (f *sharedInformerFactory) KubeBind() kubebind.ClusterInterface { - return kubebind.New(f, f.tweakListOptions) -} - -func (f *sharedInformerFactory) Cluster(clusterName logicalcluster.Name) ScopedDynamicSharedInformerFactory { - return &scopedDynamicSharedInformerFactory{ - sharedInformerFactory: f, - clusterName: clusterName, - } -} - -type scopedDynamicSharedInformerFactory struct { - *sharedInformerFactory - clusterName logicalcluster.Name -} - -func (f *scopedDynamicSharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { - clusterInformer, err := f.sharedInformerFactory.ForResource(resource) - if err != nil { - return nil, err - } - return clusterInformer.Cluster(f.clusterName), nil -} - -func (f *scopedDynamicSharedInformerFactory) Start(stopCh <-chan struct{}) { - f.sharedInformerFactory.Start(stopCh) -} - -// WithNamespace limits the SharedInformerFactory to the specified namespace. -func WithNamespace(namespace string) SharedInformerOption { - return func(opts *SharedInformerOptions) *SharedInformerOptions { - opts.namespace = namespace - return opts - } -} - -type sharedScopedInformerFactory struct { - client versioned.Interface - tweakListOptions internalinterfaces.TweakListOptionsFunc - lock sync.Mutex - defaultResync time.Duration - customResync map[reflect.Type]time.Duration - transform cache.TransformFunc - namespace string - - informers map[reflect.Type]cache.SharedIndexInformer - // startedInformers is used for tracking which informers have been started. - // This allows Start() to be called multiple times safely. - startedInformers map[reflect.Type]bool -} - -// NewSharedScopedInformerFactory constructs a new instance of SharedInformerFactory for some or all namespaces. -func NewSharedScopedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string) SharedScopedInformerFactory { - return NewSharedScopedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace)) -} - -// NewSharedScopedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. -func NewSharedScopedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedScopedInformerFactory { - factory := &sharedScopedInformerFactory{ - client: client, - defaultResync: defaultResync, - informers: make(map[reflect.Type]cache.SharedIndexInformer), - startedInformers: make(map[reflect.Type]bool), - customResync: make(map[reflect.Type]time.Duration), - } - - opts := &SharedInformerOptions{ - customResync: make(map[reflect.Type]time.Duration), - } - - // Apply all options - for _, opt := range options { - opts = opt(opts) - } - - // Forward options to the factory - factory.customResync = opts.customResync - factory.tweakListOptions = opts.tweakListOptions - factory.namespace = opts.namespace - - return factory -} - -// Start initializes all requested informers. -func (f *sharedScopedInformerFactory) Start(stopCh <-chan struct{}) { - f.lock.Lock() - defer f.lock.Unlock() - - for informerType, informer := range f.informers { - if !f.startedInformers[informerType] { - go informer.Run(stopCh) - f.startedInformers[informerType] = true - } - } -} - -// WaitForCacheSync waits for all started informers' cache were synced. -func (f *sharedScopedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { - informers := func() map[reflect.Type]cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informers := map[reflect.Type]cache.SharedIndexInformer{} - for informerType, informer := range f.informers { - if f.startedInformers[informerType] { - informers[informerType] = informer - } - } - return informers - }() - - res := map[reflect.Type]bool{} - for informType, informer := range informers { - res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) - } - return res -} - -// InformerFor returns the SharedIndexInformer for obj. -func (f *sharedScopedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewScopedInformerFunc) cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informerType := reflect.TypeOf(obj) - informer, exists := f.informers[informerType] - if exists { - return informer - } - - resyncPeriod, exists := f.customResync[informerType] - if !exists { - resyncPeriod = f.defaultResync - } - - informer = newFunc(f.client, resyncPeriod) - informer.SetTransform(f.transform) - f.informers[informerType] = informer - - return informer -} - -// SharedScopedInformerFactory provides shared informers for resources in all known -// API group versions, scoped to one workspace. -type SharedScopedInformerFactory interface { - internalinterfaces.SharedScopedInformerFactory - ForResource(resource schema.GroupVersionResource) (GenericInformer, error) - WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - - KubeBind() kubebind.Interface -} - -func (f *sharedScopedInformerFactory) KubeBind() kubebind.Interface { - return kubebind.NewScoped(f, f.namespace, f.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/generic.go b/sdk/kcp/informers/externalversions/generic.go deleted file mode 100644 index ffe1bfa7e..000000000 --- a/sdk/kcp/informers/externalversions/generic.go +++ /dev/null @@ -1,177 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package externalversions - -import ( - context "context" - fmt "fmt" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" - - v1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - v1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -type GenericClusterInformer interface { - Cluster(logicalcluster.Name) GenericInformer - ClusterWithContext(context.Context, logicalcluster.Name) GenericInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kcpcache.GenericClusterLister -} - -type GenericInformer interface { - Informer() cache.SharedIndexInformer - Lister() cache.GenericLister -} - -type genericClusterInformer struct { - informer kcpcache.ScopeableSharedIndexInformer - resource schema.GroupResource -} - -// Informer returns the SharedIndexInformer. -func (i *genericClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.informer -} - -// Lister returns the GenericLister. -func (i *genericClusterInformer) Lister() kcpcache.GenericClusterLister { - return kcpcache.NewGenericClusterLister(i.Informer().GetIndexer(), i.resource) -} - -// Cluster scopes to a GenericInformer. -func (i *genericClusterInformer) Cluster(clusterName logicalcluster.Name) GenericInformer { - return &genericInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().ByCluster(clusterName), - } -} - -// ClusterWithContext scopes to a GenericInformer and unregisters all -// handles registered through it once the provided context is canceled. -func (i *genericClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) GenericInformer { - return &genericInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().ByCluster(clusterName), - } -} - -type genericInformer struct { - informer cache.SharedIndexInformer - lister cache.GenericLister -} - -// Informer returns the SharedIndexInformer. -func (i *genericInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -// Lister returns the GenericLister. -func (i *genericInformer) Lister() cache.GenericLister { - return i.lister -} - -// ForResource gives generic access to a shared informer of the matching type -// TODO extend this to unknown resources with a client pool -func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericClusterInformer, error) { - switch resource { - // Group=kube-bind.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("apiservicebindings"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha1().APIServiceBindings().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("apiserviceexports"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha1().APIServiceExports().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("apiserviceexportrequests"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha1().APIServiceExportRequests().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("apiservicenamespaces"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha1().APIServiceNamespaces().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("clusterbindings"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha1().ClusterBindings().Informer()}, nil - - // Group=kube-bind.io, Version=v1alpha2 - case v1alpha2.SchemeGroupVersion.WithResource("apiresourceschemas"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha2().APIResourceSchemas().Informer()}, nil - case v1alpha2.SchemeGroupVersion.WithResource("apiservicebindings"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha2().APIServiceBindings().Informer()}, nil - case v1alpha2.SchemeGroupVersion.WithResource("apiserviceexports"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha2().APIServiceExports().Informer()}, nil - case v1alpha2.SchemeGroupVersion.WithResource("apiserviceexportrequests"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha2().APIServiceExportRequests().Informer()}, nil - case v1alpha2.SchemeGroupVersion.WithResource("apiservicenamespaces"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha2().APIServiceNamespaces().Informer()}, nil - case v1alpha2.SchemeGroupVersion.WithResource("boundapiresourceschemas"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha2().BoundAPIResourceSchemas().Informer()}, nil - case v1alpha2.SchemeGroupVersion.WithResource("clusterbindings"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha2().ClusterBindings().Informer()}, nil - - } - - return nil, fmt.Errorf("no informer found for %v", resource) -} - -// ForResource gives generic access to a shared informer of the matching type -// TODO extend this to unknown resources with a client pool -func (f *sharedScopedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { - switch resource { - // Group=kube-bind.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("apiservicebindings"): - informer := f.KubeBind().V1alpha1().APIServiceBindings().Informer() - return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case v1alpha1.SchemeGroupVersion.WithResource("apiserviceexports"): - informer := f.KubeBind().V1alpha1().APIServiceExports().Informer() - return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case v1alpha1.SchemeGroupVersion.WithResource("apiserviceexportrequests"): - informer := f.KubeBind().V1alpha1().APIServiceExportRequests().Informer() - return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case v1alpha1.SchemeGroupVersion.WithResource("apiservicenamespaces"): - informer := f.KubeBind().V1alpha1().APIServiceNamespaces().Informer() - return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case v1alpha1.SchemeGroupVersion.WithResource("clusterbindings"): - informer := f.KubeBind().V1alpha1().ClusterBindings().Informer() - return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - - // Group=kube-bind.io, Version=v1alpha2 - case v1alpha2.SchemeGroupVersion.WithResource("apiresourceschemas"): - informer := f.KubeBind().V1alpha2().APIResourceSchemas().Informer() - return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case v1alpha2.SchemeGroupVersion.WithResource("apiservicebindings"): - informer := f.KubeBind().V1alpha2().APIServiceBindings().Informer() - return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case v1alpha2.SchemeGroupVersion.WithResource("apiserviceexports"): - informer := f.KubeBind().V1alpha2().APIServiceExports().Informer() - return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case v1alpha2.SchemeGroupVersion.WithResource("apiserviceexportrequests"): - informer := f.KubeBind().V1alpha2().APIServiceExportRequests().Informer() - return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case v1alpha2.SchemeGroupVersion.WithResource("apiservicenamespaces"): - informer := f.KubeBind().V1alpha2().APIServiceNamespaces().Informer() - return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case v1alpha2.SchemeGroupVersion.WithResource("boundapiresourceschemas"): - informer := f.KubeBind().V1alpha2().BoundAPIResourceSchemas().Informer() - return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case v1alpha2.SchemeGroupVersion.WithResource("clusterbindings"): - informer := f.KubeBind().V1alpha2().ClusterBindings().Informer() - return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - - } - - return nil, fmt.Errorf("no informer found for %v", resource) -} diff --git a/sdk/kcp/informers/externalversions/internalinterfaces/factory_interfaces.go b/sdk/kcp/informers/externalversions/internalinterfaces/factory_interfaces.go deleted file mode 100644 index a4a0d0249..000000000 --- a/sdk/kcp/informers/externalversions/internalinterfaces/factory_interfaces.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package internalinterfaces - -import ( - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - cache "k8s.io/client-go/tools/cache" - - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" -) - -// TweakListOptionsFunc is a function that transforms a v1.ListOptions. -type TweakListOptionsFunc func(*v1.ListOptions) - -// NewInformerFunc takes versioned.ClusterInterface and time.Duration to return a kcpcache.ScopeableSharedIndexInformer. -type NewInformerFunc func(versioned.ClusterInterface, time.Duration) kcpcache.ScopeableSharedIndexInformer - -// SharedInformerFactory a small interface to allow for adding an informer without an import cycle. -type SharedInformerFactory interface { - Start(stopCh <-chan struct{}) - InformerFor(obj runtime.Object, newFunc NewInformerFunc) kcpcache.ScopeableSharedIndexInformer -} - -// NewScopedInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. -type NewScopedInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer - -// SharedScopedInformerFactory a small interface to allow for adding an informer without an import cycle. -type SharedScopedInformerFactory interface { - Start(stopCh <-chan struct{}) - InformerFor(obj runtime.Object, newFunc NewScopedInformerFunc) cache.SharedIndexInformer -} diff --git a/sdk/kcp/informers/externalversions/kubebind/interface.go b/sdk/kcp/informers/externalversions/kubebind/interface.go deleted file mode 100644 index f3f3976ac..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/interface.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package kubebind - -import ( - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - v1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/kubebind/v1alpha1" - v1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/kubebind/v1alpha2" -) - -// ClusterInterface provides access to each of this group's versions. -type ClusterInterface interface { - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.ClusterInterface - // V1alpha2 provides access to shared informers for resources in V1alpha2. - V1alpha2() v1alpha2.ClusterInterface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new ClusterInterface. -func New(f internalinterfaces.SharedInformerFactory, tweakListOptions internalinterfaces.TweakListOptionsFunc) ClusterInterface { - return &group{factory: f, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.ClusterInterface. -func (g *group) V1alpha1() v1alpha1.ClusterInterface { - return v1alpha1.New(g.factory, g.tweakListOptions) -} - -// V1alpha2 returns a new v1alpha2.ClusterInterface. -func (g *group) V1alpha2() v1alpha2.ClusterInterface { - return v1alpha2.New(g.factory, g.tweakListOptions) -} - -// 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 - // V1alpha2 provides access to shared informers for resources in V1alpha2. - V1alpha2() v1alpha2.Interface -} - -type scopedGroup struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// New returns a new Interface. -func NewScoped(f internalinterfaces.SharedScopedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &scopedGroup{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *scopedGroup) V1alpha1() v1alpha1.Interface { - return v1alpha1.NewScoped(g.factory, g.namespace, g.tweakListOptions) -} - -// V1alpha2 returns a new v1alpha2.Interface. -func (g *scopedGroup) V1alpha2() v1alpha2.Interface { - return v1alpha2.NewScoped(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiservicebinding.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiservicebinding.go deleted file mode 100644 index fe03fc98f..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiservicebinding.go +++ /dev/null @@ -1,181 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - 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" - - apiskubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha1" -) - -// APIServiceBindingClusterInformer provides access to a shared informer and lister for -// APIServiceBindings. -type APIServiceBindingClusterInformer interface { - Cluster(logicalcluster.Name) APIServiceBindingInformer - ClusterWithContext(context.Context, logicalcluster.Name) APIServiceBindingInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kubebindv1alpha1.APIServiceBindingClusterLister -} - -type aPIServiceBindingClusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAPIServiceBindingClusterInformer constructs a new informer for APIServiceBinding 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 NewAPIServiceBindingClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceBindingClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredAPIServiceBindingClusterInformer constructs a new informer for APIServiceBinding 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 NewFilteredAPIServiceBindingClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().APIServiceBindings().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().APIServiceBindings().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha1.APIServiceBinding{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceBindingClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceBindingClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *aPIServiceBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha1.APIServiceBinding{}, i.defaultInformer) -} - -func (i *aPIServiceBindingClusterInformer) Lister() kubebindv1alpha1.APIServiceBindingClusterLister { - return kubebindv1alpha1.NewAPIServiceBindingClusterLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceBindingClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceBindingInformer { - return &aPIServiceBindingInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *aPIServiceBindingClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceBindingInformer { - return &aPIServiceBindingInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type aPIServiceBindingInformer struct { - informer cache.SharedIndexInformer - lister kubebindv1alpha1.APIServiceBindingLister -} - -func (i *aPIServiceBindingInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *aPIServiceBindingInformer) Lister() kubebindv1alpha1.APIServiceBindingLister { - return i.lister -} - -// APIServiceBindingInformer provides access to a shared informer and lister for -// APIServiceBindings. -type APIServiceBindingInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha1.APIServiceBindingLister -} - -type aPIServiceBindingScopedInformer struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAPIServiceBindingInformer constructs a new informer for APIServiceBinding 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 NewAPIServiceBindingInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredAPIServiceBindingInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredAPIServiceBindingInformer constructs a new informer for APIServiceBinding 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 NewFilteredAPIServiceBindingInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().APIServiceBindings().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().APIServiceBindings().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha1.APIServiceBinding{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceBindingScopedInformer) Informer() cache.SharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha1.APIServiceBinding{}, i.defaultInformer) -} - -func (i *aPIServiceBindingScopedInformer) Lister() kubebindv1alpha1.APIServiceBindingLister { - return kubebindv1alpha1.NewAPIServiceBindingLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceBindingScopedInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceBindingInformer(client, resyncPeriod, cache.Indexers{}, i.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiserviceexport.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiserviceexport.go deleted file mode 100644 index faa57598d..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiserviceexport.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - 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" - - apiskubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha1" -) - -// APIServiceExportClusterInformer provides access to a shared informer and lister for -// APIServiceExports. -type APIServiceExportClusterInformer interface { - Cluster(logicalcluster.Name) APIServiceExportInformer - ClusterWithContext(context.Context, logicalcluster.Name) APIServiceExportInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kubebindv1alpha1.APIServiceExportClusterLister -} - -type aPIServiceExportClusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAPIServiceExportClusterInformer constructs a new informer for APIServiceExport 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 NewAPIServiceExportClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceExportClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredAPIServiceExportClusterInformer constructs a new informer for APIServiceExport 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 NewFilteredAPIServiceExportClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().APIServiceExports().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().APIServiceExports().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha1.APIServiceExport{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceExportClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceExportClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *aPIServiceExportClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha1.APIServiceExport{}, i.defaultInformer) -} - -func (i *aPIServiceExportClusterInformer) Lister() kubebindv1alpha1.APIServiceExportClusterLister { - return kubebindv1alpha1.NewAPIServiceExportClusterLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceExportClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceExportInformer { - return &aPIServiceExportInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *aPIServiceExportClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceExportInformer { - return &aPIServiceExportInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type aPIServiceExportInformer struct { - informer cache.SharedIndexInformer - lister kubebindv1alpha1.APIServiceExportLister -} - -func (i *aPIServiceExportInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *aPIServiceExportInformer) Lister() kubebindv1alpha1.APIServiceExportLister { - return i.lister -} - -// APIServiceExportInformer provides access to a shared informer and lister for -// APIServiceExports. -type APIServiceExportInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha1.APIServiceExportLister -} - -type aPIServiceExportScopedInformer struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewAPIServiceExportInformer constructs a new informer for APIServiceExport 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 NewAPIServiceExportInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredAPIServiceExportInformer(client, resyncPeriod, namespace, indexers, nil) -} - -// NewFilteredAPIServiceExportInformer constructs a new informer for APIServiceExport 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 NewFilteredAPIServiceExportInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, 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.KubeBindV1alpha1().APIServiceExports(namespace).List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().APIServiceExports(namespace).Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha1.APIServiceExport{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceExportScopedInformer) Informer() cache.SharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha1.APIServiceExport{}, i.defaultInformer) -} - -func (i *aPIServiceExportScopedInformer) Lister() kubebindv1alpha1.APIServiceExportLister { - return kubebindv1alpha1.NewAPIServiceExportLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceExportScopedInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceExportInformer(client, resyncPeriod, i.namespace, cache.Indexers{ - cache.NamespaceIndex: cache.MetaNamespaceIndexFunc, - }, i.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiserviceexportrequest.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiserviceexportrequest.go deleted file mode 100644 index 843d5ade2..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiserviceexportrequest.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - 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" - - apiskubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha1" -) - -// APIServiceExportRequestClusterInformer provides access to a shared informer and lister for -// APIServiceExportRequests. -type APIServiceExportRequestClusterInformer interface { - Cluster(logicalcluster.Name) APIServiceExportRequestInformer - ClusterWithContext(context.Context, logicalcluster.Name) APIServiceExportRequestInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kubebindv1alpha1.APIServiceExportRequestClusterLister -} - -type aPIServiceExportRequestClusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAPIServiceExportRequestClusterInformer constructs a new informer for APIServiceExportRequest 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 NewAPIServiceExportRequestClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceExportRequestClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredAPIServiceExportRequestClusterInformer constructs a new informer for APIServiceExportRequest 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 NewFilteredAPIServiceExportRequestClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().APIServiceExportRequests().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().APIServiceExportRequests().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha1.APIServiceExportRequest{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceExportRequestClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceExportRequestClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *aPIServiceExportRequestClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha1.APIServiceExportRequest{}, i.defaultInformer) -} - -func (i *aPIServiceExportRequestClusterInformer) Lister() kubebindv1alpha1.APIServiceExportRequestClusterLister { - return kubebindv1alpha1.NewAPIServiceExportRequestClusterLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceExportRequestClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceExportRequestInformer { - return &aPIServiceExportRequestInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *aPIServiceExportRequestClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceExportRequestInformer { - return &aPIServiceExportRequestInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type aPIServiceExportRequestInformer struct { - informer cache.SharedIndexInformer - lister kubebindv1alpha1.APIServiceExportRequestLister -} - -func (i *aPIServiceExportRequestInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *aPIServiceExportRequestInformer) Lister() kubebindv1alpha1.APIServiceExportRequestLister { - return i.lister -} - -// APIServiceExportRequestInformer provides access to a shared informer and lister for -// APIServiceExportRequests. -type APIServiceExportRequestInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha1.APIServiceExportRequestLister -} - -type aPIServiceExportRequestScopedInformer struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewAPIServiceExportRequestInformer constructs a new informer for APIServiceExportRequest 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 NewAPIServiceExportRequestInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredAPIServiceExportRequestInformer(client, resyncPeriod, namespace, indexers, nil) -} - -// NewFilteredAPIServiceExportRequestInformer constructs a new informer for APIServiceExportRequest 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 NewFilteredAPIServiceExportRequestInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, 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.KubeBindV1alpha1().APIServiceExportRequests(namespace).List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().APIServiceExportRequests(namespace).Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha1.APIServiceExportRequest{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceExportRequestScopedInformer) Informer() cache.SharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha1.APIServiceExportRequest{}, i.defaultInformer) -} - -func (i *aPIServiceExportRequestScopedInformer) Lister() kubebindv1alpha1.APIServiceExportRequestLister { - return kubebindv1alpha1.NewAPIServiceExportRequestLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceExportRequestScopedInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceExportRequestInformer(client, resyncPeriod, i.namespace, cache.Indexers{ - cache.NamespaceIndex: cache.MetaNamespaceIndexFunc, - }, i.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiservicenamespace.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiservicenamespace.go deleted file mode 100644 index 989b2020b..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiservicenamespace.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - 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" - - apiskubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha1" -) - -// APIServiceNamespaceClusterInformer provides access to a shared informer and lister for -// APIServiceNamespaces. -type APIServiceNamespaceClusterInformer interface { - Cluster(logicalcluster.Name) APIServiceNamespaceInformer - ClusterWithContext(context.Context, logicalcluster.Name) APIServiceNamespaceInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kubebindv1alpha1.APIServiceNamespaceClusterLister -} - -type aPIServiceNamespaceClusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAPIServiceNamespaceClusterInformer constructs a new informer for APIServiceNamespace 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 NewAPIServiceNamespaceClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceNamespaceClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredAPIServiceNamespaceClusterInformer constructs a new informer for APIServiceNamespace 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 NewFilteredAPIServiceNamespaceClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().APIServiceNamespaces().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().APIServiceNamespaces().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha1.APIServiceNamespace{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceNamespaceClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceNamespaceClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *aPIServiceNamespaceClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha1.APIServiceNamespace{}, i.defaultInformer) -} - -func (i *aPIServiceNamespaceClusterInformer) Lister() kubebindv1alpha1.APIServiceNamespaceClusterLister { - return kubebindv1alpha1.NewAPIServiceNamespaceClusterLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceNamespaceClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceNamespaceInformer { - return &aPIServiceNamespaceInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *aPIServiceNamespaceClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceNamespaceInformer { - return &aPIServiceNamespaceInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type aPIServiceNamespaceInformer struct { - informer cache.SharedIndexInformer - lister kubebindv1alpha1.APIServiceNamespaceLister -} - -func (i *aPIServiceNamespaceInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *aPIServiceNamespaceInformer) Lister() kubebindv1alpha1.APIServiceNamespaceLister { - return i.lister -} - -// APIServiceNamespaceInformer provides access to a shared informer and lister for -// APIServiceNamespaces. -type APIServiceNamespaceInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha1.APIServiceNamespaceLister -} - -type aPIServiceNamespaceScopedInformer struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewAPIServiceNamespaceInformer constructs a new informer for APIServiceNamespace 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 NewAPIServiceNamespaceInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredAPIServiceNamespaceInformer(client, resyncPeriod, namespace, indexers, nil) -} - -// NewFilteredAPIServiceNamespaceInformer constructs a new informer for APIServiceNamespace 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 NewFilteredAPIServiceNamespaceInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, 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.KubeBindV1alpha1().APIServiceNamespaces(namespace).List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().APIServiceNamespaces(namespace).Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha1.APIServiceNamespace{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceNamespaceScopedInformer) Informer() cache.SharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha1.APIServiceNamespace{}, i.defaultInformer) -} - -func (i *aPIServiceNamespaceScopedInformer) Lister() kubebindv1alpha1.APIServiceNamespaceLister { - return kubebindv1alpha1.NewAPIServiceNamespaceLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceNamespaceScopedInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceNamespaceInformer(client, resyncPeriod, i.namespace, cache.Indexers{ - cache.NamespaceIndex: cache.MetaNamespaceIndexFunc, - }, i.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/clusterbinding.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/clusterbinding.go deleted file mode 100644 index 92dd6e129..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/clusterbinding.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - 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" - - apiskubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha1" -) - -// ClusterBindingClusterInformer provides access to a shared informer and lister for -// ClusterBindings. -type ClusterBindingClusterInformer interface { - Cluster(logicalcluster.Name) ClusterBindingInformer - ClusterWithContext(context.Context, logicalcluster.Name) ClusterBindingInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kubebindv1alpha1.ClusterBindingClusterLister -} - -type clusterBindingClusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewClusterBindingClusterInformer constructs a new informer for ClusterBinding 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 NewClusterBindingClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredClusterBindingClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredClusterBindingClusterInformer constructs a new informer for ClusterBinding 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 NewFilteredClusterBindingClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().ClusterBindings().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().ClusterBindings().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha1.ClusterBinding{}, - resyncPeriod, - indexers, - ) -} - -func (i *clusterBindingClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredClusterBindingClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *clusterBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha1.ClusterBinding{}, i.defaultInformer) -} - -func (i *clusterBindingClusterInformer) Lister() kubebindv1alpha1.ClusterBindingClusterLister { - return kubebindv1alpha1.NewClusterBindingClusterLister(i.Informer().GetIndexer()) -} - -func (i *clusterBindingClusterInformer) Cluster(clusterName logicalcluster.Name) ClusterBindingInformer { - return &clusterBindingInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *clusterBindingClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) ClusterBindingInformer { - return &clusterBindingInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type clusterBindingInformer struct { - informer cache.SharedIndexInformer - lister kubebindv1alpha1.ClusterBindingLister -} - -func (i *clusterBindingInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *clusterBindingInformer) Lister() kubebindv1alpha1.ClusterBindingLister { - return i.lister -} - -// ClusterBindingInformer provides access to a shared informer and lister for -// ClusterBindings. -type ClusterBindingInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha1.ClusterBindingLister -} - -type clusterBindingScopedInformer struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewClusterBindingInformer constructs a new informer for ClusterBinding 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 NewClusterBindingInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredClusterBindingInformer(client, resyncPeriod, namespace, indexers, nil) -} - -// NewFilteredClusterBindingInformer constructs a new informer for ClusterBinding 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 NewFilteredClusterBindingInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, 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.KubeBindV1alpha1().ClusterBindings(namespace).List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha1().ClusterBindings(namespace).Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha1.ClusterBinding{}, - resyncPeriod, - indexers, - ) -} - -func (i *clusterBindingScopedInformer) Informer() cache.SharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha1.ClusterBinding{}, i.defaultInformer) -} - -func (i *clusterBindingScopedInformer) Lister() kubebindv1alpha1.ClusterBindingLister { - return kubebindv1alpha1.NewClusterBindingLister(i.Informer().GetIndexer()) -} - -func (i *clusterBindingScopedInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredClusterBindingInformer(client, resyncPeriod, i.namespace, cache.Indexers{ - cache.NamespaceIndex: cache.MetaNamespaceIndexFunc, - }, i.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/interface.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/interface.go deleted file mode 100644 index 7077277fb..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/interface.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" -) - -type ClusterInterface interface { - // APIServiceBindings returns a APIServiceBindingClusterInformer. - APIServiceBindings() APIServiceBindingClusterInformer - // APIServiceExports returns a APIServiceExportClusterInformer. - APIServiceExports() APIServiceExportClusterInformer - // APIServiceExportRequests returns a APIServiceExportRequestClusterInformer. - APIServiceExportRequests() APIServiceExportRequestClusterInformer - // APIServiceNamespaces returns a APIServiceNamespaceClusterInformer. - APIServiceNamespaces() APIServiceNamespaceClusterInformer - // ClusterBindings returns a ClusterBindingClusterInformer. - ClusterBindings() ClusterBindingClusterInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, tweakListOptions internalinterfaces.TweakListOptionsFunc) ClusterInterface { - return &version{factory: f, tweakListOptions: tweakListOptions} -} - -// APIServiceBindings returns a APIServiceBindingClusterInformer. -func (v *version) APIServiceBindings() APIServiceBindingClusterInformer { - return &aPIServiceBindingClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// APIServiceExports returns a APIServiceExportClusterInformer. -func (v *version) APIServiceExports() APIServiceExportClusterInformer { - return &aPIServiceExportClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// APIServiceExportRequests returns a APIServiceExportRequestClusterInformer. -func (v *version) APIServiceExportRequests() APIServiceExportRequestClusterInformer { - return &aPIServiceExportRequestClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// APIServiceNamespaces returns a APIServiceNamespaceClusterInformer. -func (v *version) APIServiceNamespaces() APIServiceNamespaceClusterInformer { - return &aPIServiceNamespaceClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ClusterBindings returns a ClusterBindingClusterInformer. -func (v *version) ClusterBindings() ClusterBindingClusterInformer { - return &clusterBindingClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -type Interface interface { - // APIServiceBindings returns a APIServiceBindingInformer. - APIServiceBindings() APIServiceBindingInformer - // APIServiceExports returns a APIServiceExportInformer. - APIServiceExports() APIServiceExportInformer - // APIServiceExportRequests returns a APIServiceExportRequestInformer. - APIServiceExportRequests() APIServiceExportRequestInformer - // APIServiceNamespaces returns a APIServiceNamespaceInformer. - APIServiceNamespaces() APIServiceNamespaceInformer - // ClusterBindings returns a ClusterBindingInformer. - ClusterBindings() ClusterBindingInformer -} - -type scopedVersion struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// New returns a new Interface. -func NewScoped(f internalinterfaces.SharedScopedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &scopedVersion{factory: f, tweakListOptions: tweakListOptions} -} - -// APIServiceBindings returns a APIServiceBindingInformer. -func (v *scopedVersion) APIServiceBindings() APIServiceBindingInformer { - return &aPIServiceBindingScopedInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// APIServiceExports returns a APIServiceExportInformer. -func (v *scopedVersion) APIServiceExports() APIServiceExportInformer { - return &aPIServiceExportScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// APIServiceExportRequests returns a APIServiceExportRequestInformer. -func (v *scopedVersion) APIServiceExportRequests() APIServiceExportRequestInformer { - return &aPIServiceExportRequestScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// APIServiceNamespaces returns a APIServiceNamespaceInformer. -func (v *scopedVersion) APIServiceNamespaces() APIServiceNamespaceInformer { - return &aPIServiceNamespaceScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// ClusterBindings returns a ClusterBindingInformer. -func (v *scopedVersion) ClusterBindings() ClusterBindingInformer { - return &clusterBindingScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiresourceschema.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiresourceschema.go deleted file mode 100644 index d87c561e7..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiresourceschema.go +++ /dev/null @@ -1,181 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - 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" - - apiskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" -) - -// APIResourceSchemaClusterInformer provides access to a shared informer and lister for -// APIResourceSchemas. -type APIResourceSchemaClusterInformer interface { - Cluster(logicalcluster.Name) APIResourceSchemaInformer - ClusterWithContext(context.Context, logicalcluster.Name) APIResourceSchemaInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kubebindv1alpha2.APIResourceSchemaClusterLister -} - -type aPIResourceSchemaClusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAPIResourceSchemaClusterInformer constructs a new informer for APIResourceSchema 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 NewAPIResourceSchemaClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIResourceSchemaClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredAPIResourceSchemaClusterInformer constructs a new informer for APIResourceSchema 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 NewFilteredAPIResourceSchemaClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIResourceSchemas().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIResourceSchemas().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.APIResourceSchema{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIResourceSchemaClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIResourceSchemaClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *aPIResourceSchemaClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.APIResourceSchema{}, i.defaultInformer) -} - -func (i *aPIResourceSchemaClusterInformer) Lister() kubebindv1alpha2.APIResourceSchemaClusterLister { - return kubebindv1alpha2.NewAPIResourceSchemaClusterLister(i.Informer().GetIndexer()) -} - -func (i *aPIResourceSchemaClusterInformer) Cluster(clusterName logicalcluster.Name) APIResourceSchemaInformer { - return &aPIResourceSchemaInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *aPIResourceSchemaClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIResourceSchemaInformer { - return &aPIResourceSchemaInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type aPIResourceSchemaInformer struct { - informer cache.SharedIndexInformer - lister kubebindv1alpha2.APIResourceSchemaLister -} - -func (i *aPIResourceSchemaInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *aPIResourceSchemaInformer) Lister() kubebindv1alpha2.APIResourceSchemaLister { - return i.lister -} - -// APIResourceSchemaInformer provides access to a shared informer and lister for -// APIResourceSchemas. -type APIResourceSchemaInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2.APIResourceSchemaLister -} - -type aPIResourceSchemaScopedInformer struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAPIResourceSchemaInformer constructs a new informer for APIResourceSchema 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 NewAPIResourceSchemaInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredAPIResourceSchemaInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredAPIResourceSchemaInformer constructs a new informer for APIResourceSchema 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 NewFilteredAPIResourceSchemaInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIResourceSchemas().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIResourceSchemas().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.APIResourceSchema{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIResourceSchemaScopedInformer) Informer() cache.SharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.APIResourceSchema{}, i.defaultInformer) -} - -func (i *aPIResourceSchemaScopedInformer) Lister() kubebindv1alpha2.APIResourceSchemaLister { - return kubebindv1alpha2.NewAPIResourceSchemaLister(i.Informer().GetIndexer()) -} - -func (i *aPIResourceSchemaScopedInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIResourceSchemaInformer(client, resyncPeriod, cache.Indexers{}, i.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiservicebinding.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiservicebinding.go deleted file mode 100644 index 7fcb11137..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiservicebinding.go +++ /dev/null @@ -1,181 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - 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" - - apiskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" -) - -// APIServiceBindingClusterInformer provides access to a shared informer and lister for -// APIServiceBindings. -type APIServiceBindingClusterInformer interface { - Cluster(logicalcluster.Name) APIServiceBindingInformer - ClusterWithContext(context.Context, logicalcluster.Name) APIServiceBindingInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kubebindv1alpha2.APIServiceBindingClusterLister -} - -type aPIServiceBindingClusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAPIServiceBindingClusterInformer constructs a new informer for APIServiceBinding 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 NewAPIServiceBindingClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceBindingClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredAPIServiceBindingClusterInformer constructs a new informer for APIServiceBinding 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 NewFilteredAPIServiceBindingClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIServiceBindings().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIServiceBindings().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.APIServiceBinding{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceBindingClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceBindingClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *aPIServiceBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.APIServiceBinding{}, i.defaultInformer) -} - -func (i *aPIServiceBindingClusterInformer) Lister() kubebindv1alpha2.APIServiceBindingClusterLister { - return kubebindv1alpha2.NewAPIServiceBindingClusterLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceBindingClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceBindingInformer { - return &aPIServiceBindingInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *aPIServiceBindingClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceBindingInformer { - return &aPIServiceBindingInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type aPIServiceBindingInformer struct { - informer cache.SharedIndexInformer - lister kubebindv1alpha2.APIServiceBindingLister -} - -func (i *aPIServiceBindingInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *aPIServiceBindingInformer) Lister() kubebindv1alpha2.APIServiceBindingLister { - return i.lister -} - -// APIServiceBindingInformer provides access to a shared informer and lister for -// APIServiceBindings. -type APIServiceBindingInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2.APIServiceBindingLister -} - -type aPIServiceBindingScopedInformer struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAPIServiceBindingInformer constructs a new informer for APIServiceBinding 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 NewAPIServiceBindingInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredAPIServiceBindingInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredAPIServiceBindingInformer constructs a new informer for APIServiceBinding 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 NewFilteredAPIServiceBindingInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIServiceBindings().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIServiceBindings().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.APIServiceBinding{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceBindingScopedInformer) Informer() cache.SharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.APIServiceBinding{}, i.defaultInformer) -} - -func (i *aPIServiceBindingScopedInformer) Lister() kubebindv1alpha2.APIServiceBindingLister { - return kubebindv1alpha2.NewAPIServiceBindingLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceBindingScopedInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceBindingInformer(client, resyncPeriod, cache.Indexers{}, i.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiserviceexport.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiserviceexport.go deleted file mode 100644 index 149c4a119..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiserviceexport.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - 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" - - apiskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" -) - -// APIServiceExportClusterInformer provides access to a shared informer and lister for -// APIServiceExports. -type APIServiceExportClusterInformer interface { - Cluster(logicalcluster.Name) APIServiceExportInformer - ClusterWithContext(context.Context, logicalcluster.Name) APIServiceExportInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kubebindv1alpha2.APIServiceExportClusterLister -} - -type aPIServiceExportClusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAPIServiceExportClusterInformer constructs a new informer for APIServiceExport 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 NewAPIServiceExportClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceExportClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredAPIServiceExportClusterInformer constructs a new informer for APIServiceExport 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 NewFilteredAPIServiceExportClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIServiceExports().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIServiceExports().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.APIServiceExport{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceExportClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceExportClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *aPIServiceExportClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.APIServiceExport{}, i.defaultInformer) -} - -func (i *aPIServiceExportClusterInformer) Lister() kubebindv1alpha2.APIServiceExportClusterLister { - return kubebindv1alpha2.NewAPIServiceExportClusterLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceExportClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceExportInformer { - return &aPIServiceExportInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *aPIServiceExportClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceExportInformer { - return &aPIServiceExportInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type aPIServiceExportInformer struct { - informer cache.SharedIndexInformer - lister kubebindv1alpha2.APIServiceExportLister -} - -func (i *aPIServiceExportInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *aPIServiceExportInformer) Lister() kubebindv1alpha2.APIServiceExportLister { - return i.lister -} - -// APIServiceExportInformer provides access to a shared informer and lister for -// APIServiceExports. -type APIServiceExportInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2.APIServiceExportLister -} - -type aPIServiceExportScopedInformer struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewAPIServiceExportInformer constructs a new informer for APIServiceExport 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 NewAPIServiceExportInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredAPIServiceExportInformer(client, resyncPeriod, namespace, indexers, nil) -} - -// NewFilteredAPIServiceExportInformer constructs a new informer for APIServiceExport 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 NewFilteredAPIServiceExportInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, 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.KubeBindV1alpha2().APIServiceExports(namespace).List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIServiceExports(namespace).Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.APIServiceExport{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceExportScopedInformer) Informer() cache.SharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.APIServiceExport{}, i.defaultInformer) -} - -func (i *aPIServiceExportScopedInformer) Lister() kubebindv1alpha2.APIServiceExportLister { - return kubebindv1alpha2.NewAPIServiceExportLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceExportScopedInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceExportInformer(client, resyncPeriod, i.namespace, cache.Indexers{ - cache.NamespaceIndex: cache.MetaNamespaceIndexFunc, - }, i.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiserviceexportrequest.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiserviceexportrequest.go deleted file mode 100644 index 09a06e1e1..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiserviceexportrequest.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - 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" - - apiskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" -) - -// APIServiceExportRequestClusterInformer provides access to a shared informer and lister for -// APIServiceExportRequests. -type APIServiceExportRequestClusterInformer interface { - Cluster(logicalcluster.Name) APIServiceExportRequestInformer - ClusterWithContext(context.Context, logicalcluster.Name) APIServiceExportRequestInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kubebindv1alpha2.APIServiceExportRequestClusterLister -} - -type aPIServiceExportRequestClusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAPIServiceExportRequestClusterInformer constructs a new informer for APIServiceExportRequest 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 NewAPIServiceExportRequestClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceExportRequestClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredAPIServiceExportRequestClusterInformer constructs a new informer for APIServiceExportRequest 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 NewFilteredAPIServiceExportRequestClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIServiceExportRequests().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIServiceExportRequests().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.APIServiceExportRequest{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceExportRequestClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceExportRequestClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *aPIServiceExportRequestClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.APIServiceExportRequest{}, i.defaultInformer) -} - -func (i *aPIServiceExportRequestClusterInformer) Lister() kubebindv1alpha2.APIServiceExportRequestClusterLister { - return kubebindv1alpha2.NewAPIServiceExportRequestClusterLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceExportRequestClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceExportRequestInformer { - return &aPIServiceExportRequestInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *aPIServiceExportRequestClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceExportRequestInformer { - return &aPIServiceExportRequestInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type aPIServiceExportRequestInformer struct { - informer cache.SharedIndexInformer - lister kubebindv1alpha2.APIServiceExportRequestLister -} - -func (i *aPIServiceExportRequestInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *aPIServiceExportRequestInformer) Lister() kubebindv1alpha2.APIServiceExportRequestLister { - return i.lister -} - -// APIServiceExportRequestInformer provides access to a shared informer and lister for -// APIServiceExportRequests. -type APIServiceExportRequestInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2.APIServiceExportRequestLister -} - -type aPIServiceExportRequestScopedInformer struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewAPIServiceExportRequestInformer constructs a new informer for APIServiceExportRequest 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 NewAPIServiceExportRequestInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredAPIServiceExportRequestInformer(client, resyncPeriod, namespace, indexers, nil) -} - -// NewFilteredAPIServiceExportRequestInformer constructs a new informer for APIServiceExportRequest 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 NewFilteredAPIServiceExportRequestInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, 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.KubeBindV1alpha2().APIServiceExportRequests(namespace).List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIServiceExportRequests(namespace).Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.APIServiceExportRequest{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceExportRequestScopedInformer) Informer() cache.SharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.APIServiceExportRequest{}, i.defaultInformer) -} - -func (i *aPIServiceExportRequestScopedInformer) Lister() kubebindv1alpha2.APIServiceExportRequestLister { - return kubebindv1alpha2.NewAPIServiceExportRequestLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceExportRequestScopedInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceExportRequestInformer(client, resyncPeriod, i.namespace, cache.Indexers{ - cache.NamespaceIndex: cache.MetaNamespaceIndexFunc, - }, i.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiservicenamespace.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiservicenamespace.go deleted file mode 100644 index e0ac8776d..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiservicenamespace.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - 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" - - apiskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" -) - -// APIServiceNamespaceClusterInformer provides access to a shared informer and lister for -// APIServiceNamespaces. -type APIServiceNamespaceClusterInformer interface { - Cluster(logicalcluster.Name) APIServiceNamespaceInformer - ClusterWithContext(context.Context, logicalcluster.Name) APIServiceNamespaceInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kubebindv1alpha2.APIServiceNamespaceClusterLister -} - -type aPIServiceNamespaceClusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAPIServiceNamespaceClusterInformer constructs a new informer for APIServiceNamespace 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 NewAPIServiceNamespaceClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceNamespaceClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredAPIServiceNamespaceClusterInformer constructs a new informer for APIServiceNamespace 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 NewFilteredAPIServiceNamespaceClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIServiceNamespaces().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIServiceNamespaces().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.APIServiceNamespace{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceNamespaceClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredAPIServiceNamespaceClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *aPIServiceNamespaceClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.APIServiceNamespace{}, i.defaultInformer) -} - -func (i *aPIServiceNamespaceClusterInformer) Lister() kubebindv1alpha2.APIServiceNamespaceClusterLister { - return kubebindv1alpha2.NewAPIServiceNamespaceClusterLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceNamespaceClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceNamespaceInformer { - return &aPIServiceNamespaceInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *aPIServiceNamespaceClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceNamespaceInformer { - return &aPIServiceNamespaceInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type aPIServiceNamespaceInformer struct { - informer cache.SharedIndexInformer - lister kubebindv1alpha2.APIServiceNamespaceLister -} - -func (i *aPIServiceNamespaceInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *aPIServiceNamespaceInformer) Lister() kubebindv1alpha2.APIServiceNamespaceLister { - return i.lister -} - -// APIServiceNamespaceInformer provides access to a shared informer and lister for -// APIServiceNamespaces. -type APIServiceNamespaceInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2.APIServiceNamespaceLister -} - -type aPIServiceNamespaceScopedInformer struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewAPIServiceNamespaceInformer constructs a new informer for APIServiceNamespace 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 NewAPIServiceNamespaceInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredAPIServiceNamespaceInformer(client, resyncPeriod, namespace, indexers, nil) -} - -// NewFilteredAPIServiceNamespaceInformer constructs a new informer for APIServiceNamespace 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 NewFilteredAPIServiceNamespaceInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, 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.KubeBindV1alpha2().APIServiceNamespaces(namespace).List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().APIServiceNamespaces(namespace).Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.APIServiceNamespace{}, - resyncPeriod, - indexers, - ) -} - -func (i *aPIServiceNamespaceScopedInformer) Informer() cache.SharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.APIServiceNamespace{}, i.defaultInformer) -} - -func (i *aPIServiceNamespaceScopedInformer) Lister() kubebindv1alpha2.APIServiceNamespaceLister { - return kubebindv1alpha2.NewAPIServiceNamespaceLister(i.Informer().GetIndexer()) -} - -func (i *aPIServiceNamespaceScopedInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceNamespaceInformer(client, resyncPeriod, i.namespace, cache.Indexers{ - cache.NamespaceIndex: cache.MetaNamespaceIndexFunc, - }, i.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/boundapiresourceschema.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/boundapiresourceschema.go deleted file mode 100644 index 0fc179cb4..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/boundapiresourceschema.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - 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" - - apiskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" -) - -// BoundAPIResourceSchemaClusterInformer provides access to a shared informer and lister for -// BoundAPIResourceSchemas. -type BoundAPIResourceSchemaClusterInformer interface { - Cluster(logicalcluster.Name) BoundAPIResourceSchemaInformer - ClusterWithContext(context.Context, logicalcluster.Name) BoundAPIResourceSchemaInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kubebindv1alpha2.BoundAPIResourceSchemaClusterLister -} - -type boundAPIResourceSchemaClusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewBoundAPIResourceSchemaClusterInformer constructs a new informer for BoundAPIResourceSchema 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 NewBoundAPIResourceSchemaClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredBoundAPIResourceSchemaClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredBoundAPIResourceSchemaClusterInformer constructs a new informer for BoundAPIResourceSchema 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 NewFilteredBoundAPIResourceSchemaClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().BoundAPIResourceSchemas().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().BoundAPIResourceSchemas().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.BoundAPIResourceSchema{}, - resyncPeriod, - indexers, - ) -} - -func (i *boundAPIResourceSchemaClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredBoundAPIResourceSchemaClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *boundAPIResourceSchemaClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.BoundAPIResourceSchema{}, i.defaultInformer) -} - -func (i *boundAPIResourceSchemaClusterInformer) Lister() kubebindv1alpha2.BoundAPIResourceSchemaClusterLister { - return kubebindv1alpha2.NewBoundAPIResourceSchemaClusterLister(i.Informer().GetIndexer()) -} - -func (i *boundAPIResourceSchemaClusterInformer) Cluster(clusterName logicalcluster.Name) BoundAPIResourceSchemaInformer { - return &boundAPIResourceSchemaInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *boundAPIResourceSchemaClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) BoundAPIResourceSchemaInformer { - return &boundAPIResourceSchemaInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type boundAPIResourceSchemaInformer struct { - informer cache.SharedIndexInformer - lister kubebindv1alpha2.BoundAPIResourceSchemaLister -} - -func (i *boundAPIResourceSchemaInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *boundAPIResourceSchemaInformer) Lister() kubebindv1alpha2.BoundAPIResourceSchemaLister { - return i.lister -} - -// BoundAPIResourceSchemaInformer provides access to a shared informer and lister for -// BoundAPIResourceSchemas. -type BoundAPIResourceSchemaInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2.BoundAPIResourceSchemaLister -} - -type boundAPIResourceSchemaScopedInformer struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewBoundAPIResourceSchemaInformer constructs a new informer for BoundAPIResourceSchema 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 NewBoundAPIResourceSchemaInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredBoundAPIResourceSchemaInformer(client, resyncPeriod, namespace, indexers, nil) -} - -// NewFilteredBoundAPIResourceSchemaInformer constructs a new informer for BoundAPIResourceSchema 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 NewFilteredBoundAPIResourceSchemaInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, 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.KubeBindV1alpha2().BoundAPIResourceSchemas(namespace).List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().BoundAPIResourceSchemas(namespace).Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.BoundAPIResourceSchema{}, - resyncPeriod, - indexers, - ) -} - -func (i *boundAPIResourceSchemaScopedInformer) Informer() cache.SharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.BoundAPIResourceSchema{}, i.defaultInformer) -} - -func (i *boundAPIResourceSchemaScopedInformer) Lister() kubebindv1alpha2.BoundAPIResourceSchemaLister { - return kubebindv1alpha2.NewBoundAPIResourceSchemaLister(i.Informer().GetIndexer()) -} - -func (i *boundAPIResourceSchemaScopedInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredBoundAPIResourceSchemaInformer(client, resyncPeriod, i.namespace, cache.Indexers{ - cache.NamespaceIndex: cache.MetaNamespaceIndexFunc, - }, i.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/clusterbinding.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/clusterbinding.go deleted file mode 100644 index 1dea73adf..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/clusterbinding.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - time "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" - 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" - - apiskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" -) - -// ClusterBindingClusterInformer provides access to a shared informer and lister for -// ClusterBindings. -type ClusterBindingClusterInformer interface { - Cluster(logicalcluster.Name) ClusterBindingInformer - ClusterWithContext(context.Context, logicalcluster.Name) ClusterBindingInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kubebindv1alpha2.ClusterBindingClusterLister -} - -type clusterBindingClusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewClusterBindingClusterInformer constructs a new informer for ClusterBinding 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 NewClusterBindingClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredClusterBindingClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredClusterBindingClusterInformer constructs a new informer for ClusterBinding 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 NewFilteredClusterBindingClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().ClusterBindings().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().ClusterBindings().Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.ClusterBinding{}, - resyncPeriod, - indexers, - ) -} - -func (i *clusterBindingClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredClusterBindingClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *clusterBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.ClusterBinding{}, i.defaultInformer) -} - -func (i *clusterBindingClusterInformer) Lister() kubebindv1alpha2.ClusterBindingClusterLister { - return kubebindv1alpha2.NewClusterBindingClusterLister(i.Informer().GetIndexer()) -} - -func (i *clusterBindingClusterInformer) Cluster(clusterName logicalcluster.Name) ClusterBindingInformer { - return &clusterBindingInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *clusterBindingClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) ClusterBindingInformer { - return &clusterBindingInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type clusterBindingInformer struct { - informer cache.SharedIndexInformer - lister kubebindv1alpha2.ClusterBindingLister -} - -func (i *clusterBindingInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *clusterBindingInformer) Lister() kubebindv1alpha2.ClusterBindingLister { - return i.lister -} - -// ClusterBindingInformer provides access to a shared informer and lister for -// ClusterBindings. -type ClusterBindingInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2.ClusterBindingLister -} - -type clusterBindingScopedInformer struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewClusterBindingInformer constructs a new informer for ClusterBinding 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 NewClusterBindingInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredClusterBindingInformer(client, resyncPeriod, namespace, indexers, nil) -} - -// NewFilteredClusterBindingInformer constructs a new informer for ClusterBinding 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 NewFilteredClusterBindingInformer(client versioned.Interface, resyncPeriod time.Duration, namespace string, 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.KubeBindV1alpha2().ClusterBindings(namespace).List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.KubeBindV1alpha2().ClusterBindings(namespace).Watch(context.Background(), options) - }, - }, - &apiskubebindv1alpha2.ClusterBinding{}, - resyncPeriod, - indexers, - ) -} - -func (i *clusterBindingScopedInformer) Informer() cache.SharedIndexInformer { - return i.factory.InformerFor(&apiskubebindv1alpha2.ClusterBinding{}, i.defaultInformer) -} - -func (i *clusterBindingScopedInformer) Lister() kubebindv1alpha2.ClusterBindingLister { - return kubebindv1alpha2.NewClusterBindingLister(i.Informer().GetIndexer()) -} - -func (i *clusterBindingScopedInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredClusterBindingInformer(client, resyncPeriod, i.namespace, cache.Indexers{ - cache.NamespaceIndex: cache.MetaNamespaceIndexFunc, - }, i.tweakListOptions) -} diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/interface.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/interface.go deleted file mode 100644 index 4889f4d1f..000000000 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/interface.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-informer-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" -) - -type ClusterInterface interface { - // APIResourceSchemas returns a APIResourceSchemaClusterInformer. - APIResourceSchemas() APIResourceSchemaClusterInformer - // APIServiceBindings returns a APIServiceBindingClusterInformer. - APIServiceBindings() APIServiceBindingClusterInformer - // APIServiceExports returns a APIServiceExportClusterInformer. - APIServiceExports() APIServiceExportClusterInformer - // APIServiceExportRequests returns a APIServiceExportRequestClusterInformer. - APIServiceExportRequests() APIServiceExportRequestClusterInformer - // APIServiceNamespaces returns a APIServiceNamespaceClusterInformer. - APIServiceNamespaces() APIServiceNamespaceClusterInformer - // BoundAPIResourceSchemas returns a BoundAPIResourceSchemaClusterInformer. - BoundAPIResourceSchemas() BoundAPIResourceSchemaClusterInformer - // ClusterBindings returns a ClusterBindingClusterInformer. - ClusterBindings() ClusterBindingClusterInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, tweakListOptions internalinterfaces.TweakListOptionsFunc) ClusterInterface { - return &version{factory: f, tweakListOptions: tweakListOptions} -} - -// APIResourceSchemas returns a APIResourceSchemaClusterInformer. -func (v *version) APIResourceSchemas() APIResourceSchemaClusterInformer { - return &aPIResourceSchemaClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// APIServiceBindings returns a APIServiceBindingClusterInformer. -func (v *version) APIServiceBindings() APIServiceBindingClusterInformer { - return &aPIServiceBindingClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// APIServiceExports returns a APIServiceExportClusterInformer. -func (v *version) APIServiceExports() APIServiceExportClusterInformer { - return &aPIServiceExportClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// APIServiceExportRequests returns a APIServiceExportRequestClusterInformer. -func (v *version) APIServiceExportRequests() APIServiceExportRequestClusterInformer { - return &aPIServiceExportRequestClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// APIServiceNamespaces returns a APIServiceNamespaceClusterInformer. -func (v *version) APIServiceNamespaces() APIServiceNamespaceClusterInformer { - return &aPIServiceNamespaceClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// BoundAPIResourceSchemas returns a BoundAPIResourceSchemaClusterInformer. -func (v *version) BoundAPIResourceSchemas() BoundAPIResourceSchemaClusterInformer { - return &boundAPIResourceSchemaClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ClusterBindings returns a ClusterBindingClusterInformer. -func (v *version) ClusterBindings() ClusterBindingClusterInformer { - return &clusterBindingClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -type Interface interface { - // APIResourceSchemas returns a APIResourceSchemaInformer. - APIResourceSchemas() APIResourceSchemaInformer - // APIServiceBindings returns a APIServiceBindingInformer. - APIServiceBindings() APIServiceBindingInformer - // APIServiceExports returns a APIServiceExportInformer. - APIServiceExports() APIServiceExportInformer - // APIServiceExportRequests returns a APIServiceExportRequestInformer. - APIServiceExportRequests() APIServiceExportRequestInformer - // APIServiceNamespaces returns a APIServiceNamespaceInformer. - APIServiceNamespaces() APIServiceNamespaceInformer - // BoundAPIResourceSchemas returns a BoundAPIResourceSchemaInformer. - BoundAPIResourceSchemas() BoundAPIResourceSchemaInformer - // ClusterBindings returns a ClusterBindingInformer. - ClusterBindings() ClusterBindingInformer -} - -type scopedVersion struct { - factory internalinterfaces.SharedScopedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// New returns a new Interface. -func NewScoped(f internalinterfaces.SharedScopedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &scopedVersion{factory: f, tweakListOptions: tweakListOptions} -} - -// APIResourceSchemas returns a APIResourceSchemaInformer. -func (v *scopedVersion) APIResourceSchemas() APIResourceSchemaInformer { - return &aPIResourceSchemaScopedInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// APIServiceBindings returns a APIServiceBindingInformer. -func (v *scopedVersion) APIServiceBindings() APIServiceBindingInformer { - return &aPIServiceBindingScopedInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// APIServiceExports returns a APIServiceExportInformer. -func (v *scopedVersion) APIServiceExports() APIServiceExportInformer { - return &aPIServiceExportScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// APIServiceExportRequests returns a APIServiceExportRequestInformer. -func (v *scopedVersion) APIServiceExportRequests() APIServiceExportRequestInformer { - return &aPIServiceExportRequestScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// APIServiceNamespaces returns a APIServiceNamespaceInformer. -func (v *scopedVersion) APIServiceNamespaces() APIServiceNamespaceInformer { - return &aPIServiceNamespaceScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// BoundAPIResourceSchemas returns a BoundAPIResourceSchemaInformer. -func (v *scopedVersion) BoundAPIResourceSchemas() BoundAPIResourceSchemaInformer { - return &boundAPIResourceSchemaScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// ClusterBindings returns a ClusterBindingInformer. -func (v *scopedVersion) ClusterBindings() ClusterBindingInformer { - return &clusterBindingScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} diff --git a/sdk/kcp/listers/kubebind/v1alpha1/apiservicebinding.go b/sdk/kcp/listers/kubebind/v1alpha1/apiservicebinding.go deleted file mode 100644 index 561a8d05e..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha1/apiservicebinding.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" -) - -// APIServiceBindingClusterLister helps list APIServiceBindings across all workspaces, -// or scope down to a APIServiceBindingLister for one workspace. -// All objects returned here must be treated as read-only. -type APIServiceBindingClusterLister interface { - // List lists all APIServiceBindings in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceBinding, err error) - // Cluster returns a lister that can list and get APIServiceBindings in one workspace. - Cluster(clusterName logicalcluster.Name) APIServiceBindingLister - APIServiceBindingClusterListerExpansion -} - -// aPIServiceBindingClusterLister implements the APIServiceBindingClusterLister interface. -type aPIServiceBindingClusterLister struct { - kcplisters.ResourceClusterIndexer[*kubebindv1alpha1.APIServiceBinding] -} - -var _ APIServiceBindingClusterLister = new(aPIServiceBindingClusterLister) - -// NewAPIServiceBindingClusterLister returns a new APIServiceBindingClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -func NewAPIServiceBindingClusterLister(indexer cache.Indexer) APIServiceBindingClusterLister { - return &aPIServiceBindingClusterLister{ - kcplisters.NewCluster[*kubebindv1alpha1.APIServiceBinding](indexer, kubebindv1alpha1.Resource("apiservicebinding")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceBindings. -func (l *aPIServiceBindingClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceBindingLister { - return &aPIServiceBindingLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// aPIServiceBindingLister can list all APIServiceBindings inside a workspace -// or scope down to a APIServiceBindingNamespaceLister for one namespace. -type aPIServiceBindingLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceBinding] -} - -var _ APIServiceBindingLister = new(aPIServiceBindingLister) - -// APIServiceBindingLister can list all APIServiceBindings, or get one in particular. -// All objects returned here must be treated as read-only. -type APIServiceBindingLister interface { - // List lists all APIServiceBindings in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceBinding, err error) - // Get retrieves the APIServiceBinding from the indexer for a given workspace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*kubebindv1alpha1.APIServiceBinding, error) - APIServiceBindingListerExpansion -} - -// NewAPIServiceBindingLister returns a new APIServiceBindingLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -func NewAPIServiceBindingLister(indexer cache.Indexer) APIServiceBindingLister { - return &aPIServiceBindingLister{ - kcplisters.New[*kubebindv1alpha1.APIServiceBinding](indexer, kubebindv1alpha1.Resource("apiservicebinding")), - } -} - -// aPIServiceBindingScopedLister can list all APIServiceBindings inside a workspace -// or scope down to a APIServiceBindingNamespaceLister. -type aPIServiceBindingScopedLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceBinding] -} diff --git a/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexport.go b/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexport.go deleted file mode 100644 index a691ea880..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexport.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" -) - -// APIServiceExportClusterLister helps list APIServiceExports across all workspaces, -// or scope down to a APIServiceExportLister for one workspace. -// All objects returned here must be treated as read-only. -type APIServiceExportClusterLister interface { - // List lists all APIServiceExports in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExport, err error) - // Cluster returns a lister that can list and get APIServiceExports in one workspace. - Cluster(clusterName logicalcluster.Name) APIServiceExportLister - APIServiceExportClusterListerExpansion -} - -// aPIServiceExportClusterLister implements the APIServiceExportClusterLister interface. -type aPIServiceExportClusterLister struct { - kcplisters.ResourceClusterIndexer[*kubebindv1alpha1.APIServiceExport] -} - -var _ APIServiceExportClusterLister = new(aPIServiceExportClusterLister) - -// NewAPIServiceExportClusterLister returns a new APIServiceExportClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewAPIServiceExportClusterLister(indexer cache.Indexer) APIServiceExportClusterLister { - return &aPIServiceExportClusterLister{ - kcplisters.NewCluster[*kubebindv1alpha1.APIServiceExport](indexer, kubebindv1alpha1.Resource("apiserviceexport")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceExports. -func (l *aPIServiceExportClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceExportLister { - return &aPIServiceExportLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// aPIServiceExportLister can list all APIServiceExports inside a workspace -// or scope down to a APIServiceExportNamespaceLister for one namespace. -type aPIServiceExportLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceExport] -} - -var _ APIServiceExportLister = new(aPIServiceExportLister) - -// APIServiceExportLister can list APIServiceExports across all namespaces, or scope down to a APIServiceExportNamespaceLister for one namespace. -// All objects returned here must be treated as read-only. -type APIServiceExportLister interface { - // List lists all APIServiceExports in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExport, err error) - // APIServiceExports returns a lister that can list and get APIServiceExports in one workspace and namespace. - APIServiceExports(namespace string) APIServiceExportNamespaceLister - APIServiceExportListerExpansion -} - -// APIServiceExports returns an object that can list and get APIServiceExports in one namespace. -func (l *aPIServiceExportLister) APIServiceExports(namespace string) APIServiceExportNamespaceLister { - return &aPIServiceExportNamespaceLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} - -// aPIServiceExportNamespaceLister implements the APIServiceExportNamespaceLister -// interface. -type aPIServiceExportNamespaceLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceExport] -} - -var _ APIServiceExportNamespaceLister = new(aPIServiceExportNamespaceLister) - -// APIServiceExportNamespaceLister can list all APIServiceExports, or get one in particular. -// All objects returned here must be treated as read-only. -type APIServiceExportNamespaceLister interface { - // List lists all APIServiceExports in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExport, err error) - // Get retrieves the APIServiceExport from the indexer for a given workspace, namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*kubebindv1alpha1.APIServiceExport, error) - APIServiceExportNamespaceListerExpansion -} - -// NewAPIServiceExportLister returns a new APIServiceExportLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewAPIServiceExportLister(indexer cache.Indexer) APIServiceExportLister { - return &aPIServiceExportLister{ - kcplisters.New[*kubebindv1alpha1.APIServiceExport](indexer, kubebindv1alpha1.Resource("apiserviceexport")), - } -} - -// aPIServiceExportScopedLister can list all APIServiceExports inside a workspace -// or scope down to a APIServiceExportNamespaceLister for one namespace. -type aPIServiceExportScopedLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceExport] -} - -// APIServiceExports returns an object that can list and get APIServiceExports in one namespace. -func (l *aPIServiceExportScopedLister) APIServiceExports(namespace string) APIServiceExportLister { - return &aPIServiceExportLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} diff --git a/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexportrequest.go b/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexportrequest.go deleted file mode 100644 index e79d8ed6a..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexportrequest.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" -) - -// APIServiceExportRequestClusterLister helps list APIServiceExportRequests across all workspaces, -// or scope down to a APIServiceExportRequestLister for one workspace. -// All objects returned here must be treated as read-only. -type APIServiceExportRequestClusterLister interface { - // List lists all APIServiceExportRequests in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExportRequest, err error) - // Cluster returns a lister that can list and get APIServiceExportRequests in one workspace. - Cluster(clusterName logicalcluster.Name) APIServiceExportRequestLister - APIServiceExportRequestClusterListerExpansion -} - -// aPIServiceExportRequestClusterLister implements the APIServiceExportRequestClusterLister interface. -type aPIServiceExportRequestClusterLister struct { - kcplisters.ResourceClusterIndexer[*kubebindv1alpha1.APIServiceExportRequest] -} - -var _ APIServiceExportRequestClusterLister = new(aPIServiceExportRequestClusterLister) - -// NewAPIServiceExportRequestClusterLister returns a new APIServiceExportRequestClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewAPIServiceExportRequestClusterLister(indexer cache.Indexer) APIServiceExportRequestClusterLister { - return &aPIServiceExportRequestClusterLister{ - kcplisters.NewCluster[*kubebindv1alpha1.APIServiceExportRequest](indexer, kubebindv1alpha1.Resource("apiserviceexportrequest")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceExportRequests. -func (l *aPIServiceExportRequestClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceExportRequestLister { - return &aPIServiceExportRequestLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// aPIServiceExportRequestLister can list all APIServiceExportRequests inside a workspace -// or scope down to a APIServiceExportRequestNamespaceLister for one namespace. -type aPIServiceExportRequestLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceExportRequest] -} - -var _ APIServiceExportRequestLister = new(aPIServiceExportRequestLister) - -// APIServiceExportRequestLister can list APIServiceExportRequests across all namespaces, or scope down to a APIServiceExportRequestNamespaceLister for one namespace. -// All objects returned here must be treated as read-only. -type APIServiceExportRequestLister interface { - // List lists all APIServiceExportRequests in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExportRequest, err error) - // APIServiceExportRequests returns a lister that can list and get APIServiceExportRequests in one workspace and namespace. - APIServiceExportRequests(namespace string) APIServiceExportRequestNamespaceLister - APIServiceExportRequestListerExpansion -} - -// APIServiceExportRequests returns an object that can list and get APIServiceExportRequests in one namespace. -func (l *aPIServiceExportRequestLister) APIServiceExportRequests(namespace string) APIServiceExportRequestNamespaceLister { - return &aPIServiceExportRequestNamespaceLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} - -// aPIServiceExportRequestNamespaceLister implements the APIServiceExportRequestNamespaceLister -// interface. -type aPIServiceExportRequestNamespaceLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceExportRequest] -} - -var _ APIServiceExportRequestNamespaceLister = new(aPIServiceExportRequestNamespaceLister) - -// APIServiceExportRequestNamespaceLister can list all APIServiceExportRequests, or get one in particular. -// All objects returned here must be treated as read-only. -type APIServiceExportRequestNamespaceLister interface { - // List lists all APIServiceExportRequests in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExportRequest, err error) - // Get retrieves the APIServiceExportRequest from the indexer for a given workspace, namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*kubebindv1alpha1.APIServiceExportRequest, error) - APIServiceExportRequestNamespaceListerExpansion -} - -// NewAPIServiceExportRequestLister returns a new APIServiceExportRequestLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewAPIServiceExportRequestLister(indexer cache.Indexer) APIServiceExportRequestLister { - return &aPIServiceExportRequestLister{ - kcplisters.New[*kubebindv1alpha1.APIServiceExportRequest](indexer, kubebindv1alpha1.Resource("apiserviceexportrequest")), - } -} - -// aPIServiceExportRequestScopedLister can list all APIServiceExportRequests inside a workspace -// or scope down to a APIServiceExportRequestNamespaceLister for one namespace. -type aPIServiceExportRequestScopedLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceExportRequest] -} - -// APIServiceExportRequests returns an object that can list and get APIServiceExportRequests in one namespace. -func (l *aPIServiceExportRequestScopedLister) APIServiceExportRequests(namespace string) APIServiceExportRequestLister { - return &aPIServiceExportRequestLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} diff --git a/sdk/kcp/listers/kubebind/v1alpha1/apiservicenamespace.go b/sdk/kcp/listers/kubebind/v1alpha1/apiservicenamespace.go deleted file mode 100644 index 319fa8bda..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha1/apiservicenamespace.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" -) - -// APIServiceNamespaceClusterLister helps list APIServiceNamespaces across all workspaces, -// or scope down to a APIServiceNamespaceLister for one workspace. -// All objects returned here must be treated as read-only. -type APIServiceNamespaceClusterLister interface { - // List lists all APIServiceNamespaces in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceNamespace, err error) - // Cluster returns a lister that can list and get APIServiceNamespaces in one workspace. - Cluster(clusterName logicalcluster.Name) APIServiceNamespaceLister - APIServiceNamespaceClusterListerExpansion -} - -// aPIServiceNamespaceClusterLister implements the APIServiceNamespaceClusterLister interface. -type aPIServiceNamespaceClusterLister struct { - kcplisters.ResourceClusterIndexer[*kubebindv1alpha1.APIServiceNamespace] -} - -var _ APIServiceNamespaceClusterLister = new(aPIServiceNamespaceClusterLister) - -// NewAPIServiceNamespaceClusterLister returns a new APIServiceNamespaceClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewAPIServiceNamespaceClusterLister(indexer cache.Indexer) APIServiceNamespaceClusterLister { - return &aPIServiceNamespaceClusterLister{ - kcplisters.NewCluster[*kubebindv1alpha1.APIServiceNamespace](indexer, kubebindv1alpha1.Resource("apiservicenamespace")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceNamespaces. -func (l *aPIServiceNamespaceClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceNamespaceLister { - return &aPIServiceNamespaceLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// aPIServiceNamespaceLister can list all APIServiceNamespaces inside a workspace -// or scope down to a APIServiceNamespaceNamespaceLister for one namespace. -type aPIServiceNamespaceLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceNamespace] -} - -var _ APIServiceNamespaceLister = new(aPIServiceNamespaceLister) - -// APIServiceNamespaceLister can list APIServiceNamespaces across all namespaces, or scope down to a APIServiceNamespaceNamespaceLister for one namespace. -// All objects returned here must be treated as read-only. -type APIServiceNamespaceLister interface { - // List lists all APIServiceNamespaces in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceNamespace, err error) - // APIServiceNamespaces returns a lister that can list and get APIServiceNamespaces in one workspace and namespace. - APIServiceNamespaces(namespace string) APIServiceNamespaceNamespaceLister - APIServiceNamespaceListerExpansion -} - -// APIServiceNamespaces returns an object that can list and get APIServiceNamespaces in one namespace. -func (l *aPIServiceNamespaceLister) APIServiceNamespaces(namespace string) APIServiceNamespaceNamespaceLister { - return &aPIServiceNamespaceNamespaceLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} - -// aPIServiceNamespaceNamespaceLister implements the APIServiceNamespaceNamespaceLister -// interface. -type aPIServiceNamespaceNamespaceLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceNamespace] -} - -var _ APIServiceNamespaceNamespaceLister = new(aPIServiceNamespaceNamespaceLister) - -// APIServiceNamespaceNamespaceLister can list all APIServiceNamespaces, or get one in particular. -// All objects returned here must be treated as read-only. -type APIServiceNamespaceNamespaceLister interface { - // List lists all APIServiceNamespaces in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceNamespace, err error) - // Get retrieves the APIServiceNamespace from the indexer for a given workspace, namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*kubebindv1alpha1.APIServiceNamespace, error) - APIServiceNamespaceNamespaceListerExpansion -} - -// NewAPIServiceNamespaceLister returns a new APIServiceNamespaceLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewAPIServiceNamespaceLister(indexer cache.Indexer) APIServiceNamespaceLister { - return &aPIServiceNamespaceLister{ - kcplisters.New[*kubebindv1alpha1.APIServiceNamespace](indexer, kubebindv1alpha1.Resource("apiservicenamespace")), - } -} - -// aPIServiceNamespaceScopedLister can list all APIServiceNamespaces inside a workspace -// or scope down to a APIServiceNamespaceNamespaceLister for one namespace. -type aPIServiceNamespaceScopedLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceNamespace] -} - -// APIServiceNamespaces returns an object that can list and get APIServiceNamespaces in one namespace. -func (l *aPIServiceNamespaceScopedLister) APIServiceNamespaces(namespace string) APIServiceNamespaceLister { - return &aPIServiceNamespaceLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} diff --git a/sdk/kcp/listers/kubebind/v1alpha1/clusterbinding.go b/sdk/kcp/listers/kubebind/v1alpha1/clusterbinding.go deleted file mode 100644 index 44ccd197d..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha1/clusterbinding.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" -) - -// ClusterBindingClusterLister helps list ClusterBindings across all workspaces, -// or scope down to a ClusterBindingLister for one workspace. -// All objects returned here must be treated as read-only. -type ClusterBindingClusterLister interface { - // List lists all ClusterBindings in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.ClusterBinding, err error) - // Cluster returns a lister that can list and get ClusterBindings in one workspace. - Cluster(clusterName logicalcluster.Name) ClusterBindingLister - ClusterBindingClusterListerExpansion -} - -// clusterBindingClusterLister implements the ClusterBindingClusterLister interface. -type clusterBindingClusterLister struct { - kcplisters.ResourceClusterIndexer[*kubebindv1alpha1.ClusterBinding] -} - -var _ ClusterBindingClusterLister = new(clusterBindingClusterLister) - -// NewClusterBindingClusterLister returns a new ClusterBindingClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewClusterBindingClusterLister(indexer cache.Indexer) ClusterBindingClusterLister { - return &clusterBindingClusterLister{ - kcplisters.NewCluster[*kubebindv1alpha1.ClusterBinding](indexer, kubebindv1alpha1.Resource("clusterbinding")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get ClusterBindings. -func (l *clusterBindingClusterLister) Cluster(clusterName logicalcluster.Name) ClusterBindingLister { - return &clusterBindingLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// clusterBindingLister can list all ClusterBindings inside a workspace -// or scope down to a ClusterBindingNamespaceLister for one namespace. -type clusterBindingLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.ClusterBinding] -} - -var _ ClusterBindingLister = new(clusterBindingLister) - -// ClusterBindingLister can list ClusterBindings across all namespaces, or scope down to a ClusterBindingNamespaceLister for one namespace. -// All objects returned here must be treated as read-only. -type ClusterBindingLister interface { - // List lists all ClusterBindings in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.ClusterBinding, err error) - // ClusterBindings returns a lister that can list and get ClusterBindings in one workspace and namespace. - ClusterBindings(namespace string) ClusterBindingNamespaceLister - ClusterBindingListerExpansion -} - -// ClusterBindings returns an object that can list and get ClusterBindings in one namespace. -func (l *clusterBindingLister) ClusterBindings(namespace string) ClusterBindingNamespaceLister { - return &clusterBindingNamespaceLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} - -// clusterBindingNamespaceLister implements the ClusterBindingNamespaceLister -// interface. -type clusterBindingNamespaceLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.ClusterBinding] -} - -var _ ClusterBindingNamespaceLister = new(clusterBindingNamespaceLister) - -// ClusterBindingNamespaceLister can list all ClusterBindings, or get one in particular. -// All objects returned here must be treated as read-only. -type ClusterBindingNamespaceLister interface { - // List lists all ClusterBindings in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha1.ClusterBinding, err error) - // Get retrieves the ClusterBinding from the indexer for a given workspace, namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*kubebindv1alpha1.ClusterBinding, error) - ClusterBindingNamespaceListerExpansion -} - -// NewClusterBindingLister returns a new ClusterBindingLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewClusterBindingLister(indexer cache.Indexer) ClusterBindingLister { - return &clusterBindingLister{ - kcplisters.New[*kubebindv1alpha1.ClusterBinding](indexer, kubebindv1alpha1.Resource("clusterbinding")), - } -} - -// clusterBindingScopedLister can list all ClusterBindings inside a workspace -// or scope down to a ClusterBindingNamespaceLister for one namespace. -type clusterBindingScopedLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha1.ClusterBinding] -} - -// ClusterBindings returns an object that can list and get ClusterBindings in one namespace. -func (l *clusterBindingScopedLister) ClusterBindings(namespace string) ClusterBindingLister { - return &clusterBindingLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} diff --git a/sdk/kcp/listers/kubebind/v1alpha1/expansion_generated.go b/sdk/kcp/listers/kubebind/v1alpha1/expansion_generated.go deleted file mode 100644 index 9eda6cab4..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha1 - -// APIServiceBindingClusterListerExpansion allows custom methods to be added to -// APIServiceBindingClusterLister. -type APIServiceBindingClusterListerExpansion interface{} - -// APIServiceBindingListerExpansion allows custom methods to be added to -// APIServiceBindingLister. -type APIServiceBindingListerExpansion interface{} - -// APIServiceExportClusterListerExpansion allows custom methods to be added to -// APIServiceExportClusterLister. -type APIServiceExportClusterListerExpansion interface{} - -// APIServiceExportListerExpansion allows custom methods to be added to -// APIServiceExportLister. -type APIServiceExportListerExpansion interface{} - -// APIServiceExportNamespaceListerExpansion allows custom methods to be added to -// APIServiceExportNamespaceLister. -type APIServiceExportNamespaceListerExpansion interface{} - -// APIServiceExportRequestClusterListerExpansion allows custom methods to be added to -// APIServiceExportRequestClusterLister. -type APIServiceExportRequestClusterListerExpansion interface{} - -// APIServiceExportRequestListerExpansion allows custom methods to be added to -// APIServiceExportRequestLister. -type APIServiceExportRequestListerExpansion interface{} - -// APIServiceExportRequestNamespaceListerExpansion allows custom methods to be added to -// APIServiceExportRequestNamespaceLister. -type APIServiceExportRequestNamespaceListerExpansion interface{} - -// APIServiceNamespaceClusterListerExpansion allows custom methods to be added to -// APIServiceNamespaceClusterLister. -type APIServiceNamespaceClusterListerExpansion interface{} - -// APIServiceNamespaceListerExpansion allows custom methods to be added to -// APIServiceNamespaceLister. -type APIServiceNamespaceListerExpansion interface{} - -// APIServiceNamespaceNamespaceListerExpansion allows custom methods to be added to -// APIServiceNamespaceNamespaceLister. -type APIServiceNamespaceNamespaceListerExpansion interface{} - -// ClusterBindingClusterListerExpansion allows custom methods to be added to -// ClusterBindingClusterLister. -type ClusterBindingClusterListerExpansion interface{} - -// ClusterBindingListerExpansion allows custom methods to be added to -// ClusterBindingLister. -type ClusterBindingListerExpansion interface{} - -// ClusterBindingNamespaceListerExpansion allows custom methods to be added to -// ClusterBindingNamespaceLister. -type ClusterBindingNamespaceListerExpansion interface{} diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiresourceschema.go b/sdk/kcp/listers/kubebind/v1alpha2/apiresourceschema.go deleted file mode 100644 index a33fa59cd..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiresourceschema.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// APIResourceSchemaClusterLister helps list APIResourceSchemas across all workspaces, -// or scope down to a APIResourceSchemaLister for one workspace. -// All objects returned here must be treated as read-only. -type APIResourceSchemaClusterLister interface { - // List lists all APIResourceSchemas in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.APIResourceSchema, err error) - // Cluster returns a lister that can list and get APIResourceSchemas in one workspace. - Cluster(clusterName logicalcluster.Name) APIResourceSchemaLister - APIResourceSchemaClusterListerExpansion -} - -// aPIResourceSchemaClusterLister implements the APIResourceSchemaClusterLister interface. -type aPIResourceSchemaClusterLister struct { - kcplisters.ResourceClusterIndexer[*kubebindv1alpha2.APIResourceSchema] -} - -var _ APIResourceSchemaClusterLister = new(aPIResourceSchemaClusterLister) - -// NewAPIResourceSchemaClusterLister returns a new APIResourceSchemaClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -func NewAPIResourceSchemaClusterLister(indexer cache.Indexer) APIResourceSchemaClusterLister { - return &aPIResourceSchemaClusterLister{ - kcplisters.NewCluster[*kubebindv1alpha2.APIResourceSchema](indexer, kubebindv1alpha2.Resource("apiresourceschema")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get APIResourceSchemas. -func (l *aPIResourceSchemaClusterLister) Cluster(clusterName logicalcluster.Name) APIResourceSchemaLister { - return &aPIResourceSchemaLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// aPIResourceSchemaLister can list all APIResourceSchemas inside a workspace -// or scope down to a APIResourceSchemaNamespaceLister for one namespace. -type aPIResourceSchemaLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.APIResourceSchema] -} - -var _ APIResourceSchemaLister = new(aPIResourceSchemaLister) - -// APIResourceSchemaLister can list all APIResourceSchemas, or get one in particular. -// All objects returned here must be treated as read-only. -type APIResourceSchemaLister interface { - // List lists all APIResourceSchemas in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.APIResourceSchema, err error) - // Get retrieves the APIResourceSchema from the indexer for a given workspace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*kubebindv1alpha2.APIResourceSchema, error) - APIResourceSchemaListerExpansion -} - -// NewAPIResourceSchemaLister returns a new APIResourceSchemaLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -func NewAPIResourceSchemaLister(indexer cache.Indexer) APIResourceSchemaLister { - return &aPIResourceSchemaLister{ - kcplisters.New[*kubebindv1alpha2.APIResourceSchema](indexer, kubebindv1alpha2.Resource("apiresourceschema")), - } -} - -// aPIResourceSchemaScopedLister can list all APIResourceSchemas inside a workspace -// or scope down to a APIResourceSchemaNamespaceLister. -type aPIResourceSchemaScopedLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.APIResourceSchema] -} diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiservicebinding.go b/sdk/kcp/listers/kubebind/v1alpha2/apiservicebinding.go deleted file mode 100644 index 20c6a9ef6..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiservicebinding.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// APIServiceBindingClusterLister helps list APIServiceBindings across all workspaces, -// or scope down to a APIServiceBindingLister for one workspace. -// All objects returned here must be treated as read-only. -type APIServiceBindingClusterLister interface { - // List lists all APIServiceBindings in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceBinding, err error) - // Cluster returns a lister that can list and get APIServiceBindings in one workspace. - Cluster(clusterName logicalcluster.Name) APIServiceBindingLister - APIServiceBindingClusterListerExpansion -} - -// aPIServiceBindingClusterLister implements the APIServiceBindingClusterLister interface. -type aPIServiceBindingClusterLister struct { - kcplisters.ResourceClusterIndexer[*kubebindv1alpha2.APIServiceBinding] -} - -var _ APIServiceBindingClusterLister = new(aPIServiceBindingClusterLister) - -// NewAPIServiceBindingClusterLister returns a new APIServiceBindingClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -func NewAPIServiceBindingClusterLister(indexer cache.Indexer) APIServiceBindingClusterLister { - return &aPIServiceBindingClusterLister{ - kcplisters.NewCluster[*kubebindv1alpha2.APIServiceBinding](indexer, kubebindv1alpha2.Resource("apiservicebinding")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceBindings. -func (l *aPIServiceBindingClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceBindingLister { - return &aPIServiceBindingLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// aPIServiceBindingLister can list all APIServiceBindings inside a workspace -// or scope down to a APIServiceBindingNamespaceLister for one namespace. -type aPIServiceBindingLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceBinding] -} - -var _ APIServiceBindingLister = new(aPIServiceBindingLister) - -// APIServiceBindingLister can list all APIServiceBindings, or get one in particular. -// All objects returned here must be treated as read-only. -type APIServiceBindingLister interface { - // List lists all APIServiceBindings in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceBinding, err error) - // Get retrieves the APIServiceBinding from the indexer for a given workspace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*kubebindv1alpha2.APIServiceBinding, error) - APIServiceBindingListerExpansion -} - -// NewAPIServiceBindingLister returns a new APIServiceBindingLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -func NewAPIServiceBindingLister(indexer cache.Indexer) APIServiceBindingLister { - return &aPIServiceBindingLister{ - kcplisters.New[*kubebindv1alpha2.APIServiceBinding](indexer, kubebindv1alpha2.Resource("apiservicebinding")), - } -} - -// aPIServiceBindingScopedLister can list all APIServiceBindings inside a workspace -// or scope down to a APIServiceBindingNamespaceLister. -type aPIServiceBindingScopedLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceBinding] -} diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexport.go b/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexport.go deleted file mode 100644 index 3082c8cf2..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexport.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// APIServiceExportClusterLister helps list APIServiceExports across all workspaces, -// or scope down to a APIServiceExportLister for one workspace. -// All objects returned here must be treated as read-only. -type APIServiceExportClusterLister interface { - // List lists all APIServiceExports in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExport, err error) - // Cluster returns a lister that can list and get APIServiceExports in one workspace. - Cluster(clusterName logicalcluster.Name) APIServiceExportLister - APIServiceExportClusterListerExpansion -} - -// aPIServiceExportClusterLister implements the APIServiceExportClusterLister interface. -type aPIServiceExportClusterLister struct { - kcplisters.ResourceClusterIndexer[*kubebindv1alpha2.APIServiceExport] -} - -var _ APIServiceExportClusterLister = new(aPIServiceExportClusterLister) - -// NewAPIServiceExportClusterLister returns a new APIServiceExportClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewAPIServiceExportClusterLister(indexer cache.Indexer) APIServiceExportClusterLister { - return &aPIServiceExportClusterLister{ - kcplisters.NewCluster[*kubebindv1alpha2.APIServiceExport](indexer, kubebindv1alpha2.Resource("apiserviceexport")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceExports. -func (l *aPIServiceExportClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceExportLister { - return &aPIServiceExportLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// aPIServiceExportLister can list all APIServiceExports inside a workspace -// or scope down to a APIServiceExportNamespaceLister for one namespace. -type aPIServiceExportLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceExport] -} - -var _ APIServiceExportLister = new(aPIServiceExportLister) - -// APIServiceExportLister can list APIServiceExports across all namespaces, or scope down to a APIServiceExportNamespaceLister for one namespace. -// All objects returned here must be treated as read-only. -type APIServiceExportLister interface { - // List lists all APIServiceExports in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExport, err error) - // APIServiceExports returns a lister that can list and get APIServiceExports in one workspace and namespace. - APIServiceExports(namespace string) APIServiceExportNamespaceLister - APIServiceExportListerExpansion -} - -// APIServiceExports returns an object that can list and get APIServiceExports in one namespace. -func (l *aPIServiceExportLister) APIServiceExports(namespace string) APIServiceExportNamespaceLister { - return &aPIServiceExportNamespaceLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} - -// aPIServiceExportNamespaceLister implements the APIServiceExportNamespaceLister -// interface. -type aPIServiceExportNamespaceLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceExport] -} - -var _ APIServiceExportNamespaceLister = new(aPIServiceExportNamespaceLister) - -// APIServiceExportNamespaceLister can list all APIServiceExports, or get one in particular. -// All objects returned here must be treated as read-only. -type APIServiceExportNamespaceLister interface { - // List lists all APIServiceExports in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExport, err error) - // Get retrieves the APIServiceExport from the indexer for a given workspace, namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*kubebindv1alpha2.APIServiceExport, error) - APIServiceExportNamespaceListerExpansion -} - -// NewAPIServiceExportLister returns a new APIServiceExportLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewAPIServiceExportLister(indexer cache.Indexer) APIServiceExportLister { - return &aPIServiceExportLister{ - kcplisters.New[*kubebindv1alpha2.APIServiceExport](indexer, kubebindv1alpha2.Resource("apiserviceexport")), - } -} - -// aPIServiceExportScopedLister can list all APIServiceExports inside a workspace -// or scope down to a APIServiceExportNamespaceLister for one namespace. -type aPIServiceExportScopedLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceExport] -} - -// APIServiceExports returns an object that can list and get APIServiceExports in one namespace. -func (l *aPIServiceExportScopedLister) APIServiceExports(namespace string) APIServiceExportLister { - return &aPIServiceExportLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexportrequest.go b/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexportrequest.go deleted file mode 100644 index 026fe2a3b..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexportrequest.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// APIServiceExportRequestClusterLister helps list APIServiceExportRequests across all workspaces, -// or scope down to a APIServiceExportRequestLister for one workspace. -// All objects returned here must be treated as read-only. -type APIServiceExportRequestClusterLister interface { - // List lists all APIServiceExportRequests in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExportRequest, err error) - // Cluster returns a lister that can list and get APIServiceExportRequests in one workspace. - Cluster(clusterName logicalcluster.Name) APIServiceExportRequestLister - APIServiceExportRequestClusterListerExpansion -} - -// aPIServiceExportRequestClusterLister implements the APIServiceExportRequestClusterLister interface. -type aPIServiceExportRequestClusterLister struct { - kcplisters.ResourceClusterIndexer[*kubebindv1alpha2.APIServiceExportRequest] -} - -var _ APIServiceExportRequestClusterLister = new(aPIServiceExportRequestClusterLister) - -// NewAPIServiceExportRequestClusterLister returns a new APIServiceExportRequestClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewAPIServiceExportRequestClusterLister(indexer cache.Indexer) APIServiceExportRequestClusterLister { - return &aPIServiceExportRequestClusterLister{ - kcplisters.NewCluster[*kubebindv1alpha2.APIServiceExportRequest](indexer, kubebindv1alpha2.Resource("apiserviceexportrequest")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceExportRequests. -func (l *aPIServiceExportRequestClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceExportRequestLister { - return &aPIServiceExportRequestLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// aPIServiceExportRequestLister can list all APIServiceExportRequests inside a workspace -// or scope down to a APIServiceExportRequestNamespaceLister for one namespace. -type aPIServiceExportRequestLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceExportRequest] -} - -var _ APIServiceExportRequestLister = new(aPIServiceExportRequestLister) - -// APIServiceExportRequestLister can list APIServiceExportRequests across all namespaces, or scope down to a APIServiceExportRequestNamespaceLister for one namespace. -// All objects returned here must be treated as read-only. -type APIServiceExportRequestLister interface { - // List lists all APIServiceExportRequests in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExportRequest, err error) - // APIServiceExportRequests returns a lister that can list and get APIServiceExportRequests in one workspace and namespace. - APIServiceExportRequests(namespace string) APIServiceExportRequestNamespaceLister - APIServiceExportRequestListerExpansion -} - -// APIServiceExportRequests returns an object that can list and get APIServiceExportRequests in one namespace. -func (l *aPIServiceExportRequestLister) APIServiceExportRequests(namespace string) APIServiceExportRequestNamespaceLister { - return &aPIServiceExportRequestNamespaceLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} - -// aPIServiceExportRequestNamespaceLister implements the APIServiceExportRequestNamespaceLister -// interface. -type aPIServiceExportRequestNamespaceLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceExportRequest] -} - -var _ APIServiceExportRequestNamespaceLister = new(aPIServiceExportRequestNamespaceLister) - -// APIServiceExportRequestNamespaceLister can list all APIServiceExportRequests, or get one in particular. -// All objects returned here must be treated as read-only. -type APIServiceExportRequestNamespaceLister interface { - // List lists all APIServiceExportRequests in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExportRequest, err error) - // Get retrieves the APIServiceExportRequest from the indexer for a given workspace, namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*kubebindv1alpha2.APIServiceExportRequest, error) - APIServiceExportRequestNamespaceListerExpansion -} - -// NewAPIServiceExportRequestLister returns a new APIServiceExportRequestLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewAPIServiceExportRequestLister(indexer cache.Indexer) APIServiceExportRequestLister { - return &aPIServiceExportRequestLister{ - kcplisters.New[*kubebindv1alpha2.APIServiceExportRequest](indexer, kubebindv1alpha2.Resource("apiserviceexportrequest")), - } -} - -// aPIServiceExportRequestScopedLister can list all APIServiceExportRequests inside a workspace -// or scope down to a APIServiceExportRequestNamespaceLister for one namespace. -type aPIServiceExportRequestScopedLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceExportRequest] -} - -// APIServiceExportRequests returns an object that can list and get APIServiceExportRequests in one namespace. -func (l *aPIServiceExportRequestScopedLister) APIServiceExportRequests(namespace string) APIServiceExportRequestLister { - return &aPIServiceExportRequestLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiservicenamespace.go b/sdk/kcp/listers/kubebind/v1alpha2/apiservicenamespace.go deleted file mode 100644 index 076d1f79a..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiservicenamespace.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// APIServiceNamespaceClusterLister helps list APIServiceNamespaces across all workspaces, -// or scope down to a APIServiceNamespaceLister for one workspace. -// All objects returned here must be treated as read-only. -type APIServiceNamespaceClusterLister interface { - // List lists all APIServiceNamespaces in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceNamespace, err error) - // Cluster returns a lister that can list and get APIServiceNamespaces in one workspace. - Cluster(clusterName logicalcluster.Name) APIServiceNamespaceLister - APIServiceNamespaceClusterListerExpansion -} - -// aPIServiceNamespaceClusterLister implements the APIServiceNamespaceClusterLister interface. -type aPIServiceNamespaceClusterLister struct { - kcplisters.ResourceClusterIndexer[*kubebindv1alpha2.APIServiceNamespace] -} - -var _ APIServiceNamespaceClusterLister = new(aPIServiceNamespaceClusterLister) - -// NewAPIServiceNamespaceClusterLister returns a new APIServiceNamespaceClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewAPIServiceNamespaceClusterLister(indexer cache.Indexer) APIServiceNamespaceClusterLister { - return &aPIServiceNamespaceClusterLister{ - kcplisters.NewCluster[*kubebindv1alpha2.APIServiceNamespace](indexer, kubebindv1alpha2.Resource("apiservicenamespace")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceNamespaces. -func (l *aPIServiceNamespaceClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceNamespaceLister { - return &aPIServiceNamespaceLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// aPIServiceNamespaceLister can list all APIServiceNamespaces inside a workspace -// or scope down to a APIServiceNamespaceNamespaceLister for one namespace. -type aPIServiceNamespaceLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceNamespace] -} - -var _ APIServiceNamespaceLister = new(aPIServiceNamespaceLister) - -// APIServiceNamespaceLister can list APIServiceNamespaces across all namespaces, or scope down to a APIServiceNamespaceNamespaceLister for one namespace. -// All objects returned here must be treated as read-only. -type APIServiceNamespaceLister interface { - // List lists all APIServiceNamespaces in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceNamespace, err error) - // APIServiceNamespaces returns a lister that can list and get APIServiceNamespaces in one workspace and namespace. - APIServiceNamespaces(namespace string) APIServiceNamespaceNamespaceLister - APIServiceNamespaceListerExpansion -} - -// APIServiceNamespaces returns an object that can list and get APIServiceNamespaces in one namespace. -func (l *aPIServiceNamespaceLister) APIServiceNamespaces(namespace string) APIServiceNamespaceNamespaceLister { - return &aPIServiceNamespaceNamespaceLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} - -// aPIServiceNamespaceNamespaceLister implements the APIServiceNamespaceNamespaceLister -// interface. -type aPIServiceNamespaceNamespaceLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceNamespace] -} - -var _ APIServiceNamespaceNamespaceLister = new(aPIServiceNamespaceNamespaceLister) - -// APIServiceNamespaceNamespaceLister can list all APIServiceNamespaces, or get one in particular. -// All objects returned here must be treated as read-only. -type APIServiceNamespaceNamespaceLister interface { - // List lists all APIServiceNamespaces in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceNamespace, err error) - // Get retrieves the APIServiceNamespace from the indexer for a given workspace, namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*kubebindv1alpha2.APIServiceNamespace, error) - APIServiceNamespaceNamespaceListerExpansion -} - -// NewAPIServiceNamespaceLister returns a new APIServiceNamespaceLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewAPIServiceNamespaceLister(indexer cache.Indexer) APIServiceNamespaceLister { - return &aPIServiceNamespaceLister{ - kcplisters.New[*kubebindv1alpha2.APIServiceNamespace](indexer, kubebindv1alpha2.Resource("apiservicenamespace")), - } -} - -// aPIServiceNamespaceScopedLister can list all APIServiceNamespaces inside a workspace -// or scope down to a APIServiceNamespaceNamespaceLister for one namespace. -type aPIServiceNamespaceScopedLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceNamespace] -} - -// APIServiceNamespaces returns an object that can list and get APIServiceNamespaces in one namespace. -func (l *aPIServiceNamespaceScopedLister) APIServiceNamespaces(namespace string) APIServiceNamespaceLister { - return &aPIServiceNamespaceLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} diff --git a/sdk/kcp/listers/kubebind/v1alpha2/boundapiresourceschema.go b/sdk/kcp/listers/kubebind/v1alpha2/boundapiresourceschema.go deleted file mode 100644 index e08ec6b1b..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/boundapiresourceschema.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// BoundAPIResourceSchemaClusterLister helps list BoundAPIResourceSchemas across all workspaces, -// or scope down to a BoundAPIResourceSchemaLister for one workspace. -// All objects returned here must be treated as read-only. -type BoundAPIResourceSchemaClusterLister interface { - // List lists all BoundAPIResourceSchemas in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.BoundAPIResourceSchema, err error) - // Cluster returns a lister that can list and get BoundAPIResourceSchemas in one workspace. - Cluster(clusterName logicalcluster.Name) BoundAPIResourceSchemaLister - BoundAPIResourceSchemaClusterListerExpansion -} - -// boundAPIResourceSchemaClusterLister implements the BoundAPIResourceSchemaClusterLister interface. -type boundAPIResourceSchemaClusterLister struct { - kcplisters.ResourceClusterIndexer[*kubebindv1alpha2.BoundAPIResourceSchema] -} - -var _ BoundAPIResourceSchemaClusterLister = new(boundAPIResourceSchemaClusterLister) - -// NewBoundAPIResourceSchemaClusterLister returns a new BoundAPIResourceSchemaClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewBoundAPIResourceSchemaClusterLister(indexer cache.Indexer) BoundAPIResourceSchemaClusterLister { - return &boundAPIResourceSchemaClusterLister{ - kcplisters.NewCluster[*kubebindv1alpha2.BoundAPIResourceSchema](indexer, kubebindv1alpha2.Resource("boundapiresourceschema")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get BoundAPIResourceSchemas. -func (l *boundAPIResourceSchemaClusterLister) Cluster(clusterName logicalcluster.Name) BoundAPIResourceSchemaLister { - return &boundAPIResourceSchemaLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// boundAPIResourceSchemaLister can list all BoundAPIResourceSchemas inside a workspace -// or scope down to a BoundAPIResourceSchemaNamespaceLister for one namespace. -type boundAPIResourceSchemaLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.BoundAPIResourceSchema] -} - -var _ BoundAPIResourceSchemaLister = new(boundAPIResourceSchemaLister) - -// BoundAPIResourceSchemaLister can list BoundAPIResourceSchemas across all namespaces, or scope down to a BoundAPIResourceSchemaNamespaceLister for one namespace. -// All objects returned here must be treated as read-only. -type BoundAPIResourceSchemaLister interface { - // List lists all BoundAPIResourceSchemas in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.BoundAPIResourceSchema, err error) - // BoundAPIResourceSchemas returns a lister that can list and get BoundAPIResourceSchemas in one workspace and namespace. - BoundAPIResourceSchemas(namespace string) BoundAPIResourceSchemaNamespaceLister - BoundAPIResourceSchemaListerExpansion -} - -// BoundAPIResourceSchemas returns an object that can list and get BoundAPIResourceSchemas in one namespace. -func (l *boundAPIResourceSchemaLister) BoundAPIResourceSchemas(namespace string) BoundAPIResourceSchemaNamespaceLister { - return &boundAPIResourceSchemaNamespaceLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} - -// boundAPIResourceSchemaNamespaceLister implements the BoundAPIResourceSchemaNamespaceLister -// interface. -type boundAPIResourceSchemaNamespaceLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.BoundAPIResourceSchema] -} - -var _ BoundAPIResourceSchemaNamespaceLister = new(boundAPIResourceSchemaNamespaceLister) - -// BoundAPIResourceSchemaNamespaceLister can list all BoundAPIResourceSchemas, or get one in particular. -// All objects returned here must be treated as read-only. -type BoundAPIResourceSchemaNamespaceLister interface { - // List lists all BoundAPIResourceSchemas in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.BoundAPIResourceSchema, err error) - // Get retrieves the BoundAPIResourceSchema from the indexer for a given workspace, namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*kubebindv1alpha2.BoundAPIResourceSchema, error) - BoundAPIResourceSchemaNamespaceListerExpansion -} - -// NewBoundAPIResourceSchemaLister returns a new BoundAPIResourceSchemaLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewBoundAPIResourceSchemaLister(indexer cache.Indexer) BoundAPIResourceSchemaLister { - return &boundAPIResourceSchemaLister{ - kcplisters.New[*kubebindv1alpha2.BoundAPIResourceSchema](indexer, kubebindv1alpha2.Resource("boundapiresourceschema")), - } -} - -// boundAPIResourceSchemaScopedLister can list all BoundAPIResourceSchemas inside a workspace -// or scope down to a BoundAPIResourceSchemaNamespaceLister for one namespace. -type boundAPIResourceSchemaScopedLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.BoundAPIResourceSchema] -} - -// BoundAPIResourceSchemas returns an object that can list and get BoundAPIResourceSchemas in one namespace. -func (l *boundAPIResourceSchemaScopedLister) BoundAPIResourceSchemas(namespace string) BoundAPIResourceSchemaLister { - return &boundAPIResourceSchemaLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} diff --git a/sdk/kcp/listers/kubebind/v1alpha2/clusterbinding.go b/sdk/kcp/listers/kubebind/v1alpha2/clusterbinding.go deleted file mode 100644 index ff24a026c..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/clusterbinding.go +++ /dev/null @@ -1,137 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" -) - -// ClusterBindingClusterLister helps list ClusterBindings across all workspaces, -// or scope down to a ClusterBindingLister for one workspace. -// All objects returned here must be treated as read-only. -type ClusterBindingClusterLister interface { - // List lists all ClusterBindings in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.ClusterBinding, err error) - // Cluster returns a lister that can list and get ClusterBindings in one workspace. - Cluster(clusterName logicalcluster.Name) ClusterBindingLister - ClusterBindingClusterListerExpansion -} - -// clusterBindingClusterLister implements the ClusterBindingClusterLister interface. -type clusterBindingClusterLister struct { - kcplisters.ResourceClusterIndexer[*kubebindv1alpha2.ClusterBinding] -} - -var _ ClusterBindingClusterLister = new(clusterBindingClusterLister) - -// NewClusterBindingClusterLister returns a new ClusterBindingClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewClusterBindingClusterLister(indexer cache.Indexer) ClusterBindingClusterLister { - return &clusterBindingClusterLister{ - kcplisters.NewCluster[*kubebindv1alpha2.ClusterBinding](indexer, kubebindv1alpha2.Resource("clusterbinding")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get ClusterBindings. -func (l *clusterBindingClusterLister) Cluster(clusterName logicalcluster.Name) ClusterBindingLister { - return &clusterBindingLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// clusterBindingLister can list all ClusterBindings inside a workspace -// or scope down to a ClusterBindingNamespaceLister for one namespace. -type clusterBindingLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.ClusterBinding] -} - -var _ ClusterBindingLister = new(clusterBindingLister) - -// ClusterBindingLister can list ClusterBindings across all namespaces, or scope down to a ClusterBindingNamespaceLister for one namespace. -// All objects returned here must be treated as read-only. -type ClusterBindingLister interface { - // List lists all ClusterBindings in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.ClusterBinding, err error) - // ClusterBindings returns a lister that can list and get ClusterBindings in one workspace and namespace. - ClusterBindings(namespace string) ClusterBindingNamespaceLister - ClusterBindingListerExpansion -} - -// ClusterBindings returns an object that can list and get ClusterBindings in one namespace. -func (l *clusterBindingLister) ClusterBindings(namespace string) ClusterBindingNamespaceLister { - return &clusterBindingNamespaceLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} - -// clusterBindingNamespaceLister implements the ClusterBindingNamespaceLister -// interface. -type clusterBindingNamespaceLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.ClusterBinding] -} - -var _ ClusterBindingNamespaceLister = new(clusterBindingNamespaceLister) - -// ClusterBindingNamespaceLister can list all ClusterBindings, or get one in particular. -// All objects returned here must be treated as read-only. -type ClusterBindingNamespaceLister interface { - // List lists all ClusterBindings in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*kubebindv1alpha2.ClusterBinding, err error) - // Get retrieves the ClusterBinding from the indexer for a given workspace, namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*kubebindv1alpha2.ClusterBinding, error) - ClusterBindingNamespaceListerExpansion -} - -// NewClusterBindingLister returns a new ClusterBindingLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -// - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewClusterBindingLister(indexer cache.Indexer) ClusterBindingLister { - return &clusterBindingLister{ - kcplisters.New[*kubebindv1alpha2.ClusterBinding](indexer, kubebindv1alpha2.Resource("clusterbinding")), - } -} - -// clusterBindingScopedLister can list all ClusterBindings inside a workspace -// or scope down to a ClusterBindingNamespaceLister for one namespace. -type clusterBindingScopedLister struct { - kcplisters.ResourceIndexer[*kubebindv1alpha2.ClusterBinding] -} - -// ClusterBindings returns an object that can list and get ClusterBindings in one namespace. -func (l *clusterBindingScopedLister) ClusterBindings(namespace string) ClusterBindingLister { - return &clusterBindingLister{ - l.ResourceIndexer.WithNamespace(namespace), - } -} diff --git a/sdk/kcp/listers/kubebind/v1alpha2/expansion_generated.go b/sdk/kcp/listers/kubebind/v1alpha2/expansion_generated.go deleted file mode 100644 index a888db475..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/expansion_generated.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -Copyright The Kube Bind 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 cluster-lister-gen. DO NOT EDIT. - -package v1alpha2 - -// APIResourceSchemaClusterListerExpansion allows custom methods to be added to -// APIResourceSchemaClusterLister. -type APIResourceSchemaClusterListerExpansion interface{} - -// APIResourceSchemaListerExpansion allows custom methods to be added to -// APIResourceSchemaLister. -type APIResourceSchemaListerExpansion interface{} - -// APIServiceBindingClusterListerExpansion allows custom methods to be added to -// APIServiceBindingClusterLister. -type APIServiceBindingClusterListerExpansion interface{} - -// APIServiceBindingListerExpansion allows custom methods to be added to -// APIServiceBindingLister. -type APIServiceBindingListerExpansion interface{} - -// APIServiceExportClusterListerExpansion allows custom methods to be added to -// APIServiceExportClusterLister. -type APIServiceExportClusterListerExpansion interface{} - -// APIServiceExportListerExpansion allows custom methods to be added to -// APIServiceExportLister. -type APIServiceExportListerExpansion interface{} - -// APIServiceExportNamespaceListerExpansion allows custom methods to be added to -// APIServiceExportNamespaceLister. -type APIServiceExportNamespaceListerExpansion interface{} - -// APIServiceExportRequestClusterListerExpansion allows custom methods to be added to -// APIServiceExportRequestClusterLister. -type APIServiceExportRequestClusterListerExpansion interface{} - -// APIServiceExportRequestListerExpansion allows custom methods to be added to -// APIServiceExportRequestLister. -type APIServiceExportRequestListerExpansion interface{} - -// APIServiceExportRequestNamespaceListerExpansion allows custom methods to be added to -// APIServiceExportRequestNamespaceLister. -type APIServiceExportRequestNamespaceListerExpansion interface{} - -// APIServiceNamespaceClusterListerExpansion allows custom methods to be added to -// APIServiceNamespaceClusterLister. -type APIServiceNamespaceClusterListerExpansion interface{} - -// APIServiceNamespaceListerExpansion allows custom methods to be added to -// APIServiceNamespaceLister. -type APIServiceNamespaceListerExpansion interface{} - -// APIServiceNamespaceNamespaceListerExpansion allows custom methods to be added to -// APIServiceNamespaceNamespaceLister. -type APIServiceNamespaceNamespaceListerExpansion interface{} - -// BoundAPIResourceSchemaClusterListerExpansion allows custom methods to be added to -// BoundAPIResourceSchemaClusterLister. -type BoundAPIResourceSchemaClusterListerExpansion interface{} - -// BoundAPIResourceSchemaListerExpansion allows custom methods to be added to -// BoundAPIResourceSchemaLister. -type BoundAPIResourceSchemaListerExpansion interface{} - -// BoundAPIResourceSchemaNamespaceListerExpansion allows custom methods to be added to -// BoundAPIResourceSchemaNamespaceLister. -type BoundAPIResourceSchemaNamespaceListerExpansion interface{} - -// ClusterBindingClusterListerExpansion allows custom methods to be added to -// ClusterBindingClusterLister. -type ClusterBindingClusterListerExpansion interface{} - -// ClusterBindingListerExpansion allows custom methods to be added to -// ClusterBindingLister. -type ClusterBindingListerExpansion interface{} - -// ClusterBindingNamespaceListerExpansion allows custom methods to be added to -// ClusterBindingNamespaceLister. -type ClusterBindingNamespaceListerExpansion interface{} diff --git a/test/e2e/bind/happy-case_test.go b/test/e2e/bind/happy-case_test.go index 7f2da31d1..ec21b3185 100644 --- a/test/e2e/bind/happy-case_test.go +++ b/test/e2e/bind/happy-case_test.go @@ -63,7 +63,7 @@ func testHappyCase(t *testing.T, resourceScope apiextensionsv1.ResourceScope, in providerConfig, providerKubeconfig := framework.NewWorkspace(t, framework.ClientConfig(t), framework.WithGenerateName("test-happy-case-provider")) t.Logf("Starting backend with random port") - addr, _ := framework.StartBackend(t, providerConfig, "--kubeconfig="+providerKubeconfig, "--listen-port=0", "--consumer-scope="+string(informerScope)) + addr, _ := framework.StartBackend(t, providerConfig, "--kubeconfig="+providerKubeconfig, "--listen-address=:0", "--consumer-scope="+string(informerScope)) t.Logf("Creating APIResourceSchemas on provider side") providerfixtures.Bootstrap(t, framework.DiscoveryClient(t, providerConfig), framework.DynamicClient(t, providerConfig), nil) diff --git a/test/e2e/framework/backend.go b/test/e2e/framework/backend.go index 7a9eb4f29..3c1549ba9 100644 --- a/test/e2e/framework/backend.go +++ b/test/e2e/framework/backend.go @@ -34,8 +34,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/rest" - backend "github.com/kube-bind/kube-bind/contrib/example-backend" - "github.com/kube-bind/kube-bind/contrib/example-backend/options" + backend "github.com/kube-bind/kube-bind/backend" + "github.com/kube-bind/kube-bind/backend/options" "github.com/kube-bind/kube-bind/deploy/crd" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" ) @@ -87,7 +87,7 @@ func StartBackendWithoutDefaultArgs(t *testing.T, clientConfig *rest.Config, arg options.OIDC.IssuerClientID = "kube-bind-" + port createDexClient(t, addr) - options.TestingSkipNameValidation = true + options.ExtraOptions.TestingSkipNameValidation = true completed, err := options.Complete() require.NoError(t, err)