diff --git a/.gitignore b/.gitignore index 90acb2eee..d419328f1 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ coverage.* /dex /bin docs/generators/cli-doc/cli-doc +dex/ \ No newline at end of file diff --git a/Makefile b/Makefile index ca72d8403..2171a228d 100644 --- a/Makefile +++ b/Makefile @@ -59,15 +59,14 @@ YAML_PATCH_BIN := yaml-patch YAML_PATCH := $(TOOLS_DIR)/$(YAML_PATCH_BIN)-$(YAML_PATCH_VER) export YAML_PATCH # so hack scripts can use it -OPENSHIFT_GOIMPORTS_VER := c72f1dc2e3aacfa00aece3391d938c9bc734e791 -OPENSHIFT_GOIMPORTS_BIN := openshift-goimports -OPENSHIFT_GOIMPORTS := $(TOOLS_DIR)/$(OPENSHIFT_GOIMPORTS_BIN)-$(OPENSHIFT_GOIMPORTS_VER) -export OPENSHIFT_GOIMPORTS # so hack scripts can use it - GOLANGCI_LINT_VER := v2.1.6 GOLANGCI_LINT_BIN := golangci-lint GOLANGCI_LINT := $(TOOLS_GOBIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER) +GOIMPORTS_VER := v0.35.0 +GOIMPORTS_BIN := goimports +GOIMPORTS := $(TOOLS_GOBIN_DIR)/$(GOIMPORTS_BIN)-$(GOIMPORTS_VER) + GOTESTSUM_VER := v1.8.1 GOTESTSUM_BIN := gotestsum GOTESTSUM := $(abspath $(TOOLS_DIR))/$(GOTESTSUM_BIN)-$(GOTESTSUM_VER) @@ -145,6 +144,9 @@ install: ## install binaries to GOBIN $(GOLANGCI_LINT): GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) github.com/golangci/golangci-lint/v2/cmd/golangci-lint $(GOLANGCI_LINT_BIN) $(GOLANGCI_LINT_VER) +$(GOIMPORTS): + GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) golang.org/x/tools/cmd/goimports $(GOIMPORTS_BIN) $(GOIMPORTS_VER) + $(LOGCHECK): GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) sigs.k8s.io/logtools/logcheck $(LOGCHECK_BIN) $(LOGCHECK_VER) @@ -164,7 +166,7 @@ vendor: ## Vendor the dependencies go mod vendor .PHONY: vendor -tools: $(GOLANGCI_LINT) $(CONTROLLER_GEN) $(YAML_PATCH) $(GOTESTSUM) $(OPENSHIFT_GOIMPORTS) $(CODE_GENERATOR) +tools: $(GOLANGCI_LINT) $(CONTROLLER_GEN) $(YAML_PATCH) $(GOTESTSUM) $(CODE_GENERATOR) .PHONY: tools $(CONTROLLER_GEN): @@ -186,7 +188,8 @@ $(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: $(CONTROLLER_GEN) $(YAML_PATCH) $(CODE_GENERATOR) $(KUBE_CLIENT_GEN) $(KUBE_LISTER_GEN) $(KUBE_INFORMER_GEN) $(KUBE_APPLYCONFIGURATION_GEN) ## Run the codegenerators +codegen: WHAT ?= ./sdk/kcp ./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 $(MAKE) imports @@ -209,12 +212,17 @@ verify-codegen: exit 1; \ fi -$(OPENSHIFT_GOIMPORTS): - GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) github.com/openshift-eng/openshift-goimports $(OPENSHIFT_GOIMPORTS_BIN) $(OPENSHIFT_GOIMPORTS_VER) - .PHONY: imports -imports: $(OPENSHIFT_GOIMPORTS) - $(OPENSHIFT_GOIMPORTS) -m github.com/kube-bind/kube-bind +imports: $(GOLANGCI_LINT) $(GOIMPORTS) verify-go-versions + if [ -n "$(WHAT)" ]; then \ + $(GOLANGCI_LINT) fmt --enable gci -c $(ROOT_DIR)/.golangci.yaml $(WHAT); \ + $(GOIMPORTS) -local github.com/kube-bind/kube-bind -w $(WHAT); \ + else \ + for MOD in . $$(git ls-files '**/go.mod' | sed 's,/go.mod,,'); do \ + (set -x; cd $$MOD; $(GOLANGCI_LINT) fmt --enable gci -c $(ROOT_DIR)/.golangci.yaml); \ + $(GOIMPORTS) -local github.com/kube-bind/kube-bind -w .; \ + done; \ + fi $(TOOLS_DIR)/verify_boilerplate.py: mkdir -p $(TOOLS_DIR) diff --git a/cli/cmd/crd2apiresourceschema/cmd/crd2apiresourceschema.go b/cli/cmd/crd2apiresourceschema/cmd/crd2apiresourceschema.go index 37d494f07..11c132cbc 100644 --- a/cli/cmd/crd2apiresourceschema/cmd/crd2apiresourceschema.go +++ b/cli/cmd/crd2apiresourceschema/cmd/crd2apiresourceschema.go @@ -22,7 +22,6 @@ import ( "os" "github.com/spf13/cobra" - "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/component-base/version" "k8s.io/klog/v2" diff --git a/cli/cmd/kubectl-bind/cmd/kubectlBind.go b/cli/cmd/kubectl-bind/cmd/kubectlBind.go index b890acd27..a8b53a64c 100644 --- a/cli/cmd/kubectl-bind/cmd/kubectlBind.go +++ b/cli/cmd/kubectl-bind/cmd/kubectlBind.go @@ -22,7 +22,6 @@ import ( "os" "github.com/spf13/cobra" - "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/component-base/version" "k8s.io/klog/v2" diff --git a/cli/pkg/crd2apiresourceschema/cmd/cmd.go b/cli/pkg/crd2apiresourceschema/cmd/cmd.go index b7dccc582..68e80b079 100644 --- a/cli/pkg/crd2apiresourceschema/cmd/cmd.go +++ b/cli/pkg/crd2apiresourceschema/cmd/cmd.go @@ -18,7 +18,6 @@ package cmd import ( "github.com/spf13/cobra" - "k8s.io/cli-runtime/pkg/genericclioptions" _ "k8s.io/client-go/plugin/pkg/client/auth/exec" _ "k8s.io/client-go/plugin/pkg/client/auth/oidc" diff --git a/cli/pkg/crd2apiresourceschema/plugin/crd2apiresourceschema.go b/cli/pkg/crd2apiresourceschema/plugin/crd2apiresourceschema.go index f8c4b7489..3a31e0834 100644 --- a/cli/pkg/crd2apiresourceschema/plugin/crd2apiresourceschema.go +++ b/cli/pkg/crd2apiresourceschema/plugin/crd2apiresourceschema.go @@ -26,7 +26,6 @@ import ( "time" "github.com/spf13/cobra" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/cli/pkg/help/help.go b/cli/pkg/help/help.go index bdca3bc5a..10cd9b1eb 100644 --- a/cli/pkg/help/help.go +++ b/cli/pkg/help/help.go @@ -25,7 +25,6 @@ import ( "github.com/MakeNowJust/heredoc" "github.com/muesli/reflow/wordwrap" "github.com/spf13/cobra" - "k8s.io/component-base/term" ) diff --git a/cli/pkg/kubectl/base/kubeconfig.go b/cli/pkg/kubectl/base/kubeconfig.go index af0ae06e8..dffe5642d 100644 --- a/cli/pkg/kubectl/base/kubeconfig.go +++ b/cli/pkg/kubectl/base/kubeconfig.go @@ -22,7 +22,7 @@ import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/util/retry" diff --git a/cli/pkg/kubectl/base/options.go b/cli/pkg/kubectl/base/options.go index e57017c9b..a3643eac6 100644 --- a/cli/pkg/kubectl/base/options.go +++ b/cli/pkg/kubectl/base/options.go @@ -18,7 +18,6 @@ package base import ( "github.com/spf13/cobra" - "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/client-go/tools/clientcmd" ) diff --git a/cli/pkg/kubectl/bind-apiservice/cmd/cmd.go b/cli/pkg/kubectl/bind-apiservice/cmd/cmd.go index f31bc5d02..ea0b3a64a 100644 --- a/cli/pkg/kubectl/bind-apiservice/cmd/cmd.go +++ b/cli/pkg/kubectl/bind-apiservice/cmd/cmd.go @@ -21,7 +21,6 @@ import ( "github.com/fatih/color" "github.com/spf13/cobra" - "k8s.io/cli-runtime/pkg/genericclioptions" _ "k8s.io/client-go/plugin/pkg/client/auth/exec" _ "k8s.io/client-go/plugin/pkg/client/auth/oidc" diff --git a/cli/pkg/kubectl/bind-apiservice/plugin/bind.go b/cli/pkg/kubectl/bind-apiservice/plugin/bind.go index 9ca25a2dd..e303e2fcc 100644 --- a/cli/pkg/kubectl/bind-apiservice/plugin/bind.go +++ b/cli/pkg/kubectl/bind-apiservice/plugin/bind.go @@ -27,7 +27,6 @@ import ( "strings" "github.com/spf13/cobra" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/cli-runtime/pkg/genericclioptions" diff --git a/cli/pkg/kubectl/bind-apiservice/plugin/konnector.go b/cli/pkg/kubectl/bind-apiservice/plugin/konnector.go index fcbcf35f0..27e2d3cf2 100644 --- a/cli/pkg/kubectl/bind-apiservice/plugin/konnector.go +++ b/cli/pkg/kubectl/bind-apiservice/plugin/konnector.go @@ -23,7 +23,6 @@ import ( "time" "github.com/blang/semver/v4" - "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" diff --git a/cli/pkg/kubectl/bind/cmd/cmd.go b/cli/pkg/kubectl/bind/cmd/cmd.go index 7a25afa3a..0e3c88410 100644 --- a/cli/pkg/kubectl/bind/cmd/cmd.go +++ b/cli/pkg/kubectl/bind/cmd/cmd.go @@ -22,7 +22,6 @@ import ( "github.com/fatih/color" "github.com/spf13/cobra" - "k8s.io/cli-runtime/pkg/genericclioptions" _ "k8s.io/client-go/plugin/pkg/client/auth/exec" _ "k8s.io/client-go/plugin/pkg/client/auth/oidc" diff --git a/cli/pkg/kubectl/bind/plugin/authenticate.go b/cli/pkg/kubectl/bind/plugin/authenticate.go index b9ec4996c..77762c7ba 100644 --- a/cli/pkg/kubectl/bind/plugin/authenticate.go +++ b/cli/pkg/kubectl/bind/plugin/authenticate.go @@ -29,7 +29,6 @@ import ( "github.com/blang/semver/v4" "github.com/mdp/qrterminal/v3" - clientgoversion "k8s.io/client-go/pkg/version" "github.com/kube-bind/kube-bind/pkg/version" diff --git a/cli/pkg/kubectl/bind/plugin/bind.go b/cli/pkg/kubectl/bind/plugin/bind.go index 41a8a8104..d6cdc36b6 100644 --- a/cli/pkg/kubectl/bind/plugin/bind.go +++ b/cli/pkg/kubectl/bind/plugin/bind.go @@ -33,7 +33,6 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/cli/pkg/kubectl/bind/plugin/flags_test.go b/cli/pkg/kubectl/bind/plugin/flags_test.go index 0f0ce73e8..1da10794d 100644 --- a/cli/pkg/kubectl/bind/plugin/flags_test.go +++ b/cli/pkg/kubectl/bind/plugin/flags_test.go @@ -23,7 +23,6 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/stretchr/testify/require" - "k8s.io/apimachinery/pkg/util/sets" "k8s.io/cli-runtime/pkg/genericclioptions" ) diff --git a/cmd/example-backend/main.go b/cmd/example-backend/main.go index d752817b4..dac9672fe 100644 --- a/cmd/example-backend/main.go +++ b/cmd/example-backend/main.go @@ -22,7 +22,6 @@ import ( "strings" "github.com/spf13/pflag" - genericapiserver "k8s.io/apiserver/pkg/server" logsv1 "k8s.io/component-base/logs/api/v1" "k8s.io/component-base/version" diff --git a/cmd/konnector/cmd/konnector.go b/cmd/konnector/cmd/konnector.go index f10b2a755..4d2cb326e 100644 --- a/cmd/konnector/cmd/konnector.go +++ b/cmd/konnector/cmd/konnector.go @@ -23,7 +23,6 @@ import ( "time" "github.com/spf13/cobra" - "k8s.io/client-go/tools/leaderelection" logsv1 "k8s.io/component-base/logs/api/v1" _ "k8s.io/component-base/logs/json/register" diff --git a/contrib/example-backend/http/handler.go b/contrib/example-backend/http/handler.go index 734a28634..f2d27faf0 100644 --- a/contrib/example-backend/http/handler.go +++ b/contrib/example-backend/http/handler.go @@ -31,7 +31,6 @@ import ( "github.com/gorilla/mux" "github.com/gorilla/securecookie" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" apiextensionslisters "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/contrib/example-backend/options/options.go b/contrib/example-backend/options/options.go index 730cf570d..1f5b5f00b 100644 --- a/contrib/example-backend/options/options.go +++ b/contrib/example-backend/options/options.go @@ -23,7 +23,6 @@ import ( "strings" "github.com/spf13/pflag" - "k8s.io/component-base/logs" logsv1 "k8s.io/component-base/logs/api/v1" diff --git a/docs/generators/cli-doc/go.mod b/docs/generators/cli-doc/go.mod index 855b2e37f..377034b8d 100644 --- a/docs/generators/cli-doc/go.mod +++ b/docs/generators/cli-doc/go.mod @@ -14,11 +14,11 @@ require ( ) require ( - cel.dev/expr v0.18.0 // indirect + cel.dev/expr v0.19.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect - github.com/antlr4-go/antlr/v4 v4.13.0 // indirect + github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect @@ -27,7 +27,7 @@ require ( 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.11.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/fatih/color v1.18.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -36,28 +36,30 @@ require ( 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.20.2 // 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.0.1 // indirect - github.com/google/cel-go v0.22.0 // indirect - github.com/google/gnostic-models v0.6.8 // indirect - github.com/google/go-cmp v0.6.0 // indirect + github.com/google/btree v1.1.3 // indirect + github.com/google/cel-go v0.22.1 // indirect + github.com/google/gnostic-models v0.6.9 // indirect + github.com/google/go-cmp v0.7.0 // 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 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.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/klauspost/compress v1.17.11 // indirect github.com/kube-bind/kube-bind v0.4.8 // indirect github.com/kube-bind/kube-bind/sdk/apis v0.4.8 // indirect github.com/kube-bind/kube-bind/sdk/client v0.4.8 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect - github.com/mailru/easyjson v0.7.7 // indirect + github.com/mailru/easyjson v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.12 // indirect @@ -68,64 +70,65 @@ require ( github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/muesli/reflow v0.3.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/onsi/gomega v1.36.1 // indirect + github.com/onsi/gomega v1.36.2 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/common v0.61.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rivo/uniseg v0.2.0 // indirect - github.com/spf13/cobra v1.8.1 // indirect - github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace // indirect + github.com/spf13/cobra v1.9.1 // indirect + github.com/spf13/pflag v1.0.6 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.2.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.16 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.16 // indirect - go.etcd.io/etcd/client/v3 v3.5.16 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect - go.opentelemetry.io/otel v1.28.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect - go.opentelemetry.io/otel/sdk v1.28.0 // indirect - go.opentelemetry.io/otel/trace v1.28.0 // indirect - go.opentelemetry.io/proto/otlp v1.3.1 // indirect + go.etcd.io/etcd/api/v3 v3.5.17 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.17 // indirect + go.etcd.io/etcd/client/v3 v3.5.17 // 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.31.0 // indirect - golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 // indirect - golang.org/x/net v0.33.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect - golang.org/x/sync v0.10.0 // indirect - golang.org/x/sys v0.28.0 // indirect - golang.org/x/term v0.27.0 // indirect - golang.org/x/text v0.21.0 // indirect - golang.org/x/time v0.7.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect - google.golang.org/grpc v1.65.0 // indirect - google.golang.org/protobuf v1.35.1 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect + golang.org/x/net v0.39.0 // indirect + golang.org/x/oauth2 v0.29.0 // indirect + golang.org/x/sync v0.13.0 // indirect + golang.org/x/sys v0.32.0 // indirect + golang.org/x/term v0.31.0 // indirect + golang.org/x/text v0.24.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.2 // 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.32.0 // indirect - k8s.io/apiextensions-apiserver v0.32.0 // indirect - k8s.io/apimachinery v0.32.0 // indirect - k8s.io/apiserver v0.32.0 // indirect + k8s.io/api v0.32.3 // indirect + k8s.io/apiextensions-apiserver v0.32.3 // indirect + k8s.io/apimachinery v0.32.3 // indirect + k8s.io/apiserver v0.32.3 // indirect k8s.io/cli-runtime v0.32.0 // indirect - k8s.io/client-go v0.32.0 // indirect - k8s.io/component-base v0.32.0 // indirect + k8s.io/client-go v0.32.3 // indirect + k8s.io/component-base v0.32.3 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect + k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect rsc.io/qr v0.2.0 // indirect - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 // indirect - sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.1 // 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/structured-merge-diff/v4 v4.4.2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.5.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 62a2ef294..52bb25227 100644 --- a/docs/generators/cli-doc/go.sum +++ b/docs/generators/cli-doc/go.sum @@ -1,13 +1,13 @@ -cel.dev/expr v0.18.0 h1:CJ6drgk+Hf96lkLikr4rFf19WrU0BOWEihyZnI2TAzo= -cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= +cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= 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.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= -github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= +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-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -22,8 +22,7 @@ github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr 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.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -32,8 +31,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 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.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +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/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -51,12 +50,10 @@ 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.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/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= @@ -68,20 +65,20 @@ github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOW github.com/golang-jwt/jwt/v4 v4.5.0/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.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.22.0 h1:b3FJZxpiv1vTMo2/5RDUqAHPxkT8mmMfJIrq1llbf7g= -github.com/google/cel-go v0.22.0/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= -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/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.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/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/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/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/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -96,8 +93,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy 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.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +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= @@ -110,19 +107,20 @@ github.com/kcp-dev/kcp v0.26.1 h1:64i6gB5KMnbtuH+Ae9t5rVGgZZ+lMb5w4IYpc4VoIvs= github.com/kcp-dev/kcp v0.26.1/go.mod h1:8RwbIysrwQXYq1vfWjoGQkqCMwLe6cEJMGUBnIdMLuQ= 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/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= 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/cli v0.0.0-20250515145715-d9f20e7c840d h1:XNKsPss6lwmEZdNIhiWxVB/dhT8apYwyBgtMAddAUrE= github.com/kube-bind/kube-bind/cli v0.0.0-20250515145715-d9f20e7c840d/go.mod h1:+Si5+7jDEdgWGwZw0Pho2VGtkNnonEgDLVMThVN2LC4= +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/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +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/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -145,10 +143,10 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= 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/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/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -156,19 +154,19 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE 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.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= 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.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= +github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= 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/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -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/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/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= @@ -176,11 +174,10 @@ 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.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= -github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace h1:9PNP1jnUjRhfmGMlkXHjYPishpcw4jpSt/V/xYY3FMA= -github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +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 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/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= @@ -207,38 +204,42 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de 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.16 h1:WvmyJVbjWqK4R1E+B12RRHz3bRGy9XVfh++MgbN+6n0= -go.etcd.io/etcd/api/v3 v3.5.16/go.mod h1:1P4SlIP/VwkDmGo3OlOD7faPeP8KDIFhqvciH5EfN28= -go.etcd.io/etcd/client/pkg/v3 v3.5.16 h1:ZgY48uH6UvB+/7R9Yf4x574uCO3jIx0TRDyetSfId3Q= -go.etcd.io/etcd/client/pkg/v3 v3.5.16/go.mod h1:V8acl8pcEK0Y2g19YlOV9m9ssUe6MgiDSobSoaBAM0E= +go.etcd.io/etcd/api/v3 v3.5.17 h1:cQB8eb8bxwuxOilBpMJAEo8fAONyrdXTHUNcMd8yT1w= +go.etcd.io/etcd/api/v3 v3.5.17/go.mod h1:d1hvkRuXkts6PmaYk2Vrgqbv7H4ADfAKhyJqHNLJCB4= +go.etcd.io/etcd/client/pkg/v3 v3.5.17 h1:XxnDXAWq2pnxqx76ljWwiQ9jylbpC4rvkAeRVOUKKVw= +go.etcd.io/etcd/client/pkg/v3 v3.5.17/go.mod h1:4DqK1TKacp/86nJk4FLQqo6Mn2vvQFBmruW3pP14H/w= 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/v3 v3.5.16 h1:sSmVYOAHeC9doqi0gv7v86oY/BTld0SEFGaxsU9eRhE= -go.etcd.io/etcd/client/v3 v3.5.16/go.mod h1:X+rExSGkyqxvu276cr2OwPLBaeqFu1cIl4vmRjAD/50= +go.etcd.io/etcd/client/v3 v3.5.17 h1:o48sINNeWz5+pjy/Z0+HKpj/xSnBkuVhVvXkjEXbqZY= +go.etcd.io/etcd/client/v3 v3.5.17/go.mod h1:j2d4eXTHWkT2ClBgnnEPm/Wuu7jsqku41v9DZ3OtjQo= 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.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= -go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= -go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= -go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= -go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= -go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= +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= @@ -248,61 +249,61 @@ 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.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 h1:kx6Ds3MlpiUHKj7syVnbp57++8WpuKPcR5yjLBjvLEA= -golang.org/x/exp v0.0.0-20240823005443-9b4947da3948/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +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.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= -golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= +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.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= +golang.org/x/sync v0.13.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.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= -golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= 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.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -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/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +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.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU= +golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s= 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-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw= -google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -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= +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.2 h1:R8FeyR1/eLmkutZOM5CWghmo5itiG9z0ktFlTVLuTmU= +google.golang.org/protobuf v1.36.2/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= @@ -315,39 +316,39 @@ 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.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/apiserver v0.32.0 h1:VJ89ZvQZ8p1sLeiWdRJpRD6oLozNZD2+qVSLi+ft5Qs= -k8s.io/apiserver v0.32.0/go.mod h1:HFh+dM1/BE/Hm4bS4nTXHVfN6Z6tFIZPi649n83b4Ag= +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.0 h1:dP+OZqs7zHPpGQMCGAhectbHU2SNCuZtIimRKTv2T1c= k8s.io/cli-runtime v0.32.0/go.mod h1:Mai8ht2+esoDRK5hr861KRy6z0zHsSTYttNVJXgP3YQ= -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/component-base v0.32.0 h1:d6cWHZkCiiep41ObYQS6IcgzOUQUNpywm39KVYaUqzU= -k8s.io/component-base v0.32.0/go.mod h1:JLG2W5TUxUu5uDyKiH2R/7NnxJo1HlPoRIIbVLkK5eM= +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/component-base v0.32.3 h1:98WJvvMs3QZ2LYHBzvltFSeJjEx7t5+8s71P7M74u8k= +k8s.io/component-base v0.32.3/go.mod h1:LWi9cR+yPAv7cu2X9rZanTiFKB2kHA+JjmhkKjCZRpI= 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.0 h1:jwOfunHIrcdYl5FRcA+uUKKtg6qiqoPCwmS2T3XTYL4= -k8s.io/kms v0.32.0/go.mod h1:Bk2evz/Yvk0oVrvm4MvZbgq8BD34Ksxs2SRHn4/UiOM= -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/kms v0.32.3 h1:HhHw5+pRCzEJp3oFFJ1q5W2N6gAI7YkUg4ay4Z0dgwM= +k8s.io/kms v0.32.3/go.mod h1:Bk2evz/Yvk0oVrvm4MvZbgq8BD34Ksxs2SRHn4/UiOM= +k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 h1:hcha5B1kVACrLujCKLbr8XWMxCxzQx42DY8QKYJrDLg= +k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7/go.mod h1:GewRfANuJ70iYzvn+i4lezLDAFzvjxZYK1gn1lWcfas= k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0= k8s.io/utils v0.0.0-20241210054802-24370beab758/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.0 h1:CPT0ExVicCzcpeN4baWEV2ko2Z/AsiZgEdwgcfwLgMo= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -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/apiserver-network-proxy/konnectivity-client v0.31.1 h1:uOuSLOMBWkJH0TWa9X6l+mj5nZdm6Ay6Bli8HL8rNfk= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.1/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/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= -sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= +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/go.mod b/go.mod index a2a82e193..8aa714647 100644 --- a/go.mod +++ b/go.mod @@ -14,31 +14,33 @@ require ( github.com/coreos/go-oidc v2.2.1+incompatible github.com/dexidp/dex/api/v2 v2.1.0 github.com/evanphx/json-patch v5.6.0+incompatible - github.com/google/go-cmp v0.6.0 + github.com/google/go-cmp v0.7.0 github.com/gorilla/mux v1.8.0 github.com/gorilla/securecookie v1.1.1 github.com/headzoo/surf v1.0.1 + github.com/kcp-dev/code-generator/v3 v3.0.0-20250707080944-4094fb87e20f github.com/kcp-dev/kcp/pkg/apis v0.11.0 + github.com/kcp-dev/kcp/sdk v0.28.0 github.com/kube-bind/kube-bind/cli v0.0.0-20250515145715-d9f20e7c840d github.com/kube-bind/kube-bind/sdk/apis v0.4.8 github.com/kube-bind/kube-bind/sdk/client v0.0.0-20250515145715-d9f20e7c840d github.com/martinlindhe/base36 v1.1.1 github.com/pierrec/lz4 v2.6.1+incompatible - github.com/spf13/cobra v1.8.1 - github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace + github.com/spf13/cobra v1.9.1 + github.com/spf13/pflag v1.0.6 github.com/stretchr/testify v1.10.0 github.com/vmihailenco/msgpack/v4 v4.3.12 - golang.org/x/oauth2 v0.23.0 - google.golang.org/grpc v1.65.0 + 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.32.0 - k8s.io/apiextensions-apiserver v0.32.0 - k8s.io/apimachinery v0.32.0 - k8s.io/apiserver v0.32.0 + k8s.io/api v0.32.3 + k8s.io/apiextensions-apiserver v0.32.3 + k8s.io/apimachinery v0.32.3 + k8s.io/apiserver v0.32.3 k8s.io/cli-runtime v0.32.0 - k8s.io/client-go v0.32.0 - k8s.io/code-generator v0.32.0 - k8s.io/component-base v0.32.0 + k8s.io/client-go v0.32.3 + k8s.io/code-generator v0.32.3 + k8s.io/component-base v0.32.3 k8s.io/klog/v2 v2.130.1 k8s.io/utils v0.0.0-20241210054802-24370beab758 sigs.k8s.io/controller-runtime v0.19.0 @@ -49,21 +51,22 @@ require ( replace cloud.google.com/go => cloud.google.com/go v0.100.2 require ( - cel.dev/expr v0.18.0 // indirect + cel.dev/expr v0.19.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/PuerkitoBio/goquery v1.8.0 // indirect github.com/andybalholm/cascadia v1.3.1 // indirect - github.com/antlr4-go/antlr/v4 v4.13.0 // 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 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.11.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fatih/color v1.18.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -75,27 +78,29 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/gobuffalo/flect v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/btree v1.0.1 // indirect - github.com/google/cel-go v0.22.0 // indirect - github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/btree v1.1.3 // indirect + github.com/google/cel-go v0.22.1 // 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 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 // indirect github.com/headzoo/ut v0.0.0-20181013193318-a13b5a7a02ca // 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/logicalcluster/v3 v3.0.5 // indirect + github.com/klauspost/compress v1.17.11 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect - github.com/mailru/easyjson v0.7.7 // indirect + github.com/mailru/easyjson v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mdp/qrterminal/v3 v3.2.0 // indirect @@ -104,60 +109,62 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/onsi/gomega v1.36.1 // indirect + github.com/onsi/gomega v1.36.2 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/pquerna/cachecontrol v0.1.0 // indirect - github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/common v0.61.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/vmihailenco/tagparser v0.1.1 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.2.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.16 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.16 // indirect - go.etcd.io/etcd/client/v3 v3.5.16 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect - go.opentelemetry.io/otel v1.28.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect - go.opentelemetry.io/otel/sdk v1.28.0 // indirect - go.opentelemetry.io/otel/trace v1.28.0 // indirect - go.opentelemetry.io/proto/otlp v1.3.1 // indirect + go.etcd.io/etcd/api/v3 v3.5.17 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.17 // indirect + go.etcd.io/etcd/client/v3 v3.5.17 // 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.31.0 // indirect - golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 // indirect - golang.org/x/mod v0.21.0 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/sync v0.10.0 // indirect - golang.org/x/sys v0.28.0 // indirect - golang.org/x/term v0.27.0 // indirect - golang.org/x/text v0.21.0 // indirect - golang.org/x/time v0.7.0 // indirect - golang.org/x/tools v0.26.0 // indirect + golang.org/x/crypto v0.37.0 // indirect + golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect + golang.org/x/mod v0.24.0 // indirect + golang.org/x/net v0.39.0 // indirect + golang.org/x/sync v0.13.0 // indirect + golang.org/x/sys v0.32.0 // indirect + golang.org/x/term v0.31.0 // indirect + golang.org/x/text v0.24.0 // indirect + golang.org/x/time v0.11.0 // indirect + golang.org/x/tools v0.32.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect - google.golang.org/protobuf v1.35.1 // 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.2 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect - k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect + k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect rsc.io/qr v0.2.0 // indirect - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 // indirect - sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.1 // 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/structured-merge-diff/v4 v4.4.2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect ) // This is needed for update-codegen-clients.sh to pin the version of code-generator. diff --git a/go.sum b/go.sum index 3ad43a026..acb1437bf 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -cel.dev/expr v0.18.0 h1:CJ6drgk+Hf96lkLikr4rFf19WrU0BOWEihyZnI2TAzo= -cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= +cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= @@ -8,14 +8,16 @@ github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0g github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI= github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= -github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= -github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= +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= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/bombsimon/logrusr/v3 v3.1.0 h1:zORbLM943D+hDMGgyjMhSAz/iDz86ZV72qaak/CA0zQ= +github.com/bombsimon/logrusr/v3 v3.1.0/go.mod h1:PksPPgSFEL2I52pla2glgCyyd2OqOHAnFF5E+g8Ixco= 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= @@ -26,7 +28,7 @@ github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr 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.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= @@ -38,8 +40,8 @@ github.com/dexidp/dex/api/v2 v2.1.0 h1:V7XTnG2HM2bqWZMABDQpf4EA6F+0jWPsv9pGaUIDo github.com/dexidp/dex/api/v2 v2.1.0/go.mod h1:s91/6CI290JhYN1F8aiRifLF71qRGLVZvzq68uC6Ln4= 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.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +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/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= @@ -63,12 +65,10 @@ 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.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/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= @@ -84,21 +84,21 @@ github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 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.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.22.0 h1:b3FJZxpiv1vTMo2/5RDUqAHPxkT8mmMfJIrq1llbf7g= -github.com/google/cel-go v0.22.0/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= -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/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.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= 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/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/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/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/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -117,8 +117,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy 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.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +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/headzoo/surf v1.0.1 h1:wk3+LT8gjnCxEwfBJl6MhaNg154En5KjgmgzAG9uMS0= github.com/headzoo/surf v1.0.1/go.mod h1:/bct0m/iMNEqpn520y01yoaWxsAEigGFPnvyR1ewR5M= github.com/headzoo/ut v0.0.0-20181013193318-a13b5a7a02ca h1:utFgFwgxaqx5OthzE3DSGrtOq7rox5r2sxZ2wbfTuK0= @@ -131,14 +131,19 @@ 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/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= github.com/kcp-dev/kcp/pkg/apis v0.11.0/go.mod h1:8cUAmfMJcksauz53UtsLYG8Phhx62rvuCnd/5t/Zihk= +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/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.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -146,10 +151,12 @@ 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/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +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/martinlindhe/base36 v1.1.1 h1:1F1MZ5MGghBXDZ2KJ3QfxmiydlWOGB8HCEtkap5NkVg= github.com/martinlindhe/base36 v1.1.1/go.mod h1:vMS8PaZ5e/jV9LwFKlm0YLnXl/hpOihiBxKkIoc3g08= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -174,10 +181,10 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -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/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/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= @@ -189,17 +196,17 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc= github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= -github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= 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.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= +github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= 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.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -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/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/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= @@ -207,11 +214,10 @@ 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.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= -github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace h1:9PNP1jnUjRhfmGMlkXHjYPishpcw4jpSt/V/xYY3FMA= -github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +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 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/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= @@ -243,38 +249,42 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de 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.16 h1:WvmyJVbjWqK4R1E+B12RRHz3bRGy9XVfh++MgbN+6n0= -go.etcd.io/etcd/api/v3 v3.5.16/go.mod h1:1P4SlIP/VwkDmGo3OlOD7faPeP8KDIFhqvciH5EfN28= -go.etcd.io/etcd/client/pkg/v3 v3.5.16 h1:ZgY48uH6UvB+/7R9Yf4x574uCO3jIx0TRDyetSfId3Q= -go.etcd.io/etcd/client/pkg/v3 v3.5.16/go.mod h1:V8acl8pcEK0Y2g19YlOV9m9ssUe6MgiDSobSoaBAM0E= +go.etcd.io/etcd/api/v3 v3.5.17 h1:cQB8eb8bxwuxOilBpMJAEo8fAONyrdXTHUNcMd8yT1w= +go.etcd.io/etcd/api/v3 v3.5.17/go.mod h1:d1hvkRuXkts6PmaYk2Vrgqbv7H4ADfAKhyJqHNLJCB4= +go.etcd.io/etcd/client/pkg/v3 v3.5.17 h1:XxnDXAWq2pnxqx76ljWwiQ9jylbpC4rvkAeRVOUKKVw= +go.etcd.io/etcd/client/pkg/v3 v3.5.17/go.mod h1:4DqK1TKacp/86nJk4FLQqo6Mn2vvQFBmruW3pP14H/w= 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/v3 v3.5.16 h1:sSmVYOAHeC9doqi0gv7v86oY/BTld0SEFGaxsU9eRhE= -go.etcd.io/etcd/client/v3 v3.5.16/go.mod h1:X+rExSGkyqxvu276cr2OwPLBaeqFu1cIl4vmRjAD/50= +go.etcd.io/etcd/client/v3 v3.5.17 h1:o48sINNeWz5+pjy/Z0+HKpj/xSnBkuVhVvXkjEXbqZY= +go.etcd.io/etcd/client/v3 v3.5.17/go.mod h1:j2d4eXTHWkT2ClBgnnEPm/Wuu7jsqku41v9DZ3OtjQo= 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.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= -go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= -go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= -go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= -go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= -go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= +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= @@ -284,14 +294,14 @@ 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.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 h1:kx6Ds3MlpiUHKj7syVnbp57++8WpuKPcR5yjLBjvLEA= -golang.org/x/exp v0.0.0-20240823005443-9b4947da3948/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= +golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= +golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +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/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= -golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -299,42 +309,43 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200301022130-244492dfa37a/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.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -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/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= +golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= +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.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= +golang.org/x/sync v0.13.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.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= +golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= -golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= +golang.org/x/term v0.31.0 h1:erwDkOK1Msy6offm1mOgvspSkslFnIGsFnxOKoufg3o= +golang.org/x/term v0.31.0/go.mod h1:R4BeIy7D95HzImkxGkTW1UQTtP54tio2RyHz7PwK0aw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -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/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= +golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= +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.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= -golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= +golang.org/x/tools v0.32.0 h1:Q7N1vhpkQv7ybVzLFtTjvQya2ewbwNDZzUgfXGqtMWU= +golang.org/x/tools v0.32.0/go.mod h1:ZxrU41P/wAbZD8EDa6dDCa6XfpkhJ7HFMjHJXfBDu8s= 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= @@ -344,14 +355,14 @@ google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6 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/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw= -google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= -google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= -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= +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.2 h1:R8FeyR1/eLmkutZOM5CWghmo5itiG9z0ktFlTVLuTmU= +google.golang.org/protobuf v1.36.2/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-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= @@ -374,47 +385,47 @@ 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.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/apiserver v0.32.0 h1:VJ89ZvQZ8p1sLeiWdRJpRD6oLozNZD2+qVSLi+ft5Qs= -k8s.io/apiserver v0.32.0/go.mod h1:HFh+dM1/BE/Hm4bS4nTXHVfN6Z6tFIZPi649n83b4Ag= +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.0 h1:dP+OZqs7zHPpGQMCGAhectbHU2SNCuZtIimRKTv2T1c= k8s.io/cli-runtime v0.32.0/go.mod h1:Mai8ht2+esoDRK5hr861KRy6z0zHsSTYttNVJXgP3YQ= -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/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.31.0 h1:w607nrMi1KeDKB3/F/J4lIoOgAwc+gV9ZKew4XRfMp8= k8s.io/code-generator v0.31.0/go.mod h1:84y4w3es8rOJOUUP1rLsIiGlO1JuEaPFXQPA9e/K6U0= -k8s.io/component-base v0.32.0 h1:d6cWHZkCiiep41ObYQS6IcgzOUQUNpywm39KVYaUqzU= -k8s.io/component-base v0.32.0/go.mod h1:JLG2W5TUxUu5uDyKiH2R/7NnxJo1HlPoRIIbVLkK5eM= +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/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 h1:si3PfKm8dDYxgfbeA6orqrtLkvvIeH8UqffFJDl0bz4= k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9/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.0 h1:jwOfunHIrcdYl5FRcA+uUKKtg6qiqoPCwmS2T3XTYL4= -k8s.io/kms v0.32.0/go.mod h1:Bk2evz/Yvk0oVrvm4MvZbgq8BD34Ksxs2SRHn4/UiOM= -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/kms v0.32.3 h1:HhHw5+pRCzEJp3oFFJ1q5W2N6gAI7YkUg4ay4Z0dgwM= +k8s.io/kms v0.32.3/go.mod h1:Bk2evz/Yvk0oVrvm4MvZbgq8BD34Ksxs2SRHn4/UiOM= +k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 h1:hcha5B1kVACrLujCKLbr8XWMxCxzQx42DY8QKYJrDLg= +k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7/go.mod h1:GewRfANuJ70iYzvn+i4lezLDAFzvjxZYK1gn1lWcfas= k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0= k8s.io/utils v0.0.0-20241210054802-24370beab758/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.0 h1:CPT0ExVicCzcpeN4baWEV2ko2Z/AsiZgEdwgcfwLgMo= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.1 h1:uOuSLOMBWkJH0TWa9X6l+mj5nZdm6Ay6Bli8HL8rNfk= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.1/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= 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-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= +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/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= -sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= +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/hack/tools.go b/hack/tools.go index d038d301f..e35a8ffa8 100644 --- a/hack/tools.go +++ b/hack/tools.go @@ -19,6 +19,8 @@ limitations under the License. package tools import ( + _ "github.com/kcp-dev/code-generator/v3/cmd/cluster-client-gen" + _ "github.com/kcp-dev/kcp/sdk/cmd/apigen" _ "k8s.io/code-generator" _ "k8s.io/code-generator/cmd/conversion-gen" _ "k8s.io/code-generator/cmd/deepcopy-gen" diff --git a/hack/update-codegen-clients-kcp.sh b/hack/update-codegen-clients-kcp.sh index 470efc4d8..54f24a100 100755 --- a/hack/update-codegen-clients-kcp.sh +++ b/hack/update-codegen-clients-kcp.sh @@ -26,12 +26,22 @@ 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 -${KUBE_APPLYCONFIGURATION_GEN} \ +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" \ @@ -42,7 +52,7 @@ ${KUBE_APPLYCONFIGURATION_GEN} \ k8s.io/apimachinery/pkg/runtime \ k8s.io/apimachinery/pkg/version -"${KUBE_CLIENT_GEN}" \ +"$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="" \ @@ -51,12 +61,46 @@ ${KUBE_APPLYCONFIGURATION_GEN} \ --output-pkg github.com/kube-bind/kube-bind/sdk/kcp/clientset \ --go-header-file ./hack/boilerplate/boilerplate.generatego.txt \ --output-dir "sdk/kcp/clientset" -pushd ./sdk/apis - -${CODE_GENERATOR} \ - "client:outputPackagePath=github.com/kube-bind/kube-bind/sdk/kcp,apiPackagePath=github.com/kube-bind/kube-bind/sdk/apis,singleClusterClientPackagePath=github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned,singleClusterApplyConfigurationsPackagePath=github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration,headerFile=${BOILERPLATE_HEADER}" \ - "lister:apiPackagePath=github.com/kube-bind/kube-bind/sdk/apis,headerFile=${BOILERPLATE_HEADER}" \ - "informer:outputPackagePath=github.com/kube-bind/kube-bind/sdk/kcp,singleClusterClientPackagePath=github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned,apiPackagePath=github.com/kube-bind/kube-bind/sdk/apis,headerFile=${BOILERPLATE_HEADER}" \ - "paths=./..." \ - "output:dir=../kcp" -popd + + +# 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/pkg/committer/committer.go b/pkg/committer/committer.go index 5c8e523b2..52e9b15a3 100644 --- a/pkg/committer/committer.go +++ b/pkg/committer/committer.go @@ -23,7 +23,6 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/google/go-cmp/cmp" - "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" diff --git a/pkg/konnector/controllers/cluster/servicebinding/servicebinding_reconcile_test.go b/pkg/konnector/controllers/cluster/servicebinding/servicebinding_reconcile_test.go index aa5f41687..23b6f30c8 100644 --- a/pkg/konnector/controllers/cluster/servicebinding/servicebinding_reconcile_test.go +++ b/pkg/konnector/controllers/cluster/servicebinding/servicebinding_reconcile_test.go @@ -21,7 +21,6 @@ import ( "testing" "github.com/stretchr/testify/require" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/konnector/controllers/cluster/serviceexport/cluster-scoped/utils_test.go b/pkg/konnector/controllers/cluster/serviceexport/cluster-scoped/utils_test.go index ba29b611e..5f4e2a7ab 100644 --- a/pkg/konnector/controllers/cluster/serviceexport/cluster-scoped/utils_test.go +++ b/pkg/konnector/controllers/cluster/serviceexport/cluster-scoped/utils_test.go @@ -20,7 +20,6 @@ import ( "testing" "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ) diff --git a/pkg/konnector/controllers/cluster/serviceexport/serviceexport_reconcile_test.go b/pkg/konnector/controllers/cluster/serviceexport/serviceexport_reconcile_test.go index f38f3a8a5..7aee3b3df 100644 --- a/pkg/konnector/controllers/cluster/serviceexport/serviceexport_reconcile_test.go +++ b/pkg/konnector/controllers/cluster/serviceexport/serviceexport_reconcile_test.go @@ -22,7 +22,6 @@ import ( "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/require" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/konnector/healthz/server.go b/pkg/konnector/healthz/server.go index 451bd0f6b..5865d236b 100644 --- a/pkg/konnector/healthz/server.go +++ b/pkg/konnector/healthz/server.go @@ -23,7 +23,6 @@ import ( "time" "github.com/gorilla/mux" - "k8s.io/klog/v2" ) diff --git a/pkg/konnector/options/options.go b/pkg/konnector/options/options.go index 788df0df4..9821b794e 100644 --- a/pkg/konnector/options/options.go +++ b/pkg/konnector/options/options.go @@ -22,7 +22,6 @@ import ( "os" "github.com/spf13/pflag" - "k8s.io/component-base/logs" logsv1 "k8s.io/component-base/logs/api/v1" ) diff --git a/sdk/apis/kubebind/v1alpha1/helpers/serviceexport_test.go b/sdk/apis/kubebind/v1alpha1/helpers/serviceexport_test.go index 734c8edba..8baf1c82f 100644 --- a/sdk/apis/kubebind/v1alpha1/helpers/serviceexport_test.go +++ b/sdk/apis/kubebind/v1alpha1/helpers/serviceexport_test.go @@ -20,7 +20,6 @@ import ( "testing" "github.com/stretchr/testify/require" - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/utils/ptr" ) diff --git a/sdk/apis/kubebind/v1alpha2/helpers/apiresourceschema_test.go b/sdk/apis/kubebind/v1alpha2/helpers/apiresourceschema_test.go index 4dd624595..e5722623a 100644 --- a/sdk/apis/kubebind/v1alpha2/helpers/apiresourceschema_test.go +++ b/sdk/apis/kubebind/v1alpha2/helpers/apiresourceschema_test.go @@ -20,7 +20,6 @@ import ( "testing" "github.com/stretchr/testify/require" - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/utils/ptr" ) diff --git a/sdk/apis/third_party/conditions/util/conditions/getter_test.go b/sdk/apis/third_party/conditions/util/conditions/getter_test.go index 2785e1559..279f2d22c 100644 --- a/sdk/apis/third_party/conditions/util/conditions/getter_test.go +++ b/sdk/apis/third_party/conditions/util/conditions/getter_test.go @@ -20,7 +20,6 @@ import ( "testing" . "github.com/onsi/gomega" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" conditionsapi "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" diff --git a/sdk/apis/third_party/conditions/util/conditions/matcher_test.go b/sdk/apis/third_party/conditions/util/conditions/matcher_test.go index 0528d1709..c535bd2eb 100644 --- a/sdk/apis/third_party/conditions/util/conditions/matcher_test.go +++ b/sdk/apis/third_party/conditions/util/conditions/matcher_test.go @@ -20,7 +20,6 @@ import ( "testing" . "github.com/onsi/gomega" - corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/sdk/apis/third_party/conditions/util/conditions/merge_strategies_test.go b/sdk/apis/third_party/conditions/util/conditions/merge_strategies_test.go index db47e782b..35035e020 100644 --- a/sdk/apis/third_party/conditions/util/conditions/merge_strategies_test.go +++ b/sdk/apis/third_party/conditions/util/conditions/merge_strategies_test.go @@ -20,7 +20,6 @@ import ( "testing" . "github.com/onsi/gomega" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" conditionsapi "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" diff --git a/sdk/apis/third_party/conditions/util/conditions/merge_test.go b/sdk/apis/third_party/conditions/util/conditions/merge_test.go index 4715a502f..8370db03e 100644 --- a/sdk/apis/third_party/conditions/util/conditions/merge_test.go +++ b/sdk/apis/third_party/conditions/util/conditions/merge_test.go @@ -20,7 +20,6 @@ import ( "testing" . "github.com/onsi/gomega" - corev1 "k8s.io/api/core/v1" conditionsapi "github.com/kube-bind/kube-bind/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" diff --git a/sdk/apis/third_party/conditions/util/conditions/patch_test.go b/sdk/apis/third_party/conditions/util/conditions/patch_test.go index 492e289c9..e68323c1a 100644 --- a/sdk/apis/third_party/conditions/util/conditions/patch_test.go +++ b/sdk/apis/third_party/conditions/util/conditions/patch_test.go @@ -21,7 +21,6 @@ import ( "time" . "github.com/onsi/gomega" - corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/sdk/apis/third_party/conditions/util/conditions/setter_test.go b/sdk/apis/third_party/conditions/util/conditions/setter_test.go index 1a8bbb53b..d12e4c782 100644 --- a/sdk/apis/third_party/conditions/util/conditions/setter_test.go +++ b/sdk/apis/third_party/conditions/util/conditions/setter_test.go @@ -24,7 +24,6 @@ import ( . "github.com/onsi/gomega" "github.com/onsi/gomega/format" "github.com/onsi/gomega/types" - corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/sdk/client/go.mod b/sdk/client/go.mod index e37abdcf5..e0d828e14 100644 --- a/sdk/client/go.mod +++ b/sdk/client/go.mod @@ -3,7 +3,7 @@ module github.com/kube-bind/kube-bind/sdk/client go 1.23.4 require ( - github.com/kube-bind/kube-bind/sdk/apis v0.4.5 + github.com/kube-bind/kube-bind/sdk/apis v0.0.0-20250620125133-1a40ef5c5d27 k8s.io/apimachinery v0.32.0 k8s.io/client-go v0.32.0 ) diff --git a/sdk/client/go.sum b/sdk/client/go.sum index 554265b1e..c04003b7c 100644 --- a/sdk/client/go.sum +++ b/sdk/client/go.sum @@ -48,8 +48,8 @@ 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.4.5 h1:sr4Vj5wrzbQ9DmrqQheryFGX6RvajtVbZInGxwZoSMI= -github.com/kube-bind/kube-bind/sdk/apis v0.4.5/go.mod h1:gR234zh0uX7aRXKsb9UPhPPq33u+zhL5NuyrzJFJI2Y= +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= diff --git a/sdk/kcp/applyconfiguration/conditions/v1alpha1/condition.go b/sdk/kcp/applyconfiguration/conditions/v1alpha1/condition.go index 3a5d80cab..f45255ab2 100644 --- a/sdk/kcp/applyconfiguration/conditions/v1alpha1/condition.go +++ b/sdk/kcp/applyconfiguration/conditions/v1alpha1/condition.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -22,18 +22,18 @@ 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" + v1alpha1 "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"` + Type *v1alpha1.ConditionType `json:"type,omitempty"` + Status *v1.ConditionStatus `json:"status,omitempty"` + Severity *v1alpha1.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 @@ -45,7 +45,7 @@ func Condition() *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 { +func (b *ConditionApplyConfiguration) WithType(value v1alpha1.ConditionType) *ConditionApplyConfiguration { b.Type = &value return b } @@ -61,7 +61,7 @@ func (b *ConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *Cond // 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 { +func (b *ConditionApplyConfiguration) WithSeverity(value v1alpha1.ConditionSeverity) *ConditionApplyConfiguration { b.Severity = &value return b } diff --git a/sdk/kcp/applyconfiguration/internal/internal.go b/sdk/kcp/applyconfiguration/internal/internal.go index 20b9c2bdd..6ddb044e2 100644 --- a/sdk/kcp/applyconfiguration/internal/internal.go +++ b/sdk/kcp/applyconfiguration/internal/internal.go @@ -14,13 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package internal import ( - fmt "fmt" - sync "sync" + "fmt" + "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebinding.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebinding.go index 81c04308c..5bbe9852b 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebinding.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebinding.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -48,7 +48,7 @@ func APIServiceBinding(name string) *APIServiceBindingApplyConfiguration { // 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 + b.Kind = &value return b } @@ -56,7 +56,7 @@ func (b *APIServiceBindingApplyConfiguration) WithKind(value string) *APIService // 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 + b.APIVersion = &value return b } @@ -65,7 +65,7 @@ func (b *APIServiceBindingApplyConfiguration) WithAPIVersion(value string) *APIS // 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 + b.Name = &value return b } @@ -74,7 +74,7 @@ func (b *APIServiceBindingApplyConfiguration) WithName(value string) *APIService // 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 + b.GenerateName = &value return b } @@ -83,7 +83,7 @@ func (b *APIServiceBindingApplyConfiguration) WithGenerateName(value string) *AP // 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 + b.Namespace = &value return b } @@ -92,7 +92,7 @@ func (b *APIServiceBindingApplyConfiguration) WithNamespace(value string) *APISe // 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 + b.UID = &value return b } @@ -101,7 +101,7 @@ func (b *APIServiceBindingApplyConfiguration) WithUID(value types.UID) *APIServi // 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 + b.ResourceVersion = &value return b } @@ -110,7 +110,7 @@ func (b *APIServiceBindingApplyConfiguration) WithResourceVersion(value string) // 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 + b.Generation = &value return b } @@ -119,7 +119,7 @@ func (b *APIServiceBindingApplyConfiguration) WithGeneration(value int64) *APISe // 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 + b.CreationTimestamp = &value return b } @@ -128,7 +128,7 @@ func (b *APIServiceBindingApplyConfiguration) WithCreationTimestamp(value metav1 // 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 + b.DeletionTimestamp = &value return b } @@ -137,7 +137,7 @@ func (b *APIServiceBindingApplyConfiguration) WithDeletionTimestamp(value metav1 // 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 + b.DeletionGracePeriodSeconds = &value return b } @@ -147,11 +147,11 @@ func (b *APIServiceBindingApplyConfiguration) WithDeletionGracePeriodSeconds(val // 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)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -162,11 +162,11 @@ func (b *APIServiceBindingApplyConfiguration) WithLabels(entries map[string]stri // 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)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -180,7 +180,7 @@ func (b *APIServiceBindingApplyConfiguration) WithOwnerReferences(values ...*v1. if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -191,7 +191,7 @@ func (b *APIServiceBindingApplyConfiguration) WithOwnerReferences(values ...*v1. func (b *APIServiceBindingApplyConfiguration) WithFinalizers(values ...string) *APIServiceBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -221,5 +221,5 @@ func (b *APIServiceBindingApplyConfiguration) WithStatus(value *APIServiceBindin // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIServiceBindingApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingspec.go index 9a2d6d8f1..906edecb5 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingspec.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingstatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingstatus.go index 2554a68eb..40005f459 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingstatus.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicebindingstatus.go @@ -14,19 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// 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" + 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 *conditionsv1alpha1.Conditions `json:"conditions,omitempty"` + ProviderPrettyName *string `json:"providerPrettyName,omitempty"` + Conditions *v1alpha1.Conditions `json:"conditions,omitempty"` } // APIServiceBindingStatusApplyConfiguration constructs a declarative configuration of the APIServiceBindingStatus type for use with @@ -46,7 +46,7 @@ func (b *APIServiceBindingStatusApplyConfiguration) WithProviderPrettyName(value // 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 { +func (b *APIServiceBindingStatusApplyConfiguration) WithConditions(value v1alpha1.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 index 34aca7f2b..911880abc 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexport.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexport.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -49,7 +49,7 @@ func APIServiceExport(name, namespace string) *APIServiceExportApplyConfiguratio // 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 + b.Kind = &value return b } @@ -57,7 +57,7 @@ func (b *APIServiceExportApplyConfiguration) WithKind(value string) *APIServiceE // 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 + b.APIVersion = &value return b } @@ -66,7 +66,7 @@ func (b *APIServiceExportApplyConfiguration) WithAPIVersion(value string) *APISe // 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 + b.Name = &value return b } @@ -75,7 +75,7 @@ func (b *APIServiceExportApplyConfiguration) WithName(value string) *APIServiceE // 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 + b.GenerateName = &value return b } @@ -84,7 +84,7 @@ func (b *APIServiceExportApplyConfiguration) WithGenerateName(value string) *API // 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 + b.Namespace = &value return b } @@ -93,7 +93,7 @@ func (b *APIServiceExportApplyConfiguration) WithNamespace(value string) *APISer // 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 + b.UID = &value return b } @@ -102,7 +102,7 @@ func (b *APIServiceExportApplyConfiguration) WithUID(value types.UID) *APIServic // 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 + b.ResourceVersion = &value return b } @@ -111,7 +111,7 @@ func (b *APIServiceExportApplyConfiguration) WithResourceVersion(value string) * // 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 + b.Generation = &value return b } @@ -120,7 +120,7 @@ func (b *APIServiceExportApplyConfiguration) WithGeneration(value int64) *APISer // 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 + b.CreationTimestamp = &value return b } @@ -129,7 +129,7 @@ func (b *APIServiceExportApplyConfiguration) WithCreationTimestamp(value metav1. // 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 + b.DeletionTimestamp = &value return b } @@ -138,7 +138,7 @@ func (b *APIServiceExportApplyConfiguration) WithDeletionTimestamp(value metav1. // 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 + b.DeletionGracePeriodSeconds = &value return b } @@ -148,11 +148,11 @@ func (b *APIServiceExportApplyConfiguration) WithDeletionGracePeriodSeconds(valu // 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)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -163,11 +163,11 @@ func (b *APIServiceExportApplyConfiguration) WithLabels(entries map[string]strin // 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)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -181,7 +181,7 @@ func (b *APIServiceExportApplyConfiguration) WithOwnerReferences(values ...*v1.O if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -192,7 +192,7 @@ func (b *APIServiceExportApplyConfiguration) WithOwnerReferences(values ...*v1.O func (b *APIServiceExportApplyConfiguration) WithFinalizers(values ...string) *APIServiceExportApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -222,5 +222,5 @@ func (b *APIServiceExportApplyConfiguration) WithStatus(value *APIServiceExportS // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIServiceExportApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportcrdspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportcrdspec.go index 355af0353..694798522 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportcrdspec.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportcrdspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequest.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequest.go index fb6a79926..4f8c861e3 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequest.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequest.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -49,7 +49,7 @@ func APIServiceExportRequest(name, namespace string) *APIServiceExportRequestApp // 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 + b.Kind = &value return b } @@ -57,7 +57,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithKind(value string) *APIS // 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 + b.APIVersion = &value return b } @@ -66,7 +66,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithAPIVersion(value string) // 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 + b.Name = &value return b } @@ -75,7 +75,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithName(value string) *APIS // 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 + b.GenerateName = &value return b } @@ -84,7 +84,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithGenerateName(value strin // 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 + b.Namespace = &value return b } @@ -93,7 +93,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithNamespace(value string) // 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 + b.UID = &value return b } @@ -102,7 +102,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithUID(value types.UID) *AP // 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 + b.ResourceVersion = &value return b } @@ -111,7 +111,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithResourceVersion(value st // 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 + b.Generation = &value return b } @@ -120,7 +120,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithGeneration(value int64) // 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 + b.CreationTimestamp = &value return b } @@ -129,7 +129,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithCreationTimestamp(value // 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 + b.DeletionTimestamp = &value return b } @@ -138,7 +138,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithDeletionTimestamp(value // 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 + b.DeletionGracePeriodSeconds = &value return b } @@ -148,11 +148,11 @@ func (b *APIServiceExportRequestApplyConfiguration) WithDeletionGracePeriodSecon // 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)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -163,11 +163,11 @@ func (b *APIServiceExportRequestApplyConfiguration) WithLabels(entries map[strin // 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)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -181,7 +181,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithOwnerReferences(values . if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -192,7 +192,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithOwnerReferences(values . func (b *APIServiceExportRequestApplyConfiguration) WithFinalizers(values ...string) *APIServiceExportRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -222,5 +222,5 @@ func (b *APIServiceExportRequestApplyConfiguration) WithStatus(value *APIService // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIServiceExportRequestApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestresource.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestresource.go index e0a21cfb3..06ebcff2e 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestresource.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestresource.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -35,7 +35,7 @@ func APIServiceExportRequestResource() *APIServiceExportRequestResourceApplyConf // 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 + b.Group = &value return b } @@ -43,7 +43,7 @@ func (b *APIServiceExportRequestResourceApplyConfiguration) WithGroup(value stri // 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 + b.Resource = &value return b } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestspec.go index 675167f32..18ab1a8dd 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestspec.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequestspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequeststatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequeststatus.go index 7d9121a23..3d4936790 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequeststatus.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportrequeststatus.go @@ -14,21 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 import ( - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" + v1alpha1 "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"` + Phase *v1alpha1.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 @@ -40,7 +40,7 @@ func APIServiceExportRequestStatus() *APIServiceExportRequestStatusApplyConfigur // 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 { +func (b *APIServiceExportRequestStatusApplyConfiguration) WithPhase(value v1alpha1.APIServiceExportRequestPhase) *APIServiceExportRequestStatusApplyConfiguration { b.Phase = &value return b } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportschema.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportschema.go index 77efa2625..45e564063 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportschema.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportschema.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportspec.go index 240b8a881..b351ca75b 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportspec.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -42,7 +42,7 @@ func APIServiceExportSpec() *APIServiceExportSpecApplyConfiguration { // 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 + b.Group = &value return b } @@ -50,7 +50,7 @@ func (b *APIServiceExportSpecApplyConfiguration) WithGroup(value string) *APISer // 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 + b.Names = &value return b } @@ -58,7 +58,7 @@ func (b *APIServiceExportSpecApplyConfiguration) WithNames(value v1.CustomResour // 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 + b.Scope = &value return b } @@ -70,7 +70,7 @@ func (b *APIServiceExportSpecApplyConfiguration) WithVersions(values ...*APIServ if values[i] == nil { panic("nil value passed to WithVersions") } - b.APIServiceExportCRDSpecApplyConfiguration.Versions = append(b.APIServiceExportCRDSpecApplyConfiguration.Versions, *values[i]) + b.Versions = append(b.Versions, *values[i]) } return b } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportstatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportstatus.go index e6d4b6eca..6a1b0fbef 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportstatus.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportstatus.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// 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" + 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 @@ -29,7 +29,7 @@ import ( type APIServiceExportStatusApplyConfiguration struct { AcceptedNames *v1.CustomResourceDefinitionNames `json:"acceptedNames,omitempty"` StoredVersions []string `json:"storedVersions,omitempty"` - Conditions *conditionsv1alpha1.Conditions `json:"conditions,omitempty"` + Conditions *v1alpha1.Conditions `json:"conditions,omitempty"` } // APIServiceExportStatusApplyConfiguration constructs a declarative configuration of the APIServiceExportStatus type for use with @@ -59,7 +59,7 @@ func (b *APIServiceExportStatusApplyConfiguration) WithStoredVersions(values ... // 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 { +func (b *APIServiceExportStatusApplyConfiguration) WithConditions(value v1alpha1.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 index 182f7841c..7bb448d41 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportversion.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiserviceexportversion.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespace.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespace.go index 0fa4bc9e9..d17f4165c 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespace.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespace.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -22,7 +22,7 @@ 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" + v1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" ) @@ -31,7 +31,7 @@ import ( type APIServiceNamespaceApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *kubebindv1alpha1.APIServiceNamespaceSpec `json:"spec,omitempty"` + Spec *v1alpha1.APIServiceNamespaceSpec `json:"spec,omitempty"` Status *APIServiceNamespaceStatusApplyConfiguration `json:"status,omitempty"` } @@ -50,7 +50,7 @@ func APIServiceNamespace(name, namespace string) *APIServiceNamespaceApplyConfig // 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 + b.Kind = &value return b } @@ -58,7 +58,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithKind(value string) *APIServi // 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 + b.APIVersion = &value return b } @@ -67,7 +67,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithAPIVersion(value string) *AP // 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 + b.Name = &value return b } @@ -76,7 +76,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithName(value string) *APIServi // 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 + b.GenerateName = &value return b } @@ -85,7 +85,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithGenerateName(value string) * // 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 + b.Namespace = &value return b } @@ -94,7 +94,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithNamespace(value string) *API // 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 + b.UID = &value return b } @@ -103,7 +103,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithUID(value types.UID) *APISer // 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 + b.ResourceVersion = &value return b } @@ -112,7 +112,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithResourceVersion(value string // 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 + b.Generation = &value return b } @@ -121,7 +121,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithGeneration(value int64) *API // 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 + b.CreationTimestamp = &value return b } @@ -130,7 +130,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithCreationTimestamp(value meta // 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 + b.DeletionTimestamp = &value return b } @@ -139,7 +139,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithDeletionTimestamp(value meta // 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 + b.DeletionGracePeriodSeconds = &value return b } @@ -149,11 +149,11 @@ func (b *APIServiceNamespaceApplyConfiguration) WithDeletionGracePeriodSeconds(v // 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)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -164,11 +164,11 @@ func (b *APIServiceNamespaceApplyConfiguration) WithLabels(entries map[string]st // 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)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -182,7 +182,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithOwnerReferences(values ...*v if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -193,7 +193,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithOwnerReferences(values ...*v func (b *APIServiceNamespaceApplyConfiguration) WithFinalizers(values ...string) *APIServiceNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -207,7 +207,7 @@ func (b *APIServiceNamespaceApplyConfiguration) ensureObjectMetaApplyConfigurati // 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 { +func (b *APIServiceNamespaceApplyConfiguration) WithSpec(value v1alpha1.APIServiceNamespaceSpec) *APIServiceNamespaceApplyConfiguration { b.Spec = &value return b } @@ -223,5 +223,5 @@ func (b *APIServiceNamespaceApplyConfiguration) WithStatus(value *APIServiceName // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIServiceNamespaceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespacestatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespacestatus.go index d996da931..8a12263dc 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespacestatus.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/apiservicenamespacestatus.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbinding.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbinding.go index 13f6990f4..058c5cd5c 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbinding.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbinding.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -49,7 +49,7 @@ func ClusterBinding(name, namespace string) *ClusterBindingApplyConfiguration { // 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 + b.Kind = &value return b } @@ -57,7 +57,7 @@ func (b *ClusterBindingApplyConfiguration) WithKind(value string) *ClusterBindin // 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 + b.APIVersion = &value return b } @@ -66,7 +66,7 @@ func (b *ClusterBindingApplyConfiguration) WithAPIVersion(value string) *Cluster // 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 + b.Name = &value return b } @@ -75,7 +75,7 @@ func (b *ClusterBindingApplyConfiguration) WithName(value string) *ClusterBindin // 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 + b.GenerateName = &value return b } @@ -84,7 +84,7 @@ func (b *ClusterBindingApplyConfiguration) WithGenerateName(value string) *Clust // 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 + b.Namespace = &value return b } @@ -93,7 +93,7 @@ func (b *ClusterBindingApplyConfiguration) WithNamespace(value string) *ClusterB // 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 + b.UID = &value return b } @@ -102,7 +102,7 @@ func (b *ClusterBindingApplyConfiguration) WithUID(value types.UID) *ClusterBind // 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 + b.ResourceVersion = &value return b } @@ -111,7 +111,7 @@ func (b *ClusterBindingApplyConfiguration) WithResourceVersion(value string) *Cl // 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 + b.Generation = &value return b } @@ -120,7 +120,7 @@ func (b *ClusterBindingApplyConfiguration) WithGeneration(value int64) *ClusterB // 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 + b.CreationTimestamp = &value return b } @@ -129,7 +129,7 @@ func (b *ClusterBindingApplyConfiguration) WithCreationTimestamp(value metav1.Ti // 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 + b.DeletionTimestamp = &value return b } @@ -138,7 +138,7 @@ func (b *ClusterBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Ti // 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 + b.DeletionGracePeriodSeconds = &value return b } @@ -148,11 +148,11 @@ func (b *ClusterBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value // 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)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -163,11 +163,11 @@ func (b *ClusterBindingApplyConfiguration) WithLabels(entries map[string]string) // 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)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -181,7 +181,7 @@ func (b *ClusterBindingApplyConfiguration) WithOwnerReferences(values ...*v1.Own if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -192,7 +192,7 @@ func (b *ClusterBindingApplyConfiguration) WithOwnerReferences(values ...*v1.Own func (b *ClusterBindingApplyConfiguration) WithFinalizers(values ...string) *ClusterBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -222,5 +222,5 @@ func (b *ClusterBindingApplyConfiguration) WithStatus(value *ClusterBindingStatu // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterBindingApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingspec.go index f3ebd2590..7a74c5c4a 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingspec.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingstatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingstatus.go index 1f69e6cfe..3f0a2acbb 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingstatus.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clusterbindingstatus.go @@ -14,23 +14,23 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// 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" + 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 *conditionsv1alpha1.Conditions `json:"conditions,omitempty"` + 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 @@ -66,7 +66,7 @@ func (b *ClusterBindingStatusApplyConfiguration) WithKonnectorVersion(value stri // 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 { +func (b *ClusterBindingStatusApplyConfiguration) WithConditions(value v1alpha1.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 index df6be6f86..675b461e7 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clustersecretkeyref.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/clustersecretkeyref.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 @@ -35,7 +35,7 @@ func ClusterSecretKeyRef() *ClusterSecretKeyRefApplyConfiguration { // 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 + b.Name = &value return b } @@ -43,7 +43,7 @@ func (b *ClusterSecretKeyRefApplyConfiguration) WithName(value string) *ClusterS // 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 + b.Key = &value return b } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/groupresource.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/groupresource.go index 057490ab9..a20ba92f6 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/groupresource.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/groupresource.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/localsecretkeyref.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/localsecretkeyref.go index 6e0cedf47..cc38185ef 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha1/localsecretkeyref.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha1/localsecretkeyref.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha1 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschema.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschema.go index b1395db19..66af52d62 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschema.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschema.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 @@ -47,7 +47,7 @@ func APIResourceSchema(name string) *APIResourceSchemaApplyConfiguration { // 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 + b.Kind = &value return b } @@ -55,7 +55,7 @@ func (b *APIResourceSchemaApplyConfiguration) WithKind(value string) *APIResourc // 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 + b.APIVersion = &value return b } @@ -64,7 +64,7 @@ func (b *APIResourceSchemaApplyConfiguration) WithAPIVersion(value string) *APIR // 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 + b.Name = &value return b } @@ -73,7 +73,7 @@ func (b *APIResourceSchemaApplyConfiguration) WithName(value string) *APIResourc // 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 + b.GenerateName = &value return b } @@ -82,7 +82,7 @@ func (b *APIResourceSchemaApplyConfiguration) WithGenerateName(value string) *AP // 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 + b.Namespace = &value return b } @@ -91,7 +91,7 @@ func (b *APIResourceSchemaApplyConfiguration) WithNamespace(value string) *APIRe // 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 + b.UID = &value return b } @@ -100,7 +100,7 @@ func (b *APIResourceSchemaApplyConfiguration) WithUID(value types.UID) *APIResou // 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 + b.ResourceVersion = &value return b } @@ -109,7 +109,7 @@ func (b *APIResourceSchemaApplyConfiguration) WithResourceVersion(value string) // 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 + b.Generation = &value return b } @@ -118,7 +118,7 @@ func (b *APIResourceSchemaApplyConfiguration) WithGeneration(value int64) *APIRe // 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 + b.CreationTimestamp = &value return b } @@ -127,7 +127,7 @@ func (b *APIResourceSchemaApplyConfiguration) WithCreationTimestamp(value metav1 // 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 + b.DeletionTimestamp = &value return b } @@ -136,7 +136,7 @@ func (b *APIResourceSchemaApplyConfiguration) WithDeletionTimestamp(value metav1 // 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 + b.DeletionGracePeriodSeconds = &value return b } @@ -146,11 +146,11 @@ func (b *APIResourceSchemaApplyConfiguration) WithDeletionGracePeriodSeconds(val // 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)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -161,11 +161,11 @@ func (b *APIResourceSchemaApplyConfiguration) WithLabels(entries map[string]stri // 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)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -179,7 +179,7 @@ func (b *APIResourceSchemaApplyConfiguration) WithOwnerReferences(values ...*v1. if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -190,7 +190,7 @@ func (b *APIResourceSchemaApplyConfiguration) WithOwnerReferences(values ...*v1. func (b *APIResourceSchemaApplyConfiguration) WithFinalizers(values ...string) *APIResourceSchemaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -212,5 +212,5 @@ func (b *APIResourceSchemaApplyConfiguration) WithSpec(value *APIResourceSchemaS // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIResourceSchemaApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemacrdspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemacrdspec.go index effd2e5a4..fdcdba0ae 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemacrdspec.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemacrdspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemareference.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemareference.go index 3308d0640..b232bcb3f 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemareference.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemareference.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemaspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemaspec.go index 11ae7b8b1..aea70bbea 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemaspec.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceschemaspec.go @@ -14,20 +14,20 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// 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" + v1alpha2 "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"` + InformerScope *v1alpha2.InformerScope `json:"informerScope,omitempty"` APIResourceSchemaCRDSpecApplyConfiguration `json:",inline"` } @@ -40,7 +40,7 @@ func APIResourceSchemaSpec() *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 { +func (b *APIResourceSchemaSpecApplyConfiguration) WithInformerScope(value v1alpha2.InformerScope) *APIResourceSchemaSpecApplyConfiguration { b.InformerScope = &value return b } @@ -49,7 +49,7 @@ func (b *APIResourceSchemaSpecApplyConfiguration) WithInformerScope(value kubebi // 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 + b.Group = &value return b } @@ -57,7 +57,7 @@ func (b *APIResourceSchemaSpecApplyConfiguration) WithGroup(value string) *APIRe // 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 + b.Names = &value return b } @@ -65,7 +65,7 @@ func (b *APIResourceSchemaSpecApplyConfiguration) WithNames(value v1.CustomResou // 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 + b.Scope = &value return b } @@ -77,7 +77,7 @@ func (b *APIResourceSchemaSpecApplyConfiguration) WithVersions(values ...*APIRes if values[i] == nil { panic("nil value passed to WithVersions") } - b.APIResourceSchemaCRDSpecApplyConfiguration.Versions = append(b.APIResourceSchemaCRDSpecApplyConfiguration.Versions, *values[i]) + b.Versions = append(b.Versions, *values[i]) } return b } @@ -86,6 +86,6 @@ func (b *APIResourceSchemaSpecApplyConfiguration) WithVersions(values ...*APIRes // 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 + b.Conversion = value return b } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceversion.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceversion.go index cf0f2d881..d6055ad0d 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceversion.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiresourceversion.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebinding.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebinding.go index b1849fbef..de3c3b7ad 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebinding.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebinding.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 @@ -48,7 +48,7 @@ func APIServiceBinding(name string) *APIServiceBindingApplyConfiguration { // 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 + b.Kind = &value return b } @@ -56,7 +56,7 @@ func (b *APIServiceBindingApplyConfiguration) WithKind(value string) *APIService // 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 + b.APIVersion = &value return b } @@ -65,7 +65,7 @@ func (b *APIServiceBindingApplyConfiguration) WithAPIVersion(value string) *APIS // 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 + b.Name = &value return b } @@ -74,7 +74,7 @@ func (b *APIServiceBindingApplyConfiguration) WithName(value string) *APIService // 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 + b.GenerateName = &value return b } @@ -83,7 +83,7 @@ func (b *APIServiceBindingApplyConfiguration) WithGenerateName(value string) *AP // 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 + b.Namespace = &value return b } @@ -92,7 +92,7 @@ func (b *APIServiceBindingApplyConfiguration) WithNamespace(value string) *APISe // 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 + b.UID = &value return b } @@ -101,7 +101,7 @@ func (b *APIServiceBindingApplyConfiguration) WithUID(value types.UID) *APIServi // 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 + b.ResourceVersion = &value return b } @@ -110,7 +110,7 @@ func (b *APIServiceBindingApplyConfiguration) WithResourceVersion(value string) // 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 + b.Generation = &value return b } @@ -119,7 +119,7 @@ func (b *APIServiceBindingApplyConfiguration) WithGeneration(value int64) *APISe // 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 + b.CreationTimestamp = &value return b } @@ -128,7 +128,7 @@ func (b *APIServiceBindingApplyConfiguration) WithCreationTimestamp(value metav1 // 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 + b.DeletionTimestamp = &value return b } @@ -137,7 +137,7 @@ func (b *APIServiceBindingApplyConfiguration) WithDeletionTimestamp(value metav1 // 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 + b.DeletionGracePeriodSeconds = &value return b } @@ -147,11 +147,11 @@ func (b *APIServiceBindingApplyConfiguration) WithDeletionGracePeriodSeconds(val // 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)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -162,11 +162,11 @@ func (b *APIServiceBindingApplyConfiguration) WithLabels(entries map[string]stri // 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)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -180,7 +180,7 @@ func (b *APIServiceBindingApplyConfiguration) WithOwnerReferences(values ...*v1. if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -191,7 +191,7 @@ func (b *APIServiceBindingApplyConfiguration) WithOwnerReferences(values ...*v1. func (b *APIServiceBindingApplyConfiguration) WithFinalizers(values ...string) *APIServiceBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -221,5 +221,5 @@ func (b *APIServiceBindingApplyConfiguration) WithStatus(value *APIServiceBindin // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIServiceBindingApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingspec.go index 04f8ac366..0da6cff28 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingspec.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingstatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingstatus.go index 283d091f0..f01b46205 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingstatus.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicebindingstatus.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexport.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexport.go index 7278a9a09..48831608b 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexport.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexport.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 @@ -49,7 +49,7 @@ func APIServiceExport(name, namespace string) *APIServiceExportApplyConfiguratio // 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 + b.Kind = &value return b } @@ -57,7 +57,7 @@ func (b *APIServiceExportApplyConfiguration) WithKind(value string) *APIServiceE // 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 + b.APIVersion = &value return b } @@ -66,7 +66,7 @@ func (b *APIServiceExportApplyConfiguration) WithAPIVersion(value string) *APISe // 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 + b.Name = &value return b } @@ -75,7 +75,7 @@ func (b *APIServiceExportApplyConfiguration) WithName(value string) *APIServiceE // 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 + b.GenerateName = &value return b } @@ -84,7 +84,7 @@ func (b *APIServiceExportApplyConfiguration) WithGenerateName(value string) *API // 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 + b.Namespace = &value return b } @@ -93,7 +93,7 @@ func (b *APIServiceExportApplyConfiguration) WithNamespace(value string) *APISer // 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 + b.UID = &value return b } @@ -102,7 +102,7 @@ func (b *APIServiceExportApplyConfiguration) WithUID(value types.UID) *APIServic // 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 + b.ResourceVersion = &value return b } @@ -111,7 +111,7 @@ func (b *APIServiceExportApplyConfiguration) WithResourceVersion(value string) * // 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 + b.Generation = &value return b } @@ -120,7 +120,7 @@ func (b *APIServiceExportApplyConfiguration) WithGeneration(value int64) *APISer // 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 + b.CreationTimestamp = &value return b } @@ -129,7 +129,7 @@ func (b *APIServiceExportApplyConfiguration) WithCreationTimestamp(value metav1. // 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 + b.DeletionTimestamp = &value return b } @@ -138,7 +138,7 @@ func (b *APIServiceExportApplyConfiguration) WithDeletionTimestamp(value metav1. // 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 + b.DeletionGracePeriodSeconds = &value return b } @@ -148,11 +148,11 @@ func (b *APIServiceExportApplyConfiguration) WithDeletionGracePeriodSeconds(valu // 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)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -163,11 +163,11 @@ func (b *APIServiceExportApplyConfiguration) WithLabels(entries map[string]strin // 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)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -181,7 +181,7 @@ func (b *APIServiceExportApplyConfiguration) WithOwnerReferences(values ...*v1.O if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -192,7 +192,7 @@ func (b *APIServiceExportApplyConfiguration) WithOwnerReferences(values ...*v1.O func (b *APIServiceExportApplyConfiguration) WithFinalizers(values ...string) *APIServiceExportApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -222,5 +222,5 @@ func (b *APIServiceExportApplyConfiguration) WithStatus(value *APIServiceExportS // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIServiceExportApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequest.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequest.go index 560667f99..34594a134 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequest.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequest.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 @@ -49,7 +49,7 @@ func APIServiceExportRequest(name, namespace string) *APIServiceExportRequestApp // 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 + b.Kind = &value return b } @@ -57,7 +57,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithKind(value string) *APIS // 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 + b.APIVersion = &value return b } @@ -66,7 +66,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithAPIVersion(value string) // 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 + b.Name = &value return b } @@ -75,7 +75,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithName(value string) *APIS // 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 + b.GenerateName = &value return b } @@ -84,7 +84,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithGenerateName(value strin // 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 + b.Namespace = &value return b } @@ -93,7 +93,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithNamespace(value string) // 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 + b.UID = &value return b } @@ -102,7 +102,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithUID(value types.UID) *AP // 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 + b.ResourceVersion = &value return b } @@ -111,7 +111,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithResourceVersion(value st // 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 + b.Generation = &value return b } @@ -120,7 +120,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithGeneration(value int64) // 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 + b.CreationTimestamp = &value return b } @@ -129,7 +129,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithCreationTimestamp(value // 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 + b.DeletionTimestamp = &value return b } @@ -138,7 +138,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithDeletionTimestamp(value // 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 + b.DeletionGracePeriodSeconds = &value return b } @@ -148,11 +148,11 @@ func (b *APIServiceExportRequestApplyConfiguration) WithDeletionGracePeriodSecon // 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)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -163,11 +163,11 @@ func (b *APIServiceExportRequestApplyConfiguration) WithLabels(entries map[strin // 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)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -181,7 +181,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithOwnerReferences(values . if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -192,7 +192,7 @@ func (b *APIServiceExportRequestApplyConfiguration) WithOwnerReferences(values . func (b *APIServiceExportRequestApplyConfiguration) WithFinalizers(values ...string) *APIServiceExportRequestApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -222,5 +222,5 @@ func (b *APIServiceExportRequestApplyConfiguration) WithStatus(value *APIService // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIServiceExportRequestApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestresource.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestresource.go index 78e0cb4c3..69ff9e345 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestresource.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestresource.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 @@ -35,7 +35,7 @@ func APIServiceExportRequestResource() *APIServiceExportRequestResourceApplyConf // 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 + b.Group = &value return b } @@ -43,7 +43,7 @@ func (b *APIServiceExportRequestResourceApplyConfiguration) WithGroup(value stri // 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 + b.Resource = &value return b } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestspec.go index 0dbbcfcff..16c501cea 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestspec.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequestspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequeststatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequeststatus.go index 604324a08..c3ea1e0fd 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequeststatus.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportrequeststatus.go @@ -14,21 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 import ( - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" + 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" ) // 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"` + Phase *v1alpha2.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 @@ -40,7 +40,7 @@ func APIServiceExportRequestStatus() *APIServiceExportRequestStatusApplyConfigur // 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 { +func (b *APIServiceExportRequestStatusApplyConfiguration) WithPhase(value v1alpha2.APIServiceExportRequestPhase) *APIServiceExportRequestStatusApplyConfiguration { b.Phase = &value return b } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportspec.go index e97347f60..50d25109e 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportspec.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportstatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportstatus.go index 351eebf77..736873217 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportstatus.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiserviceexportstatus.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespace.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespace.go index a105c8be0..89dce104c 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespace.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespace.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 @@ -22,7 +22,7 @@ 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" + v1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" v1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/meta/v1" ) @@ -31,7 +31,7 @@ import ( type APIServiceNamespaceApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *kubebindv1alpha2.APIServiceNamespaceSpec `json:"spec,omitempty"` + Spec *v1alpha2.APIServiceNamespaceSpec `json:"spec,omitempty"` Status *APIServiceNamespaceStatusApplyConfiguration `json:"status,omitempty"` } @@ -50,7 +50,7 @@ func APIServiceNamespace(name, namespace string) *APIServiceNamespaceApplyConfig // 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 + b.Kind = &value return b } @@ -58,7 +58,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithKind(value string) *APIServi // 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 + b.APIVersion = &value return b } @@ -67,7 +67,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithAPIVersion(value string) *AP // 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 + b.Name = &value return b } @@ -76,7 +76,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithName(value string) *APIServi // 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 + b.GenerateName = &value return b } @@ -85,7 +85,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithGenerateName(value string) * // 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 + b.Namespace = &value return b } @@ -94,7 +94,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithNamespace(value string) *API // 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 + b.UID = &value return b } @@ -103,7 +103,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithUID(value types.UID) *APISer // 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 + b.ResourceVersion = &value return b } @@ -112,7 +112,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithResourceVersion(value string // 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 + b.Generation = &value return b } @@ -121,7 +121,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithGeneration(value int64) *API // 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 + b.CreationTimestamp = &value return b } @@ -130,7 +130,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithCreationTimestamp(value meta // 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 + b.DeletionTimestamp = &value return b } @@ -139,7 +139,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithDeletionTimestamp(value meta // 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 + b.DeletionGracePeriodSeconds = &value return b } @@ -149,11 +149,11 @@ func (b *APIServiceNamespaceApplyConfiguration) WithDeletionGracePeriodSeconds(v // 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)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -164,11 +164,11 @@ func (b *APIServiceNamespaceApplyConfiguration) WithLabels(entries map[string]st // 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)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -182,7 +182,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithOwnerReferences(values ...*v if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -193,7 +193,7 @@ func (b *APIServiceNamespaceApplyConfiguration) WithOwnerReferences(values ...*v func (b *APIServiceNamespaceApplyConfiguration) WithFinalizers(values ...string) *APIServiceNamespaceApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -207,7 +207,7 @@ func (b *APIServiceNamespaceApplyConfiguration) ensureObjectMetaApplyConfigurati // 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 { +func (b *APIServiceNamespaceApplyConfiguration) WithSpec(value v1alpha2.APIServiceNamespaceSpec) *APIServiceNamespaceApplyConfiguration { b.Spec = &value return b } @@ -223,5 +223,5 @@ func (b *APIServiceNamespaceApplyConfiguration) WithStatus(value *APIServiceName // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIServiceNamespaceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespacestatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespacestatus.go index 611c6111d..8b38e0169 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespacestatus.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/apiservicenamespacestatus.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschema.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschema.go index 317cbaae4..6e070c386 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschema.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschema.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 @@ -49,7 +49,7 @@ func BoundAPIResourceSchema(name, namespace string) *BoundAPIResourceSchemaApply // 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 + b.Kind = &value return b } @@ -57,7 +57,7 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithKind(value string) *Bound // 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 + b.APIVersion = &value return b } @@ -66,7 +66,7 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithAPIVersion(value string) // 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 + b.Name = &value return b } @@ -75,7 +75,7 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithName(value string) *Bound // 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 + b.GenerateName = &value return b } @@ -84,7 +84,7 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithGenerateName(value string // 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 + b.Namespace = &value return b } @@ -93,7 +93,7 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithNamespace(value string) * // 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 + b.UID = &value return b } @@ -102,7 +102,7 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithUID(value types.UID) *Bou // 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 + b.ResourceVersion = &value return b } @@ -111,7 +111,7 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithResourceVersion(value str // 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 + b.Generation = &value return b } @@ -120,7 +120,7 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithGeneration(value int64) * // 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 + b.CreationTimestamp = &value return b } @@ -129,7 +129,7 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithCreationTimestamp(value m // 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 + b.DeletionTimestamp = &value return b } @@ -138,7 +138,7 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithDeletionTimestamp(value m // 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 + b.DeletionGracePeriodSeconds = &value return b } @@ -148,11 +148,11 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithDeletionGracePeriodSecond // 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)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -163,11 +163,11 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithLabels(entries map[string // 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)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -181,7 +181,7 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithOwnerReferences(values .. if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -192,7 +192,7 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithOwnerReferences(values .. func (b *BoundAPIResourceSchemaApplyConfiguration) WithFinalizers(values ...string) *BoundAPIResourceSchemaApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -222,5 +222,5 @@ func (b *BoundAPIResourceSchemaApplyConfiguration) WithStatus(value *BoundAPIRes // GetName retrieves the value of the Name field in the declarative configuration. func (b *BoundAPIResourceSchemaApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemaspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemaspec.go index d2ebd1251..c849bf2ff 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemaspec.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemaspec.go @@ -14,20 +14,20 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// 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" + v1alpha2 "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"` + InformerScope *v1alpha2.InformerScope `json:"informerScope,omitempty"` APIResourceSchemaCRDSpecApplyConfiguration `json:",inline"` } @@ -40,7 +40,7 @@ func BoundAPIResourceSchemaSpec() *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 { +func (b *BoundAPIResourceSchemaSpecApplyConfiguration) WithInformerScope(value v1alpha2.InformerScope) *BoundAPIResourceSchemaSpecApplyConfiguration { b.InformerScope = &value return b } @@ -49,7 +49,7 @@ func (b *BoundAPIResourceSchemaSpecApplyConfiguration) WithInformerScope(value k // 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 + b.Group = &value return b } @@ -57,7 +57,7 @@ func (b *BoundAPIResourceSchemaSpecApplyConfiguration) WithGroup(value string) * // 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 + b.Names = &value return b } @@ -65,7 +65,7 @@ func (b *BoundAPIResourceSchemaSpecApplyConfiguration) WithNames(value v1.Custom // 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 + b.Scope = &value return b } @@ -77,7 +77,7 @@ func (b *BoundAPIResourceSchemaSpecApplyConfiguration) WithVersions(values ...*A if values[i] == nil { panic("nil value passed to WithVersions") } - b.APIResourceSchemaCRDSpecApplyConfiguration.Versions = append(b.APIResourceSchemaCRDSpecApplyConfiguration.Versions, *values[i]) + b.Versions = append(b.Versions, *values[i]) } return b } @@ -86,6 +86,6 @@ func (b *BoundAPIResourceSchemaSpecApplyConfiguration) WithVersions(values ...*A // 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 + b.Conversion = value return b } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemastatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemastatus.go index fc80aaa87..fa16d9c67 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemastatus.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundapiresourceschemastatus.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundresourcereference.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundresourcereference.go deleted file mode 100644 index bdfc77732..000000000 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundresourcereference.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-v0.31. DO NOT EDIT. - -package v1alpha2 - -// BoundResourceReferenceApplyConfiguration represents a declarative configuration of the BoundResourceReference type for use -// with apply. -type BoundResourceReferenceApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Namespace *string `json:"namespace,omitempty"` -} - -// BoundResourceReferenceApplyConfiguration constructs a declarative configuration of the BoundResourceReference type for use with -// apply. -func BoundResourceReference() *BoundResourceReferenceApplyConfiguration { - return &BoundResourceReferenceApplyConfiguration{} -} - -// 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 *BoundResourceReferenceApplyConfiguration) WithName(value string) *BoundResourceReferenceApplyConfiguration { - b.Name = &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 *BoundResourceReferenceApplyConfiguration) WithNamespace(value string) *BoundResourceReferenceApplyConfiguration { - b.Namespace = &value - return b -} diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundschemareference.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundschemareference.go index 2da769a0c..0deae06c1 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundschemareference.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/boundschemareference.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 @@ -34,7 +34,7 @@ func BoundSchemaReference() *BoundSchemaReferenceApplyConfiguration { // 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 + b.Group = &value return b } @@ -42,6 +42,6 @@ func (b *BoundSchemaReferenceApplyConfiguration) WithGroup(value string) *BoundS // 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 + b.Resource = &value return b } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbinding.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbinding.go index c7c25ef65..020a60613 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbinding.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbinding.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 @@ -49,7 +49,7 @@ func ClusterBinding(name, namespace string) *ClusterBindingApplyConfiguration { // 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 + b.Kind = &value return b } @@ -57,7 +57,7 @@ func (b *ClusterBindingApplyConfiguration) WithKind(value string) *ClusterBindin // 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 + b.APIVersion = &value return b } @@ -66,7 +66,7 @@ func (b *ClusterBindingApplyConfiguration) WithAPIVersion(value string) *Cluster // 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 + b.Name = &value return b } @@ -75,7 +75,7 @@ func (b *ClusterBindingApplyConfiguration) WithName(value string) *ClusterBindin // 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 + b.GenerateName = &value return b } @@ -84,7 +84,7 @@ func (b *ClusterBindingApplyConfiguration) WithGenerateName(value string) *Clust // 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 + b.Namespace = &value return b } @@ -93,7 +93,7 @@ func (b *ClusterBindingApplyConfiguration) WithNamespace(value string) *ClusterB // 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 + b.UID = &value return b } @@ -102,7 +102,7 @@ func (b *ClusterBindingApplyConfiguration) WithUID(value types.UID) *ClusterBind // 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 + b.ResourceVersion = &value return b } @@ -111,7 +111,7 @@ func (b *ClusterBindingApplyConfiguration) WithResourceVersion(value string) *Cl // 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 + b.Generation = &value return b } @@ -120,7 +120,7 @@ func (b *ClusterBindingApplyConfiguration) WithGeneration(value int64) *ClusterB // 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 + b.CreationTimestamp = &value return b } @@ -129,7 +129,7 @@ func (b *ClusterBindingApplyConfiguration) WithCreationTimestamp(value metav1.Ti // 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 + b.DeletionTimestamp = &value return b } @@ -138,7 +138,7 @@ func (b *ClusterBindingApplyConfiguration) WithDeletionTimestamp(value metav1.Ti // 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 + b.DeletionGracePeriodSeconds = &value return b } @@ -148,11 +148,11 @@ func (b *ClusterBindingApplyConfiguration) WithDeletionGracePeriodSeconds(value // 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)) + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v + b.Labels[k] = v } return b } @@ -163,11 +163,11 @@ func (b *ClusterBindingApplyConfiguration) WithLabels(entries map[string]string) // 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)) + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v + b.Annotations[k] = v } return b } @@ -181,7 +181,7 @@ func (b *ClusterBindingApplyConfiguration) WithOwnerReferences(values ...*v1.Own if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + b.OwnerReferences = append(b.OwnerReferences, *values[i]) } return b } @@ -192,7 +192,7 @@ func (b *ClusterBindingApplyConfiguration) WithOwnerReferences(values ...*v1.Own func (b *ClusterBindingApplyConfiguration) WithFinalizers(values ...string) *ClusterBindingApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + b.Finalizers = append(b.Finalizers, values[i]) } return b } @@ -222,5 +222,5 @@ func (b *ClusterBindingApplyConfiguration) WithStatus(value *ClusterBindingStatu // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterBindingApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name + return b.Name } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingspec.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingspec.go index d28699bf0..e5b01c8e3 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingspec.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingstatus.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingstatus.go index a244895ab..3b9ca2773 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingstatus.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clusterbindingstatus.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clustersecretkeyref.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clustersecretkeyref.go index 1c29b399d..284092e99 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clustersecretkeyref.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/clustersecretkeyref.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 @@ -35,7 +35,7 @@ func ClusterSecretKeyRef() *ClusterSecretKeyRefApplyConfiguration { // 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 + b.Name = &value return b } @@ -43,7 +43,7 @@ func (b *ClusterSecretKeyRefApplyConfiguration) WithName(value string) *ClusterS // 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 + b.Key = &value return b } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/crdversionschema.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/crdversionschema.go index 7fe38efd3..7133e98c6 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/crdversionschema.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/crdversionschema.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/customresourceconversion.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/customresourceconversion.go index f43e9ac42..49a94f6fc 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/customresourceconversion.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/customresourceconversion.go @@ -14,19 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 import ( - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" + v1alpha2 "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"` + Strategy *v1alpha2.ConversionStrategyType `json:"strategy,omitempty"` + Webhook *WebhookConversionApplyConfiguration `json:"webhook,omitempty"` } // CustomResourceConversionApplyConfiguration constructs a declarative configuration of the CustomResourceConversion type for use with @@ -38,7 +38,7 @@ func CustomResourceConversion() *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 { +func (b *CustomResourceConversionApplyConfiguration) WithStrategy(value v1alpha2.ConversionStrategyType) *CustomResourceConversionApplyConfiguration { b.Strategy = &value return b } diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/groupresource.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/groupresource.go index 31a28acec..f8972a0fe 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/groupresource.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/groupresource.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/localsecretkeyref.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/localsecretkeyref.go index 317bfd799..0defbb6a8 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/localsecretkeyref.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/localsecretkeyref.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookclientconfig.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookclientconfig.go index 8a79c712b..db3b25af1 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookclientconfig.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookclientconfig.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookconversion.go b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookconversion.go index 489f2eb05..070612d5e 100644 --- a/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookconversion.go +++ b/sdk/kcp/applyconfiguration/kubebind/v1alpha2/webhookconversion.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1alpha2 diff --git a/sdk/kcp/applyconfiguration/meta/v1/condition.go b/sdk/kcp/applyconfiguration/meta/v1/condition.go index 308d12b65..4a012815a 100644 --- a/sdk/kcp/applyconfiguration/meta/v1/condition.go +++ b/sdk/kcp/applyconfiguration/meta/v1/condition.go @@ -14,23 +14,23 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "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"` + Type *string `json:"type,omitempty"` + Status *v1.ConditionStatus `json:"status,omitempty"` + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + LastTransitionTime *v1.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 @@ -50,7 +50,7 @@ func (b *ConditionApplyConfiguration) WithType(value string) *ConditionApplyConf // 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 { +func (b *ConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *ConditionApplyConfiguration { b.Status = &value return b } @@ -66,7 +66,7 @@ func (b *ConditionApplyConfiguration) WithObservedGeneration(value int64) *Condi // 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 { +func (b *ConditionApplyConfiguration) WithLastTransitionTime(value v1.Time) *ConditionApplyConfiguration { b.LastTransitionTime = &value return b } diff --git a/sdk/kcp/applyconfiguration/meta/v1/deleteoptions.go b/sdk/kcp/applyconfiguration/meta/v1/deleteoptions.go index a3cd98fe9..16f0adc61 100644 --- a/sdk/kcp/applyconfiguration/meta/v1/deleteoptions.go +++ b/sdk/kcp/applyconfiguration/meta/v1/deleteoptions.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 @@ -47,7 +47,7 @@ func DeleteOptions() *DeleteOptionsApplyConfiguration { // 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 + b.Kind = &value return b } @@ -55,7 +55,7 @@ func (b *DeleteOptionsApplyConfiguration) WithKind(value string) *DeleteOptionsA // 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 + b.APIVersion = &value return b } diff --git a/sdk/kcp/applyconfiguration/meta/v1/labelselector.go b/sdk/kcp/applyconfiguration/meta/v1/labelselector.go index 6488aecb1..44842d6ec 100644 --- a/sdk/kcp/applyconfiguration/meta/v1/labelselector.go +++ b/sdk/kcp/applyconfiguration/meta/v1/labelselector.go @@ -14,19 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 import ( - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" + v1 "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"` + MatchLabels map[string]string `json:"matchLabels,omitempty"` + MatchExpressions []v1.LabelSelectorRequirementApplyConfiguration `json:"matchExpressions,omitempty"` } // LabelSelectorApplyConfiguration constructs a declarative configuration of the LabelSelector type for use with @@ -52,7 +52,7 @@ func (b *LabelSelectorApplyConfiguration) WithMatchLabels(entries map[string]str // 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 { +func (b *LabelSelectorApplyConfiguration) WithMatchExpressions(values ...*v1.LabelSelectorRequirementApplyConfiguration) *LabelSelectorApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithMatchExpressions") diff --git a/sdk/kcp/applyconfiguration/meta/v1/labelselectorrequirement.go b/sdk/kcp/applyconfiguration/meta/v1/labelselectorrequirement.go index aa1ad730c..308c35f8a 100644 --- a/sdk/kcp/applyconfiguration/meta/v1/labelselectorrequirement.go +++ b/sdk/kcp/applyconfiguration/meta/v1/labelselectorrequirement.go @@ -14,20 +14,20 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "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"` + Key *string `json:"key,omitempty"` + Operator *v1.LabelSelectorOperator `json:"operator,omitempty"` + Values []string `json:"values,omitempty"` } // LabelSelectorRequirementApplyConfiguration constructs a declarative configuration of the LabelSelectorRequirement type for use with @@ -47,7 +47,7 @@ func (b *LabelSelectorRequirementApplyConfiguration) WithKey(value string) *Labe // 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 { +func (b *LabelSelectorRequirementApplyConfiguration) WithOperator(value v1.LabelSelectorOperator) *LabelSelectorRequirementApplyConfiguration { b.Operator = &value return b } diff --git a/sdk/kcp/applyconfiguration/meta/v1/managedfieldsentry.go b/sdk/kcp/applyconfiguration/meta/v1/managedfieldsentry.go index d803b3925..c9bb58624 100644 --- a/sdk/kcp/applyconfiguration/meta/v1/managedfieldsentry.go +++ b/sdk/kcp/applyconfiguration/meta/v1/managedfieldsentry.go @@ -14,24 +14,24 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "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"` + Manager *string `json:"manager,omitempty"` + Operation *v1.ManagedFieldsOperationType `json:"operation,omitempty"` + APIVersion *string `json:"apiVersion,omitempty"` + Time *v1.Time `json:"time,omitempty"` + FieldsType *string `json:"fieldsType,omitempty"` + FieldsV1 *v1.FieldsV1 `json:"fieldsV1,omitempty"` + Subresource *string `json:"subresource,omitempty"` } // ManagedFieldsEntryApplyConfiguration constructs a declarative configuration of the ManagedFieldsEntry type for use with @@ -51,7 +51,7 @@ func (b *ManagedFieldsEntryApplyConfiguration) WithManager(value string) *Manage // 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 { +func (b *ManagedFieldsEntryApplyConfiguration) WithOperation(value v1.ManagedFieldsOperationType) *ManagedFieldsEntryApplyConfiguration { b.Operation = &value return b } @@ -67,7 +67,7 @@ func (b *ManagedFieldsEntryApplyConfiguration) WithAPIVersion(value string) *Man // 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 { +func (b *ManagedFieldsEntryApplyConfiguration) WithTime(value v1.Time) *ManagedFieldsEntryApplyConfiguration { b.Time = &value return b } @@ -83,7 +83,7 @@ func (b *ManagedFieldsEntryApplyConfiguration) WithFieldsType(value string) *Man // 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 { +func (b *ManagedFieldsEntryApplyConfiguration) WithFieldsV1(value v1.FieldsV1) *ManagedFieldsEntryApplyConfiguration { b.FieldsV1 = &value return b } diff --git a/sdk/kcp/applyconfiguration/meta/v1/objectmeta.go b/sdk/kcp/applyconfiguration/meta/v1/objectmeta.go index 4641d180f..d8897f9e7 100644 --- a/sdk/kcp/applyconfiguration/meta/v1/objectmeta.go +++ b/sdk/kcp/applyconfiguration/meta/v1/objectmeta.go @@ -14,12 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" ) @@ -32,8 +32,8 @@ type ObjectMetaApplyConfiguration struct { 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"` + CreationTimestamp *v1.Time `json:"creationTimestamp,omitempty"` + DeletionTimestamp *v1.Time `json:"deletionTimestamp,omitempty"` DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty"` Labels map[string]string `json:"labels,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` @@ -98,7 +98,7 @@ func (b *ObjectMetaApplyConfiguration) WithGeneration(value int64) *ObjectMetaAp // 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 { +func (b *ObjectMetaApplyConfiguration) WithCreationTimestamp(value v1.Time) *ObjectMetaApplyConfiguration { b.CreationTimestamp = &value return b } @@ -106,7 +106,7 @@ func (b *ObjectMetaApplyConfiguration) WithCreationTimestamp(value metav1.Time) // 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 { +func (b *ObjectMetaApplyConfiguration) WithDeletionTimestamp(value v1.Time) *ObjectMetaApplyConfiguration { b.DeletionTimestamp = &value return b } diff --git a/sdk/kcp/applyconfiguration/meta/v1/ownerreference.go b/sdk/kcp/applyconfiguration/meta/v1/ownerreference.go index 43d3d95e7..acc635e0e 100644 --- a/sdk/kcp/applyconfiguration/meta/v1/ownerreference.go +++ b/sdk/kcp/applyconfiguration/meta/v1/ownerreference.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 diff --git a/sdk/kcp/applyconfiguration/meta/v1/typemeta.go b/sdk/kcp/applyconfiguration/meta/v1/typemeta.go index d77e96968..b977d8cf1 100644 --- a/sdk/kcp/applyconfiguration/meta/v1/typemeta.go +++ b/sdk/kcp/applyconfiguration/meta/v1/typemeta.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package v1 diff --git a/sdk/kcp/applyconfiguration/utils.go b/sdk/kcp/applyconfiguration/utils.go index 767233f8b..4e2c03681 100644 --- a/sdk/kcp/applyconfiguration/utils.go +++ b/sdk/kcp/applyconfiguration/utils.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. +// Code generated by applyconfiguration-gen. DO NOT EDIT. package applyconfiguration diff --git a/sdk/kcp/clientset/versioned/clientset.go b/sdk/kcp/clientset/versioned/clientset.go index fd5a1870f..2b9379f71 100644 --- a/sdk/kcp/clientset/versioned/clientset.go +++ b/sdk/kcp/clientset/versioned/clientset.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by cluster-client-gen. DO NOT EDIT. package versioned @@ -22,51 +22,64 @@ 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 Interface interface { +type ClusterInterface interface { + Cluster(logicalcluster.Path) client.Interface Discovery() discovery.DiscoveryInterface - KubeBindV1alpha1() kubebindv1alpha1.KubeBindV1alpha1Interface - KubeBindV1alpha2() kubebindv1alpha2.KubeBindV1alpha2Interface + KubeBindV1alpha1() kubebindv1alpha1.KubeBindV1alpha1ClusterInterface + KubeBindV1alpha2() kubebindv1alpha2.KubeBindV1alpha2ClusterInterface } -// Clientset contains the clients for groups. -type Clientset struct { +// ClusterClientset contains the cluster clients for groups. +type ClusterClientset struct { *discovery.DiscoveryClient - kubeBindV1alpha1 *kubebindv1alpha1.KubeBindV1alpha1Client - kubeBindV1alpha2 *kubebindv1alpha2.KubeBindV1alpha2Client + clientCache kcpclient.Cache[*client.Clientset] + kubeBindV1alpha1 *kubebindv1alpha1.KubeBindV1alpha1ClusterClient + kubeBindV1alpha2 *kubebindv1alpha2.KubeBindV1alpha2ClusterClient } -// KubeBindV1alpha1 retrieves the KubeBindV1alpha1Client -func (c *Clientset) KubeBindV1alpha1() kubebindv1alpha1.KubeBindV1alpha1Interface { +// 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 KubeBindV1alpha2Client -func (c *Clientset) KubeBindV1alpha2() kubebindv1alpha2.KubeBindV1alpha2Interface { +// KubeBindV1alpha2 retrieves the KubeBindV1alpha2ClusterClient. +func (c *ClusterClientset) KubeBindV1alpha2() kubebindv1alpha2.KubeBindV1alpha2ClusterInterface { return c.kubeBindV1alpha2 } -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil +// 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.DiscoveryClient + return c.clientCache.ClusterOrDie(clusterPath) } -// NewForConfig creates a new Clientset for the given config. +// 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) (*Clientset, error) { +func NewForConfig(c *rest.Config) (*ClusterClientset, error) { configShallowCopy := *c if configShallowCopy.UserAgent == "" { @@ -82,11 +95,11 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { return NewForConfigAndClient(&configShallowCopy, httpClient) } -// NewForConfigAndClient creates a new Clientset for the given config and http client. +// 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) (*Clientset, error) { +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*ClusterClientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { @@ -95,7 +108,15 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) } - var cs Clientset + 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 { @@ -113,9 +134,9 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, return &cs, nil } -// NewForConfigOrDie creates a new Clientset for the given config and +// NewForConfigOrDie creates a new ClusterClientset for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { +func NewForConfigOrDie(c *rest.Config) *ClusterClientset { cs, err := NewForConfig(c) if err != nil { panic(err) @@ -123,12 +144,12 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { return cs } -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.kubeBindV1alpha1 = kubebindv1alpha1.New(c) - cs.kubeBindV1alpha2 = kubebindv1alpha2.New(c) +// 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.NewDiscoveryClient(c) + cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &cs } diff --git a/sdk/kcp/clientset/versioned/cluster/clientset.go b/sdk/kcp/clientset/versioned/cluster/clientset.go deleted file mode 100644 index b647bc8e2..000000000 --- a/sdk/kcp/clientset/versioned/cluster/clientset.go +++ /dev/null @@ -1,149 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package clientset - -import ( - "fmt" - "net/http" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/client-go/discovery" - "k8s.io/client-go/rest" - "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/cluster/typed/kubebind/v1alpha1" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2" -) - -type ClusterInterface interface { - Cluster(logicalcluster.Path) client.Interface - Discovery() discovery.DiscoveryInterface - KubeBindV1alpha1() kubebindv1alpha1.KubeBindV1alpha1ClusterInterface - KubeBindV1alpha2() kubebindv1alpha2.KubeBindV1alpha2ClusterInterface -} - -// ClusterClientset contains the 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 -} diff --git a/sdk/kcp/clientset/versioned/cluster/scheme/register.go b/sdk/kcp/clientset/versioned/cluster/scheme/register.go deleted file mode 100644 index 2b46e2bb8..000000000 --- a/sdk/kcp/clientset/versioned/cluster/scheme/register.go +++ /dev/null @@ -1,62 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package scheme - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "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() { - metav1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/apiservicebinding.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/apiservicebinding.go deleted file mode 100644 index 42c83d8f9..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/apiservicebinding.go +++ /dev/null @@ -1,72 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - kubebindv1alpha1client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/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 kubebindv1alpha1client.APIServiceBindingInterface. -type APIServiceBindingClusterInterface interface { - Cluster(logicalcluster.Path) kubebindv1alpha1client.APIServiceBindingInterface - List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha1.APIServiceBindingList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type aPIServiceBindingsClusterInterface struct { - clientCache kcpclient.Cache[*kubebindv1alpha1client.KubeBindV1alpha1Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceBindingsClusterInterface) Cluster(clusterPath logicalcluster.Path) kubebindv1alpha1client.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 metav1.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 metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceBindings().Watch(ctx, opts) -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/apiserviceexport.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/apiserviceexport.go deleted file mode 100644 index 82103b427..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/apiserviceexport.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - kubebindv1alpha1client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/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 metav1.ListOptions) (*kubebindv1alpha1.APIServiceExportList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type aPIServiceExportsClusterInterface struct { - clientCache kcpclient.Cache[*kubebindv1alpha1client.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 metav1.ListOptions) (*kubebindv1alpha1.APIServiceExportList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExports(metav1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all APIServiceExports across all clusters. -func (c *aPIServiceExportsClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExports(metav1.NamespaceAll).Watch(ctx, opts) -} - -// APIServiceExportsNamespacer can scope to objects within a namespace, returning a kubebindv1alpha1client.APIServiceExportInterface. -type APIServiceExportsNamespacer interface { - Namespace(string) kubebindv1alpha1client.APIServiceExportInterface -} - -type aPIServiceExportsNamespacer struct { - clientCache kcpclient.Cache[*kubebindv1alpha1client.KubeBindV1alpha1Client] - clusterPath logicalcluster.Path -} - -func (n *aPIServiceExportsNamespacer) Namespace(namespace string) kubebindv1alpha1client.APIServiceExportInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).APIServiceExports(namespace) -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/apiserviceexportrequest.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/apiserviceexportrequest.go deleted file mode 100644 index f00d2536b..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/apiserviceexportrequest.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - kubebindv1alpha1client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/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 metav1.ListOptions) (*kubebindv1alpha1.APIServiceExportRequestList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type aPIServiceExportRequestsClusterInterface struct { - clientCache kcpclient.Cache[*kubebindv1alpha1client.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 metav1.ListOptions) (*kubebindv1alpha1.APIServiceExportRequestList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExportRequests(metav1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all APIServiceExportRequests across all clusters. -func (c *aPIServiceExportRequestsClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExportRequests(metav1.NamespaceAll).Watch(ctx, opts) -} - -// APIServiceExportRequestsNamespacer can scope to objects within a namespace, returning a kubebindv1alpha1client.APIServiceExportRequestInterface. -type APIServiceExportRequestsNamespacer interface { - Namespace(string) kubebindv1alpha1client.APIServiceExportRequestInterface -} - -type aPIServiceExportRequestsNamespacer struct { - clientCache kcpclient.Cache[*kubebindv1alpha1client.KubeBindV1alpha1Client] - clusterPath logicalcluster.Path -} - -func (n *aPIServiceExportRequestsNamespacer) Namespace(namespace string) kubebindv1alpha1client.APIServiceExportRequestInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).APIServiceExportRequests(namespace) -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/apiservicenamespace.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/apiservicenamespace.go deleted file mode 100644 index 4a8be3144..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/apiservicenamespace.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - kubebindv1alpha1client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/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 metav1.ListOptions) (*kubebindv1alpha1.APIServiceNamespaceList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type aPIServiceNamespacesClusterInterface struct { - clientCache kcpclient.Cache[*kubebindv1alpha1client.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 metav1.ListOptions) (*kubebindv1alpha1.APIServiceNamespaceList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceNamespaces(metav1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all APIServiceNamespaces across all clusters. -func (c *aPIServiceNamespacesClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceNamespaces(metav1.NamespaceAll).Watch(ctx, opts) -} - -// APIServiceNamespacesNamespacer can scope to objects within a namespace, returning a kubebindv1alpha1client.APIServiceNamespaceInterface. -type APIServiceNamespacesNamespacer interface { - Namespace(string) kubebindv1alpha1client.APIServiceNamespaceInterface -} - -type aPIServiceNamespacesNamespacer struct { - clientCache kcpclient.Cache[*kubebindv1alpha1client.KubeBindV1alpha1Client] - clusterPath logicalcluster.Path -} - -func (n *aPIServiceNamespacesNamespacer) Namespace(namespace string) kubebindv1alpha1client.APIServiceNamespaceInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).APIServiceNamespaces(namespace) -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/clusterbinding.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/clusterbinding.go deleted file mode 100644 index 4e76b17bb..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/clusterbinding.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - kubebindv1alpha1client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/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 metav1.ListOptions) (*kubebindv1alpha1.ClusterBindingList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type clusterBindingsClusterInterface struct { - clientCache kcpclient.Cache[*kubebindv1alpha1client.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 metav1.ListOptions) (*kubebindv1alpha1.ClusterBindingList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ClusterBindings(metav1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all ClusterBindings across all clusters. -func (c *clusterBindingsClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ClusterBindings(metav1.NamespaceAll).Watch(ctx, opts) -} - -// ClusterBindingsNamespacer can scope to objects within a namespace, returning a kubebindv1alpha1client.ClusterBindingInterface. -type ClusterBindingsNamespacer interface { - Namespace(string) kubebindv1alpha1client.ClusterBindingInterface -} - -type clusterBindingsNamespacer struct { - clientCache kcpclient.Cache[*kubebindv1alpha1client.KubeBindV1alpha1Client] - clusterPath logicalcluster.Path -} - -func (n *clusterBindingsNamespacer) Namespace(namespace string) kubebindv1alpha1client.ClusterBindingInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).ClusterBindings(namespace) -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/apiservicebinding.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/apiservicebinding.go deleted file mode 100644 index a9fa66850..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/apiservicebinding.go +++ /dev/null @@ -1,202 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/testing" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - applyconfigurationskubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - kubebindv1alpha1client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -var aPIServiceBindingsResource = schema.GroupVersionResource{Group: "kube-bind.io", Version: "v1alpha1", Resource: "apiservicebindings"} -var aPIServiceBindingsKind = schema.GroupVersionKind{Group: "kube-bind.io", Version: "v1alpha1", Kind: "APIServiceBinding"} - -type aPIServiceBindingsClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceBindingsClusterClient) Cluster(clusterPath logicalcluster.Path) kubebindv1alpha1client.APIServiceBindingInterface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceBindingsClient{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of APIServiceBindings that match those selectors across all clusters. -func (c *aPIServiceBindingsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha1.APIServiceBindingList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(aPIServiceBindingsResource, aPIServiceBindingsKind, logicalcluster.Wildcard, opts), &kubebindv1alpha1.APIServiceBindingList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha1.APIServiceBindingList{ListMeta: obj.(*kubebindv1alpha1.APIServiceBindingList).ListMeta} - for _, item := range obj.(*kubebindv1alpha1.APIServiceBindingList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested APIServiceBindings across all clusters. -func (c *aPIServiceBindingsClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(aPIServiceBindingsResource, logicalcluster.Wildcard, opts)) -} - -type aPIServiceBindingsClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (c *aPIServiceBindingsClient) Create(ctx context.Context, aPIServiceBinding *kubebindv1alpha1.APIServiceBinding, opts metav1.CreateOptions) (*kubebindv1alpha1.APIServiceBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(aPIServiceBindingsResource, c.ClusterPath, aPIServiceBinding), &kubebindv1alpha1.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceBinding), err -} - -func (c *aPIServiceBindingsClient) Update(ctx context.Context, aPIServiceBinding *kubebindv1alpha1.APIServiceBinding, opts metav1.UpdateOptions) (*kubebindv1alpha1.APIServiceBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(aPIServiceBindingsResource, c.ClusterPath, aPIServiceBinding), &kubebindv1alpha1.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceBinding), err -} - -func (c *aPIServiceBindingsClient) UpdateStatus(ctx context.Context, aPIServiceBinding *kubebindv1alpha1.APIServiceBinding, opts metav1.UpdateOptions) (*kubebindv1alpha1.APIServiceBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(aPIServiceBindingsResource, c.ClusterPath, "status", aPIServiceBinding), &kubebindv1alpha1.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceBinding), err -} - -func (c *aPIServiceBindingsClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(aPIServiceBindingsResource, c.ClusterPath, name, opts), &kubebindv1alpha1.APIServiceBinding{}) - return err -} - -func (c *aPIServiceBindingsClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewRootDeleteCollectionAction(aPIServiceBindingsResource, c.ClusterPath, listOpts) - - _, err := c.Fake.Invokes(action, &kubebindv1alpha1.APIServiceBindingList{}) - return err -} - -func (c *aPIServiceBindingsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*kubebindv1alpha1.APIServiceBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(aPIServiceBindingsResource, c.ClusterPath, name), &kubebindv1alpha1.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceBinding), err -} - -// List takes label and field selectors, and returns the list of APIServiceBindings that match those selectors. -func (c *aPIServiceBindingsClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha1.APIServiceBindingList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(aPIServiceBindingsResource, aPIServiceBindingsKind, c.ClusterPath, opts), &kubebindv1alpha1.APIServiceBindingList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha1.APIServiceBindingList{ListMeta: obj.(*kubebindv1alpha1.APIServiceBindingList).ListMeta} - for _, item := range obj.(*kubebindv1alpha1.APIServiceBindingList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *aPIServiceBindingsClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(aPIServiceBindingsResource, c.ClusterPath, opts)) -} - -func (c *aPIServiceBindingsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*kubebindv1alpha1.APIServiceBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(aPIServiceBindingsResource, c.ClusterPath, name, pt, data, subresources...), &kubebindv1alpha1.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceBinding), err -} - -func (c *aPIServiceBindingsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha1.APIServiceBindingApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha1.APIServiceBinding, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(aPIServiceBindingsResource, c.ClusterPath, *name, types.ApplyPatchType, data), &kubebindv1alpha1.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceBinding), err -} - -func (c *aPIServiceBindingsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha1.APIServiceBindingApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha1.APIServiceBinding, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(aPIServiceBindingsResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &kubebindv1alpha1.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceBinding), err -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/apiserviceexport.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/apiserviceexport.go deleted file mode 100644 index 3c6ad8fc4..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/apiserviceexport.go +++ /dev/null @@ -1,213 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/testing" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - applyconfigurationskubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - kcpkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1" - kubebindv1alpha1client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -var aPIServiceExportsResource = schema.GroupVersionResource{Group: "kube-bind.io", Version: "v1alpha1", Resource: "apiserviceexports"} -var aPIServiceExportsKind = schema.GroupVersionKind{Group: "kube-bind.io", Version: "v1alpha1", Kind: "APIServiceExport"} - -type aPIServiceExportsClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceExportsClusterClient) Cluster(clusterPath logicalcluster.Path) kcpkubebindv1alpha1.APIServiceExportsNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceExportsNamespacer{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of APIServiceExports that match those selectors across all clusters. -func (c *aPIServiceExportsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha1.APIServiceExportList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(aPIServiceExportsResource, aPIServiceExportsKind, logicalcluster.Wildcard, metav1.NamespaceAll, opts), &kubebindv1alpha1.APIServiceExportList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha1.APIServiceExportList{ListMeta: obj.(*kubebindv1alpha1.APIServiceExportList).ListMeta} - for _, item := range obj.(*kubebindv1alpha1.APIServiceExportList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested APIServiceExports across all clusters. -func (c *aPIServiceExportsClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(aPIServiceExportsResource, logicalcluster.Wildcard, metav1.NamespaceAll, opts)) -} - -type aPIServiceExportsNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *aPIServiceExportsNamespacer) Namespace(namespace string) kubebindv1alpha1client.APIServiceExportInterface { - return &aPIServiceExportsClient{Fake: n.Fake, ClusterPath: n.ClusterPath, Namespace: namespace} -} - -type aPIServiceExportsClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path - Namespace string -} - -func (c *aPIServiceExportsClient) Create(ctx context.Context, aPIServiceExport *kubebindv1alpha1.APIServiceExport, opts metav1.CreateOptions) (*kubebindv1alpha1.APIServiceExport, error) { - obj, err := c.Fake.Invokes(kcptesting.NewCreateAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, aPIServiceExport), &kubebindv1alpha1.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExport), err -} - -func (c *aPIServiceExportsClient) Update(ctx context.Context, aPIServiceExport *kubebindv1alpha1.APIServiceExport, opts metav1.UpdateOptions) (*kubebindv1alpha1.APIServiceExport, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, aPIServiceExport), &kubebindv1alpha1.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExport), err -} - -func (c *aPIServiceExportsClient) UpdateStatus(ctx context.Context, aPIServiceExport *kubebindv1alpha1.APIServiceExport, opts metav1.UpdateOptions) (*kubebindv1alpha1.APIServiceExport, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateSubresourceAction(aPIServiceExportsResource, c.ClusterPath, "status", c.Namespace, aPIServiceExport), &kubebindv1alpha1.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExport), err -} - -func (c *aPIServiceExportsClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewDeleteActionWithOptions(aPIServiceExportsResource, c.ClusterPath, c.Namespace, name, opts), &kubebindv1alpha1.APIServiceExport{}) - return err -} - -func (c *aPIServiceExportsClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewDeleteCollectionAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, listOpts) - - _, err := c.Fake.Invokes(action, &kubebindv1alpha1.APIServiceExportList{}) - return err -} - -func (c *aPIServiceExportsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*kubebindv1alpha1.APIServiceExport, error) { - obj, err := c.Fake.Invokes(kcptesting.NewGetAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, name), &kubebindv1alpha1.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExport), err -} - -// List takes label and field selectors, and returns the list of APIServiceExports that match those selectors. -func (c *aPIServiceExportsClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha1.APIServiceExportList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(aPIServiceExportsResource, aPIServiceExportsKind, c.ClusterPath, c.Namespace, opts), &kubebindv1alpha1.APIServiceExportList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha1.APIServiceExportList{ListMeta: obj.(*kubebindv1alpha1.APIServiceExportList).ListMeta} - for _, item := range obj.(*kubebindv1alpha1.APIServiceExportList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *aPIServiceExportsClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, opts)) -} - -func (c *aPIServiceExportsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*kubebindv1alpha1.APIServiceExport, error) { - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, name, pt, data, subresources...), &kubebindv1alpha1.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExport), err -} - -func (c *aPIServiceExportsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha1.APIServiceExportApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha1.APIServiceExport, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data), &kubebindv1alpha1.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExport), err -} - -func (c *aPIServiceExportsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha1.APIServiceExportApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha1.APIServiceExport, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data, "status"), &kubebindv1alpha1.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExport), err -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/apiserviceexportrequest.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/apiserviceexportrequest.go deleted file mode 100644 index 97bffd542..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/apiserviceexportrequest.go +++ /dev/null @@ -1,213 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/testing" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - applyconfigurationskubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - kcpkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1" - kubebindv1alpha1client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -var aPIServiceExportRequestsResource = schema.GroupVersionResource{Group: "kube-bind.io", Version: "v1alpha1", Resource: "apiserviceexportrequests"} -var aPIServiceExportRequestsKind = schema.GroupVersionKind{Group: "kube-bind.io", Version: "v1alpha1", Kind: "APIServiceExportRequest"} - -type aPIServiceExportRequestsClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceExportRequestsClusterClient) Cluster(clusterPath logicalcluster.Path) kcpkubebindv1alpha1.APIServiceExportRequestsNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceExportRequestsNamespacer{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of APIServiceExportRequests that match those selectors across all clusters. -func (c *aPIServiceExportRequestsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha1.APIServiceExportRequestList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(aPIServiceExportRequestsResource, aPIServiceExportRequestsKind, logicalcluster.Wildcard, metav1.NamespaceAll, opts), &kubebindv1alpha1.APIServiceExportRequestList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha1.APIServiceExportRequestList{ListMeta: obj.(*kubebindv1alpha1.APIServiceExportRequestList).ListMeta} - for _, item := range obj.(*kubebindv1alpha1.APIServiceExportRequestList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested APIServiceExportRequests across all clusters. -func (c *aPIServiceExportRequestsClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(aPIServiceExportRequestsResource, logicalcluster.Wildcard, metav1.NamespaceAll, opts)) -} - -type aPIServiceExportRequestsNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *aPIServiceExportRequestsNamespacer) Namespace(namespace string) kubebindv1alpha1client.APIServiceExportRequestInterface { - return &aPIServiceExportRequestsClient{Fake: n.Fake, ClusterPath: n.ClusterPath, Namespace: namespace} -} - -type aPIServiceExportRequestsClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path - Namespace string -} - -func (c *aPIServiceExportRequestsClient) Create(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha1.APIServiceExportRequest, opts metav1.CreateOptions) (*kubebindv1alpha1.APIServiceExportRequest, error) { - obj, err := c.Fake.Invokes(kcptesting.NewCreateAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, aPIServiceExportRequest), &kubebindv1alpha1.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExportRequest), err -} - -func (c *aPIServiceExportRequestsClient) Update(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha1.APIServiceExportRequest, opts metav1.UpdateOptions) (*kubebindv1alpha1.APIServiceExportRequest, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, aPIServiceExportRequest), &kubebindv1alpha1.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExportRequest), err -} - -func (c *aPIServiceExportRequestsClient) UpdateStatus(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha1.APIServiceExportRequest, opts metav1.UpdateOptions) (*kubebindv1alpha1.APIServiceExportRequest, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateSubresourceAction(aPIServiceExportRequestsResource, c.ClusterPath, "status", c.Namespace, aPIServiceExportRequest), &kubebindv1alpha1.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExportRequest), err -} - -func (c *aPIServiceExportRequestsClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewDeleteActionWithOptions(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, name, opts), &kubebindv1alpha1.APIServiceExportRequest{}) - return err -} - -func (c *aPIServiceExportRequestsClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewDeleteCollectionAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, listOpts) - - _, err := c.Fake.Invokes(action, &kubebindv1alpha1.APIServiceExportRequestList{}) - return err -} - -func (c *aPIServiceExportRequestsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*kubebindv1alpha1.APIServiceExportRequest, error) { - obj, err := c.Fake.Invokes(kcptesting.NewGetAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, name), &kubebindv1alpha1.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExportRequest), err -} - -// List takes label and field selectors, and returns the list of APIServiceExportRequests that match those selectors. -func (c *aPIServiceExportRequestsClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha1.APIServiceExportRequestList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(aPIServiceExportRequestsResource, aPIServiceExportRequestsKind, c.ClusterPath, c.Namespace, opts), &kubebindv1alpha1.APIServiceExportRequestList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha1.APIServiceExportRequestList{ListMeta: obj.(*kubebindv1alpha1.APIServiceExportRequestList).ListMeta} - for _, item := range obj.(*kubebindv1alpha1.APIServiceExportRequestList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *aPIServiceExportRequestsClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, opts)) -} - -func (c *aPIServiceExportRequestsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*kubebindv1alpha1.APIServiceExportRequest, error) { - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, name, pt, data, subresources...), &kubebindv1alpha1.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExportRequest), err -} - -func (c *aPIServiceExportRequestsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha1.APIServiceExportRequestApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha1.APIServiceExportRequest, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data), &kubebindv1alpha1.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExportRequest), err -} - -func (c *aPIServiceExportRequestsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha1.APIServiceExportRequestApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha1.APIServiceExportRequest, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data, "status"), &kubebindv1alpha1.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceExportRequest), err -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/apiservicenamespace.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/apiservicenamespace.go deleted file mode 100644 index 78bab4932..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/apiservicenamespace.go +++ /dev/null @@ -1,213 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/testing" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - applyconfigurationskubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - kcpkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1" - kubebindv1alpha1client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -var aPIServiceNamespacesResource = schema.GroupVersionResource{Group: "kube-bind.io", Version: "v1alpha1", Resource: "apiservicenamespaces"} -var aPIServiceNamespacesKind = schema.GroupVersionKind{Group: "kube-bind.io", Version: "v1alpha1", Kind: "APIServiceNamespace"} - -type aPIServiceNamespacesClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceNamespacesClusterClient) Cluster(clusterPath logicalcluster.Path) kcpkubebindv1alpha1.APIServiceNamespacesNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceNamespacesNamespacer{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of APIServiceNamespaces that match those selectors across all clusters. -func (c *aPIServiceNamespacesClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha1.APIServiceNamespaceList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(aPIServiceNamespacesResource, aPIServiceNamespacesKind, logicalcluster.Wildcard, metav1.NamespaceAll, opts), &kubebindv1alpha1.APIServiceNamespaceList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha1.APIServiceNamespaceList{ListMeta: obj.(*kubebindv1alpha1.APIServiceNamespaceList).ListMeta} - for _, item := range obj.(*kubebindv1alpha1.APIServiceNamespaceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested APIServiceNamespaces across all clusters. -func (c *aPIServiceNamespacesClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(aPIServiceNamespacesResource, logicalcluster.Wildcard, metav1.NamespaceAll, opts)) -} - -type aPIServiceNamespacesNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *aPIServiceNamespacesNamespacer) Namespace(namespace string) kubebindv1alpha1client.APIServiceNamespaceInterface { - return &aPIServiceNamespacesClient{Fake: n.Fake, ClusterPath: n.ClusterPath, Namespace: namespace} -} - -type aPIServiceNamespacesClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path - Namespace string -} - -func (c *aPIServiceNamespacesClient) Create(ctx context.Context, aPIServiceNamespace *kubebindv1alpha1.APIServiceNamespace, opts metav1.CreateOptions) (*kubebindv1alpha1.APIServiceNamespace, error) { - obj, err := c.Fake.Invokes(kcptesting.NewCreateAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, aPIServiceNamespace), &kubebindv1alpha1.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceNamespace), err -} - -func (c *aPIServiceNamespacesClient) Update(ctx context.Context, aPIServiceNamespace *kubebindv1alpha1.APIServiceNamespace, opts metav1.UpdateOptions) (*kubebindv1alpha1.APIServiceNamespace, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, aPIServiceNamespace), &kubebindv1alpha1.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceNamespace), err -} - -func (c *aPIServiceNamespacesClient) UpdateStatus(ctx context.Context, aPIServiceNamespace *kubebindv1alpha1.APIServiceNamespace, opts metav1.UpdateOptions) (*kubebindv1alpha1.APIServiceNamespace, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateSubresourceAction(aPIServiceNamespacesResource, c.ClusterPath, "status", c.Namespace, aPIServiceNamespace), &kubebindv1alpha1.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceNamespace), err -} - -func (c *aPIServiceNamespacesClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewDeleteActionWithOptions(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, name, opts), &kubebindv1alpha1.APIServiceNamespace{}) - return err -} - -func (c *aPIServiceNamespacesClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewDeleteCollectionAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, listOpts) - - _, err := c.Fake.Invokes(action, &kubebindv1alpha1.APIServiceNamespaceList{}) - return err -} - -func (c *aPIServiceNamespacesClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*kubebindv1alpha1.APIServiceNamespace, error) { - obj, err := c.Fake.Invokes(kcptesting.NewGetAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, name), &kubebindv1alpha1.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceNamespace), err -} - -// List takes label and field selectors, and returns the list of APIServiceNamespaces that match those selectors. -func (c *aPIServiceNamespacesClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha1.APIServiceNamespaceList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(aPIServiceNamespacesResource, aPIServiceNamespacesKind, c.ClusterPath, c.Namespace, opts), &kubebindv1alpha1.APIServiceNamespaceList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha1.APIServiceNamespaceList{ListMeta: obj.(*kubebindv1alpha1.APIServiceNamespaceList).ListMeta} - for _, item := range obj.(*kubebindv1alpha1.APIServiceNamespaceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *aPIServiceNamespacesClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, opts)) -} - -func (c *aPIServiceNamespacesClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*kubebindv1alpha1.APIServiceNamespace, error) { - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, name, pt, data, subresources...), &kubebindv1alpha1.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceNamespace), err -} - -func (c *aPIServiceNamespacesClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha1.APIServiceNamespaceApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha1.APIServiceNamespace, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data), &kubebindv1alpha1.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceNamespace), err -} - -func (c *aPIServiceNamespacesClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha1.APIServiceNamespaceApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha1.APIServiceNamespace, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data, "status"), &kubebindv1alpha1.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.APIServiceNamespace), err -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/clusterbinding.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/clusterbinding.go deleted file mode 100644 index 322134afc..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/clusterbinding.go +++ /dev/null @@ -1,213 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/testing" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - applyconfigurationskubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - kcpkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1" - kubebindv1alpha1client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -var clusterBindingsResource = schema.GroupVersionResource{Group: "kube-bind.io", Version: "v1alpha1", Resource: "clusterbindings"} -var clusterBindingsKind = schema.GroupVersionKind{Group: "kube-bind.io", Version: "v1alpha1", Kind: "ClusterBinding"} - -type clusterBindingsClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *clusterBindingsClusterClient) Cluster(clusterPath logicalcluster.Path) kcpkubebindv1alpha1.ClusterBindingsNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &clusterBindingsNamespacer{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of ClusterBindings that match those selectors across all clusters. -func (c *clusterBindingsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha1.ClusterBindingList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(clusterBindingsResource, clusterBindingsKind, logicalcluster.Wildcard, metav1.NamespaceAll, opts), &kubebindv1alpha1.ClusterBindingList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha1.ClusterBindingList{ListMeta: obj.(*kubebindv1alpha1.ClusterBindingList).ListMeta} - for _, item := range obj.(*kubebindv1alpha1.ClusterBindingList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ClusterBindings across all clusters. -func (c *clusterBindingsClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(clusterBindingsResource, logicalcluster.Wildcard, metav1.NamespaceAll, opts)) -} - -type clusterBindingsNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *clusterBindingsNamespacer) Namespace(namespace string) kubebindv1alpha1client.ClusterBindingInterface { - return &clusterBindingsClient{Fake: n.Fake, ClusterPath: n.ClusterPath, Namespace: namespace} -} - -type clusterBindingsClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path - Namespace string -} - -func (c *clusterBindingsClient) Create(ctx context.Context, clusterBinding *kubebindv1alpha1.ClusterBinding, opts metav1.CreateOptions) (*kubebindv1alpha1.ClusterBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewCreateAction(clusterBindingsResource, c.ClusterPath, c.Namespace, clusterBinding), &kubebindv1alpha1.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.ClusterBinding), err -} - -func (c *clusterBindingsClient) Update(ctx context.Context, clusterBinding *kubebindv1alpha1.ClusterBinding, opts metav1.UpdateOptions) (*kubebindv1alpha1.ClusterBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateAction(clusterBindingsResource, c.ClusterPath, c.Namespace, clusterBinding), &kubebindv1alpha1.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.ClusterBinding), err -} - -func (c *clusterBindingsClient) UpdateStatus(ctx context.Context, clusterBinding *kubebindv1alpha1.ClusterBinding, opts metav1.UpdateOptions) (*kubebindv1alpha1.ClusterBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateSubresourceAction(clusterBindingsResource, c.ClusterPath, "status", c.Namespace, clusterBinding), &kubebindv1alpha1.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.ClusterBinding), err -} - -func (c *clusterBindingsClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewDeleteActionWithOptions(clusterBindingsResource, c.ClusterPath, c.Namespace, name, opts), &kubebindv1alpha1.ClusterBinding{}) - return err -} - -func (c *clusterBindingsClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewDeleteCollectionAction(clusterBindingsResource, c.ClusterPath, c.Namespace, listOpts) - - _, err := c.Fake.Invokes(action, &kubebindv1alpha1.ClusterBindingList{}) - return err -} - -func (c *clusterBindingsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*kubebindv1alpha1.ClusterBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewGetAction(clusterBindingsResource, c.ClusterPath, c.Namespace, name), &kubebindv1alpha1.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.ClusterBinding), err -} - -// List takes label and field selectors, and returns the list of ClusterBindings that match those selectors. -func (c *clusterBindingsClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha1.ClusterBindingList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(clusterBindingsResource, clusterBindingsKind, c.ClusterPath, c.Namespace, opts), &kubebindv1alpha1.ClusterBindingList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha1.ClusterBindingList{ListMeta: obj.(*kubebindv1alpha1.ClusterBindingList).ListMeta} - for _, item := range obj.(*kubebindv1alpha1.ClusterBindingList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *clusterBindingsClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(clusterBindingsResource, c.ClusterPath, c.Namespace, opts)) -} - -func (c *clusterBindingsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*kubebindv1alpha1.ClusterBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(clusterBindingsResource, c.ClusterPath, c.Namespace, name, pt, data, subresources...), &kubebindv1alpha1.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.ClusterBinding), err -} - -func (c *clusterBindingsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha1.ClusterBindingApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha1.ClusterBinding, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(clusterBindingsResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data), &kubebindv1alpha1.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.ClusterBinding), err -} - -func (c *clusterBindingsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha1.ClusterBindingApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha1.ClusterBinding, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(clusterBindingsResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data, "status"), &kubebindv1alpha1.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha1.ClusterBinding), err -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/kubebind_client.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/kubebind_client.go deleted file mode 100644 index 332c0482c..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/kubebind_client.go +++ /dev/null @@ -1,110 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha1 - -import ( - "net/http" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/client-go/rest" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1" -) - -type KubeBindV1alpha1ClusterInterface interface { - KubeBindV1alpha1ClusterScoper - APIServiceBindingsClusterGetter - APIServiceExportsClusterGetter - APIServiceExportRequestsClusterGetter - APIServiceNamespacesClusterGetter - ClusterBindingsClusterGetter -} - -type KubeBindV1alpha1ClusterScoper interface { - Cluster(logicalcluster.Path) kubebindv1alpha1.KubeBindV1alpha1Interface -} - -type KubeBindV1alpha1ClusterClient struct { - clientCache kcpclient.Cache[*kubebindv1alpha1.KubeBindV1alpha1Client] -} - -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 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) { - client, err := rest.HTTPClientFor(c) - if err != nil { - return nil, err - } - return NewForConfigAndClient(c, client) -} - -// 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[*kubebindv1alpha1.KubeBindV1alpha1Client]{ - NewForConfigAndClient: kubebindv1alpha1.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 -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiresourceschema.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiresourceschema.go deleted file mode 100644 index 953c45950..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiresourceschema.go +++ /dev/null @@ -1,72 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -import ( - "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/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 kubebindv1alpha2client.APIResourceSchemaInterface. -type APIResourceSchemaClusterInterface interface { - Cluster(logicalcluster.Path) kubebindv1alpha2client.APIResourceSchemaInterface - List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.APIResourceSchemaList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type aPIResourceSchemasClusterInterface struct { - clientCache kcpclient.Cache[*kubebindv1alpha2client.KubeBindV1alpha2Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIResourceSchemasClusterInterface) Cluster(clusterPath logicalcluster.Path) kubebindv1alpha2client.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 metav1.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 metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIResourceSchemas().Watch(ctx, opts) -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiservicebinding.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiservicebinding.go deleted file mode 100644 index 843b2c6c8..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiservicebinding.go +++ /dev/null @@ -1,72 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -import ( - "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/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 kubebindv1alpha2client.APIServiceBindingInterface. -type APIServiceBindingClusterInterface interface { - Cluster(logicalcluster.Path) kubebindv1alpha2client.APIServiceBindingInterface - List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.APIServiceBindingList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type aPIServiceBindingsClusterInterface struct { - clientCache kcpclient.Cache[*kubebindv1alpha2client.KubeBindV1alpha2Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceBindingsClusterInterface) Cluster(clusterPath logicalcluster.Path) kubebindv1alpha2client.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 metav1.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 metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceBindings().Watch(ctx, opts) -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiserviceexport.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiserviceexport.go deleted file mode 100644 index f95cd04a8..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiserviceexport.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -import ( - "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/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 metav1.ListOptions) (*kubebindv1alpha2.APIServiceExportList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type aPIServiceExportsClusterInterface struct { - clientCache kcpclient.Cache[*kubebindv1alpha2client.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 metav1.ListOptions) (*kubebindv1alpha2.APIServiceExportList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExports(metav1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all APIServiceExports across all clusters. -func (c *aPIServiceExportsClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExports(metav1.NamespaceAll).Watch(ctx, opts) -} - -// APIServiceExportsNamespacer can scope to objects within a namespace, returning a kubebindv1alpha2client.APIServiceExportInterface. -type APIServiceExportsNamespacer interface { - Namespace(string) kubebindv1alpha2client.APIServiceExportInterface -} - -type aPIServiceExportsNamespacer struct { - clientCache kcpclient.Cache[*kubebindv1alpha2client.KubeBindV1alpha2Client] - clusterPath logicalcluster.Path -} - -func (n *aPIServiceExportsNamespacer) Namespace(namespace string) kubebindv1alpha2client.APIServiceExportInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).APIServiceExports(namespace) -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiserviceexportrequest.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiserviceexportrequest.go deleted file mode 100644 index ee6487c70..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiserviceexportrequest.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -import ( - "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/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 metav1.ListOptions) (*kubebindv1alpha2.APIServiceExportRequestList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type aPIServiceExportRequestsClusterInterface struct { - clientCache kcpclient.Cache[*kubebindv1alpha2client.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 metav1.ListOptions) (*kubebindv1alpha2.APIServiceExportRequestList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExportRequests(metav1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all APIServiceExportRequests across all clusters. -func (c *aPIServiceExportRequestsClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceExportRequests(metav1.NamespaceAll).Watch(ctx, opts) -} - -// APIServiceExportRequestsNamespacer can scope to objects within a namespace, returning a kubebindv1alpha2client.APIServiceExportRequestInterface. -type APIServiceExportRequestsNamespacer interface { - Namespace(string) kubebindv1alpha2client.APIServiceExportRequestInterface -} - -type aPIServiceExportRequestsNamespacer struct { - clientCache kcpclient.Cache[*kubebindv1alpha2client.KubeBindV1alpha2Client] - clusterPath logicalcluster.Path -} - -func (n *aPIServiceExportRequestsNamespacer) Namespace(namespace string) kubebindv1alpha2client.APIServiceExportRequestInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).APIServiceExportRequests(namespace) -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiservicenamespace.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiservicenamespace.go deleted file mode 100644 index dcace1e8b..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/apiservicenamespace.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -import ( - "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/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 metav1.ListOptions) (*kubebindv1alpha2.APIServiceNamespaceList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type aPIServiceNamespacesClusterInterface struct { - clientCache kcpclient.Cache[*kubebindv1alpha2client.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 metav1.ListOptions) (*kubebindv1alpha2.APIServiceNamespaceList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceNamespaces(metav1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all APIServiceNamespaces across all clusters. -func (c *aPIServiceNamespacesClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).APIServiceNamespaces(metav1.NamespaceAll).Watch(ctx, opts) -} - -// APIServiceNamespacesNamespacer can scope to objects within a namespace, returning a kubebindv1alpha2client.APIServiceNamespaceInterface. -type APIServiceNamespacesNamespacer interface { - Namespace(string) kubebindv1alpha2client.APIServiceNamespaceInterface -} - -type aPIServiceNamespacesNamespacer struct { - clientCache kcpclient.Cache[*kubebindv1alpha2client.KubeBindV1alpha2Client] - clusterPath logicalcluster.Path -} - -func (n *aPIServiceNamespacesNamespacer) Namespace(namespace string) kubebindv1alpha2client.APIServiceNamespaceInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).APIServiceNamespaces(namespace) -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/boundapiresourceschema.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/boundapiresourceschema.go deleted file mode 100644 index 1656ac73f..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/boundapiresourceschema.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -import ( - "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/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 metav1.ListOptions) (*kubebindv1alpha2.BoundAPIResourceSchemaList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type boundAPIResourceSchemasClusterInterface struct { - clientCache kcpclient.Cache[*kubebindv1alpha2client.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 metav1.ListOptions) (*kubebindv1alpha2.BoundAPIResourceSchemaList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).BoundAPIResourceSchemas(metav1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all BoundAPIResourceSchemas across all clusters. -func (c *boundAPIResourceSchemasClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).BoundAPIResourceSchemas(metav1.NamespaceAll).Watch(ctx, opts) -} - -// BoundAPIResourceSchemasNamespacer can scope to objects within a namespace, returning a kubebindv1alpha2client.BoundAPIResourceSchemaInterface. -type BoundAPIResourceSchemasNamespacer interface { - Namespace(string) kubebindv1alpha2client.BoundAPIResourceSchemaInterface -} - -type boundAPIResourceSchemasNamespacer struct { - clientCache kcpclient.Cache[*kubebindv1alpha2client.KubeBindV1alpha2Client] - clusterPath logicalcluster.Path -} - -func (n *boundAPIResourceSchemasNamespacer) Namespace(namespace string) kubebindv1alpha2client.BoundAPIResourceSchemaInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).BoundAPIResourceSchemas(namespace) -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/clusterbinding.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/clusterbinding.go deleted file mode 100644 index cebabf20c..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/clusterbinding.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -import ( - "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/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 metav1.ListOptions) (*kubebindv1alpha2.ClusterBindingList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type clusterBindingsClusterInterface struct { - clientCache kcpclient.Cache[*kubebindv1alpha2client.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 metav1.ListOptions) (*kubebindv1alpha2.ClusterBindingList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ClusterBindings(metav1.NamespaceAll).List(ctx, opts) -} - -// Watch begins to watch all ClusterBindings across all clusters. -func (c *clusterBindingsClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ClusterBindings(metav1.NamespaceAll).Watch(ctx, opts) -} - -// ClusterBindingsNamespacer can scope to objects within a namespace, returning a kubebindv1alpha2client.ClusterBindingInterface. -type ClusterBindingsNamespacer interface { - Namespace(string) kubebindv1alpha2client.ClusterBindingInterface -} - -type clusterBindingsNamespacer struct { - clientCache kcpclient.Cache[*kubebindv1alpha2client.KubeBindV1alpha2Client] - clusterPath logicalcluster.Path -} - -func (n *clusterBindingsNamespacer) Namespace(namespace string) kubebindv1alpha2client.ClusterBindingInterface { - return n.clientCache.ClusterOrDie(n.clusterPath).ClusterBindings(namespace) -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiresourceschema.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiresourceschema.go deleted file mode 100644 index 726235f59..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiresourceschema.go +++ /dev/null @@ -1,202 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/testing" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -var aPIResourceSchemasResource = schema.GroupVersionResource{Group: "kube-bind.io", Version: "v1alpha2", Resource: "apiresourceschemas"} -var aPIResourceSchemasKind = schema.GroupVersionKind{Group: "kube-bind.io", Version: "v1alpha2", Kind: "APIResourceSchema"} - -type aPIResourceSchemasClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIResourceSchemasClusterClient) Cluster(clusterPath logicalcluster.Path) kubebindv1alpha2client.APIResourceSchemaInterface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIResourceSchemasClient{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of APIResourceSchemas that match those selectors across all clusters. -func (c *aPIResourceSchemasClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.APIResourceSchemaList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(aPIResourceSchemasResource, aPIResourceSchemasKind, logicalcluster.Wildcard, opts), &kubebindv1alpha2.APIResourceSchemaList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.APIResourceSchemaList{ListMeta: obj.(*kubebindv1alpha2.APIResourceSchemaList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.APIResourceSchemaList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested APIResourceSchemas across all clusters. -func (c *aPIResourceSchemasClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(aPIResourceSchemasResource, logicalcluster.Wildcard, opts)) -} - -type aPIResourceSchemasClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (c *aPIResourceSchemasClient) Create(ctx context.Context, aPIResourceSchema *kubebindv1alpha2.APIResourceSchema, opts metav1.CreateOptions) (*kubebindv1alpha2.APIResourceSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(aPIResourceSchemasResource, c.ClusterPath, aPIResourceSchema), &kubebindv1alpha2.APIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIResourceSchema), err -} - -func (c *aPIResourceSchemasClient) Update(ctx context.Context, aPIResourceSchema *kubebindv1alpha2.APIResourceSchema, opts metav1.UpdateOptions) (*kubebindv1alpha2.APIResourceSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(aPIResourceSchemasResource, c.ClusterPath, aPIResourceSchema), &kubebindv1alpha2.APIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIResourceSchema), err -} - -func (c *aPIResourceSchemasClient) UpdateStatus(ctx context.Context, aPIResourceSchema *kubebindv1alpha2.APIResourceSchema, opts metav1.UpdateOptions) (*kubebindv1alpha2.APIResourceSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(aPIResourceSchemasResource, c.ClusterPath, "status", aPIResourceSchema), &kubebindv1alpha2.APIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIResourceSchema), err -} - -func (c *aPIResourceSchemasClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(aPIResourceSchemasResource, c.ClusterPath, name, opts), &kubebindv1alpha2.APIResourceSchema{}) - return err -} - -func (c *aPIResourceSchemasClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewRootDeleteCollectionAction(aPIResourceSchemasResource, c.ClusterPath, listOpts) - - _, err := c.Fake.Invokes(action, &kubebindv1alpha2.APIResourceSchemaList{}) - return err -} - -func (c *aPIResourceSchemasClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*kubebindv1alpha2.APIResourceSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(aPIResourceSchemasResource, c.ClusterPath, name), &kubebindv1alpha2.APIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIResourceSchema), err -} - -// List takes label and field selectors, and returns the list of APIResourceSchemas that match those selectors. -func (c *aPIResourceSchemasClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.APIResourceSchemaList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(aPIResourceSchemasResource, aPIResourceSchemasKind, c.ClusterPath, opts), &kubebindv1alpha2.APIResourceSchemaList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.APIResourceSchemaList{ListMeta: obj.(*kubebindv1alpha2.APIResourceSchemaList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.APIResourceSchemaList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *aPIResourceSchemasClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(aPIResourceSchemasResource, c.ClusterPath, opts)) -} - -func (c *aPIResourceSchemasClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*kubebindv1alpha2.APIResourceSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(aPIResourceSchemasResource, c.ClusterPath, name, pt, data, subresources...), &kubebindv1alpha2.APIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIResourceSchema), err -} - -func (c *aPIResourceSchemasClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.APIResourceSchemaApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.APIResourceSchema, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(aPIResourceSchemasResource, c.ClusterPath, *name, types.ApplyPatchType, data), &kubebindv1alpha2.APIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIResourceSchema), err -} - -func (c *aPIResourceSchemasClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.APIResourceSchemaApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.APIResourceSchema, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(aPIResourceSchemasResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &kubebindv1alpha2.APIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIResourceSchema), err -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiservicebinding.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiservicebinding.go deleted file mode 100644 index 8b71c6729..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiservicebinding.go +++ /dev/null @@ -1,202 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/testing" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -var aPIServiceBindingsResource = schema.GroupVersionResource{Group: "kube-bind.io", Version: "v1alpha2", Resource: "apiservicebindings"} -var aPIServiceBindingsKind = schema.GroupVersionKind{Group: "kube-bind.io", Version: "v1alpha2", Kind: "APIServiceBinding"} - -type aPIServiceBindingsClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceBindingsClusterClient) Cluster(clusterPath logicalcluster.Path) kubebindv1alpha2client.APIServiceBindingInterface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceBindingsClient{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of APIServiceBindings that match those selectors across all clusters. -func (c *aPIServiceBindingsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.APIServiceBindingList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(aPIServiceBindingsResource, aPIServiceBindingsKind, logicalcluster.Wildcard, opts), &kubebindv1alpha2.APIServiceBindingList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.APIServiceBindingList{ListMeta: obj.(*kubebindv1alpha2.APIServiceBindingList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.APIServiceBindingList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested APIServiceBindings across all clusters. -func (c *aPIServiceBindingsClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(aPIServiceBindingsResource, logicalcluster.Wildcard, opts)) -} - -type aPIServiceBindingsClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (c *aPIServiceBindingsClient) Create(ctx context.Context, aPIServiceBinding *kubebindv1alpha2.APIServiceBinding, opts metav1.CreateOptions) (*kubebindv1alpha2.APIServiceBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(aPIServiceBindingsResource, c.ClusterPath, aPIServiceBinding), &kubebindv1alpha2.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceBinding), err -} - -func (c *aPIServiceBindingsClient) Update(ctx context.Context, aPIServiceBinding *kubebindv1alpha2.APIServiceBinding, opts metav1.UpdateOptions) (*kubebindv1alpha2.APIServiceBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(aPIServiceBindingsResource, c.ClusterPath, aPIServiceBinding), &kubebindv1alpha2.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceBinding), err -} - -func (c *aPIServiceBindingsClient) UpdateStatus(ctx context.Context, aPIServiceBinding *kubebindv1alpha2.APIServiceBinding, opts metav1.UpdateOptions) (*kubebindv1alpha2.APIServiceBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(aPIServiceBindingsResource, c.ClusterPath, "status", aPIServiceBinding), &kubebindv1alpha2.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceBinding), err -} - -func (c *aPIServiceBindingsClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(aPIServiceBindingsResource, c.ClusterPath, name, opts), &kubebindv1alpha2.APIServiceBinding{}) - return err -} - -func (c *aPIServiceBindingsClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewRootDeleteCollectionAction(aPIServiceBindingsResource, c.ClusterPath, listOpts) - - _, err := c.Fake.Invokes(action, &kubebindv1alpha2.APIServiceBindingList{}) - return err -} - -func (c *aPIServiceBindingsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*kubebindv1alpha2.APIServiceBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(aPIServiceBindingsResource, c.ClusterPath, name), &kubebindv1alpha2.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceBinding), err -} - -// List takes label and field selectors, and returns the list of APIServiceBindings that match those selectors. -func (c *aPIServiceBindingsClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.APIServiceBindingList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(aPIServiceBindingsResource, aPIServiceBindingsKind, c.ClusterPath, opts), &kubebindv1alpha2.APIServiceBindingList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.APIServiceBindingList{ListMeta: obj.(*kubebindv1alpha2.APIServiceBindingList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.APIServiceBindingList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *aPIServiceBindingsClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(aPIServiceBindingsResource, c.ClusterPath, opts)) -} - -func (c *aPIServiceBindingsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*kubebindv1alpha2.APIServiceBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(aPIServiceBindingsResource, c.ClusterPath, name, pt, data, subresources...), &kubebindv1alpha2.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceBinding), err -} - -func (c *aPIServiceBindingsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.APIServiceBindingApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.APIServiceBinding, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(aPIServiceBindingsResource, c.ClusterPath, *name, types.ApplyPatchType, data), &kubebindv1alpha2.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceBinding), err -} - -func (c *aPIServiceBindingsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.APIServiceBindingApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.APIServiceBinding, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(aPIServiceBindingsResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &kubebindv1alpha2.APIServiceBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceBinding), err -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiserviceexport.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiserviceexport.go deleted file mode 100644 index 471863ef8..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiserviceexport.go +++ /dev/null @@ -1,213 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/testing" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - kcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -var aPIServiceExportsResource = schema.GroupVersionResource{Group: "kube-bind.io", Version: "v1alpha2", Resource: "apiserviceexports"} -var aPIServiceExportsKind = schema.GroupVersionKind{Group: "kube-bind.io", Version: "v1alpha2", Kind: "APIServiceExport"} - -type aPIServiceExportsClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceExportsClusterClient) Cluster(clusterPath logicalcluster.Path) kcpkubebindv1alpha2.APIServiceExportsNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceExportsNamespacer{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of APIServiceExports that match those selectors across all clusters. -func (c *aPIServiceExportsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.APIServiceExportList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(aPIServiceExportsResource, aPIServiceExportsKind, logicalcluster.Wildcard, metav1.NamespaceAll, opts), &kubebindv1alpha2.APIServiceExportList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.APIServiceExportList{ListMeta: obj.(*kubebindv1alpha2.APIServiceExportList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.APIServiceExportList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested APIServiceExports across all clusters. -func (c *aPIServiceExportsClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(aPIServiceExportsResource, logicalcluster.Wildcard, metav1.NamespaceAll, opts)) -} - -type aPIServiceExportsNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *aPIServiceExportsNamespacer) Namespace(namespace string) kubebindv1alpha2client.APIServiceExportInterface { - return &aPIServiceExportsClient{Fake: n.Fake, ClusterPath: n.ClusterPath, Namespace: namespace} -} - -type aPIServiceExportsClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path - Namespace string -} - -func (c *aPIServiceExportsClient) Create(ctx context.Context, aPIServiceExport *kubebindv1alpha2.APIServiceExport, opts metav1.CreateOptions) (*kubebindv1alpha2.APIServiceExport, error) { - obj, err := c.Fake.Invokes(kcptesting.NewCreateAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, aPIServiceExport), &kubebindv1alpha2.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExport), err -} - -func (c *aPIServiceExportsClient) Update(ctx context.Context, aPIServiceExport *kubebindv1alpha2.APIServiceExport, opts metav1.UpdateOptions) (*kubebindv1alpha2.APIServiceExport, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, aPIServiceExport), &kubebindv1alpha2.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExport), err -} - -func (c *aPIServiceExportsClient) UpdateStatus(ctx context.Context, aPIServiceExport *kubebindv1alpha2.APIServiceExport, opts metav1.UpdateOptions) (*kubebindv1alpha2.APIServiceExport, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateSubresourceAction(aPIServiceExportsResource, c.ClusterPath, "status", c.Namespace, aPIServiceExport), &kubebindv1alpha2.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExport), err -} - -func (c *aPIServiceExportsClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewDeleteActionWithOptions(aPIServiceExportsResource, c.ClusterPath, c.Namespace, name, opts), &kubebindv1alpha2.APIServiceExport{}) - return err -} - -func (c *aPIServiceExportsClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewDeleteCollectionAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, listOpts) - - _, err := c.Fake.Invokes(action, &kubebindv1alpha2.APIServiceExportList{}) - return err -} - -func (c *aPIServiceExportsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*kubebindv1alpha2.APIServiceExport, error) { - obj, err := c.Fake.Invokes(kcptesting.NewGetAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, name), &kubebindv1alpha2.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExport), err -} - -// List takes label and field selectors, and returns the list of APIServiceExports that match those selectors. -func (c *aPIServiceExportsClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.APIServiceExportList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(aPIServiceExportsResource, aPIServiceExportsKind, c.ClusterPath, c.Namespace, opts), &kubebindv1alpha2.APIServiceExportList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.APIServiceExportList{ListMeta: obj.(*kubebindv1alpha2.APIServiceExportList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.APIServiceExportList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *aPIServiceExportsClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, opts)) -} - -func (c *aPIServiceExportsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*kubebindv1alpha2.APIServiceExport, error) { - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, name, pt, data, subresources...), &kubebindv1alpha2.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExport), err -} - -func (c *aPIServiceExportsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.APIServiceExportApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.APIServiceExport, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data), &kubebindv1alpha2.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExport), err -} - -func (c *aPIServiceExportsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.APIServiceExportApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.APIServiceExport, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceExportsResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data, "status"), &kubebindv1alpha2.APIServiceExport{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExport), err -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiserviceexportrequest.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiserviceexportrequest.go deleted file mode 100644 index d37825d1d..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiserviceexportrequest.go +++ /dev/null @@ -1,213 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/testing" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - kcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -var aPIServiceExportRequestsResource = schema.GroupVersionResource{Group: "kube-bind.io", Version: "v1alpha2", Resource: "apiserviceexportrequests"} -var aPIServiceExportRequestsKind = schema.GroupVersionKind{Group: "kube-bind.io", Version: "v1alpha2", Kind: "APIServiceExportRequest"} - -type aPIServiceExportRequestsClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceExportRequestsClusterClient) Cluster(clusterPath logicalcluster.Path) kcpkubebindv1alpha2.APIServiceExportRequestsNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceExportRequestsNamespacer{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of APIServiceExportRequests that match those selectors across all clusters. -func (c *aPIServiceExportRequestsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.APIServiceExportRequestList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(aPIServiceExportRequestsResource, aPIServiceExportRequestsKind, logicalcluster.Wildcard, metav1.NamespaceAll, opts), &kubebindv1alpha2.APIServiceExportRequestList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.APIServiceExportRequestList{ListMeta: obj.(*kubebindv1alpha2.APIServiceExportRequestList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.APIServiceExportRequestList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested APIServiceExportRequests across all clusters. -func (c *aPIServiceExportRequestsClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(aPIServiceExportRequestsResource, logicalcluster.Wildcard, metav1.NamespaceAll, opts)) -} - -type aPIServiceExportRequestsNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *aPIServiceExportRequestsNamespacer) Namespace(namespace string) kubebindv1alpha2client.APIServiceExportRequestInterface { - return &aPIServiceExportRequestsClient{Fake: n.Fake, ClusterPath: n.ClusterPath, Namespace: namespace} -} - -type aPIServiceExportRequestsClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path - Namespace string -} - -func (c *aPIServiceExportRequestsClient) Create(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha2.APIServiceExportRequest, opts metav1.CreateOptions) (*kubebindv1alpha2.APIServiceExportRequest, error) { - obj, err := c.Fake.Invokes(kcptesting.NewCreateAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, aPIServiceExportRequest), &kubebindv1alpha2.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExportRequest), err -} - -func (c *aPIServiceExportRequestsClient) Update(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha2.APIServiceExportRequest, opts metav1.UpdateOptions) (*kubebindv1alpha2.APIServiceExportRequest, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, aPIServiceExportRequest), &kubebindv1alpha2.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExportRequest), err -} - -func (c *aPIServiceExportRequestsClient) UpdateStatus(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha2.APIServiceExportRequest, opts metav1.UpdateOptions) (*kubebindv1alpha2.APIServiceExportRequest, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateSubresourceAction(aPIServiceExportRequestsResource, c.ClusterPath, "status", c.Namespace, aPIServiceExportRequest), &kubebindv1alpha2.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExportRequest), err -} - -func (c *aPIServiceExportRequestsClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewDeleteActionWithOptions(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, name, opts), &kubebindv1alpha2.APIServiceExportRequest{}) - return err -} - -func (c *aPIServiceExportRequestsClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewDeleteCollectionAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, listOpts) - - _, err := c.Fake.Invokes(action, &kubebindv1alpha2.APIServiceExportRequestList{}) - return err -} - -func (c *aPIServiceExportRequestsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*kubebindv1alpha2.APIServiceExportRequest, error) { - obj, err := c.Fake.Invokes(kcptesting.NewGetAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, name), &kubebindv1alpha2.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExportRequest), err -} - -// List takes label and field selectors, and returns the list of APIServiceExportRequests that match those selectors. -func (c *aPIServiceExportRequestsClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.APIServiceExportRequestList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(aPIServiceExportRequestsResource, aPIServiceExportRequestsKind, c.ClusterPath, c.Namespace, opts), &kubebindv1alpha2.APIServiceExportRequestList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.APIServiceExportRequestList{ListMeta: obj.(*kubebindv1alpha2.APIServiceExportRequestList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.APIServiceExportRequestList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *aPIServiceExportRequestsClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, opts)) -} - -func (c *aPIServiceExportRequestsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*kubebindv1alpha2.APIServiceExportRequest, error) { - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, name, pt, data, subresources...), &kubebindv1alpha2.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExportRequest), err -} - -func (c *aPIServiceExportRequestsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.APIServiceExportRequestApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.APIServiceExportRequest, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data), &kubebindv1alpha2.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExportRequest), err -} - -func (c *aPIServiceExportRequestsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.APIServiceExportRequestApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.APIServiceExportRequest, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceExportRequestsResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data, "status"), &kubebindv1alpha2.APIServiceExportRequest{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceExportRequest), err -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiservicenamespace.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiservicenamespace.go deleted file mode 100644 index c6f7f83a6..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/apiservicenamespace.go +++ /dev/null @@ -1,213 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/testing" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - kcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -var aPIServiceNamespacesResource = schema.GroupVersionResource{Group: "kube-bind.io", Version: "v1alpha2", Resource: "apiservicenamespaces"} -var aPIServiceNamespacesKind = schema.GroupVersionKind{Group: "kube-bind.io", Version: "v1alpha2", Kind: "APIServiceNamespace"} - -type aPIServiceNamespacesClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *aPIServiceNamespacesClusterClient) Cluster(clusterPath logicalcluster.Path) kcpkubebindv1alpha2.APIServiceNamespacesNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &aPIServiceNamespacesNamespacer{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of APIServiceNamespaces that match those selectors across all clusters. -func (c *aPIServiceNamespacesClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.APIServiceNamespaceList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(aPIServiceNamespacesResource, aPIServiceNamespacesKind, logicalcluster.Wildcard, metav1.NamespaceAll, opts), &kubebindv1alpha2.APIServiceNamespaceList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.APIServiceNamespaceList{ListMeta: obj.(*kubebindv1alpha2.APIServiceNamespaceList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.APIServiceNamespaceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested APIServiceNamespaces across all clusters. -func (c *aPIServiceNamespacesClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(aPIServiceNamespacesResource, logicalcluster.Wildcard, metav1.NamespaceAll, opts)) -} - -type aPIServiceNamespacesNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *aPIServiceNamespacesNamespacer) Namespace(namespace string) kubebindv1alpha2client.APIServiceNamespaceInterface { - return &aPIServiceNamespacesClient{Fake: n.Fake, ClusterPath: n.ClusterPath, Namespace: namespace} -} - -type aPIServiceNamespacesClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path - Namespace string -} - -func (c *aPIServiceNamespacesClient) Create(ctx context.Context, aPIServiceNamespace *kubebindv1alpha2.APIServiceNamespace, opts metav1.CreateOptions) (*kubebindv1alpha2.APIServiceNamespace, error) { - obj, err := c.Fake.Invokes(kcptesting.NewCreateAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, aPIServiceNamespace), &kubebindv1alpha2.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceNamespace), err -} - -func (c *aPIServiceNamespacesClient) Update(ctx context.Context, aPIServiceNamespace *kubebindv1alpha2.APIServiceNamespace, opts metav1.UpdateOptions) (*kubebindv1alpha2.APIServiceNamespace, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, aPIServiceNamespace), &kubebindv1alpha2.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceNamespace), err -} - -func (c *aPIServiceNamespacesClient) UpdateStatus(ctx context.Context, aPIServiceNamespace *kubebindv1alpha2.APIServiceNamespace, opts metav1.UpdateOptions) (*kubebindv1alpha2.APIServiceNamespace, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateSubresourceAction(aPIServiceNamespacesResource, c.ClusterPath, "status", c.Namespace, aPIServiceNamespace), &kubebindv1alpha2.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceNamespace), err -} - -func (c *aPIServiceNamespacesClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewDeleteActionWithOptions(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, name, opts), &kubebindv1alpha2.APIServiceNamespace{}) - return err -} - -func (c *aPIServiceNamespacesClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewDeleteCollectionAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, listOpts) - - _, err := c.Fake.Invokes(action, &kubebindv1alpha2.APIServiceNamespaceList{}) - return err -} - -func (c *aPIServiceNamespacesClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*kubebindv1alpha2.APIServiceNamespace, error) { - obj, err := c.Fake.Invokes(kcptesting.NewGetAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, name), &kubebindv1alpha2.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceNamespace), err -} - -// List takes label and field selectors, and returns the list of APIServiceNamespaces that match those selectors. -func (c *aPIServiceNamespacesClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.APIServiceNamespaceList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(aPIServiceNamespacesResource, aPIServiceNamespacesKind, c.ClusterPath, c.Namespace, opts), &kubebindv1alpha2.APIServiceNamespaceList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.APIServiceNamespaceList{ListMeta: obj.(*kubebindv1alpha2.APIServiceNamespaceList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.APIServiceNamespaceList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *aPIServiceNamespacesClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, opts)) -} - -func (c *aPIServiceNamespacesClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*kubebindv1alpha2.APIServiceNamespace, error) { - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, name, pt, data, subresources...), &kubebindv1alpha2.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceNamespace), err -} - -func (c *aPIServiceNamespacesClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.APIServiceNamespaceApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.APIServiceNamespace, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data), &kubebindv1alpha2.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceNamespace), err -} - -func (c *aPIServiceNamespacesClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.APIServiceNamespaceApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.APIServiceNamespace, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(aPIServiceNamespacesResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data, "status"), &kubebindv1alpha2.APIServiceNamespace{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.APIServiceNamespace), err -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/boundapiresourceschema.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/boundapiresourceschema.go deleted file mode 100644 index 8fff69c69..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/boundapiresourceschema.go +++ /dev/null @@ -1,213 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/testing" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - kcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -var boundAPIResourceSchemasResource = schema.GroupVersionResource{Group: "kube-bind.io", Version: "v1alpha2", Resource: "boundapiresourceschemas"} -var boundAPIResourceSchemasKind = schema.GroupVersionKind{Group: "kube-bind.io", Version: "v1alpha2", Kind: "BoundAPIResourceSchema"} - -type boundAPIResourceSchemasClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *boundAPIResourceSchemasClusterClient) Cluster(clusterPath logicalcluster.Path) kcpkubebindv1alpha2.BoundAPIResourceSchemasNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &boundAPIResourceSchemasNamespacer{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of BoundAPIResourceSchemas that match those selectors across all clusters. -func (c *boundAPIResourceSchemasClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.BoundAPIResourceSchemaList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(boundAPIResourceSchemasResource, boundAPIResourceSchemasKind, logicalcluster.Wildcard, metav1.NamespaceAll, opts), &kubebindv1alpha2.BoundAPIResourceSchemaList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.BoundAPIResourceSchemaList{ListMeta: obj.(*kubebindv1alpha2.BoundAPIResourceSchemaList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.BoundAPIResourceSchemaList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested BoundAPIResourceSchemas across all clusters. -func (c *boundAPIResourceSchemasClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(boundAPIResourceSchemasResource, logicalcluster.Wildcard, metav1.NamespaceAll, opts)) -} - -type boundAPIResourceSchemasNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *boundAPIResourceSchemasNamespacer) Namespace(namespace string) kubebindv1alpha2client.BoundAPIResourceSchemaInterface { - return &boundAPIResourceSchemasClient{Fake: n.Fake, ClusterPath: n.ClusterPath, Namespace: namespace} -} - -type boundAPIResourceSchemasClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path - Namespace string -} - -func (c *boundAPIResourceSchemasClient) Create(ctx context.Context, boundAPIResourceSchema *kubebindv1alpha2.BoundAPIResourceSchema, opts metav1.CreateOptions) (*kubebindv1alpha2.BoundAPIResourceSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewCreateAction(boundAPIResourceSchemasResource, c.ClusterPath, c.Namespace, boundAPIResourceSchema), &kubebindv1alpha2.BoundAPIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.BoundAPIResourceSchema), err -} - -func (c *boundAPIResourceSchemasClient) Update(ctx context.Context, boundAPIResourceSchema *kubebindv1alpha2.BoundAPIResourceSchema, opts metav1.UpdateOptions) (*kubebindv1alpha2.BoundAPIResourceSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateAction(boundAPIResourceSchemasResource, c.ClusterPath, c.Namespace, boundAPIResourceSchema), &kubebindv1alpha2.BoundAPIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.BoundAPIResourceSchema), err -} - -func (c *boundAPIResourceSchemasClient) UpdateStatus(ctx context.Context, boundAPIResourceSchema *kubebindv1alpha2.BoundAPIResourceSchema, opts metav1.UpdateOptions) (*kubebindv1alpha2.BoundAPIResourceSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateSubresourceAction(boundAPIResourceSchemasResource, c.ClusterPath, "status", c.Namespace, boundAPIResourceSchema), &kubebindv1alpha2.BoundAPIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.BoundAPIResourceSchema), err -} - -func (c *boundAPIResourceSchemasClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewDeleteActionWithOptions(boundAPIResourceSchemasResource, c.ClusterPath, c.Namespace, name, opts), &kubebindv1alpha2.BoundAPIResourceSchema{}) - return err -} - -func (c *boundAPIResourceSchemasClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewDeleteCollectionAction(boundAPIResourceSchemasResource, c.ClusterPath, c.Namespace, listOpts) - - _, err := c.Fake.Invokes(action, &kubebindv1alpha2.BoundAPIResourceSchemaList{}) - return err -} - -func (c *boundAPIResourceSchemasClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*kubebindv1alpha2.BoundAPIResourceSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewGetAction(boundAPIResourceSchemasResource, c.ClusterPath, c.Namespace, name), &kubebindv1alpha2.BoundAPIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.BoundAPIResourceSchema), err -} - -// List takes label and field selectors, and returns the list of BoundAPIResourceSchemas that match those selectors. -func (c *boundAPIResourceSchemasClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.BoundAPIResourceSchemaList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(boundAPIResourceSchemasResource, boundAPIResourceSchemasKind, c.ClusterPath, c.Namespace, opts), &kubebindv1alpha2.BoundAPIResourceSchemaList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.BoundAPIResourceSchemaList{ListMeta: obj.(*kubebindv1alpha2.BoundAPIResourceSchemaList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.BoundAPIResourceSchemaList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *boundAPIResourceSchemasClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(boundAPIResourceSchemasResource, c.ClusterPath, c.Namespace, opts)) -} - -func (c *boundAPIResourceSchemasClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*kubebindv1alpha2.BoundAPIResourceSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(boundAPIResourceSchemasResource, c.ClusterPath, c.Namespace, name, pt, data, subresources...), &kubebindv1alpha2.BoundAPIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.BoundAPIResourceSchema), err -} - -func (c *boundAPIResourceSchemasClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.BoundAPIResourceSchemaApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.BoundAPIResourceSchema, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(boundAPIResourceSchemasResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data), &kubebindv1alpha2.BoundAPIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.BoundAPIResourceSchema), err -} - -func (c *boundAPIResourceSchemasClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.BoundAPIResourceSchemaApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.BoundAPIResourceSchema, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(boundAPIResourceSchemasResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data, "status"), &kubebindv1alpha2.BoundAPIResourceSchema{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.BoundAPIResourceSchema), err -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/clusterbinding.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/clusterbinding.go deleted file mode 100644 index 4e0305bd6..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/clusterbinding.go +++ /dev/null @@ -1,213 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/testing" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationskubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - kcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2" - kubebindv1alpha2client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -var clusterBindingsResource = schema.GroupVersionResource{Group: "kube-bind.io", Version: "v1alpha2", Resource: "clusterbindings"} -var clusterBindingsKind = schema.GroupVersionKind{Group: "kube-bind.io", Version: "v1alpha2", Kind: "ClusterBinding"} - -type clusterBindingsClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *clusterBindingsClusterClient) Cluster(clusterPath logicalcluster.Path) kcpkubebindv1alpha2.ClusterBindingsNamespacer { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &clusterBindingsNamespacer{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of ClusterBindings that match those selectors across all clusters. -func (c *clusterBindingsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.ClusterBindingList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(clusterBindingsResource, clusterBindingsKind, logicalcluster.Wildcard, metav1.NamespaceAll, opts), &kubebindv1alpha2.ClusterBindingList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.ClusterBindingList{ListMeta: obj.(*kubebindv1alpha2.ClusterBindingList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.ClusterBindingList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ClusterBindings across all clusters. -func (c *clusterBindingsClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(clusterBindingsResource, logicalcluster.Wildcard, metav1.NamespaceAll, opts)) -} - -type clusterBindingsNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *clusterBindingsNamespacer) Namespace(namespace string) kubebindv1alpha2client.ClusterBindingInterface { - return &clusterBindingsClient{Fake: n.Fake, ClusterPath: n.ClusterPath, Namespace: namespace} -} - -type clusterBindingsClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path - Namespace string -} - -func (c *clusterBindingsClient) Create(ctx context.Context, clusterBinding *kubebindv1alpha2.ClusterBinding, opts metav1.CreateOptions) (*kubebindv1alpha2.ClusterBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewCreateAction(clusterBindingsResource, c.ClusterPath, c.Namespace, clusterBinding), &kubebindv1alpha2.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.ClusterBinding), err -} - -func (c *clusterBindingsClient) Update(ctx context.Context, clusterBinding *kubebindv1alpha2.ClusterBinding, opts metav1.UpdateOptions) (*kubebindv1alpha2.ClusterBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateAction(clusterBindingsResource, c.ClusterPath, c.Namespace, clusterBinding), &kubebindv1alpha2.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.ClusterBinding), err -} - -func (c *clusterBindingsClient) UpdateStatus(ctx context.Context, clusterBinding *kubebindv1alpha2.ClusterBinding, opts metav1.UpdateOptions) (*kubebindv1alpha2.ClusterBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewUpdateSubresourceAction(clusterBindingsResource, c.ClusterPath, "status", c.Namespace, clusterBinding), &kubebindv1alpha2.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.ClusterBinding), err -} - -func (c *clusterBindingsClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewDeleteActionWithOptions(clusterBindingsResource, c.ClusterPath, c.Namespace, name, opts), &kubebindv1alpha2.ClusterBinding{}) - return err -} - -func (c *clusterBindingsClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewDeleteCollectionAction(clusterBindingsResource, c.ClusterPath, c.Namespace, listOpts) - - _, err := c.Fake.Invokes(action, &kubebindv1alpha2.ClusterBindingList{}) - return err -} - -func (c *clusterBindingsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*kubebindv1alpha2.ClusterBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewGetAction(clusterBindingsResource, c.ClusterPath, c.Namespace, name), &kubebindv1alpha2.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.ClusterBinding), err -} - -// List takes label and field selectors, and returns the list of ClusterBindings that match those selectors. -func (c *clusterBindingsClient) List(ctx context.Context, opts metav1.ListOptions) (*kubebindv1alpha2.ClusterBindingList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewListAction(clusterBindingsResource, clusterBindingsKind, c.ClusterPath, c.Namespace, opts), &kubebindv1alpha2.ClusterBindingList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &kubebindv1alpha2.ClusterBindingList{ListMeta: obj.(*kubebindv1alpha2.ClusterBindingList).ListMeta} - for _, item := range obj.(*kubebindv1alpha2.ClusterBindingList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *clusterBindingsClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewWatchAction(clusterBindingsResource, c.ClusterPath, c.Namespace, opts)) -} - -func (c *clusterBindingsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*kubebindv1alpha2.ClusterBinding, error) { - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(clusterBindingsResource, c.ClusterPath, c.Namespace, name, pt, data, subresources...), &kubebindv1alpha2.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.ClusterBinding), err -} - -func (c *clusterBindingsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.ClusterBindingApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.ClusterBinding, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(clusterBindingsResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data), &kubebindv1alpha2.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.ClusterBinding), err -} - -func (c *clusterBindingsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationskubebindv1alpha2.ClusterBindingApplyConfiguration, opts metav1.ApplyOptions) (*kubebindv1alpha2.ClusterBinding, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(clusterBindingsResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data, "status"), &kubebindv1alpha2.ClusterBinding{}) - if obj == nil { - return nil, err - } - return obj.(*kubebindv1alpha2.ClusterBinding), err -} diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/kubebind_client.go b/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/kubebind_client.go deleted file mode 100644 index 91297a0f2..000000000 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/kubebind_client.go +++ /dev/null @@ -1,120 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -import ( - "net/http" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/client-go/rest" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2" -) - -type KubeBindV1alpha2ClusterInterface interface { - KubeBindV1alpha2ClusterScoper - APIResourceSchemasClusterGetter - APIServiceBindingsClusterGetter - APIServiceExportsClusterGetter - APIServiceExportRequestsClusterGetter - APIServiceNamespacesClusterGetter - BoundAPIResourceSchemasClusterGetter - ClusterBindingsClusterGetter -} - -type KubeBindV1alpha2ClusterScoper interface { - Cluster(logicalcluster.Path) kubebindv1alpha2.KubeBindV1alpha2Interface -} - -type KubeBindV1alpha2ClusterClient struct { - clientCache kcpclient.Cache[*kubebindv1alpha2.KubeBindV1alpha2Client] -} - -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 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) { - client, err := rest.HTTPClientFor(c) - if err != nil { - return nil, err - } - return NewForConfigAndClient(c, client) -} - -// 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[*kubebindv1alpha2.KubeBindV1alpha2Client]{ - NewForConfigAndClient: kubebindv1alpha2.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 -} diff --git a/sdk/kcp/clientset/versioned/cluster/fake/clientset.go b/sdk/kcp/clientset/versioned/fake/clientset.go similarity index 50% rename from sdk/kcp/clientset/versioned/cluster/fake/clientset.go rename to sdk/kcp/clientset/versioned/fake/clientset.go index 171ca39a2..cebc15662 100644 --- a/sdk/kcp/clientset/versioned/cluster/fake/clientset.go +++ b/sdk/kcp/clientset/versioned/fake/clientset.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,54 +14,58 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-client-gen. DO NOT EDIT. package fake import ( - "github.com/kcp-dev/logicalcluster/v3" - 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" - client "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - kcpclient "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - kcpkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1" - fakekubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake" - kcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2" - fakekubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake" - clientscheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" + 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 validations and/or defaults. It shouldn't be considered a replacement +// 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(clientscheme.Scheme, clientscheme.Codecs.UniversalDecoder()) + 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 := &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 } -var _ kcpclient.ClusterInterface = (*ClusterClientset)(nil) - // ClusterClientset contains the clients for groups. type ClusterClientset struct { - *kcptesting.Fake + 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 @@ -74,32 +75,32 @@ func (c *ClusterClientset) Tracker() kcptesting.ObjectTracker { return c.tracker } -// KubeBindV1alpha1 retrieves the KubeBindV1alpha1ClusterClient. -func (c *ClusterClientset) KubeBindV1alpha1() kcpkubebindv1alpha1.KubeBindV1alpha1ClusterInterface { - return &fakekubebindv1alpha1.KubeBindV1alpha1ClusterClient{Fake: c.Fake} -} - -// KubeBindV1alpha2 retrieves the KubeBindV1alpha2ClusterClient. -func (c *ClusterClientset) KubeBindV1alpha2() kcpkubebindv1alpha2.KubeBindV1alpha2ClusterInterface { - return &fakekubebindv1alpha2.KubeBindV1alpha2ClusterClient{Fake: c.Fake} -} - // Cluster scopes this clientset to one cluster. -func (c *ClusterClientset) Cluster(clusterPath logicalcluster.Path) client.Interface { +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}, + Fake: &c.Fake, + discovery: &kcpfakediscovery.FakeDiscovery{Fake: &c.Fake, ClusterPath: clusterPath}, tracker: c.tracker.Cluster(clusterPath), clusterPath: clusterPath, } } -var _ client.Interface = (*Clientset)(nil) +// KubeBindV1alpha1 retrieves the KubeBindV1alpha1ClusterClient +func (c *ClusterClientset) KubeBindV1alpha1() kcpkubebindv1alpha1.KubeBindV1alpha1ClusterInterface { + return &kcpfakekubebindv1alpha1.KubeBindV1alpha1ClusterClient{Fake: &c.Fake} +} -// Clientset contains the clients for groups. +// 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 @@ -107,7 +108,11 @@ type Clientset struct { clusterPath logicalcluster.Path } -// Discovery retrieves the DiscoveryClient +var ( + _ clientset.Interface = &Clientset{} + _ kcptesting.FakeScopedClient = &Clientset{} +) + func (c *Clientset) Discovery() discovery.DiscoveryInterface { return c.discovery } @@ -116,12 +121,32 @@ func (c *Clientset) Tracker() kcptesting.ScopedObjectTracker { return c.tracker } -// KubeBindV1alpha1 retrieves the KubeBindV1alpha1Client. +// 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 &fakekubebindv1alpha1.KubeBindV1alpha1Client{Fake: c.Fake, ClusterPath: c.clusterPath} + return &kcpfakekubebindv1alpha1.KubeBindV1alpha1Client{Fake: c.Fake, ClusterPath: c.clusterPath} } -// KubeBindV1alpha2 retrieves the KubeBindV1alpha2Client. +// KubeBindV1alpha2 retrieves the KubeBindV1alpha2Client func (c *Clientset) KubeBindV1alpha2() kubebindv1alpha2.KubeBindV1alpha2Interface { - return &fakekubebindv1alpha2.KubeBindV1alpha2Client{Fake: c.Fake, ClusterPath: c.clusterPath} + 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 index 7dce268c1..3ac2202a7 100644 --- a/sdk/kcp/clientset/versioned/fake/clientset_generated.go +++ b/sdk/kcp/clientset/versioned/fake/clientset_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake diff --git a/sdk/kcp/clientset/versioned/fake/doc.go b/sdk/kcp/clientset/versioned/fake/doc.go index 279185bfb..0127325b6 100644 --- a/sdk/kcp/clientset/versioned/fake/doc.go +++ b/sdk/kcp/clientset/versioned/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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 index 6d407cb25..eb2aeb50a 100644 --- a/sdk/kcp/clientset/versioned/fake/register.go +++ b/sdk/kcp/clientset/versioned/fake/register.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by cluster-client-gen. DO NOT EDIT. package fake diff --git a/sdk/kcp/clientset/versioned/scheme/doc.go b/sdk/kcp/clientset/versioned/scheme/doc.go index 622d38d76..15f30da06 100644 --- a/sdk/kcp/clientset/versioned/scheme/doc.go +++ b/sdk/kcp/clientset/versioned/scheme/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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 index 083574fd2..508797228 100644 --- a/sdk/kcp/clientset/versioned/scheme/register.go +++ b/sdk/kcp/clientset/versioned/scheme/register.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by cluster-client-gen. DO NOT EDIT. package scheme diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiservicebinding.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiservicebinding.go index 5bff2feb0..a27137991 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiservicebinding.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiservicebinding.go @@ -14,62 +14,55 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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" - types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - applyconfigurationkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" ) -// APIServiceBindingsGetter has a method to return a APIServiceBindingInterface. -// A group's client should implement this interface. -type APIServiceBindingsGetter interface { - APIServiceBindings() APIServiceBindingInterface +// APIServiceBindingsClusterGetter has a method to return a APIServiceBindingClusterInterface. +// A group's cluster client should implement this interface. +type APIServiceBindingsClusterGetter interface { + APIServiceBindings() APIServiceBindingClusterInterface } -// APIServiceBindingInterface has methods to work with APIServiceBinding resources. -type APIServiceBindingInterface interface { - Create(ctx context.Context, aPIServiceBinding *kubebindv1alpha1.APIServiceBinding, opts v1.CreateOptions) (*kubebindv1alpha1.APIServiceBinding, error) - Update(ctx context.Context, aPIServiceBinding *kubebindv1alpha1.APIServiceBinding, opts v1.UpdateOptions) (*kubebindv1alpha1.APIServiceBinding, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, aPIServiceBinding *kubebindv1alpha1.APIServiceBinding, opts v1.UpdateOptions) (*kubebindv1alpha1.APIServiceBinding, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*kubebindv1alpha1.APIServiceBinding, error) +// 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) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubebindv1alpha1.APIServiceBinding, err error) - Apply(ctx context.Context, aPIServiceBinding *applyconfigurationkubebindv1alpha1.APIServiceBindingApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha1.APIServiceBinding, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, aPIServiceBinding *applyconfigurationkubebindv1alpha1.APIServiceBindingApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha1.APIServiceBinding, err error) - APIServiceBindingExpansion + APIServiceBindingClusterExpansion } -// aPIServiceBindings implements APIServiceBindingInterface -type aPIServiceBindings struct { - *gentype.ClientWithListAndApply[*kubebindv1alpha1.APIServiceBinding, *kubebindv1alpha1.APIServiceBindingList, *applyconfigurationkubebindv1alpha1.APIServiceBindingApplyConfiguration] +type aPIServiceBindingsClusterInterface struct { + clientCache kcpclient.Cache[*KubeBindV1alpha1Client] } -// newAPIServiceBindings returns a APIServiceBindings -func newAPIServiceBindings(c *KubeBindV1alpha1Client) *aPIServiceBindings { - return &aPIServiceBindings{ - gentype.NewClientWithListAndApply[*kubebindv1alpha1.APIServiceBinding, *kubebindv1alpha1.APIServiceBindingList, *applyconfigurationkubebindv1alpha1.APIServiceBindingApplyConfiguration]( - "apiservicebindings", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *kubebindv1alpha1.APIServiceBinding { return &kubebindv1alpha1.APIServiceBinding{} }, - func() *kubebindv1alpha1.APIServiceBindingList { return &kubebindv1alpha1.APIServiceBindingList{} }, - ), +// 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 index 3778e3fb5..9950120ba 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiserviceexport.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiserviceexport.go @@ -14,62 +14,69 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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" - types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - applyconfigurationkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" ) -// APIServiceExportsGetter has a method to return a APIServiceExportInterface. -// A group's client should implement this interface. -type APIServiceExportsGetter interface { - APIServiceExports(namespace string) APIServiceExportInterface +// APIServiceExportsClusterGetter has a method to return a APIServiceExportClusterInterface. +// A group's cluster client should implement this interface. +type APIServiceExportsClusterGetter interface { + APIServiceExports() APIServiceExportClusterInterface } -// APIServiceExportInterface has methods to work with APIServiceExport resources. -type APIServiceExportInterface interface { - Create(ctx context.Context, aPIServiceExport *kubebindv1alpha1.APIServiceExport, opts v1.CreateOptions) (*kubebindv1alpha1.APIServiceExport, error) - Update(ctx context.Context, aPIServiceExport *kubebindv1alpha1.APIServiceExport, opts v1.UpdateOptions) (*kubebindv1alpha1.APIServiceExport, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, aPIServiceExport *kubebindv1alpha1.APIServiceExport, opts v1.UpdateOptions) (*kubebindv1alpha1.APIServiceExport, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*kubebindv1alpha1.APIServiceExport, error) +// 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) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubebindv1alpha1.APIServiceExport, err error) - Apply(ctx context.Context, aPIServiceExport *applyconfigurationkubebindv1alpha1.APIServiceExportApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha1.APIServiceExport, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, aPIServiceExport *applyconfigurationkubebindv1alpha1.APIServiceExportApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha1.APIServiceExport, err error) - APIServiceExportExpansion + APIServiceExportClusterExpansion } -// aPIServiceExports implements APIServiceExportInterface -type aPIServiceExports struct { - *gentype.ClientWithListAndApply[*kubebindv1alpha1.APIServiceExport, *kubebindv1alpha1.APIServiceExportList, *applyconfigurationkubebindv1alpha1.APIServiceExportApplyConfiguration] +type aPIServiceExportsClusterInterface struct { + clientCache kcpclient.Cache[*KubeBindV1alpha1Client] } -// newAPIServiceExports returns a APIServiceExports -func newAPIServiceExports(c *KubeBindV1alpha1Client, namespace string) *aPIServiceExports { - return &aPIServiceExports{ - gentype.NewClientWithListAndApply[*kubebindv1alpha1.APIServiceExport, *kubebindv1alpha1.APIServiceExportList, *applyconfigurationkubebindv1alpha1.APIServiceExportApplyConfiguration]( - "apiserviceexports", - c.RESTClient(), - scheme.ParameterCodec, - namespace, - func() *kubebindv1alpha1.APIServiceExport { return &kubebindv1alpha1.APIServiceExport{} }, - func() *kubebindv1alpha1.APIServiceExportList { return &kubebindv1alpha1.APIServiceExportList{} }, - ), +// 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 index 80ae98997..004af9e22 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiserviceexportrequest.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiserviceexportrequest.go @@ -14,64 +14,69 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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" - types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - applyconfigurationkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" ) -// APIServiceExportRequestsGetter has a method to return a APIServiceExportRequestInterface. -// A group's client should implement this interface. -type APIServiceExportRequestsGetter interface { - APIServiceExportRequests(namespace string) APIServiceExportRequestInterface +// APIServiceExportRequestsClusterGetter has a method to return a APIServiceExportRequestClusterInterface. +// A group's cluster client should implement this interface. +type APIServiceExportRequestsClusterGetter interface { + APIServiceExportRequests() APIServiceExportRequestClusterInterface } -// APIServiceExportRequestInterface has methods to work with APIServiceExportRequest resources. -type APIServiceExportRequestInterface interface { - Create(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha1.APIServiceExportRequest, opts v1.CreateOptions) (*kubebindv1alpha1.APIServiceExportRequest, error) - Update(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha1.APIServiceExportRequest, opts v1.UpdateOptions) (*kubebindv1alpha1.APIServiceExportRequest, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha1.APIServiceExportRequest, opts v1.UpdateOptions) (*kubebindv1alpha1.APIServiceExportRequest, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*kubebindv1alpha1.APIServiceExportRequest, error) +// 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) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubebindv1alpha1.APIServiceExportRequest, err error) - Apply(ctx context.Context, aPIServiceExportRequest *applyconfigurationkubebindv1alpha1.APIServiceExportRequestApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha1.APIServiceExportRequest, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, aPIServiceExportRequest *applyconfigurationkubebindv1alpha1.APIServiceExportRequestApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha1.APIServiceExportRequest, err error) - APIServiceExportRequestExpansion + APIServiceExportRequestClusterExpansion } -// aPIServiceExportRequests implements APIServiceExportRequestInterface -type aPIServiceExportRequests struct { - *gentype.ClientWithListAndApply[*kubebindv1alpha1.APIServiceExportRequest, *kubebindv1alpha1.APIServiceExportRequestList, *applyconfigurationkubebindv1alpha1.APIServiceExportRequestApplyConfiguration] +type aPIServiceExportRequestsClusterInterface struct { + clientCache kcpclient.Cache[*KubeBindV1alpha1Client] } -// newAPIServiceExportRequests returns a APIServiceExportRequests -func newAPIServiceExportRequests(c *KubeBindV1alpha1Client, namespace string) *aPIServiceExportRequests { - return &aPIServiceExportRequests{ - gentype.NewClientWithListAndApply[*kubebindv1alpha1.APIServiceExportRequest, *kubebindv1alpha1.APIServiceExportRequestList, *applyconfigurationkubebindv1alpha1.APIServiceExportRequestApplyConfiguration]( - "apiserviceexportrequests", - c.RESTClient(), - scheme.ParameterCodec, - namespace, - func() *kubebindv1alpha1.APIServiceExportRequest { return &kubebindv1alpha1.APIServiceExportRequest{} }, - func() *kubebindv1alpha1.APIServiceExportRequestList { - return &kubebindv1alpha1.APIServiceExportRequestList{} - }, - ), +// 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 index cedb28705..a15c3fc79 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiservicenamespace.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/apiservicenamespace.go @@ -14,62 +14,69 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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" - types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - applyconfigurationkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" ) -// APIServiceNamespacesGetter has a method to return a APIServiceNamespaceInterface. -// A group's client should implement this interface. -type APIServiceNamespacesGetter interface { - APIServiceNamespaces(namespace string) APIServiceNamespaceInterface +// APIServiceNamespacesClusterGetter has a method to return a APIServiceNamespaceClusterInterface. +// A group's cluster client should implement this interface. +type APIServiceNamespacesClusterGetter interface { + APIServiceNamespaces() APIServiceNamespaceClusterInterface } -// APIServiceNamespaceInterface has methods to work with APIServiceNamespace resources. -type APIServiceNamespaceInterface interface { - Create(ctx context.Context, aPIServiceNamespace *kubebindv1alpha1.APIServiceNamespace, opts v1.CreateOptions) (*kubebindv1alpha1.APIServiceNamespace, error) - Update(ctx context.Context, aPIServiceNamespace *kubebindv1alpha1.APIServiceNamespace, opts v1.UpdateOptions) (*kubebindv1alpha1.APIServiceNamespace, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, aPIServiceNamespace *kubebindv1alpha1.APIServiceNamespace, opts v1.UpdateOptions) (*kubebindv1alpha1.APIServiceNamespace, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*kubebindv1alpha1.APIServiceNamespace, error) +// 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) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubebindv1alpha1.APIServiceNamespace, err error) - Apply(ctx context.Context, aPIServiceNamespace *applyconfigurationkubebindv1alpha1.APIServiceNamespaceApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha1.APIServiceNamespace, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, aPIServiceNamespace *applyconfigurationkubebindv1alpha1.APIServiceNamespaceApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha1.APIServiceNamespace, err error) - APIServiceNamespaceExpansion + APIServiceNamespaceClusterExpansion } -// aPIServiceNamespaces implements APIServiceNamespaceInterface -type aPIServiceNamespaces struct { - *gentype.ClientWithListAndApply[*kubebindv1alpha1.APIServiceNamespace, *kubebindv1alpha1.APIServiceNamespaceList, *applyconfigurationkubebindv1alpha1.APIServiceNamespaceApplyConfiguration] +type aPIServiceNamespacesClusterInterface struct { + clientCache kcpclient.Cache[*KubeBindV1alpha1Client] } -// newAPIServiceNamespaces returns a APIServiceNamespaces -func newAPIServiceNamespaces(c *KubeBindV1alpha1Client, namespace string) *aPIServiceNamespaces { - return &aPIServiceNamespaces{ - gentype.NewClientWithListAndApply[*kubebindv1alpha1.APIServiceNamespace, *kubebindv1alpha1.APIServiceNamespaceList, *applyconfigurationkubebindv1alpha1.APIServiceNamespaceApplyConfiguration]( - "apiservicenamespaces", - c.RESTClient(), - scheme.ParameterCodec, - namespace, - func() *kubebindv1alpha1.APIServiceNamespace { return &kubebindv1alpha1.APIServiceNamespace{} }, - func() *kubebindv1alpha1.APIServiceNamespaceList { return &kubebindv1alpha1.APIServiceNamespaceList{} }, - ), +// 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 index 3202dd857..52f4cc120 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/clusterbinding.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/clusterbinding.go @@ -14,62 +14,69 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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" - types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - applyconfigurationkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha1" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" ) -// ClusterBindingsGetter has a method to return a ClusterBindingInterface. -// A group's client should implement this interface. -type ClusterBindingsGetter interface { - ClusterBindings(namespace string) ClusterBindingInterface +// ClusterBindingsClusterGetter has a method to return a ClusterBindingClusterInterface. +// A group's cluster client should implement this interface. +type ClusterBindingsClusterGetter interface { + ClusterBindings() ClusterBindingClusterInterface } -// ClusterBindingInterface has methods to work with ClusterBinding resources. -type ClusterBindingInterface interface { - Create(ctx context.Context, clusterBinding *kubebindv1alpha1.ClusterBinding, opts v1.CreateOptions) (*kubebindv1alpha1.ClusterBinding, error) - Update(ctx context.Context, clusterBinding *kubebindv1alpha1.ClusterBinding, opts v1.UpdateOptions) (*kubebindv1alpha1.ClusterBinding, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, clusterBinding *kubebindv1alpha1.ClusterBinding, opts v1.UpdateOptions) (*kubebindv1alpha1.ClusterBinding, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*kubebindv1alpha1.ClusterBinding, error) +// 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) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubebindv1alpha1.ClusterBinding, err error) - Apply(ctx context.Context, clusterBinding *applyconfigurationkubebindv1alpha1.ClusterBindingApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha1.ClusterBinding, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, clusterBinding *applyconfigurationkubebindv1alpha1.ClusterBindingApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha1.ClusterBinding, err error) - ClusterBindingExpansion + ClusterBindingClusterExpansion } -// clusterBindings implements ClusterBindingInterface -type clusterBindings struct { - *gentype.ClientWithListAndApply[*kubebindv1alpha1.ClusterBinding, *kubebindv1alpha1.ClusterBindingList, *applyconfigurationkubebindv1alpha1.ClusterBindingApplyConfiguration] +type clusterBindingsClusterInterface struct { + clientCache kcpclient.Cache[*KubeBindV1alpha1Client] } -// newClusterBindings returns a ClusterBindings -func newClusterBindings(c *KubeBindV1alpha1Client, namespace string) *clusterBindings { - return &clusterBindings{ - gentype.NewClientWithListAndApply[*kubebindv1alpha1.ClusterBinding, *kubebindv1alpha1.ClusterBindingList, *applyconfigurationkubebindv1alpha1.ClusterBindingApplyConfiguration]( - "clusterbindings", - c.RESTClient(), - scheme.ParameterCodec, - namespace, - func() *kubebindv1alpha1.ClusterBinding { return &kubebindv1alpha1.ClusterBinding{} }, - func() *kubebindv1alpha1.ClusterBindingList { return &kubebindv1alpha1.ClusterBindingList{} }, - ), +// 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 index c4f0595eb..4e3061938 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/doc.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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 new file mode 100644 index 000000000..edf06f04f --- /dev/null +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiservicebinding.go @@ -0,0 +1,90 @@ +/* +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 new file mode 100644 index 000000000..74686a123 --- /dev/null +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiserviceexport.go @@ -0,0 +1,99 @@ +/* +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 new file mode 100644 index 000000000..31c60ae56 --- /dev/null +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiserviceexportrequest.go @@ -0,0 +1,103 @@ +/* +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 new file mode 100644 index 000000000..72ac35173 --- /dev/null +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/apiservicenamespace.go @@ -0,0 +1,99 @@ +/* +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 new file mode 100644 index 000000000..54c32a0f8 --- /dev/null +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/clusterbinding.go @@ -0,0 +1,99 @@ +/* +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 index b6c79f90d..3c4dfa810 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/doc.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by cluster-client-gen. DO NOT EDIT. -// Package fake has the automatically generated clients. +// 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 index 8d6724319..a26e254d2 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiservicebinding.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiservicebinding.go @@ -14,41 +14,174 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake import ( - gentype "k8s.io/client-go/gentype" + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" 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] +// FakeAPIServiceBindings implements APIServiceBindingInterface +type FakeAPIServiceBindings struct { 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, +var apiservicebindingsResource = v1alpha1.SchemeGroupVersion.WithResource("apiservicebindings") + +var apiservicebindingsKind = v1alpha1.SchemeGroupVersion.WithKind("APIServiceBinding") + +// Get takes name of the aPIServiceBinding, and returns the corresponding aPIServiceBinding object, and an error if there is any. +func (c *FakeAPIServiceBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.APIServiceBinding, err error) { + emptyResult := &v1alpha1.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootGetActionWithOptions(apiservicebindingsResource, name, options), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceBinding), err +} + +// List takes label and field selectors, and returns the list of APIServiceBindings that match those selectors. +func (c *FakeAPIServiceBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.APIServiceBindingList, err error) { + emptyResult := &v1alpha1.APIServiceBindingList{} + obj, err := c.Fake. + Invokes(testing.NewRootListActionWithOptions(apiservicebindingsResource, apiservicebindingsKind, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.APIServiceBindingList{ListMeta: obj.(*v1alpha1.APIServiceBindingList).ListMeta} + for _, item := range obj.(*v1alpha1.APIServiceBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested aPIServiceBindings. +func (c *FakeAPIServiceBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchActionWithOptions(apiservicebindingsResource, opts)) +} + +// Create takes the representation of a aPIServiceBinding and creates it. Returns the server's representation of the aPIServiceBinding, and an error, if there is any. +func (c *FakeAPIServiceBindings) Create(ctx context.Context, aPIServiceBinding *v1alpha1.APIServiceBinding, opts v1.CreateOptions) (result *v1alpha1.APIServiceBinding, err error) { + emptyResult := &v1alpha1.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootCreateActionWithOptions(apiservicebindingsResource, aPIServiceBinding, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceBinding), err +} + +// Update takes the representation of a aPIServiceBinding and updates it. Returns the server's representation of the aPIServiceBinding, and an error, if there is any. +func (c *FakeAPIServiceBindings) Update(ctx context.Context, aPIServiceBinding *v1alpha1.APIServiceBinding, opts v1.UpdateOptions) (result *v1alpha1.APIServiceBinding, err error) { + emptyResult := &v1alpha1.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootUpdateActionWithOptions(apiservicebindingsResource, aPIServiceBinding, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceBinding), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeAPIServiceBindings) UpdateStatus(ctx context.Context, aPIServiceBinding *v1alpha1.APIServiceBinding, opts v1.UpdateOptions) (result *v1alpha1.APIServiceBinding, err error) { + emptyResult := &v1alpha1.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceActionWithOptions(apiservicebindingsResource, "status", aPIServiceBinding, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceBinding), err +} + +// Delete takes name of the aPIServiceBinding and deletes it. Returns an error if one occurs. +func (c *FakeAPIServiceBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(apiservicebindingsResource, name, opts), &v1alpha1.APIServiceBinding{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeAPIServiceBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionActionWithOptions(apiservicebindingsResource, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.APIServiceBindingList{}) + return err +} + +// Patch applies the patch and returns the patched aPIServiceBinding. +func (c *FakeAPIServiceBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.APIServiceBinding, err error) { + emptyResult := &v1alpha1.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(apiservicebindingsResource, name, pt, data, opts, subresources...), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceBinding), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied aPIServiceBinding. +func (c *FakeAPIServiceBindings) Apply(ctx context.Context, aPIServiceBinding *kubebindv1alpha1.APIServiceBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.APIServiceBinding, err error) { + if aPIServiceBinding == nil { + return nil, fmt.Errorf("aPIServiceBinding provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceBinding) + if err != nil { + return nil, err + } + name := aPIServiceBinding.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceBinding.Name must be provided to Apply") + } + emptyResult := &v1alpha1.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(apiservicebindingsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceBinding), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeAPIServiceBindings) ApplyStatus(ctx context.Context, aPIServiceBinding *kubebindv1alpha1.APIServiceBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.APIServiceBinding, err error) { + if aPIServiceBinding == nil { + return nil, fmt.Errorf("aPIServiceBinding provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceBinding) + if err != nil { + return nil, err + } + name := aPIServiceBinding.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceBinding.Name must be provided to Apply") + } + emptyResult := &v1alpha1.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(apiservicebindingsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) + if obj == nil { + return emptyResult, err } + return obj.(*v1alpha1.APIServiceBinding), err } 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 index 283586e08..27d19026e 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiserviceexport.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiserviceexport.go @@ -14,41 +14,185 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake import ( - gentype "k8s.io/client-go/gentype" + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" 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] +// FakeAPIServiceExports implements APIServiceExportInterface +type FakeAPIServiceExports struct { Fake *FakeKubeBindV1alpha1 + ns string +} + +var apiserviceexportsResource = v1alpha1.SchemeGroupVersion.WithResource("apiserviceexports") + +var apiserviceexportsKind = v1alpha1.SchemeGroupVersion.WithKind("APIServiceExport") + +// Get takes name of the aPIServiceExport, and returns the corresponding aPIServiceExport object, and an error if there is any. +func (c *FakeAPIServiceExports) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.APIServiceExport, err error) { + emptyResult := &v1alpha1.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewGetActionWithOptions(apiserviceexportsResource, c.ns, name, options), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceExport), err +} + +// List takes label and field selectors, and returns the list of APIServiceExports that match those selectors. +func (c *FakeAPIServiceExports) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.APIServiceExportList, err error) { + emptyResult := &v1alpha1.APIServiceExportList{} + obj, err := c.Fake. + Invokes(testing.NewListActionWithOptions(apiserviceexportsResource, apiserviceexportsKind, c.ns, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.APIServiceExportList{ListMeta: obj.(*v1alpha1.APIServiceExportList).ListMeta} + for _, item := range obj.(*v1alpha1.APIServiceExportList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested aPIServiceExports. +func (c *FakeAPIServiceExports) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchActionWithOptions(apiserviceexportsResource, c.ns, opts)) + +} + +// Create takes the representation of a aPIServiceExport and creates it. Returns the server's representation of the aPIServiceExport, and an error, if there is any. +func (c *FakeAPIServiceExports) Create(ctx context.Context, aPIServiceExport *v1alpha1.APIServiceExport, opts v1.CreateOptions) (result *v1alpha1.APIServiceExport, err error) { + emptyResult := &v1alpha1.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewCreateActionWithOptions(apiserviceexportsResource, c.ns, aPIServiceExport, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceExport), err +} + +// Update takes the representation of a aPIServiceExport and updates it. Returns the server's representation of the aPIServiceExport, and an error, if there is any. +func (c *FakeAPIServiceExports) Update(ctx context.Context, aPIServiceExport *v1alpha1.APIServiceExport, opts v1.UpdateOptions) (result *v1alpha1.APIServiceExport, err error) { + emptyResult := &v1alpha1.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewUpdateActionWithOptions(apiserviceexportsResource, c.ns, aPIServiceExport, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceExport), err } -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, +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeAPIServiceExports) UpdateStatus(ctx context.Context, aPIServiceExport *v1alpha1.APIServiceExport, opts v1.UpdateOptions) (result *v1alpha1.APIServiceExport, err error) { + emptyResult := &v1alpha1.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceActionWithOptions(apiserviceexportsResource, "status", c.ns, aPIServiceExport, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceExport), err +} + +// Delete takes name of the aPIServiceExport and deletes it. Returns an error if one occurs. +func (c *FakeAPIServiceExports) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(apiserviceexportsResource, c.ns, name, opts), &v1alpha1.APIServiceExport{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeAPIServiceExports) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionActionWithOptions(apiserviceexportsResource, c.ns, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.APIServiceExportList{}) + return err +} + +// Patch applies the patch and returns the patched aPIServiceExport. +func (c *FakeAPIServiceExports) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.APIServiceExport, err error) { + emptyResult := &v1alpha1.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiserviceexportsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceExport), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied aPIServiceExport. +func (c *FakeAPIServiceExports) Apply(ctx context.Context, aPIServiceExport *kubebindv1alpha1.APIServiceExportApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.APIServiceExport, err error) { + if aPIServiceExport == nil { + return nil, fmt.Errorf("aPIServiceExport provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceExport) + if err != nil { + return nil, err + } + name := aPIServiceExport.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceExport.Name must be provided to Apply") + } + emptyResult := &v1alpha1.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiserviceexportsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceExport), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeAPIServiceExports) ApplyStatus(ctx context.Context, aPIServiceExport *kubebindv1alpha1.APIServiceExportApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.APIServiceExport, err error) { + if aPIServiceExport == nil { + return nil, fmt.Errorf("aPIServiceExport provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceExport) + if err != nil { + return nil, err + } + name := aPIServiceExport.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceExport.Name must be provided to Apply") + } + emptyResult := &v1alpha1.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiserviceexportsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) + + if obj == nil { + return emptyResult, err } + return obj.(*v1alpha1.APIServiceExport), err } 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 index 39f26f304..f26e27d62 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiserviceexportrequest.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiserviceexportrequest.go @@ -14,41 +14,185 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake import ( - gentype "k8s.io/client-go/gentype" + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" 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] +// FakeAPIServiceExportRequests implements APIServiceExportRequestInterface +type FakeAPIServiceExportRequests struct { Fake *FakeKubeBindV1alpha1 + ns string +} + +var apiserviceexportrequestsResource = v1alpha1.SchemeGroupVersion.WithResource("apiserviceexportrequests") + +var apiserviceexportrequestsKind = v1alpha1.SchemeGroupVersion.WithKind("APIServiceExportRequest") + +// Get takes name of the aPIServiceExportRequest, and returns the corresponding aPIServiceExportRequest object, and an error if there is any. +func (c *FakeAPIServiceExportRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.APIServiceExportRequest, err error) { + emptyResult := &v1alpha1.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewGetActionWithOptions(apiserviceexportrequestsResource, c.ns, name, options), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceExportRequest), err +} + +// List takes label and field selectors, and returns the list of APIServiceExportRequests that match those selectors. +func (c *FakeAPIServiceExportRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.APIServiceExportRequestList, err error) { + emptyResult := &v1alpha1.APIServiceExportRequestList{} + obj, err := c.Fake. + Invokes(testing.NewListActionWithOptions(apiserviceexportrequestsResource, apiserviceexportrequestsKind, c.ns, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.APIServiceExportRequestList{ListMeta: obj.(*v1alpha1.APIServiceExportRequestList).ListMeta} + for _, item := range obj.(*v1alpha1.APIServiceExportRequestList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested aPIServiceExportRequests. +func (c *FakeAPIServiceExportRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchActionWithOptions(apiserviceexportrequestsResource, c.ns, opts)) + +} + +// Create takes the representation of a aPIServiceExportRequest and creates it. Returns the server's representation of the aPIServiceExportRequest, and an error, if there is any. +func (c *FakeAPIServiceExportRequests) Create(ctx context.Context, aPIServiceExportRequest *v1alpha1.APIServiceExportRequest, opts v1.CreateOptions) (result *v1alpha1.APIServiceExportRequest, err error) { + emptyResult := &v1alpha1.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewCreateActionWithOptions(apiserviceexportrequestsResource, c.ns, aPIServiceExportRequest, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceExportRequest), err +} + +// Update takes the representation of a aPIServiceExportRequest and updates it. Returns the server's representation of the aPIServiceExportRequest, and an error, if there is any. +func (c *FakeAPIServiceExportRequests) Update(ctx context.Context, aPIServiceExportRequest *v1alpha1.APIServiceExportRequest, opts v1.UpdateOptions) (result *v1alpha1.APIServiceExportRequest, err error) { + emptyResult := &v1alpha1.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewUpdateActionWithOptions(apiserviceexportrequestsResource, c.ns, aPIServiceExportRequest, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceExportRequest), err } -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, +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeAPIServiceExportRequests) UpdateStatus(ctx context.Context, aPIServiceExportRequest *v1alpha1.APIServiceExportRequest, opts v1.UpdateOptions) (result *v1alpha1.APIServiceExportRequest, err error) { + emptyResult := &v1alpha1.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceActionWithOptions(apiserviceexportrequestsResource, "status", c.ns, aPIServiceExportRequest, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceExportRequest), err +} + +// Delete takes name of the aPIServiceExportRequest and deletes it. Returns an error if one occurs. +func (c *FakeAPIServiceExportRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(apiserviceexportrequestsResource, c.ns, name, opts), &v1alpha1.APIServiceExportRequest{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeAPIServiceExportRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionActionWithOptions(apiserviceexportrequestsResource, c.ns, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.APIServiceExportRequestList{}) + return err +} + +// Patch applies the patch and returns the patched aPIServiceExportRequest. +func (c *FakeAPIServiceExportRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.APIServiceExportRequest, err error) { + emptyResult := &v1alpha1.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiserviceexportrequestsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceExportRequest), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied aPIServiceExportRequest. +func (c *FakeAPIServiceExportRequests) Apply(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha1.APIServiceExportRequestApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.APIServiceExportRequest, err error) { + if aPIServiceExportRequest == nil { + return nil, fmt.Errorf("aPIServiceExportRequest provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceExportRequest) + if err != nil { + return nil, err + } + name := aPIServiceExportRequest.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceExportRequest.Name must be provided to Apply") + } + emptyResult := &v1alpha1.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiserviceexportrequestsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceExportRequest), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeAPIServiceExportRequests) ApplyStatus(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha1.APIServiceExportRequestApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.APIServiceExportRequest, err error) { + if aPIServiceExportRequest == nil { + return nil, fmt.Errorf("aPIServiceExportRequest provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceExportRequest) + if err != nil { + return nil, err + } + name := aPIServiceExportRequest.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceExportRequest.Name must be provided to Apply") + } + emptyResult := &v1alpha1.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiserviceexportrequestsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) + + if obj == nil { + return emptyResult, err } + return obj.(*v1alpha1.APIServiceExportRequest), err } 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 index 57cc93bfc..fccaa7b5b 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiservicenamespace.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_apiservicenamespace.go @@ -14,41 +14,185 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake import ( - gentype "k8s.io/client-go/gentype" + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" 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] +// FakeAPIServiceNamespaces implements APIServiceNamespaceInterface +type FakeAPIServiceNamespaces struct { Fake *FakeKubeBindV1alpha1 + ns string +} + +var apiservicenamespacesResource = v1alpha1.SchemeGroupVersion.WithResource("apiservicenamespaces") + +var apiservicenamespacesKind = v1alpha1.SchemeGroupVersion.WithKind("APIServiceNamespace") + +// Get takes name of the aPIServiceNamespace, and returns the corresponding aPIServiceNamespace object, and an error if there is any. +func (c *FakeAPIServiceNamespaces) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.APIServiceNamespace, err error) { + emptyResult := &v1alpha1.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewGetActionWithOptions(apiservicenamespacesResource, c.ns, name, options), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceNamespace), err +} + +// List takes label and field selectors, and returns the list of APIServiceNamespaces that match those selectors. +func (c *FakeAPIServiceNamespaces) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.APIServiceNamespaceList, err error) { + emptyResult := &v1alpha1.APIServiceNamespaceList{} + obj, err := c.Fake. + Invokes(testing.NewListActionWithOptions(apiservicenamespacesResource, apiservicenamespacesKind, c.ns, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.APIServiceNamespaceList{ListMeta: obj.(*v1alpha1.APIServiceNamespaceList).ListMeta} + for _, item := range obj.(*v1alpha1.APIServiceNamespaceList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested aPIServiceNamespaces. +func (c *FakeAPIServiceNamespaces) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchActionWithOptions(apiservicenamespacesResource, c.ns, opts)) + +} + +// Create takes the representation of a aPIServiceNamespace and creates it. Returns the server's representation of the aPIServiceNamespace, and an error, if there is any. +func (c *FakeAPIServiceNamespaces) Create(ctx context.Context, aPIServiceNamespace *v1alpha1.APIServiceNamespace, opts v1.CreateOptions) (result *v1alpha1.APIServiceNamespace, err error) { + emptyResult := &v1alpha1.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewCreateActionWithOptions(apiservicenamespacesResource, c.ns, aPIServiceNamespace, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceNamespace), err +} + +// Update takes the representation of a aPIServiceNamespace and updates it. Returns the server's representation of the aPIServiceNamespace, and an error, if there is any. +func (c *FakeAPIServiceNamespaces) Update(ctx context.Context, aPIServiceNamespace *v1alpha1.APIServiceNamespace, opts v1.UpdateOptions) (result *v1alpha1.APIServiceNamespace, err error) { + emptyResult := &v1alpha1.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewUpdateActionWithOptions(apiservicenamespacesResource, c.ns, aPIServiceNamespace, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceNamespace), err } -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, +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeAPIServiceNamespaces) UpdateStatus(ctx context.Context, aPIServiceNamespace *v1alpha1.APIServiceNamespace, opts v1.UpdateOptions) (result *v1alpha1.APIServiceNamespace, err error) { + emptyResult := &v1alpha1.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceActionWithOptions(apiservicenamespacesResource, "status", c.ns, aPIServiceNamespace, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceNamespace), err +} + +// Delete takes name of the aPIServiceNamespace and deletes it. Returns an error if one occurs. +func (c *FakeAPIServiceNamespaces) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(apiservicenamespacesResource, c.ns, name, opts), &v1alpha1.APIServiceNamespace{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeAPIServiceNamespaces) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionActionWithOptions(apiservicenamespacesResource, c.ns, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.APIServiceNamespaceList{}) + return err +} + +// Patch applies the patch and returns the patched aPIServiceNamespace. +func (c *FakeAPIServiceNamespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.APIServiceNamespace, err error) { + emptyResult := &v1alpha1.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiservicenamespacesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceNamespace), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied aPIServiceNamespace. +func (c *FakeAPIServiceNamespaces) Apply(ctx context.Context, aPIServiceNamespace *kubebindv1alpha1.APIServiceNamespaceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.APIServiceNamespace, err error) { + if aPIServiceNamespace == nil { + return nil, fmt.Errorf("aPIServiceNamespace provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceNamespace) + if err != nil { + return nil, err + } + name := aPIServiceNamespace.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceNamespace.Name must be provided to Apply") + } + emptyResult := &v1alpha1.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiservicenamespacesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.APIServiceNamespace), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeAPIServiceNamespaces) ApplyStatus(ctx context.Context, aPIServiceNamespace *kubebindv1alpha1.APIServiceNamespaceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.APIServiceNamespace, err error) { + if aPIServiceNamespace == nil { + return nil, fmt.Errorf("aPIServiceNamespace provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceNamespace) + if err != nil { + return nil, err + } + name := aPIServiceNamespace.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceNamespace.Name must be provided to Apply") + } + emptyResult := &v1alpha1.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiservicenamespacesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) + + if obj == nil { + return emptyResult, err } + return obj.(*v1alpha1.APIServiceNamespace), err } 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 index fdda76419..496012475 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_clusterbinding.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/fake_clusterbinding.go @@ -14,41 +14,185 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake import ( - gentype "k8s.io/client-go/gentype" + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" 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] +// FakeClusterBindings implements ClusterBindingInterface +type FakeClusterBindings struct { Fake *FakeKubeBindV1alpha1 + ns string +} + +var clusterbindingsResource = v1alpha1.SchemeGroupVersion.WithResource("clusterbindings") + +var clusterbindingsKind = v1alpha1.SchemeGroupVersion.WithKind("ClusterBinding") + +// Get takes name of the clusterBinding, and returns the corresponding clusterBinding object, and an error if there is any. +func (c *FakeClusterBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterBinding, err error) { + emptyResult := &v1alpha1.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewGetActionWithOptions(clusterbindingsResource, c.ns, name, options), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.ClusterBinding), err +} + +// List takes label and field selectors, and returns the list of ClusterBindings that match those selectors. +func (c *FakeClusterBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterBindingList, err error) { + emptyResult := &v1alpha1.ClusterBindingList{} + obj, err := c.Fake. + Invokes(testing.NewListActionWithOptions(clusterbindingsResource, clusterbindingsKind, c.ns, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.ClusterBindingList{ListMeta: obj.(*v1alpha1.ClusterBindingList).ListMeta} + for _, item := range obj.(*v1alpha1.ClusterBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterBindings. +func (c *FakeClusterBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchActionWithOptions(clusterbindingsResource, c.ns, opts)) + +} + +// Create takes the representation of a clusterBinding and creates it. Returns the server's representation of the clusterBinding, and an error, if there is any. +func (c *FakeClusterBindings) Create(ctx context.Context, clusterBinding *v1alpha1.ClusterBinding, opts v1.CreateOptions) (result *v1alpha1.ClusterBinding, err error) { + emptyResult := &v1alpha1.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewCreateActionWithOptions(clusterbindingsResource, c.ns, clusterBinding, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.ClusterBinding), err +} + +// Update takes the representation of a clusterBinding and updates it. Returns the server's representation of the clusterBinding, and an error, if there is any. +func (c *FakeClusterBindings) Update(ctx context.Context, clusterBinding *v1alpha1.ClusterBinding, opts v1.UpdateOptions) (result *v1alpha1.ClusterBinding, err error) { + emptyResult := &v1alpha1.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewUpdateActionWithOptions(clusterbindingsResource, c.ns, clusterBinding, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.ClusterBinding), err } -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, +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeClusterBindings) UpdateStatus(ctx context.Context, clusterBinding *v1alpha1.ClusterBinding, opts v1.UpdateOptions) (result *v1alpha1.ClusterBinding, err error) { + emptyResult := &v1alpha1.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceActionWithOptions(clusterbindingsResource, "status", c.ns, clusterBinding, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.ClusterBinding), err +} + +// Delete takes name of the clusterBinding and deletes it. Returns an error if one occurs. +func (c *FakeClusterBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(clusterbindingsResource, c.ns, name, opts), &v1alpha1.ClusterBinding{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeClusterBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionActionWithOptions(clusterbindingsResource, c.ns, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.ClusterBindingList{}) + return err +} + +// Patch applies the patch and returns the patched clusterBinding. +func (c *FakeClusterBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterBinding, err error) { + emptyResult := &v1alpha1.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(clusterbindingsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.ClusterBinding), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied clusterBinding. +func (c *FakeClusterBindings) Apply(ctx context.Context, clusterBinding *kubebindv1alpha1.ClusterBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterBinding, err error) { + if clusterBinding == nil { + return nil, fmt.Errorf("clusterBinding provided to Apply must not be nil") + } + data, err := json.Marshal(clusterBinding) + if err != nil { + return nil, err + } + name := clusterBinding.Name + if name == nil { + return nil, fmt.Errorf("clusterBinding.Name must be provided to Apply") + } + emptyResult := &v1alpha1.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(clusterbindingsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha1.ClusterBinding), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeClusterBindings) ApplyStatus(ctx context.Context, clusterBinding *kubebindv1alpha1.ClusterBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterBinding, err error) { + if clusterBinding == nil { + return nil, fmt.Errorf("clusterBinding provided to Apply must not be nil") + } + data, err := json.Marshal(clusterBinding) + if err != nil { + return nil, err + } + name := clusterBinding.Name + if name == nil { + return nil, fmt.Errorf("clusterBinding.Name must be provided to Apply") + } + emptyResult := &v1alpha1.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(clusterbindingsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) + + if obj == nil { + return emptyResult, err } + return obj.(*v1alpha1.ClusterBinding), err } 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 index 094928b5c..d51145bcd 100644 --- 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 @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake @@ -30,23 +30,23 @@ type FakeKubeBindV1alpha1 struct { } func (c *FakeKubeBindV1alpha1) APIServiceBindings() v1alpha1.APIServiceBindingInterface { - return newFakeAPIServiceBindings(c) + return &FakeAPIServiceBindings{c} } func (c *FakeKubeBindV1alpha1) APIServiceExports(namespace string) v1alpha1.APIServiceExportInterface { - return newFakeAPIServiceExports(c, namespace) + return &FakeAPIServiceExports{c, namespace} } func (c *FakeKubeBindV1alpha1) APIServiceExportRequests(namespace string) v1alpha1.APIServiceExportRequestInterface { - return newFakeAPIServiceExportRequests(c, namespace) + return &FakeAPIServiceExportRequests{c, namespace} } func (c *FakeKubeBindV1alpha1) APIServiceNamespaces(namespace string) v1alpha1.APIServiceNamespaceInterface { - return newFakeAPIServiceNamespaces(c, namespace) + return &FakeAPIServiceNamespaces{c, namespace} } func (c *FakeKubeBindV1alpha1) ClusterBindings(namespace string) v1alpha1.ClusterBindingInterface { - return newFakeClusterBindings(c, namespace) + return &FakeClusterBindings{c, namespace} } // RESTClient returns a RESTClient that is used to communicate diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/kubebind_client.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/kubebind_client.go similarity index 72% rename from sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/kubebind_client.go rename to sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/kubebind_client.go index e643dcf1d..bf6610040 100644 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1/fake/kubebind_client.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/fake/kubebind_client.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,17 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-client-gen. DO NOT EDIT. package fake import ( - "github.com/kcp-dev/logicalcluster/v3" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "k8s.io/client-go/rest" + "github.com/kcp-dev/logicalcluster/v3" + rest "k8s.io/client-go/rest" - kcpkubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha1" + 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" ) @@ -45,53 +41,53 @@ func (c *KubeBindV1alpha1ClusterClient) Cluster(clusterPath logicalcluster.Path) } func (c *KubeBindV1alpha1ClusterClient) APIServiceBindings() kcpkubebindv1alpha1.APIServiceBindingClusterInterface { - return &aPIServiceBindingsClusterClient{Fake: c.Fake} + return newFakeAPIServiceBindingClusterClient(c) } func (c *KubeBindV1alpha1ClusterClient) APIServiceExports() kcpkubebindv1alpha1.APIServiceExportClusterInterface { - return &aPIServiceExportsClusterClient{Fake: c.Fake} + return newFakeAPIServiceExportClusterClient(c) } func (c *KubeBindV1alpha1ClusterClient) APIServiceExportRequests() kcpkubebindv1alpha1.APIServiceExportRequestClusterInterface { - return &aPIServiceExportRequestsClusterClient{Fake: c.Fake} + return newFakeAPIServiceExportRequestClusterClient(c) } func (c *KubeBindV1alpha1ClusterClient) APIServiceNamespaces() kcpkubebindv1alpha1.APIServiceNamespaceClusterInterface { - return &aPIServiceNamespacesClusterClient{Fake: c.Fake} + return newFakeAPIServiceNamespaceClusterClient(c) } func (c *KubeBindV1alpha1ClusterClient) ClusterBindings() kcpkubebindv1alpha1.ClusterBindingClusterInterface { - return &clusterBindingsClusterClient{Fake: c.Fake} + return newFakeClusterBindingClusterClient(c) } -var _ kubebindv1alpha1.KubeBindV1alpha1Interface = (*KubeBindV1alpha1Client)(nil) - type KubeBindV1alpha1Client struct { *kcptesting.Fake ClusterPath logicalcluster.Path } -func (c *KubeBindV1alpha1Client) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} - func (c *KubeBindV1alpha1Client) APIServiceBindings() kubebindv1alpha1.APIServiceBindingInterface { - return &aPIServiceBindingsClient{Fake: c.Fake, ClusterPath: c.ClusterPath} + return newFakeAPIServiceBindingClient(c.Fake, c.ClusterPath) } func (c *KubeBindV1alpha1Client) APIServiceExports(namespace string) kubebindv1alpha1.APIServiceExportInterface { - return &aPIServiceExportsClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} + return newFakeAPIServiceExportClient(c.Fake, namespace, c.ClusterPath) } func (c *KubeBindV1alpha1Client) APIServiceExportRequests(namespace string) kubebindv1alpha1.APIServiceExportRequestInterface { - return &aPIServiceExportRequestsClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} + return newFakeAPIServiceExportRequestClient(c.Fake, namespace, c.ClusterPath) } func (c *KubeBindV1alpha1Client) APIServiceNamespaces(namespace string) kubebindv1alpha1.APIServiceNamespaceInterface { - return &aPIServiceNamespacesClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} + return newFakeAPIServiceNamespaceClient(c.Fake, namespace, c.ClusterPath) } func (c *KubeBindV1alpha1Client) ClusterBindings(namespace string) kubebindv1alpha1.ClusterBindingInterface { - return &clusterBindingsClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} + 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 index 20b23c9cc..1733e4c0b 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/generated_expansion.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/generated_expansion.go @@ -14,16 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by cluster-client-gen. DO NOT EDIT. package v1alpha1 -type APIServiceBindingExpansion interface{} +type APIServiceBindingClusterExpansion interface{} -type APIServiceExportExpansion interface{} +type APIServiceExportClusterExpansion interface{} -type APIServiceExportRequestExpansion interface{} +type APIServiceExportRequestClusterExpansion interface{} -type APIServiceNamespaceExpansion interface{} +type APIServiceNamespaceClusterExpansion interface{} -type ClusterBindingExpansion 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 index a47e5a9eb..11f1bdea3 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/kubebind_client.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha1/kubebind_client.go @@ -14,61 +14,72 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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 KubeBindV1alpha1Interface interface { - RESTClient() rest.Interface - APIServiceBindingsGetter - APIServiceExportsGetter - APIServiceExportRequestsGetter - APIServiceNamespacesGetter - ClusterBindingsGetter +type KubeBindV1alpha1ClusterInterface interface { + KubeBindV1alpha1ClusterScoper + APIServiceBindingsClusterGetter + APIServiceExportsClusterGetter + APIServiceExportRequestsClusterGetter + APIServiceNamespacesClusterGetter + ClusterBindingsClusterGetter } -// KubeBindV1alpha1Client is used to interact with features provided by the kube-bind.io group. -type KubeBindV1alpha1Client struct { - restClient rest.Interface +type KubeBindV1alpha1ClusterScoper interface { + Cluster(logicalcluster.Path) KubeBindV1alpha1Interface } -func (c *KubeBindV1alpha1Client) APIServiceBindings() APIServiceBindingInterface { - return newAPIServiceBindings(c) +// KubeBindV1alpha1ClusterClient is used to interact with features provided by the kube-bind.io group. +type KubeBindV1alpha1ClusterClient struct { + clientCache kcpclient.Cache[*KubeBindV1alpha1Client] } -func (c *KubeBindV1alpha1Client) APIServiceExports(namespace string) APIServiceExportInterface { - return newAPIServiceExports(c, namespace) +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 *KubeBindV1alpha1Client) APIServiceExportRequests(namespace string) APIServiceExportRequestInterface { - return newAPIServiceExportRequests(c, namespace) +func (c *KubeBindV1alpha1ClusterClient) APIServiceExportRequests() APIServiceExportRequestClusterInterface { + return &aPIServiceExportRequestsClusterInterface{clientCache: c.clientCache} } -func (c *KubeBindV1alpha1Client) APIServiceNamespaces(namespace string) APIServiceNamespaceInterface { - return newAPIServiceNamespaces(c, namespace) +func (c *KubeBindV1alpha1ClusterClient) APIServiceNamespaces() APIServiceNamespaceClusterInterface { + return &aPIServiceNamespacesClusterInterface{clientCache: c.clientCache} } -func (c *KubeBindV1alpha1Client) ClusterBindings(namespace string) ClusterBindingInterface { - return newClusterBindings(c, namespace) +func (c *KubeBindV1alpha1ClusterClient) ClusterBindings() ClusterBindingClusterInterface { + return &clusterBindingsClusterInterface{clientCache: c.clientCache} } -// NewForConfig creates a new KubeBindV1alpha1Client for the given config. +// 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) (*KubeBindV1alpha1Client, error) { +func NewForConfig(c *rest.Config) (*KubeBindV1alpha1ClusterClient, 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 @@ -76,23 +87,22 @@ func NewForConfig(c *rest.Config) (*KubeBindV1alpha1Client, error) { return NewForConfigAndClient(&config, httpClient) } -// NewForConfigAndClient creates a new KubeBindV1alpha1Client for the given config and http client. +// 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) (*KubeBindV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { +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 &KubeBindV1alpha1Client{client}, nil + + return &KubeBindV1alpha1ClusterClient{clientCache: cache}, nil } -// NewForConfigOrDie creates a new KubeBindV1alpha1Client for the given config and +// NewForConfigOrDie creates a new KubeBindV1alpha1ClusterClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *KubeBindV1alpha1Client { +func NewForConfigOrDie(c *rest.Config) *KubeBindV1alpha1ClusterClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -100,12 +110,7 @@ func NewForConfigOrDie(c *rest.Config) *KubeBindV1alpha1Client { return client } -// New creates a new KubeBindV1alpha1Client for the given RESTClient. -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,15 +119,4 @@ func setConfigDefaults(config *rest.Config) error { if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *KubeBindV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient } diff --git a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiresourceschema.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiresourceschema.go index 91056baf7..fa40cfa1b 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiresourceschema.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiresourceschema.go @@ -14,58 +14,55 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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" - types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" ) -// APIResourceSchemasGetter has a method to return a APIResourceSchemaInterface. -// A group's client should implement this interface. -type APIResourceSchemasGetter interface { - APIResourceSchemas() APIResourceSchemaInterface +// APIResourceSchemasClusterGetter has a method to return a APIResourceSchemaClusterInterface. +// A group's cluster client should implement this interface. +type APIResourceSchemasClusterGetter interface { + APIResourceSchemas() APIResourceSchemaClusterInterface } -// APIResourceSchemaInterface has methods to work with APIResourceSchema resources. -type APIResourceSchemaInterface interface { - Create(ctx context.Context, aPIResourceSchema *kubebindv1alpha2.APIResourceSchema, opts v1.CreateOptions) (*kubebindv1alpha2.APIResourceSchema, error) - Update(ctx context.Context, aPIResourceSchema *kubebindv1alpha2.APIResourceSchema, opts v1.UpdateOptions) (*kubebindv1alpha2.APIResourceSchema, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*kubebindv1alpha2.APIResourceSchema, error) +// 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) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubebindv1alpha2.APIResourceSchema, err error) - Apply(ctx context.Context, aPIResourceSchema *applyconfigurationkubebindv1alpha2.APIResourceSchemaApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha2.APIResourceSchema, err error) - APIResourceSchemaExpansion + APIResourceSchemaClusterExpansion } -// aPIResourceSchemas implements APIResourceSchemaInterface -type aPIResourceSchemas struct { - *gentype.ClientWithListAndApply[*kubebindv1alpha2.APIResourceSchema, *kubebindv1alpha2.APIResourceSchemaList, *applyconfigurationkubebindv1alpha2.APIResourceSchemaApplyConfiguration] +type aPIResourceSchemasClusterInterface struct { + clientCache kcpclient.Cache[*KubeBindV1alpha2Client] } -// newAPIResourceSchemas returns a APIResourceSchemas -func newAPIResourceSchemas(c *KubeBindV1alpha2Client) *aPIResourceSchemas { - return &aPIResourceSchemas{ - gentype.NewClientWithListAndApply[*kubebindv1alpha2.APIResourceSchema, *kubebindv1alpha2.APIResourceSchemaList, *applyconfigurationkubebindv1alpha2.APIResourceSchemaApplyConfiguration]( - "apiresourceschemas", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *kubebindv1alpha2.APIResourceSchema { return &kubebindv1alpha2.APIResourceSchema{} }, - func() *kubebindv1alpha2.APIResourceSchemaList { return &kubebindv1alpha2.APIResourceSchemaList{} }, - ), +// 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 index ab27ad247..bf94aade3 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiservicebinding.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiservicebinding.go @@ -14,62 +14,55 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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" - types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" ) -// APIServiceBindingsGetter has a method to return a APIServiceBindingInterface. -// A group's client should implement this interface. -type APIServiceBindingsGetter interface { - APIServiceBindings() APIServiceBindingInterface +// APIServiceBindingsClusterGetter has a method to return a APIServiceBindingClusterInterface. +// A group's cluster client should implement this interface. +type APIServiceBindingsClusterGetter interface { + APIServiceBindings() APIServiceBindingClusterInterface } -// APIServiceBindingInterface has methods to work with APIServiceBinding resources. -type APIServiceBindingInterface interface { - Create(ctx context.Context, aPIServiceBinding *kubebindv1alpha2.APIServiceBinding, opts v1.CreateOptions) (*kubebindv1alpha2.APIServiceBinding, error) - Update(ctx context.Context, aPIServiceBinding *kubebindv1alpha2.APIServiceBinding, opts v1.UpdateOptions) (*kubebindv1alpha2.APIServiceBinding, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, aPIServiceBinding *kubebindv1alpha2.APIServiceBinding, opts v1.UpdateOptions) (*kubebindv1alpha2.APIServiceBinding, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*kubebindv1alpha2.APIServiceBinding, error) +// 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) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubebindv1alpha2.APIServiceBinding, err error) - Apply(ctx context.Context, aPIServiceBinding *applyconfigurationkubebindv1alpha2.APIServiceBindingApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha2.APIServiceBinding, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, aPIServiceBinding *applyconfigurationkubebindv1alpha2.APIServiceBindingApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha2.APIServiceBinding, err error) - APIServiceBindingExpansion + APIServiceBindingClusterExpansion } -// aPIServiceBindings implements APIServiceBindingInterface -type aPIServiceBindings struct { - *gentype.ClientWithListAndApply[*kubebindv1alpha2.APIServiceBinding, *kubebindv1alpha2.APIServiceBindingList, *applyconfigurationkubebindv1alpha2.APIServiceBindingApplyConfiguration] +type aPIServiceBindingsClusterInterface struct { + clientCache kcpclient.Cache[*KubeBindV1alpha2Client] } -// newAPIServiceBindings returns a APIServiceBindings -func newAPIServiceBindings(c *KubeBindV1alpha2Client) *aPIServiceBindings { - return &aPIServiceBindings{ - gentype.NewClientWithListAndApply[*kubebindv1alpha2.APIServiceBinding, *kubebindv1alpha2.APIServiceBindingList, *applyconfigurationkubebindv1alpha2.APIServiceBindingApplyConfiguration]( - "apiservicebindings", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *kubebindv1alpha2.APIServiceBinding { return &kubebindv1alpha2.APIServiceBinding{} }, - func() *kubebindv1alpha2.APIServiceBindingList { return &kubebindv1alpha2.APIServiceBindingList{} }, - ), +// 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 index c7ad60a6a..a395cb114 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiserviceexport.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiserviceexport.go @@ -14,62 +14,69 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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" - types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" ) -// APIServiceExportsGetter has a method to return a APIServiceExportInterface. -// A group's client should implement this interface. -type APIServiceExportsGetter interface { - APIServiceExports(namespace string) APIServiceExportInterface +// APIServiceExportsClusterGetter has a method to return a APIServiceExportClusterInterface. +// A group's cluster client should implement this interface. +type APIServiceExportsClusterGetter interface { + APIServiceExports() APIServiceExportClusterInterface } -// APIServiceExportInterface has methods to work with APIServiceExport resources. -type APIServiceExportInterface interface { - Create(ctx context.Context, aPIServiceExport *kubebindv1alpha2.APIServiceExport, opts v1.CreateOptions) (*kubebindv1alpha2.APIServiceExport, error) - Update(ctx context.Context, aPIServiceExport *kubebindv1alpha2.APIServiceExport, opts v1.UpdateOptions) (*kubebindv1alpha2.APIServiceExport, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, aPIServiceExport *kubebindv1alpha2.APIServiceExport, opts v1.UpdateOptions) (*kubebindv1alpha2.APIServiceExport, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*kubebindv1alpha2.APIServiceExport, error) +// 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) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubebindv1alpha2.APIServiceExport, err error) - Apply(ctx context.Context, aPIServiceExport *applyconfigurationkubebindv1alpha2.APIServiceExportApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha2.APIServiceExport, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, aPIServiceExport *applyconfigurationkubebindv1alpha2.APIServiceExportApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha2.APIServiceExport, err error) - APIServiceExportExpansion + APIServiceExportClusterExpansion } -// aPIServiceExports implements APIServiceExportInterface -type aPIServiceExports struct { - *gentype.ClientWithListAndApply[*kubebindv1alpha2.APIServiceExport, *kubebindv1alpha2.APIServiceExportList, *applyconfigurationkubebindv1alpha2.APIServiceExportApplyConfiguration] +type aPIServiceExportsClusterInterface struct { + clientCache kcpclient.Cache[*KubeBindV1alpha2Client] } -// newAPIServiceExports returns a APIServiceExports -func newAPIServiceExports(c *KubeBindV1alpha2Client, namespace string) *aPIServiceExports { - return &aPIServiceExports{ - gentype.NewClientWithListAndApply[*kubebindv1alpha2.APIServiceExport, *kubebindv1alpha2.APIServiceExportList, *applyconfigurationkubebindv1alpha2.APIServiceExportApplyConfiguration]( - "apiserviceexports", - c.RESTClient(), - scheme.ParameterCodec, - namespace, - func() *kubebindv1alpha2.APIServiceExport { return &kubebindv1alpha2.APIServiceExport{} }, - func() *kubebindv1alpha2.APIServiceExportList { return &kubebindv1alpha2.APIServiceExportList{} }, - ), +// 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 index fd845d1e4..e87cb4ca8 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiserviceexportrequest.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiserviceexportrequest.go @@ -14,64 +14,69 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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" - types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" ) -// APIServiceExportRequestsGetter has a method to return a APIServiceExportRequestInterface. -// A group's client should implement this interface. -type APIServiceExportRequestsGetter interface { - APIServiceExportRequests(namespace string) APIServiceExportRequestInterface +// APIServiceExportRequestsClusterGetter has a method to return a APIServiceExportRequestClusterInterface. +// A group's cluster client should implement this interface. +type APIServiceExportRequestsClusterGetter interface { + APIServiceExportRequests() APIServiceExportRequestClusterInterface } -// APIServiceExportRequestInterface has methods to work with APIServiceExportRequest resources. -type APIServiceExportRequestInterface interface { - Create(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha2.APIServiceExportRequest, opts v1.CreateOptions) (*kubebindv1alpha2.APIServiceExportRequest, error) - Update(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha2.APIServiceExportRequest, opts v1.UpdateOptions) (*kubebindv1alpha2.APIServiceExportRequest, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha2.APIServiceExportRequest, opts v1.UpdateOptions) (*kubebindv1alpha2.APIServiceExportRequest, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*kubebindv1alpha2.APIServiceExportRequest, error) +// 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) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubebindv1alpha2.APIServiceExportRequest, err error) - Apply(ctx context.Context, aPIServiceExportRequest *applyconfigurationkubebindv1alpha2.APIServiceExportRequestApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha2.APIServiceExportRequest, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, aPIServiceExportRequest *applyconfigurationkubebindv1alpha2.APIServiceExportRequestApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha2.APIServiceExportRequest, err error) - APIServiceExportRequestExpansion + APIServiceExportRequestClusterExpansion } -// aPIServiceExportRequests implements APIServiceExportRequestInterface -type aPIServiceExportRequests struct { - *gentype.ClientWithListAndApply[*kubebindv1alpha2.APIServiceExportRequest, *kubebindv1alpha2.APIServiceExportRequestList, *applyconfigurationkubebindv1alpha2.APIServiceExportRequestApplyConfiguration] +type aPIServiceExportRequestsClusterInterface struct { + clientCache kcpclient.Cache[*KubeBindV1alpha2Client] } -// newAPIServiceExportRequests returns a APIServiceExportRequests -func newAPIServiceExportRequests(c *KubeBindV1alpha2Client, namespace string) *aPIServiceExportRequests { - return &aPIServiceExportRequests{ - gentype.NewClientWithListAndApply[*kubebindv1alpha2.APIServiceExportRequest, *kubebindv1alpha2.APIServiceExportRequestList, *applyconfigurationkubebindv1alpha2.APIServiceExportRequestApplyConfiguration]( - "apiserviceexportrequests", - c.RESTClient(), - scheme.ParameterCodec, - namespace, - func() *kubebindv1alpha2.APIServiceExportRequest { return &kubebindv1alpha2.APIServiceExportRequest{} }, - func() *kubebindv1alpha2.APIServiceExportRequestList { - return &kubebindv1alpha2.APIServiceExportRequestList{} - }, - ), +// 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 index 9b21f6139..a3f756cf3 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiservicenamespace.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/apiservicenamespace.go @@ -14,62 +14,69 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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" - types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" ) -// APIServiceNamespacesGetter has a method to return a APIServiceNamespaceInterface. -// A group's client should implement this interface. -type APIServiceNamespacesGetter interface { - APIServiceNamespaces(namespace string) APIServiceNamespaceInterface +// APIServiceNamespacesClusterGetter has a method to return a APIServiceNamespaceClusterInterface. +// A group's cluster client should implement this interface. +type APIServiceNamespacesClusterGetter interface { + APIServiceNamespaces() APIServiceNamespaceClusterInterface } -// APIServiceNamespaceInterface has methods to work with APIServiceNamespace resources. -type APIServiceNamespaceInterface interface { - Create(ctx context.Context, aPIServiceNamespace *kubebindv1alpha2.APIServiceNamespace, opts v1.CreateOptions) (*kubebindv1alpha2.APIServiceNamespace, error) - Update(ctx context.Context, aPIServiceNamespace *kubebindv1alpha2.APIServiceNamespace, opts v1.UpdateOptions) (*kubebindv1alpha2.APIServiceNamespace, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, aPIServiceNamespace *kubebindv1alpha2.APIServiceNamespace, opts v1.UpdateOptions) (*kubebindv1alpha2.APIServiceNamespace, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*kubebindv1alpha2.APIServiceNamespace, error) +// 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) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubebindv1alpha2.APIServiceNamespace, err error) - Apply(ctx context.Context, aPIServiceNamespace *applyconfigurationkubebindv1alpha2.APIServiceNamespaceApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha2.APIServiceNamespace, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, aPIServiceNamespace *applyconfigurationkubebindv1alpha2.APIServiceNamespaceApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha2.APIServiceNamespace, err error) - APIServiceNamespaceExpansion + APIServiceNamespaceClusterExpansion } -// aPIServiceNamespaces implements APIServiceNamespaceInterface -type aPIServiceNamespaces struct { - *gentype.ClientWithListAndApply[*kubebindv1alpha2.APIServiceNamespace, *kubebindv1alpha2.APIServiceNamespaceList, *applyconfigurationkubebindv1alpha2.APIServiceNamespaceApplyConfiguration] +type aPIServiceNamespacesClusterInterface struct { + clientCache kcpclient.Cache[*KubeBindV1alpha2Client] } -// newAPIServiceNamespaces returns a APIServiceNamespaces -func newAPIServiceNamespaces(c *KubeBindV1alpha2Client, namespace string) *aPIServiceNamespaces { - return &aPIServiceNamespaces{ - gentype.NewClientWithListAndApply[*kubebindv1alpha2.APIServiceNamespace, *kubebindv1alpha2.APIServiceNamespaceList, *applyconfigurationkubebindv1alpha2.APIServiceNamespaceApplyConfiguration]( - "apiservicenamespaces", - c.RESTClient(), - scheme.ParameterCodec, - namespace, - func() *kubebindv1alpha2.APIServiceNamespace { return &kubebindv1alpha2.APIServiceNamespace{} }, - func() *kubebindv1alpha2.APIServiceNamespaceList { return &kubebindv1alpha2.APIServiceNamespaceList{} }, - ), +// 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 index 272c05d7c..8c34119b7 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/boundapiresourceschema.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/boundapiresourceschema.go @@ -14,64 +14,69 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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" - types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" ) -// BoundAPIResourceSchemasGetter has a method to return a BoundAPIResourceSchemaInterface. -// A group's client should implement this interface. -type BoundAPIResourceSchemasGetter interface { - BoundAPIResourceSchemas(namespace string) BoundAPIResourceSchemaInterface +// BoundAPIResourceSchemasClusterGetter has a method to return a BoundAPIResourceSchemaClusterInterface. +// A group's cluster client should implement this interface. +type BoundAPIResourceSchemasClusterGetter interface { + BoundAPIResourceSchemas() BoundAPIResourceSchemaClusterInterface } -// BoundAPIResourceSchemaInterface has methods to work with BoundAPIResourceSchema resources. -type BoundAPIResourceSchemaInterface interface { - Create(ctx context.Context, boundAPIResourceSchema *kubebindv1alpha2.BoundAPIResourceSchema, opts v1.CreateOptions) (*kubebindv1alpha2.BoundAPIResourceSchema, error) - Update(ctx context.Context, boundAPIResourceSchema *kubebindv1alpha2.BoundAPIResourceSchema, opts v1.UpdateOptions) (*kubebindv1alpha2.BoundAPIResourceSchema, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, boundAPIResourceSchema *kubebindv1alpha2.BoundAPIResourceSchema, opts v1.UpdateOptions) (*kubebindv1alpha2.BoundAPIResourceSchema, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*kubebindv1alpha2.BoundAPIResourceSchema, error) +// 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) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubebindv1alpha2.BoundAPIResourceSchema, err error) - Apply(ctx context.Context, boundAPIResourceSchema *applyconfigurationkubebindv1alpha2.BoundAPIResourceSchemaApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha2.BoundAPIResourceSchema, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, boundAPIResourceSchema *applyconfigurationkubebindv1alpha2.BoundAPIResourceSchemaApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha2.BoundAPIResourceSchema, err error) - BoundAPIResourceSchemaExpansion + BoundAPIResourceSchemaClusterExpansion } -// boundAPIResourceSchemas implements BoundAPIResourceSchemaInterface -type boundAPIResourceSchemas struct { - *gentype.ClientWithListAndApply[*kubebindv1alpha2.BoundAPIResourceSchema, *kubebindv1alpha2.BoundAPIResourceSchemaList, *applyconfigurationkubebindv1alpha2.BoundAPIResourceSchemaApplyConfiguration] +type boundAPIResourceSchemasClusterInterface struct { + clientCache kcpclient.Cache[*KubeBindV1alpha2Client] } -// newBoundAPIResourceSchemas returns a BoundAPIResourceSchemas -func newBoundAPIResourceSchemas(c *KubeBindV1alpha2Client, namespace string) *boundAPIResourceSchemas { - return &boundAPIResourceSchemas{ - gentype.NewClientWithListAndApply[*kubebindv1alpha2.BoundAPIResourceSchema, *kubebindv1alpha2.BoundAPIResourceSchemaList, *applyconfigurationkubebindv1alpha2.BoundAPIResourceSchemaApplyConfiguration]( - "boundapiresourceschemas", - c.RESTClient(), - scheme.ParameterCodec, - namespace, - func() *kubebindv1alpha2.BoundAPIResourceSchema { return &kubebindv1alpha2.BoundAPIResourceSchema{} }, - func() *kubebindv1alpha2.BoundAPIResourceSchemaList { - return &kubebindv1alpha2.BoundAPIResourceSchemaList{} - }, - ), +// 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 index ef867abd8..621431bc2 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/clusterbinding.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/clusterbinding.go @@ -14,62 +14,69 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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" - types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - applyconfigurationkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/applyconfiguration/kubebind/v1alpha2" - scheme "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/scheme" ) -// ClusterBindingsGetter has a method to return a ClusterBindingInterface. -// A group's client should implement this interface. -type ClusterBindingsGetter interface { - ClusterBindings(namespace string) ClusterBindingInterface +// ClusterBindingsClusterGetter has a method to return a ClusterBindingClusterInterface. +// A group's cluster client should implement this interface. +type ClusterBindingsClusterGetter interface { + ClusterBindings() ClusterBindingClusterInterface } -// ClusterBindingInterface has methods to work with ClusterBinding resources. -type ClusterBindingInterface interface { - Create(ctx context.Context, clusterBinding *kubebindv1alpha2.ClusterBinding, opts v1.CreateOptions) (*kubebindv1alpha2.ClusterBinding, error) - Update(ctx context.Context, clusterBinding *kubebindv1alpha2.ClusterBinding, opts v1.UpdateOptions) (*kubebindv1alpha2.ClusterBinding, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, clusterBinding *kubebindv1alpha2.ClusterBinding, opts v1.UpdateOptions) (*kubebindv1alpha2.ClusterBinding, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*kubebindv1alpha2.ClusterBinding, error) +// 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) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kubebindv1alpha2.ClusterBinding, err error) - Apply(ctx context.Context, clusterBinding *applyconfigurationkubebindv1alpha2.ClusterBindingApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha2.ClusterBinding, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, clusterBinding *applyconfigurationkubebindv1alpha2.ClusterBindingApplyConfiguration, opts v1.ApplyOptions) (result *kubebindv1alpha2.ClusterBinding, err error) - ClusterBindingExpansion + ClusterBindingClusterExpansion } -// clusterBindings implements ClusterBindingInterface -type clusterBindings struct { - *gentype.ClientWithListAndApply[*kubebindv1alpha2.ClusterBinding, *kubebindv1alpha2.ClusterBindingList, *applyconfigurationkubebindv1alpha2.ClusterBindingApplyConfiguration] +type clusterBindingsClusterInterface struct { + clientCache kcpclient.Cache[*KubeBindV1alpha2Client] } -// newClusterBindings returns a ClusterBindings -func newClusterBindings(c *KubeBindV1alpha2Client, namespace string) *clusterBindings { - return &clusterBindings{ - gentype.NewClientWithListAndApply[*kubebindv1alpha2.ClusterBinding, *kubebindv1alpha2.ClusterBindingList, *applyconfigurationkubebindv1alpha2.ClusterBindingApplyConfiguration]( - "clusterbindings", - c.RESTClient(), - scheme.ParameterCodec, - namespace, - func() *kubebindv1alpha2.ClusterBinding { return &kubebindv1alpha2.ClusterBinding{} }, - func() *kubebindv1alpha2.ClusterBindingList { return &kubebindv1alpha2.ClusterBindingList{} }, - ), +// 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 index 7563e7e76..ad8fe059e 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/doc.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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 new file mode 100644 index 000000000..0639dec43 --- /dev/null +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiresourceschema.go @@ -0,0 +1,90 @@ +/* +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 new file mode 100644 index 000000000..2de7b8a8d --- /dev/null +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiservicebinding.go @@ -0,0 +1,90 @@ +/* +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 new file mode 100644 index 000000000..5b136a804 --- /dev/null +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiserviceexport.go @@ -0,0 +1,99 @@ +/* +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 new file mode 100644 index 000000000..e162aa5bf --- /dev/null +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiserviceexportrequest.go @@ -0,0 +1,103 @@ +/* +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 new file mode 100644 index 000000000..01bf9d590 --- /dev/null +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/apiservicenamespace.go @@ -0,0 +1,99 @@ +/* +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 new file mode 100644 index 000000000..825250c18 --- /dev/null +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/boundapiresourceschema.go @@ -0,0 +1,103 @@ +/* +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 new file mode 100644 index 000000000..86f65d28d --- /dev/null +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/clusterbinding.go @@ -0,0 +1,99 @@ +/* +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 index b6c79f90d..3c4dfa810 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/doc.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by cluster-client-gen. DO NOT EDIT. -// Package fake has the automatically generated clients. +// 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 index f14d84a8b..8e2cd0659 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiresourceschema.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiresourceschema.go @@ -14,41 +14,139 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake import ( - gentype "k8s.io/client-go/gentype" + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" 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] +// FakeAPIResourceSchemas implements APIResourceSchemaInterface +type FakeAPIResourceSchemas struct { 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, +var apiresourceschemasResource = v1alpha2.SchemeGroupVersion.WithResource("apiresourceschemas") + +var apiresourceschemasKind = v1alpha2.SchemeGroupVersion.WithKind("APIResourceSchema") + +// Get takes name of the aPIResourceSchema, and returns the corresponding aPIResourceSchema object, and an error if there is any. +func (c *FakeAPIResourceSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.APIResourceSchema, err error) { + emptyResult := &v1alpha2.APIResourceSchema{} + obj, err := c.Fake. + Invokes(testing.NewRootGetActionWithOptions(apiresourceschemasResource, name, options), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIResourceSchema), err +} + +// List takes label and field selectors, and returns the list of APIResourceSchemas that match those selectors. +func (c *FakeAPIResourceSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.APIResourceSchemaList, err error) { + emptyResult := &v1alpha2.APIResourceSchemaList{} + obj, err := c.Fake. + Invokes(testing.NewRootListActionWithOptions(apiresourceschemasResource, apiresourceschemasKind, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.APIResourceSchemaList{ListMeta: obj.(*v1alpha2.APIResourceSchemaList).ListMeta} + for _, item := range obj.(*v1alpha2.APIResourceSchemaList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested aPIResourceSchemas. +func (c *FakeAPIResourceSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchActionWithOptions(apiresourceschemasResource, opts)) +} + +// Create takes the representation of a aPIResourceSchema and creates it. Returns the server's representation of the aPIResourceSchema, and an error, if there is any. +func (c *FakeAPIResourceSchemas) Create(ctx context.Context, aPIResourceSchema *v1alpha2.APIResourceSchema, opts v1.CreateOptions) (result *v1alpha2.APIResourceSchema, err error) { + emptyResult := &v1alpha2.APIResourceSchema{} + obj, err := c.Fake. + Invokes(testing.NewRootCreateActionWithOptions(apiresourceschemasResource, aPIResourceSchema, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIResourceSchema), err +} + +// Update takes the representation of a aPIResourceSchema and updates it. Returns the server's representation of the aPIResourceSchema, and an error, if there is any. +func (c *FakeAPIResourceSchemas) Update(ctx context.Context, aPIResourceSchema *v1alpha2.APIResourceSchema, opts v1.UpdateOptions) (result *v1alpha2.APIResourceSchema, err error) { + emptyResult := &v1alpha2.APIResourceSchema{} + obj, err := c.Fake. + Invokes(testing.NewRootUpdateActionWithOptions(apiresourceschemasResource, aPIResourceSchema, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIResourceSchema), err +} + +// Delete takes name of the aPIResourceSchema and deletes it. Returns an error if one occurs. +func (c *FakeAPIResourceSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(apiresourceschemasResource, name, opts), &v1alpha2.APIResourceSchema{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeAPIResourceSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionActionWithOptions(apiresourceschemasResource, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.APIResourceSchemaList{}) + return err +} + +// Patch applies the patch and returns the patched aPIResourceSchema. +func (c *FakeAPIResourceSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.APIResourceSchema, err error) { + emptyResult := &v1alpha2.APIResourceSchema{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(apiresourceschemasResource, name, pt, data, opts, subresources...), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIResourceSchema), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied aPIResourceSchema. +func (c *FakeAPIResourceSchemas) Apply(ctx context.Context, aPIResourceSchema *kubebindv1alpha2.APIResourceSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.APIResourceSchema, err error) { + if aPIResourceSchema == nil { + return nil, fmt.Errorf("aPIResourceSchema provided to Apply must not be nil") + } + data, err := json.Marshal(aPIResourceSchema) + if err != nil { + return nil, err + } + name := aPIResourceSchema.Name + if name == nil { + return nil, fmt.Errorf("aPIResourceSchema.Name must be provided to Apply") + } + emptyResult := &v1alpha2.APIResourceSchema{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(apiresourceschemasResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + if obj == nil { + return emptyResult, err } + return obj.(*v1alpha2.APIResourceSchema), err } 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 index 85c829c60..5d6c88bc2 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiservicebinding.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiservicebinding.go @@ -14,41 +14,174 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake import ( - gentype "k8s.io/client-go/gentype" + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" 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] +// FakeAPIServiceBindings implements APIServiceBindingInterface +type FakeAPIServiceBindings struct { 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, +var apiservicebindingsResource = v1alpha2.SchemeGroupVersion.WithResource("apiservicebindings") + +var apiservicebindingsKind = v1alpha2.SchemeGroupVersion.WithKind("APIServiceBinding") + +// Get takes name of the aPIServiceBinding, and returns the corresponding aPIServiceBinding object, and an error if there is any. +func (c *FakeAPIServiceBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.APIServiceBinding, err error) { + emptyResult := &v1alpha2.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootGetActionWithOptions(apiservicebindingsResource, name, options), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceBinding), err +} + +// List takes label and field selectors, and returns the list of APIServiceBindings that match those selectors. +func (c *FakeAPIServiceBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.APIServiceBindingList, err error) { + emptyResult := &v1alpha2.APIServiceBindingList{} + obj, err := c.Fake. + Invokes(testing.NewRootListActionWithOptions(apiservicebindingsResource, apiservicebindingsKind, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.APIServiceBindingList{ListMeta: obj.(*v1alpha2.APIServiceBindingList).ListMeta} + for _, item := range obj.(*v1alpha2.APIServiceBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested aPIServiceBindings. +func (c *FakeAPIServiceBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchActionWithOptions(apiservicebindingsResource, opts)) +} + +// Create takes the representation of a aPIServiceBinding and creates it. Returns the server's representation of the aPIServiceBinding, and an error, if there is any. +func (c *FakeAPIServiceBindings) Create(ctx context.Context, aPIServiceBinding *v1alpha2.APIServiceBinding, opts v1.CreateOptions) (result *v1alpha2.APIServiceBinding, err error) { + emptyResult := &v1alpha2.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootCreateActionWithOptions(apiservicebindingsResource, aPIServiceBinding, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceBinding), err +} + +// Update takes the representation of a aPIServiceBinding and updates it. Returns the server's representation of the aPIServiceBinding, and an error, if there is any. +func (c *FakeAPIServiceBindings) Update(ctx context.Context, aPIServiceBinding *v1alpha2.APIServiceBinding, opts v1.UpdateOptions) (result *v1alpha2.APIServiceBinding, err error) { + emptyResult := &v1alpha2.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootUpdateActionWithOptions(apiservicebindingsResource, aPIServiceBinding, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceBinding), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeAPIServiceBindings) UpdateStatus(ctx context.Context, aPIServiceBinding *v1alpha2.APIServiceBinding, opts v1.UpdateOptions) (result *v1alpha2.APIServiceBinding, err error) { + emptyResult := &v1alpha2.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceActionWithOptions(apiservicebindingsResource, "status", aPIServiceBinding, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceBinding), err +} + +// Delete takes name of the aPIServiceBinding and deletes it. Returns an error if one occurs. +func (c *FakeAPIServiceBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(apiservicebindingsResource, name, opts), &v1alpha2.APIServiceBinding{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeAPIServiceBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionActionWithOptions(apiservicebindingsResource, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.APIServiceBindingList{}) + return err +} + +// Patch applies the patch and returns the patched aPIServiceBinding. +func (c *FakeAPIServiceBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.APIServiceBinding, err error) { + emptyResult := &v1alpha2.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(apiservicebindingsResource, name, pt, data, opts, subresources...), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceBinding), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied aPIServiceBinding. +func (c *FakeAPIServiceBindings) Apply(ctx context.Context, aPIServiceBinding *kubebindv1alpha2.APIServiceBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.APIServiceBinding, err error) { + if aPIServiceBinding == nil { + return nil, fmt.Errorf("aPIServiceBinding provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceBinding) + if err != nil { + return nil, err + } + name := aPIServiceBinding.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceBinding.Name must be provided to Apply") + } + emptyResult := &v1alpha2.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(apiservicebindingsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceBinding), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeAPIServiceBindings) ApplyStatus(ctx context.Context, aPIServiceBinding *kubebindv1alpha2.APIServiceBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.APIServiceBinding, err error) { + if aPIServiceBinding == nil { + return nil, fmt.Errorf("aPIServiceBinding provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceBinding) + if err != nil { + return nil, err + } + name := aPIServiceBinding.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceBinding.Name must be provided to Apply") + } + emptyResult := &v1alpha2.APIServiceBinding{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(apiservicebindingsResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) + if obj == nil { + return emptyResult, err } + return obj.(*v1alpha2.APIServiceBinding), err } 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 index 5beca9061..9b7bd8be2 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiserviceexport.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiserviceexport.go @@ -14,41 +14,185 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake import ( - gentype "k8s.io/client-go/gentype" + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" 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] +// FakeAPIServiceExports implements APIServiceExportInterface +type FakeAPIServiceExports struct { Fake *FakeKubeBindV1alpha2 + ns string +} + +var apiserviceexportsResource = v1alpha2.SchemeGroupVersion.WithResource("apiserviceexports") + +var apiserviceexportsKind = v1alpha2.SchemeGroupVersion.WithKind("APIServiceExport") + +// Get takes name of the aPIServiceExport, and returns the corresponding aPIServiceExport object, and an error if there is any. +func (c *FakeAPIServiceExports) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.APIServiceExport, err error) { + emptyResult := &v1alpha2.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewGetActionWithOptions(apiserviceexportsResource, c.ns, name, options), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceExport), err +} + +// List takes label and field selectors, and returns the list of APIServiceExports that match those selectors. +func (c *FakeAPIServiceExports) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.APIServiceExportList, err error) { + emptyResult := &v1alpha2.APIServiceExportList{} + obj, err := c.Fake. + Invokes(testing.NewListActionWithOptions(apiserviceexportsResource, apiserviceexportsKind, c.ns, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.APIServiceExportList{ListMeta: obj.(*v1alpha2.APIServiceExportList).ListMeta} + for _, item := range obj.(*v1alpha2.APIServiceExportList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested aPIServiceExports. +func (c *FakeAPIServiceExports) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchActionWithOptions(apiserviceexportsResource, c.ns, opts)) + +} + +// Create takes the representation of a aPIServiceExport and creates it. Returns the server's representation of the aPIServiceExport, and an error, if there is any. +func (c *FakeAPIServiceExports) Create(ctx context.Context, aPIServiceExport *v1alpha2.APIServiceExport, opts v1.CreateOptions) (result *v1alpha2.APIServiceExport, err error) { + emptyResult := &v1alpha2.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewCreateActionWithOptions(apiserviceexportsResource, c.ns, aPIServiceExport, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceExport), err +} + +// Update takes the representation of a aPIServiceExport and updates it. Returns the server's representation of the aPIServiceExport, and an error, if there is any. +func (c *FakeAPIServiceExports) Update(ctx context.Context, aPIServiceExport *v1alpha2.APIServiceExport, opts v1.UpdateOptions) (result *v1alpha2.APIServiceExport, err error) { + emptyResult := &v1alpha2.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewUpdateActionWithOptions(apiserviceexportsResource, c.ns, aPIServiceExport, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceExport), err } -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, +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeAPIServiceExports) UpdateStatus(ctx context.Context, aPIServiceExport *v1alpha2.APIServiceExport, opts v1.UpdateOptions) (result *v1alpha2.APIServiceExport, err error) { + emptyResult := &v1alpha2.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceActionWithOptions(apiserviceexportsResource, "status", c.ns, aPIServiceExport, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceExport), err +} + +// Delete takes name of the aPIServiceExport and deletes it. Returns an error if one occurs. +func (c *FakeAPIServiceExports) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(apiserviceexportsResource, c.ns, name, opts), &v1alpha2.APIServiceExport{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeAPIServiceExports) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionActionWithOptions(apiserviceexportsResource, c.ns, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.APIServiceExportList{}) + return err +} + +// Patch applies the patch and returns the patched aPIServiceExport. +func (c *FakeAPIServiceExports) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.APIServiceExport, err error) { + emptyResult := &v1alpha2.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiserviceexportsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceExport), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied aPIServiceExport. +func (c *FakeAPIServiceExports) Apply(ctx context.Context, aPIServiceExport *kubebindv1alpha2.APIServiceExportApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.APIServiceExport, err error) { + if aPIServiceExport == nil { + return nil, fmt.Errorf("aPIServiceExport provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceExport) + if err != nil { + return nil, err + } + name := aPIServiceExport.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceExport.Name must be provided to Apply") + } + emptyResult := &v1alpha2.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiserviceexportsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceExport), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeAPIServiceExports) ApplyStatus(ctx context.Context, aPIServiceExport *kubebindv1alpha2.APIServiceExportApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.APIServiceExport, err error) { + if aPIServiceExport == nil { + return nil, fmt.Errorf("aPIServiceExport provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceExport) + if err != nil { + return nil, err + } + name := aPIServiceExport.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceExport.Name must be provided to Apply") + } + emptyResult := &v1alpha2.APIServiceExport{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiserviceexportsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) + + if obj == nil { + return emptyResult, err } + return obj.(*v1alpha2.APIServiceExport), err } 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 index 064978d62..f5bb00327 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiserviceexportrequest.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiserviceexportrequest.go @@ -14,41 +14,185 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake import ( - gentype "k8s.io/client-go/gentype" + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" 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] +// FakeAPIServiceExportRequests implements APIServiceExportRequestInterface +type FakeAPIServiceExportRequests struct { Fake *FakeKubeBindV1alpha2 + ns string +} + +var apiserviceexportrequestsResource = v1alpha2.SchemeGroupVersion.WithResource("apiserviceexportrequests") + +var apiserviceexportrequestsKind = v1alpha2.SchemeGroupVersion.WithKind("APIServiceExportRequest") + +// Get takes name of the aPIServiceExportRequest, and returns the corresponding aPIServiceExportRequest object, and an error if there is any. +func (c *FakeAPIServiceExportRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.APIServiceExportRequest, err error) { + emptyResult := &v1alpha2.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewGetActionWithOptions(apiserviceexportrequestsResource, c.ns, name, options), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceExportRequest), err +} + +// List takes label and field selectors, and returns the list of APIServiceExportRequests that match those selectors. +func (c *FakeAPIServiceExportRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.APIServiceExportRequestList, err error) { + emptyResult := &v1alpha2.APIServiceExportRequestList{} + obj, err := c.Fake. + Invokes(testing.NewListActionWithOptions(apiserviceexportrequestsResource, apiserviceexportrequestsKind, c.ns, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.APIServiceExportRequestList{ListMeta: obj.(*v1alpha2.APIServiceExportRequestList).ListMeta} + for _, item := range obj.(*v1alpha2.APIServiceExportRequestList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested aPIServiceExportRequests. +func (c *FakeAPIServiceExportRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchActionWithOptions(apiserviceexportrequestsResource, c.ns, opts)) + +} + +// Create takes the representation of a aPIServiceExportRequest and creates it. Returns the server's representation of the aPIServiceExportRequest, and an error, if there is any. +func (c *FakeAPIServiceExportRequests) Create(ctx context.Context, aPIServiceExportRequest *v1alpha2.APIServiceExportRequest, opts v1.CreateOptions) (result *v1alpha2.APIServiceExportRequest, err error) { + emptyResult := &v1alpha2.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewCreateActionWithOptions(apiserviceexportrequestsResource, c.ns, aPIServiceExportRequest, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceExportRequest), err +} + +// Update takes the representation of a aPIServiceExportRequest and updates it. Returns the server's representation of the aPIServiceExportRequest, and an error, if there is any. +func (c *FakeAPIServiceExportRequests) Update(ctx context.Context, aPIServiceExportRequest *v1alpha2.APIServiceExportRequest, opts v1.UpdateOptions) (result *v1alpha2.APIServiceExportRequest, err error) { + emptyResult := &v1alpha2.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewUpdateActionWithOptions(apiserviceexportrequestsResource, c.ns, aPIServiceExportRequest, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceExportRequest), err } -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, +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeAPIServiceExportRequests) UpdateStatus(ctx context.Context, aPIServiceExportRequest *v1alpha2.APIServiceExportRequest, opts v1.UpdateOptions) (result *v1alpha2.APIServiceExportRequest, err error) { + emptyResult := &v1alpha2.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceActionWithOptions(apiserviceexportrequestsResource, "status", c.ns, aPIServiceExportRequest, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceExportRequest), err +} + +// Delete takes name of the aPIServiceExportRequest and deletes it. Returns an error if one occurs. +func (c *FakeAPIServiceExportRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(apiserviceexportrequestsResource, c.ns, name, opts), &v1alpha2.APIServiceExportRequest{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeAPIServiceExportRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionActionWithOptions(apiserviceexportrequestsResource, c.ns, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.APIServiceExportRequestList{}) + return err +} + +// Patch applies the patch and returns the patched aPIServiceExportRequest. +func (c *FakeAPIServiceExportRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.APIServiceExportRequest, err error) { + emptyResult := &v1alpha2.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiserviceexportrequestsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceExportRequest), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied aPIServiceExportRequest. +func (c *FakeAPIServiceExportRequests) Apply(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha2.APIServiceExportRequestApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.APIServiceExportRequest, err error) { + if aPIServiceExportRequest == nil { + return nil, fmt.Errorf("aPIServiceExportRequest provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceExportRequest) + if err != nil { + return nil, err + } + name := aPIServiceExportRequest.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceExportRequest.Name must be provided to Apply") + } + emptyResult := &v1alpha2.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiserviceexportrequestsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceExportRequest), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeAPIServiceExportRequests) ApplyStatus(ctx context.Context, aPIServiceExportRequest *kubebindv1alpha2.APIServiceExportRequestApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.APIServiceExportRequest, err error) { + if aPIServiceExportRequest == nil { + return nil, fmt.Errorf("aPIServiceExportRequest provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceExportRequest) + if err != nil { + return nil, err + } + name := aPIServiceExportRequest.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceExportRequest.Name must be provided to Apply") + } + emptyResult := &v1alpha2.APIServiceExportRequest{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiserviceexportrequestsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) + + if obj == nil { + return emptyResult, err } + return obj.(*v1alpha2.APIServiceExportRequest), err } 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 index 503f26279..fa67c78e2 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiservicenamespace.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_apiservicenamespace.go @@ -14,41 +14,185 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake import ( - gentype "k8s.io/client-go/gentype" + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" 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] +// FakeAPIServiceNamespaces implements APIServiceNamespaceInterface +type FakeAPIServiceNamespaces struct { Fake *FakeKubeBindV1alpha2 + ns string +} + +var apiservicenamespacesResource = v1alpha2.SchemeGroupVersion.WithResource("apiservicenamespaces") + +var apiservicenamespacesKind = v1alpha2.SchemeGroupVersion.WithKind("APIServiceNamespace") + +// Get takes name of the aPIServiceNamespace, and returns the corresponding aPIServiceNamespace object, and an error if there is any. +func (c *FakeAPIServiceNamespaces) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.APIServiceNamespace, err error) { + emptyResult := &v1alpha2.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewGetActionWithOptions(apiservicenamespacesResource, c.ns, name, options), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceNamespace), err +} + +// List takes label and field selectors, and returns the list of APIServiceNamespaces that match those selectors. +func (c *FakeAPIServiceNamespaces) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.APIServiceNamespaceList, err error) { + emptyResult := &v1alpha2.APIServiceNamespaceList{} + obj, err := c.Fake. + Invokes(testing.NewListActionWithOptions(apiservicenamespacesResource, apiservicenamespacesKind, c.ns, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.APIServiceNamespaceList{ListMeta: obj.(*v1alpha2.APIServiceNamespaceList).ListMeta} + for _, item := range obj.(*v1alpha2.APIServiceNamespaceList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested aPIServiceNamespaces. +func (c *FakeAPIServiceNamespaces) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchActionWithOptions(apiservicenamespacesResource, c.ns, opts)) + +} + +// Create takes the representation of a aPIServiceNamespace and creates it. Returns the server's representation of the aPIServiceNamespace, and an error, if there is any. +func (c *FakeAPIServiceNamespaces) Create(ctx context.Context, aPIServiceNamespace *v1alpha2.APIServiceNamespace, opts v1.CreateOptions) (result *v1alpha2.APIServiceNamespace, err error) { + emptyResult := &v1alpha2.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewCreateActionWithOptions(apiservicenamespacesResource, c.ns, aPIServiceNamespace, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceNamespace), err +} + +// Update takes the representation of a aPIServiceNamespace and updates it. Returns the server's representation of the aPIServiceNamespace, and an error, if there is any. +func (c *FakeAPIServiceNamespaces) Update(ctx context.Context, aPIServiceNamespace *v1alpha2.APIServiceNamespace, opts v1.UpdateOptions) (result *v1alpha2.APIServiceNamespace, err error) { + emptyResult := &v1alpha2.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewUpdateActionWithOptions(apiservicenamespacesResource, c.ns, aPIServiceNamespace, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceNamespace), err } -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, +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeAPIServiceNamespaces) UpdateStatus(ctx context.Context, aPIServiceNamespace *v1alpha2.APIServiceNamespace, opts v1.UpdateOptions) (result *v1alpha2.APIServiceNamespace, err error) { + emptyResult := &v1alpha2.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceActionWithOptions(apiservicenamespacesResource, "status", c.ns, aPIServiceNamespace, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceNamespace), err +} + +// Delete takes name of the aPIServiceNamespace and deletes it. Returns an error if one occurs. +func (c *FakeAPIServiceNamespaces) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(apiservicenamespacesResource, c.ns, name, opts), &v1alpha2.APIServiceNamespace{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeAPIServiceNamespaces) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionActionWithOptions(apiservicenamespacesResource, c.ns, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.APIServiceNamespaceList{}) + return err +} + +// Patch applies the patch and returns the patched aPIServiceNamespace. +func (c *FakeAPIServiceNamespaces) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.APIServiceNamespace, err error) { + emptyResult := &v1alpha2.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiservicenamespacesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceNamespace), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied aPIServiceNamespace. +func (c *FakeAPIServiceNamespaces) Apply(ctx context.Context, aPIServiceNamespace *kubebindv1alpha2.APIServiceNamespaceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.APIServiceNamespace, err error) { + if aPIServiceNamespace == nil { + return nil, fmt.Errorf("aPIServiceNamespace provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceNamespace) + if err != nil { + return nil, err + } + name := aPIServiceNamespace.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceNamespace.Name must be provided to Apply") + } + emptyResult := &v1alpha2.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiservicenamespacesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.APIServiceNamespace), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeAPIServiceNamespaces) ApplyStatus(ctx context.Context, aPIServiceNamespace *kubebindv1alpha2.APIServiceNamespaceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.APIServiceNamespace, err error) { + if aPIServiceNamespace == nil { + return nil, fmt.Errorf("aPIServiceNamespace provided to Apply must not be nil") + } + data, err := json.Marshal(aPIServiceNamespace) + if err != nil { + return nil, err + } + name := aPIServiceNamespace.Name + if name == nil { + return nil, fmt.Errorf("aPIServiceNamespace.Name must be provided to Apply") + } + emptyResult := &v1alpha2.APIServiceNamespace{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(apiservicenamespacesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) + + if obj == nil { + return emptyResult, err } + return obj.(*v1alpha2.APIServiceNamespace), err } 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 index 04aee6703..f8deee3b6 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_boundapiresourceschema.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_boundapiresourceschema.go @@ -14,41 +14,185 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake import ( - gentype "k8s.io/client-go/gentype" + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" 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] +// FakeBoundAPIResourceSchemas implements BoundAPIResourceSchemaInterface +type FakeBoundAPIResourceSchemas struct { Fake *FakeKubeBindV1alpha2 + ns string +} + +var boundapiresourceschemasResource = v1alpha2.SchemeGroupVersion.WithResource("boundapiresourceschemas") + +var boundapiresourceschemasKind = v1alpha2.SchemeGroupVersion.WithKind("BoundAPIResourceSchema") + +// Get takes name of the boundAPIResourceSchema, and returns the corresponding boundAPIResourceSchema object, and an error if there is any. +func (c *FakeBoundAPIResourceSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.BoundAPIResourceSchema, err error) { + emptyResult := &v1alpha2.BoundAPIResourceSchema{} + obj, err := c.Fake. + Invokes(testing.NewGetActionWithOptions(boundapiresourceschemasResource, c.ns, name, options), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.BoundAPIResourceSchema), err +} + +// List takes label and field selectors, and returns the list of BoundAPIResourceSchemas that match those selectors. +func (c *FakeBoundAPIResourceSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.BoundAPIResourceSchemaList, err error) { + emptyResult := &v1alpha2.BoundAPIResourceSchemaList{} + obj, err := c.Fake. + Invokes(testing.NewListActionWithOptions(boundapiresourceschemasResource, boundapiresourceschemasKind, c.ns, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.BoundAPIResourceSchemaList{ListMeta: obj.(*v1alpha2.BoundAPIResourceSchemaList).ListMeta} + for _, item := range obj.(*v1alpha2.BoundAPIResourceSchemaList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested boundAPIResourceSchemas. +func (c *FakeBoundAPIResourceSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchActionWithOptions(boundapiresourceschemasResource, c.ns, opts)) + +} + +// Create takes the representation of a boundAPIResourceSchema and creates it. Returns the server's representation of the boundAPIResourceSchema, and an error, if there is any. +func (c *FakeBoundAPIResourceSchemas) Create(ctx context.Context, boundAPIResourceSchema *v1alpha2.BoundAPIResourceSchema, opts v1.CreateOptions) (result *v1alpha2.BoundAPIResourceSchema, err error) { + emptyResult := &v1alpha2.BoundAPIResourceSchema{} + obj, err := c.Fake. + Invokes(testing.NewCreateActionWithOptions(boundapiresourceschemasResource, c.ns, boundAPIResourceSchema, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.BoundAPIResourceSchema), err +} + +// Update takes the representation of a boundAPIResourceSchema and updates it. Returns the server's representation of the boundAPIResourceSchema, and an error, if there is any. +func (c *FakeBoundAPIResourceSchemas) Update(ctx context.Context, boundAPIResourceSchema *v1alpha2.BoundAPIResourceSchema, opts v1.UpdateOptions) (result *v1alpha2.BoundAPIResourceSchema, err error) { + emptyResult := &v1alpha2.BoundAPIResourceSchema{} + obj, err := c.Fake. + Invokes(testing.NewUpdateActionWithOptions(boundapiresourceschemasResource, c.ns, boundAPIResourceSchema, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.BoundAPIResourceSchema), err } -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, +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeBoundAPIResourceSchemas) UpdateStatus(ctx context.Context, boundAPIResourceSchema *v1alpha2.BoundAPIResourceSchema, opts v1.UpdateOptions) (result *v1alpha2.BoundAPIResourceSchema, err error) { + emptyResult := &v1alpha2.BoundAPIResourceSchema{} + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceActionWithOptions(boundapiresourceschemasResource, "status", c.ns, boundAPIResourceSchema, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.BoundAPIResourceSchema), err +} + +// Delete takes name of the boundAPIResourceSchema and deletes it. Returns an error if one occurs. +func (c *FakeBoundAPIResourceSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(boundapiresourceschemasResource, c.ns, name, opts), &v1alpha2.BoundAPIResourceSchema{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeBoundAPIResourceSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionActionWithOptions(boundapiresourceschemasResource, c.ns, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.BoundAPIResourceSchemaList{}) + return err +} + +// Patch applies the patch and returns the patched boundAPIResourceSchema. +func (c *FakeBoundAPIResourceSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.BoundAPIResourceSchema, err error) { + emptyResult := &v1alpha2.BoundAPIResourceSchema{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(boundapiresourceschemasResource, c.ns, name, pt, data, opts, subresources...), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.BoundAPIResourceSchema), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied boundAPIResourceSchema. +func (c *FakeBoundAPIResourceSchemas) Apply(ctx context.Context, boundAPIResourceSchema *kubebindv1alpha2.BoundAPIResourceSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.BoundAPIResourceSchema, err error) { + if boundAPIResourceSchema == nil { + return nil, fmt.Errorf("boundAPIResourceSchema provided to Apply must not be nil") + } + data, err := json.Marshal(boundAPIResourceSchema) + if err != nil { + return nil, err + } + name := boundAPIResourceSchema.Name + if name == nil { + return nil, fmt.Errorf("boundAPIResourceSchema.Name must be provided to Apply") + } + emptyResult := &v1alpha2.BoundAPIResourceSchema{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(boundapiresourceschemasResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.BoundAPIResourceSchema), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeBoundAPIResourceSchemas) ApplyStatus(ctx context.Context, boundAPIResourceSchema *kubebindv1alpha2.BoundAPIResourceSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.BoundAPIResourceSchema, err error) { + if boundAPIResourceSchema == nil { + return nil, fmt.Errorf("boundAPIResourceSchema provided to Apply must not be nil") + } + data, err := json.Marshal(boundAPIResourceSchema) + if err != nil { + return nil, err + } + name := boundAPIResourceSchema.Name + if name == nil { + return nil, fmt.Errorf("boundAPIResourceSchema.Name must be provided to Apply") + } + emptyResult := &v1alpha2.BoundAPIResourceSchema{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(boundapiresourceschemasResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) + + if obj == nil { + return emptyResult, err } + return obj.(*v1alpha2.BoundAPIResourceSchema), err } 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 index 6c7c3c57b..a26c22036 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_clusterbinding.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/fake_clusterbinding.go @@ -14,41 +14,185 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake import ( - gentype "k8s.io/client-go/gentype" + "context" + json "encoding/json" + "fmt" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" 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] +// FakeClusterBindings implements ClusterBindingInterface +type FakeClusterBindings struct { Fake *FakeKubeBindV1alpha2 + ns string +} + +var clusterbindingsResource = v1alpha2.SchemeGroupVersion.WithResource("clusterbindings") + +var clusterbindingsKind = v1alpha2.SchemeGroupVersion.WithKind("ClusterBinding") + +// Get takes name of the clusterBinding, and returns the corresponding clusterBinding object, and an error if there is any. +func (c *FakeClusterBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ClusterBinding, err error) { + emptyResult := &v1alpha2.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewGetActionWithOptions(clusterbindingsResource, c.ns, name, options), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.ClusterBinding), err +} + +// List takes label and field selectors, and returns the list of ClusterBindings that match those selectors. +func (c *FakeClusterBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ClusterBindingList, err error) { + emptyResult := &v1alpha2.ClusterBindingList{} + obj, err := c.Fake. + Invokes(testing.NewListActionWithOptions(clusterbindingsResource, clusterbindingsKind, c.ns, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha2.ClusterBindingList{ListMeta: obj.(*v1alpha2.ClusterBindingList).ListMeta} + for _, item := range obj.(*v1alpha2.ClusterBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterBindings. +func (c *FakeClusterBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchActionWithOptions(clusterbindingsResource, c.ns, opts)) + +} + +// Create takes the representation of a clusterBinding and creates it. Returns the server's representation of the clusterBinding, and an error, if there is any. +func (c *FakeClusterBindings) Create(ctx context.Context, clusterBinding *v1alpha2.ClusterBinding, opts v1.CreateOptions) (result *v1alpha2.ClusterBinding, err error) { + emptyResult := &v1alpha2.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewCreateActionWithOptions(clusterbindingsResource, c.ns, clusterBinding, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.ClusterBinding), err +} + +// Update takes the representation of a clusterBinding and updates it. Returns the server's representation of the clusterBinding, and an error, if there is any. +func (c *FakeClusterBindings) Update(ctx context.Context, clusterBinding *v1alpha2.ClusterBinding, opts v1.UpdateOptions) (result *v1alpha2.ClusterBinding, err error) { + emptyResult := &v1alpha2.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewUpdateActionWithOptions(clusterbindingsResource, c.ns, clusterBinding, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.ClusterBinding), err } -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, +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeClusterBindings) UpdateStatus(ctx context.Context, clusterBinding *v1alpha2.ClusterBinding, opts v1.UpdateOptions) (result *v1alpha2.ClusterBinding, err error) { + emptyResult := &v1alpha2.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceActionWithOptions(clusterbindingsResource, "status", c.ns, clusterBinding, opts), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.ClusterBinding), err +} + +// Delete takes name of the clusterBinding and deletes it. Returns an error if one occurs. +func (c *FakeClusterBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(clusterbindingsResource, c.ns, name, opts), &v1alpha2.ClusterBinding{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeClusterBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionActionWithOptions(clusterbindingsResource, c.ns, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha2.ClusterBindingList{}) + return err +} + +// Patch applies the patch and returns the patched clusterBinding. +func (c *FakeClusterBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ClusterBinding, err error) { + emptyResult := &v1alpha2.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(clusterbindingsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.ClusterBinding), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied clusterBinding. +func (c *FakeClusterBindings) Apply(ctx context.Context, clusterBinding *kubebindv1alpha2.ClusterBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ClusterBinding, err error) { + if clusterBinding == nil { + return nil, fmt.Errorf("clusterBinding provided to Apply must not be nil") + } + data, err := json.Marshal(clusterBinding) + if err != nil { + return nil, err + } + name := clusterBinding.Name + if name == nil { + return nil, fmt.Errorf("clusterBinding.Name must be provided to Apply") + } + emptyResult := &v1alpha2.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(clusterbindingsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha2.ClusterBinding), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeClusterBindings) ApplyStatus(ctx context.Context, clusterBinding *kubebindv1alpha2.ClusterBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ClusterBinding, err error) { + if clusterBinding == nil { + return nil, fmt.Errorf("clusterBinding provided to Apply must not be nil") + } + data, err := json.Marshal(clusterBinding) + if err != nil { + return nil, err + } + name := clusterBinding.Name + if name == nil { + return nil, fmt.Errorf("clusterBinding.Name must be provided to Apply") + } + emptyResult := &v1alpha2.ClusterBinding{} + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceActionWithOptions(clusterbindingsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) + + if obj == nil { + return emptyResult, err } + return obj.(*v1alpha2.ClusterBinding), err } 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 index f75e16497..11dc40def 100644 --- 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 @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by client-gen. DO NOT EDIT. package fake @@ -30,31 +30,31 @@ type FakeKubeBindV1alpha2 struct { } func (c *FakeKubeBindV1alpha2) APIResourceSchemas() v1alpha2.APIResourceSchemaInterface { - return newFakeAPIResourceSchemas(c) + return &FakeAPIResourceSchemas{c} } func (c *FakeKubeBindV1alpha2) APIServiceBindings() v1alpha2.APIServiceBindingInterface { - return newFakeAPIServiceBindings(c) + return &FakeAPIServiceBindings{c} } func (c *FakeKubeBindV1alpha2) APIServiceExports(namespace string) v1alpha2.APIServiceExportInterface { - return newFakeAPIServiceExports(c, namespace) + return &FakeAPIServiceExports{c, namespace} } func (c *FakeKubeBindV1alpha2) APIServiceExportRequests(namespace string) v1alpha2.APIServiceExportRequestInterface { - return newFakeAPIServiceExportRequests(c, namespace) + return &FakeAPIServiceExportRequests{c, namespace} } func (c *FakeKubeBindV1alpha2) APIServiceNamespaces(namespace string) v1alpha2.APIServiceNamespaceInterface { - return newFakeAPIServiceNamespaces(c, namespace) + return &FakeAPIServiceNamespaces{c, namespace} } func (c *FakeKubeBindV1alpha2) BoundAPIResourceSchemas(namespace string) v1alpha2.BoundAPIResourceSchemaInterface { - return newFakeBoundAPIResourceSchemas(c, namespace) + return &FakeBoundAPIResourceSchemas{c, namespace} } func (c *FakeKubeBindV1alpha2) ClusterBindings(namespace string) v1alpha2.ClusterBindingInterface { - return newFakeClusterBindings(c, namespace) + return &FakeClusterBindings{c, namespace} } // RESTClient returns a RESTClient that is used to communicate diff --git a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/kubebind_client.go b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/kubebind_client.go similarity index 71% rename from sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/kubebind_client.go rename to sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/kubebind_client.go index 022e80d23..73af32ee3 100644 --- a/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2/fake/kubebind_client.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/fake/kubebind_client.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,17 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-client-gen. DO NOT EDIT. package fake import ( - "github.com/kcp-dev/logicalcluster/v3" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "k8s.io/client-go/rest" + "github.com/kcp-dev/logicalcluster/v3" + rest "k8s.io/client-go/rest" - kcpkubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster/typed/kubebind/v1alpha2" + 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" ) @@ -45,69 +41,69 @@ func (c *KubeBindV1alpha2ClusterClient) Cluster(clusterPath logicalcluster.Path) } func (c *KubeBindV1alpha2ClusterClient) APIResourceSchemas() kcpkubebindv1alpha2.APIResourceSchemaClusterInterface { - return &aPIResourceSchemasClusterClient{Fake: c.Fake} + return newFakeAPIResourceSchemaClusterClient(c) } func (c *KubeBindV1alpha2ClusterClient) APIServiceBindings() kcpkubebindv1alpha2.APIServiceBindingClusterInterface { - return &aPIServiceBindingsClusterClient{Fake: c.Fake} + return newFakeAPIServiceBindingClusterClient(c) } func (c *KubeBindV1alpha2ClusterClient) APIServiceExports() kcpkubebindv1alpha2.APIServiceExportClusterInterface { - return &aPIServiceExportsClusterClient{Fake: c.Fake} + return newFakeAPIServiceExportClusterClient(c) } func (c *KubeBindV1alpha2ClusterClient) APIServiceExportRequests() kcpkubebindv1alpha2.APIServiceExportRequestClusterInterface { - return &aPIServiceExportRequestsClusterClient{Fake: c.Fake} + return newFakeAPIServiceExportRequestClusterClient(c) } func (c *KubeBindV1alpha2ClusterClient) APIServiceNamespaces() kcpkubebindv1alpha2.APIServiceNamespaceClusterInterface { - return &aPIServiceNamespacesClusterClient{Fake: c.Fake} + return newFakeAPIServiceNamespaceClusterClient(c) } func (c *KubeBindV1alpha2ClusterClient) BoundAPIResourceSchemas() kcpkubebindv1alpha2.BoundAPIResourceSchemaClusterInterface { - return &boundAPIResourceSchemasClusterClient{Fake: c.Fake} + return newFakeBoundAPIResourceSchemaClusterClient(c) } func (c *KubeBindV1alpha2ClusterClient) ClusterBindings() kcpkubebindv1alpha2.ClusterBindingClusterInterface { - return &clusterBindingsClusterClient{Fake: c.Fake} + return newFakeClusterBindingClusterClient(c) } -var _ kubebindv1alpha2.KubeBindV1alpha2Interface = (*KubeBindV1alpha2Client)(nil) - type KubeBindV1alpha2Client struct { *kcptesting.Fake ClusterPath logicalcluster.Path } -func (c *KubeBindV1alpha2Client) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} - func (c *KubeBindV1alpha2Client) APIResourceSchemas() kubebindv1alpha2.APIResourceSchemaInterface { - return &aPIResourceSchemasClient{Fake: c.Fake, ClusterPath: c.ClusterPath} + return newFakeAPIResourceSchemaClient(c.Fake, c.ClusterPath) } func (c *KubeBindV1alpha2Client) APIServiceBindings() kubebindv1alpha2.APIServiceBindingInterface { - return &aPIServiceBindingsClient{Fake: c.Fake, ClusterPath: c.ClusterPath} + return newFakeAPIServiceBindingClient(c.Fake, c.ClusterPath) } func (c *KubeBindV1alpha2Client) APIServiceExports(namespace string) kubebindv1alpha2.APIServiceExportInterface { - return &aPIServiceExportsClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} + return newFakeAPIServiceExportClient(c.Fake, namespace, c.ClusterPath) } func (c *KubeBindV1alpha2Client) APIServiceExportRequests(namespace string) kubebindv1alpha2.APIServiceExportRequestInterface { - return &aPIServiceExportRequestsClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} + return newFakeAPIServiceExportRequestClient(c.Fake, namespace, c.ClusterPath) } func (c *KubeBindV1alpha2Client) APIServiceNamespaces(namespace string) kubebindv1alpha2.APIServiceNamespaceInterface { - return &aPIServiceNamespacesClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} + return newFakeAPIServiceNamespaceClient(c.Fake, namespace, c.ClusterPath) } func (c *KubeBindV1alpha2Client) BoundAPIResourceSchemas(namespace string) kubebindv1alpha2.BoundAPIResourceSchemaInterface { - return &boundAPIResourceSchemasClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} + return newFakeBoundAPIResourceSchemaClient(c.Fake, namespace, c.ClusterPath) } func (c *KubeBindV1alpha2Client) ClusterBindings(namespace string) kubebindv1alpha2.ClusterBindingInterface { - return &clusterBindingsClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} + 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 index af650abba..4c1bb3238 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/generated_expansion.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/generated_expansion.go @@ -14,20 +14,20 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// Code generated by cluster-client-gen. DO NOT EDIT. package v1alpha2 -type APIResourceSchemaExpansion interface{} +type APIResourceSchemaClusterExpansion interface{} -type APIServiceBindingExpansion interface{} +type APIServiceBindingClusterExpansion interface{} -type APIServiceExportExpansion interface{} +type APIServiceExportClusterExpansion interface{} -type APIServiceExportRequestExpansion interface{} +type APIServiceExportRequestClusterExpansion interface{} -type APIServiceNamespaceExpansion interface{} +type APIServiceNamespaceClusterExpansion interface{} -type BoundAPIResourceSchemaExpansion interface{} +type BoundAPIResourceSchemaClusterExpansion interface{} -type ClusterBindingExpansion 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 index f62e20784..7b01f377f 100644 --- a/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/kubebind_client.go +++ b/sdk/kcp/clientset/versioned/typed/kubebind/v1alpha2/kubebind_client.go @@ -14,71 +14,82 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen-v0.32. DO NOT EDIT. +// 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 KubeBindV1alpha2Interface interface { - RESTClient() rest.Interface - APIResourceSchemasGetter - APIServiceBindingsGetter - APIServiceExportsGetter - APIServiceExportRequestsGetter - APIServiceNamespacesGetter - BoundAPIResourceSchemasGetter - ClusterBindingsGetter +type KubeBindV1alpha2ClusterInterface interface { + KubeBindV1alpha2ClusterScoper + APIResourceSchemasClusterGetter + APIServiceBindingsClusterGetter + APIServiceExportsClusterGetter + APIServiceExportRequestsClusterGetter + APIServiceNamespacesClusterGetter + BoundAPIResourceSchemasClusterGetter + ClusterBindingsClusterGetter } -// KubeBindV1alpha2Client is used to interact with features provided by the kube-bind.io group. -type KubeBindV1alpha2Client struct { - restClient rest.Interface +type KubeBindV1alpha2ClusterScoper interface { + Cluster(logicalcluster.Path) KubeBindV1alpha2Interface } -func (c *KubeBindV1alpha2Client) APIResourceSchemas() APIResourceSchemaInterface { - return newAPIResourceSchemas(c) +// KubeBindV1alpha2ClusterClient is used to interact with features provided by the kube-bind.io group. +type KubeBindV1alpha2ClusterClient struct { + clientCache kcpclient.Cache[*KubeBindV1alpha2Client] } -func (c *KubeBindV1alpha2Client) APIServiceBindings() APIServiceBindingInterface { - return newAPIServiceBindings(c) +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 *KubeBindV1alpha2Client) APIServiceExports(namespace string) APIServiceExportInterface { - return newAPIServiceExports(c, namespace) +func (c *KubeBindV1alpha2ClusterClient) APIServiceExports() APIServiceExportClusterInterface { + return &aPIServiceExportsClusterInterface{clientCache: c.clientCache} } -func (c *KubeBindV1alpha2Client) APIServiceExportRequests(namespace string) APIServiceExportRequestInterface { - return newAPIServiceExportRequests(c, namespace) +func (c *KubeBindV1alpha2ClusterClient) APIServiceExportRequests() APIServiceExportRequestClusterInterface { + return &aPIServiceExportRequestsClusterInterface{clientCache: c.clientCache} } -func (c *KubeBindV1alpha2Client) APIServiceNamespaces(namespace string) APIServiceNamespaceInterface { - return newAPIServiceNamespaces(c, namespace) +func (c *KubeBindV1alpha2ClusterClient) APIServiceNamespaces() APIServiceNamespaceClusterInterface { + return &aPIServiceNamespacesClusterInterface{clientCache: c.clientCache} } -func (c *KubeBindV1alpha2Client) BoundAPIResourceSchemas(namespace string) BoundAPIResourceSchemaInterface { - return newBoundAPIResourceSchemas(c, namespace) +func (c *KubeBindV1alpha2ClusterClient) BoundAPIResourceSchemas() BoundAPIResourceSchemaClusterInterface { + return &boundAPIResourceSchemasClusterInterface{clientCache: c.clientCache} } -func (c *KubeBindV1alpha2Client) ClusterBindings(namespace string) ClusterBindingInterface { - return newClusterBindings(c, namespace) +func (c *KubeBindV1alpha2ClusterClient) ClusterBindings() ClusterBindingClusterInterface { + return &clusterBindingsClusterInterface{clientCache: c.clientCache} } -// NewForConfig creates a new KubeBindV1alpha2Client for the given config. +// 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) (*KubeBindV1alpha2Client, error) { +func NewForConfig(c *rest.Config) (*KubeBindV1alpha2ClusterClient, 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 @@ -86,23 +97,22 @@ func NewForConfig(c *rest.Config) (*KubeBindV1alpha2Client, error) { return NewForConfigAndClient(&config, httpClient) } -// NewForConfigAndClient creates a new KubeBindV1alpha2Client for the given config and http client. +// 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) (*KubeBindV1alpha2Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { +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 &KubeBindV1alpha2Client{client}, nil + + return &KubeBindV1alpha2ClusterClient{clientCache: cache}, nil } -// NewForConfigOrDie creates a new KubeBindV1alpha2Client for the given config and +// NewForConfigOrDie creates a new KubeBindV1alpha2ClusterClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *KubeBindV1alpha2Client { +func NewForConfigOrDie(c *rest.Config) *KubeBindV1alpha2ClusterClient { client, err := NewForConfig(c) if err != nil { panic(err) @@ -110,12 +120,7 @@ func NewForConfigOrDie(c *rest.Config) *KubeBindV1alpha2Client { return client } -// New creates a new KubeBindV1alpha2Client for the given RESTClient. -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,15 +129,4 @@ func setConfigDefaults(config *rest.Config) error { if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *KubeBindV1alpha2Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient } diff --git a/sdk/kcp/go.mod b/sdk/kcp/go.mod index 37b38269d..65e13053e 100644 --- a/sdk/kcp/go.mod +++ b/sdk/kcp/go.mod @@ -5,10 +5,7 @@ go 1.23.0 toolchain go1.23.4 require ( - github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20240817110845-a9eb9752bfeb - github.com/kcp-dev/client-go v0.0.0-20240912145314-f5949d81732a - github.com/kcp-dev/logicalcluster/v3 v3.0.5 - github.com/kube-bind/kube-bind/sdk v0.0.0-20241213193814-46d2a9212bc3 + 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 @@ -19,7 +16,6 @@ require ( 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/evanphx/json-patch v5.6.0+incompatible // 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 @@ -51,7 +47,7 @@ require ( 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-20241104100929-3ea5e8cea738 // 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 index af441d380..464dd694b 100644 --- a/sdk/kcp/go.sum +++ b/sdk/kcp/go.sum @@ -5,8 +5,6 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 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/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= 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= @@ -41,12 +39,6 @@ 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.20240817110845-a9eb9752bfeb h1:W11F/dp6NdUnHeB0SrpyWLiifRosu1qaMJvdFGGLXc0= -github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20240817110845-a9eb9752bfeb/go.mod h1:mEDD1K5BVUXJ4CP6wcJ0vZUf+7tbFMjkCFzBKsUNj18= -github.com/kcp-dev/client-go v0.0.0-20240912145314-f5949d81732a h1:O9SNM3MqMlwoEAPSWxk/yw4JU211KpVsAFjTXWQcMEk= -github.com/kcp-dev/client-go v0.0.0-20240912145314-f5949d81732a/go.mod h1:h5jC8rEbkyGUgV86+sgtMMcl950ooGzk+iLrQnbCR6o= -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/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -56,8 +48,8 @@ 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 v0.0.0-20241213193814-46d2a9212bc3 h1:8sDXUbuhWMo/NtAV4SvHfB6uLHMX1SVdovMZqxo3llE= -github.com/kube-bind/kube-bind/sdk v0.0.0-20241213193814-46d2a9212bc3/go.mod h1:z0Ii+LT7AuRJo2mQ6QN5NfMVa8XW8sChLgwulvLaSZw= +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= @@ -69,8 +61,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq 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.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= -github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= +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= @@ -78,8 +70,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI 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.6-0.20210604193023-d5e0c0615ace h1:9PNP1jnUjRhfmGMlkXHjYPishpcw4jpSt/V/xYY3FMA= -github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +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= @@ -87,8 +79,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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= @@ -156,8 +148,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-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= -k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +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= diff --git a/sdk/kcp/informers/externalversions/factory.go b/sdk/kcp/informers/externalversions/factory.go index d85406d48..1f32993e4 100644 --- a/sdk/kcp/informers/externalversions/factory.go +++ b/sdk/kcp/informers/externalversions/factory.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,27 +14,25 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. -package informers +package externalversions import ( - "reflect" - "sync" - "time" + reflect "reflect" + sync "sync" + time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/tools/cache" - - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindinformers "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/kubebind" + 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. @@ -51,7 +46,7 @@ type SharedInformerOptions struct { } type sharedInformerFactory struct { - client clientset.ClusterInterface + client versioned.ClusterInterface tweakListOptions internalinterfaces.TweakListOptionsFunc lock sync.Mutex defaultResync time.Duration @@ -70,7 +65,7 @@ type sharedInformerFactory struct { } // WithCustomResyncConfig sets a custom resync period for the specified informer types. -func WithCustomResyncConfig(resyncConfig map[metav1.Object]time.Duration) SharedInformerOption { +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 @@ -95,13 +90,21 @@ func WithTransform(transform cache.TransformFunc) SharedInformerOption { } } -// NewSharedInformerFactory constructs a new instance of SharedInformerFactory for all namespaces. -func NewSharedInformerFactory(client clientset.ClusterInterface, defaultResync time.Duration) SharedInformerFactory { +// 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 clientset.ClusterInterface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { +func NewSharedInformerFactoryWithOptions(client versioned.ClusterInterface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { factory := &sharedInformerFactory{ client: client, defaultResync: defaultResync, @@ -127,7 +130,6 @@ func NewSharedInformerFactoryWithOptions(client clientset.ClusterInterface, defa return factory } -// Start initializes all requested informers. func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { f.lock.Lock() defer f.lock.Unlock() @@ -161,7 +163,6 @@ func (f *sharedInformerFactory) Shutdown() { f.wg.Wait() } -// WaitForCacheSync waits for all started informers' cache were synced. func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { informers := func() map[reflect.Type]kcpcache.ScopeableSharedIndexInformer { f.lock.Lock() @@ -180,10 +181,11 @@ func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[ref for informType, informer := range informers { res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) } + return res } -// InformerFor returns the SharedIndexInformer for obj. +// 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() @@ -200,6 +202,7 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal } informer = newFunc(f.client, resyncPeriod) + informer.SetTransform(f.transform) f.informers[informerType] = informer return informer @@ -221,11 +224,11 @@ type ScopedDynamicSharedInformerFactory interface { // // ctx, cancel := context.Background() // defer cancel() -// factory := NewSharedInformerFactoryWithOptions(client, resyncPeriod) -// defer factory.Shutdown() // Returns immediately if nothing was started. +// 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. +// factory.Start(ctx.Done()) // Start processing these informers. // synced := factory.WaitForCacheSync(ctx.Done()) // for v, ok := range synced { // if !ok { @@ -245,6 +248,7 @@ type SharedInformerFactory interface { // 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 @@ -259,21 +263,22 @@ type SharedInformerFactory interface { // block until all goroutines have terminated. Shutdown() - // ForResource gives generic access to a shared informer of the matching type. - ForResource(resource schema.GroupVersionResource) (GenericClusterInformer, error) - // WaitForCacheSync blocks until all started informers' caches were synced // or the stop channel gets closed. WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - // InformerFor returns the SharedIndexInformer for obj. + // 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() kubebindinformers.ClusterInterface + KubeBind() kubebind.ClusterInterface } -func (f *sharedInformerFactory) KubeBind() kubebindinformers.ClusterInterface { - return kubebindinformers.New(f, f.tweakListOptions) +func (f *sharedInformerFactory) KubeBind() kubebind.ClusterInterface { + return kubebind.New(f, f.tweakListOptions) } func (f *sharedInformerFactory) Cluster(clusterName logicalcluster.Name) ScopedDynamicSharedInformerFactory { @@ -309,13 +314,13 @@ func WithNamespace(namespace string) SharedInformerOption { } type sharedScopedInformerFactory struct { - client scopedclientset.Interface - namespace string + 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. @@ -324,12 +329,12 @@ type sharedScopedInformerFactory struct { } // NewSharedScopedInformerFactory constructs a new instance of SharedInformerFactory for some or all namespaces. -func NewSharedScopedInformerFactory(client scopedclientset.Interface, defaultResync time.Duration, namespace string) SharedScopedInformerFactory { +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 scopedclientset.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedScopedInformerFactory { +func NewSharedScopedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedScopedInformerFactory { factory := &sharedScopedInformerFactory{ client: client, defaultResync: defaultResync, @@ -420,9 +425,9 @@ type SharedScopedInformerFactory interface { ForResource(resource schema.GroupVersionResource) (GenericInformer, error) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - KubeBind() kubebindinformers.Interface + KubeBind() kubebind.Interface } -func (f *sharedScopedInformerFactory) KubeBind() kubebindinformers.Interface { - return kubebindinformers.NewScoped(f, f.namespace, f.tweakListOptions) +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 index 87eb8df1a..ffe1bfa7e 100644 --- a/sdk/kcp/informers/externalversions/generic.go +++ b/sdk/kcp/informers/externalversions/generic.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,25 +14,26 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. -package informers +package externalversions import ( - "fmt" + context "context" + fmt "fmt" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/tools/cache" + logicalcluster "github.com/kcp-dev/logicalcluster/v3" + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" + 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 } @@ -51,20 +49,29 @@ type genericClusterInformer struct { } // Informer returns the SharedIndexInformer. -func (f *genericClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.informer +func (i *genericClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.informer } -// Lister returns the GenericClusterLister. -func (f *genericClusterInformer) Lister() kcpcache.GenericClusterLister { - return kcpcache.NewGenericClusterLister(f.Informer().GetIndexer(), f.resource) +// Lister returns the GenericLister. +func (i *genericClusterInformer) Lister() kcpcache.GenericClusterLister { + return kcpcache.NewGenericClusterLister(i.Informer().GetIndexer(), i.resource) } // Cluster scopes to a GenericInformer. -func (f *genericClusterInformer) Cluster(clusterName logicalcluster.Name) GenericInformer { +func (i *genericClusterInformer) Cluster(clusterName logicalcluster.Name) GenericInformer { return &genericInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().ByCluster(clusterName), + 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), } } @@ -74,45 +81,47 @@ type genericInformer struct { } // Informer returns the SharedIndexInformer. -func (f *genericInformer) Informer() cache.SharedIndexInformer { - return f.informer +func (i *genericInformer) Informer() cache.SharedIndexInformer { + return i.informer } // Lister returns the GenericLister. -func (f *genericInformer) Lister() cache.GenericLister { - return f.lister +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 kubebindv1alpha1.SchemeGroupVersion.WithResource("apiservicebindings"): + // Group=kube-bind.io, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("apiservicebindings"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha1().APIServiceBindings().Informer()}, nil - case kubebindv1alpha1.SchemeGroupVersion.WithResource("apiserviceexports"): + case v1alpha1.SchemeGroupVersion.WithResource("apiserviceexports"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha1().APIServiceExports().Informer()}, nil - case kubebindv1alpha1.SchemeGroupVersion.WithResource("apiserviceexportrequests"): + case v1alpha1.SchemeGroupVersion.WithResource("apiserviceexportrequests"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha1().APIServiceExportRequests().Informer()}, nil - case kubebindv1alpha1.SchemeGroupVersion.WithResource("apiservicenamespaces"): + case v1alpha1.SchemeGroupVersion.WithResource("apiservicenamespaces"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha1().APIServiceNamespaces().Informer()}, nil - case kubebindv1alpha1.SchemeGroupVersion.WithResource("clusterbindings"): + case v1alpha1.SchemeGroupVersion.WithResource("clusterbindings"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha1().ClusterBindings().Informer()}, nil - // Group=kube-bind.io, Version=V1alpha2 - case kubebindv1alpha2.SchemeGroupVersion.WithResource("apiresourceschemas"): + + // Group=kube-bind.io, Version=v1alpha2 + case v1alpha2.SchemeGroupVersion.WithResource("apiresourceschemas"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha2().APIResourceSchemas().Informer()}, nil - case kubebindv1alpha2.SchemeGroupVersion.WithResource("apiservicebindings"): + case v1alpha2.SchemeGroupVersion.WithResource("apiservicebindings"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha2().APIServiceBindings().Informer()}, nil - case kubebindv1alpha2.SchemeGroupVersion.WithResource("apiserviceexports"): + case v1alpha2.SchemeGroupVersion.WithResource("apiserviceexports"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha2().APIServiceExports().Informer()}, nil - case kubebindv1alpha2.SchemeGroupVersion.WithResource("apiserviceexportrequests"): + case v1alpha2.SchemeGroupVersion.WithResource("apiserviceexportrequests"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha2().APIServiceExportRequests().Informer()}, nil - case kubebindv1alpha2.SchemeGroupVersion.WithResource("apiservicenamespaces"): + case v1alpha2.SchemeGroupVersion.WithResource("apiservicenamespaces"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha2().APIServiceNamespaces().Informer()}, nil - case kubebindv1alpha2.SchemeGroupVersion.WithResource("boundapiresourceschemas"): + case v1alpha2.SchemeGroupVersion.WithResource("boundapiresourceschemas"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.KubeBind().V1alpha2().BoundAPIResourceSchemas().Informer()}, nil - case kubebindv1alpha2.SchemeGroupVersion.WithResource("clusterbindings"): + 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) @@ -122,44 +131,46 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // 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 kubebindv1alpha1.SchemeGroupVersion.WithResource("apiservicebindings"): + // 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 kubebindv1alpha1.SchemeGroupVersion.WithResource("apiserviceexports"): + case v1alpha1.SchemeGroupVersion.WithResource("apiserviceexports"): informer := f.KubeBind().V1alpha1().APIServiceExports().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case kubebindv1alpha1.SchemeGroupVersion.WithResource("apiserviceexportrequests"): + case v1alpha1.SchemeGroupVersion.WithResource("apiserviceexportrequests"): informer := f.KubeBind().V1alpha1().APIServiceExportRequests().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case kubebindv1alpha1.SchemeGroupVersion.WithResource("apiservicenamespaces"): + case v1alpha1.SchemeGroupVersion.WithResource("apiservicenamespaces"): informer := f.KubeBind().V1alpha1().APIServiceNamespaces().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case kubebindv1alpha1.SchemeGroupVersion.WithResource("clusterbindings"): + 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 kubebindv1alpha2.SchemeGroupVersion.WithResource("apiresourceschemas"): + + // 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 kubebindv1alpha2.SchemeGroupVersion.WithResource("apiservicebindings"): + case v1alpha2.SchemeGroupVersion.WithResource("apiservicebindings"): informer := f.KubeBind().V1alpha2().APIServiceBindings().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case kubebindv1alpha2.SchemeGroupVersion.WithResource("apiserviceexports"): + case v1alpha2.SchemeGroupVersion.WithResource("apiserviceexports"): informer := f.KubeBind().V1alpha2().APIServiceExports().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case kubebindv1alpha2.SchemeGroupVersion.WithResource("apiserviceexportrequests"): + case v1alpha2.SchemeGroupVersion.WithResource("apiserviceexportrequests"): informer := f.KubeBind().V1alpha2().APIServiceExportRequests().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case kubebindv1alpha2.SchemeGroupVersion.WithResource("apiservicenamespaces"): + case v1alpha2.SchemeGroupVersion.WithResource("apiservicenamespaces"): informer := f.KubeBind().V1alpha2().APIServiceNamespaces().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case kubebindv1alpha2.SchemeGroupVersion.WithResource("boundapiresourceschemas"): + case v1alpha2.SchemeGroupVersion.WithResource("boundapiresourceschemas"): informer := f.KubeBind().V1alpha2().BoundAPIResourceSchemas().Informer() return &genericInformer{lister: cache.NewGenericLister(informer.GetIndexer(), resource.GroupResource()), informer: informer}, nil - case kubebindv1alpha2.SchemeGroupVersion.WithResource("clusterbindings"): + 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 index d10a4f690..a4a0d0249 100644 --- a/sdk/kcp/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/sdk/kcp/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package internalinterfaces @@ -25,32 +22,30 @@ import ( time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/tools/cache" + cache "k8s.io/client-go/tools/cache" - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" + versioned "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" ) -// NewInformerFunc takes clientset.ClusterInterface and time.Duration to return a ScopeableSharedIndexInformer. -type NewInformerFunc func(clientset.ClusterInterface, time.Duration) kcpcache.ScopeableSharedIndexInformer +// TweakListOptionsFunc is a function that transforms a v1.ListOptions. +type TweakListOptionsFunc func(*v1.ListOptions) -// SharedInformerFactory a small interface to allow for adding an informer without an import cycle +// 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 scopedclientset.Interface and time.Duration to return a SharedIndexInformer. -type NewScopedInformerFunc func(scopedclientset.Interface, time.Duration) cache.SharedIndexInformer +// 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 +// 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 } - -// TweakListOptionsFunc is a function that transforms a metav1.ListOptions. -type TweakListOptionsFunc func(*metav1.ListOptions) diff --git a/sdk/kcp/informers/externalversions/kubebind/interface.go b/sdk/kcp/informers/externalversions/kubebind/interface.go index ce45aed66..f3f3976ac 100644 --- a/sdk/kcp/informers/externalversions/kubebind/interface.go +++ b/sdk/kcp/informers/externalversions/kubebind/interface.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,20 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package kubebind import ( - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/kubebind/v1alpha1" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/kubebind/v1alpha2" + 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 the shared informers in V1alpha1. + // V1alpha1 provides access to shared informers for resources in V1alpha1. V1alpha1() v1alpha1.ClusterInterface - // V1alpha2 provides access to the shared informers in V1alpha2. + // V1alpha2 provides access to shared informers for resources in V1alpha2. V1alpha2() v1alpha2.ClusterInterface } @@ -54,10 +52,11 @@ 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 the shared informers in V1alpha1. + // V1alpha1 provides access to shared informers for resources in V1alpha1. V1alpha1() v1alpha1.Interface - // V1alpha2 provides access to the shared informers in V1alpha2. + // V1alpha2 provides access to shared informers for resources in V1alpha2. V1alpha2() v1alpha2.Interface } @@ -72,12 +71,12 @@ func NewScoped(f internalinterfaces.SharedScopedInformerFactory, namespace strin return &scopedGroup{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// V1alpha1 returns a new v1alpha1.ClusterInterface. +// 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.ClusterInterface. +// 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 index 3e2c298a9..fe03fc98f 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiservicebinding.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiservicebinding.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,36 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha1 import ( - "context" - "time" + context "context" + time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha1listers "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha1" + 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() kubebindv1alpha1listers.APIServiceBindingClusterLister + Lister() kubebindv1alpha1.APIServiceBindingClusterLister } type aPIServiceBindingClusterInformer struct { @@ -57,76 +53,82 @@ type aPIServiceBindingClusterInformer struct { // 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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { +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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredAPIServiceBindingClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceBindings().List(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceBindings().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha1.APIServiceBinding{}, + &apiskubebindv1alpha1.APIServiceBinding{}, resyncPeriod, indexers, ) } -func (f *aPIServiceBindingClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { +func (i *aPIServiceBindingClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { return NewFilteredAPIServiceBindingClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - }, - f.tweakListOptions, - ) + kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) } -func (f *aPIServiceBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha1.APIServiceBinding{}, f.defaultInformer) +func (i *aPIServiceBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiskubebindv1alpha1.APIServiceBinding{}, i.defaultInformer) } -func (f *aPIServiceBindingClusterInformer) Lister() kubebindv1alpha1listers.APIServiceBindingClusterLister { - return kubebindv1alpha1listers.NewAPIServiceBindingClusterLister(f.Informer().GetIndexer()) +func (i *aPIServiceBindingClusterInformer) Lister() kubebindv1alpha1.APIServiceBindingClusterLister { + return kubebindv1alpha1.NewAPIServiceBindingClusterLister(i.Informer().GetIndexer()) } -// APIServiceBindingInformer provides access to a shared informer and lister for -// APIServiceBindings. -type APIServiceBindingInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha1listers.APIServiceBindingLister +func (i *aPIServiceBindingClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceBindingInformer { + return &aPIServiceBindingInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } } -func (f *aPIServiceBindingClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceBindingInformer { +func (i *aPIServiceBindingClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceBindingInformer { return &aPIServiceBindingInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().Cluster(clusterName), + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), } } type aPIServiceBindingInformer struct { informer cache.SharedIndexInformer - lister kubebindv1alpha1listers.APIServiceBindingLister + lister kubebindv1alpha1.APIServiceBindingLister } -func (f *aPIServiceBindingInformer) Informer() cache.SharedIndexInformer { - return f.informer +func (i *aPIServiceBindingInformer) Informer() cache.SharedIndexInformer { + return i.informer } -func (f *aPIServiceBindingInformer) Lister() kubebindv1alpha1listers.APIServiceBindingLister { - return f.lister +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 { @@ -134,46 +136,46 @@ type aPIServiceBindingScopedInformer struct { tweakListOptions internalinterfaces.TweakListOptionsFunc } -func (f *aPIServiceBindingScopedInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha1.APIServiceBinding{}, f.defaultInformer) -} - -func (f *aPIServiceBindingScopedInformer) Lister() kubebindv1alpha1listers.APIServiceBindingLister { - return kubebindv1alpha1listers.NewAPIServiceBindingLister(f.Informer().GetIndexer()) -} - // 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 scopedclientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { +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 scopedclientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +func NewFilteredAPIServiceBindingInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceBindings().List(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceBindings().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha1.APIServiceBinding{}, + &apiskubebindv1alpha1.APIServiceBinding{}, resyncPeriod, indexers, ) } -func (f *aPIServiceBindingScopedInformer) defaultInformer(client scopedclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceBindingInformer(client, resyncPeriod, cache.Indexers{}, f.tweakListOptions) +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 index 93421d7e4..faa57598d 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiserviceexport.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiserviceexport.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,36 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha1 import ( - "context" - "time" + context "context" + time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha1listers "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha1" + 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() kubebindv1alpha1listers.APIServiceExportClusterLister + Lister() kubebindv1alpha1.APIServiceExportClusterLister } type aPIServiceExportClusterInformer struct { @@ -57,76 +53,82 @@ type aPIServiceExportClusterInformer struct { // 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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { +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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredAPIServiceExportClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceExports().List(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceExports().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceExports().Watch(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceExports().Watch(context.Background(), options) }, }, - &kubebindv1alpha1.APIServiceExport{}, + &apiskubebindv1alpha1.APIServiceExport{}, resyncPeriod, indexers, ) } -func (f *aPIServiceExportClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { +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}, - f.tweakListOptions, - ) + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) } -func (f *aPIServiceExportClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha1.APIServiceExport{}, f.defaultInformer) +func (i *aPIServiceExportClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiskubebindv1alpha1.APIServiceExport{}, i.defaultInformer) } -func (f *aPIServiceExportClusterInformer) Lister() kubebindv1alpha1listers.APIServiceExportClusterLister { - return kubebindv1alpha1listers.NewAPIServiceExportClusterLister(f.Informer().GetIndexer()) +func (i *aPIServiceExportClusterInformer) Lister() kubebindv1alpha1.APIServiceExportClusterLister { + return kubebindv1alpha1.NewAPIServiceExportClusterLister(i.Informer().GetIndexer()) } -// APIServiceExportInformer provides access to a shared informer and lister for -// APIServiceExports. -type APIServiceExportInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha1listers.APIServiceExportLister +func (i *aPIServiceExportClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceExportInformer { + return &aPIServiceExportInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } } -func (f *aPIServiceExportClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceExportInformer { +func (i *aPIServiceExportClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceExportInformer { return &aPIServiceExportInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().Cluster(clusterName), + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), } } type aPIServiceExportInformer struct { informer cache.SharedIndexInformer - lister kubebindv1alpha1listers.APIServiceExportLister + lister kubebindv1alpha1.APIServiceExportLister } -func (f *aPIServiceExportInformer) Informer() cache.SharedIndexInformer { - return f.informer +func (i *aPIServiceExportInformer) Informer() cache.SharedIndexInformer { + return i.informer } -func (f *aPIServiceExportInformer) Lister() kubebindv1alpha1listers.APIServiceExportLister { - return f.lister +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 { @@ -135,48 +137,48 @@ type aPIServiceExportScopedInformer struct { namespace string } -func (f *aPIServiceExportScopedInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha1.APIServiceExport{}, f.defaultInformer) -} - -func (f *aPIServiceExportScopedInformer) Lister() kubebindv1alpha1listers.APIServiceExportLister { - return kubebindv1alpha1listers.NewAPIServiceExportLister(f.Informer().GetIndexer()) -} - // 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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { +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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +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 metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { 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 metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha1.APIServiceExport{}, + &apiskubebindv1alpha1.APIServiceExport{}, resyncPeriod, indexers, ) } -func (f *aPIServiceExportScopedInformer) defaultInformer(client scopedclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceExportInformer(client, resyncPeriod, f.namespace, cache.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, - }, f.tweakListOptions) + }, i.tweakListOptions) } diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiserviceexportrequest.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiserviceexportrequest.go index 7c8c7d1c4..843d5ade2 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiserviceexportrequest.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiserviceexportrequest.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,36 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha1 import ( - "context" - "time" + context "context" + time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha1listers "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha1" + 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() kubebindv1alpha1listers.APIServiceExportRequestClusterLister + Lister() kubebindv1alpha1.APIServiceExportRequestClusterLister } type aPIServiceExportRequestClusterInformer struct { @@ -57,76 +53,82 @@ type aPIServiceExportRequestClusterInformer struct { // 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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { +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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredAPIServiceExportRequestClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceExportRequests().List(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceExportRequests().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceExportRequests().Watch(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceExportRequests().Watch(context.Background(), options) }, }, - &kubebindv1alpha1.APIServiceExportRequest{}, + &apiskubebindv1alpha1.APIServiceExportRequest{}, resyncPeriod, indexers, ) } -func (f *aPIServiceExportRequestClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { +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}, - f.tweakListOptions, - ) + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) } -func (f *aPIServiceExportRequestClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha1.APIServiceExportRequest{}, f.defaultInformer) +func (i *aPIServiceExportRequestClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiskubebindv1alpha1.APIServiceExportRequest{}, i.defaultInformer) } -func (f *aPIServiceExportRequestClusterInformer) Lister() kubebindv1alpha1listers.APIServiceExportRequestClusterLister { - return kubebindv1alpha1listers.NewAPIServiceExportRequestClusterLister(f.Informer().GetIndexer()) +func (i *aPIServiceExportRequestClusterInformer) Lister() kubebindv1alpha1.APIServiceExportRequestClusterLister { + return kubebindv1alpha1.NewAPIServiceExportRequestClusterLister(i.Informer().GetIndexer()) } -// APIServiceExportRequestInformer provides access to a shared informer and lister for -// APIServiceExportRequests. -type APIServiceExportRequestInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha1listers.APIServiceExportRequestLister +func (i *aPIServiceExportRequestClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceExportRequestInformer { + return &aPIServiceExportRequestInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } } -func (f *aPIServiceExportRequestClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceExportRequestInformer { +func (i *aPIServiceExportRequestClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceExportRequestInformer { return &aPIServiceExportRequestInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().Cluster(clusterName), + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), } } type aPIServiceExportRequestInformer struct { informer cache.SharedIndexInformer - lister kubebindv1alpha1listers.APIServiceExportRequestLister + lister kubebindv1alpha1.APIServiceExportRequestLister } -func (f *aPIServiceExportRequestInformer) Informer() cache.SharedIndexInformer { - return f.informer +func (i *aPIServiceExportRequestInformer) Informer() cache.SharedIndexInformer { + return i.informer } -func (f *aPIServiceExportRequestInformer) Lister() kubebindv1alpha1listers.APIServiceExportRequestLister { - return f.lister +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 { @@ -135,48 +137,48 @@ type aPIServiceExportRequestScopedInformer struct { namespace string } -func (f *aPIServiceExportRequestScopedInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha1.APIServiceExportRequest{}, f.defaultInformer) -} - -func (f *aPIServiceExportRequestScopedInformer) Lister() kubebindv1alpha1listers.APIServiceExportRequestLister { - return kubebindv1alpha1listers.NewAPIServiceExportRequestLister(f.Informer().GetIndexer()) -} - // 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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { +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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +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 metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { 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 metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha1.APIServiceExportRequest{}, + &apiskubebindv1alpha1.APIServiceExportRequest{}, resyncPeriod, indexers, ) } -func (f *aPIServiceExportRequestScopedInformer) defaultInformer(client scopedclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceExportRequestInformer(client, resyncPeriod, f.namespace, cache.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, - }, f.tweakListOptions) + }, i.tweakListOptions) } diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiservicenamespace.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiservicenamespace.go index 9e2d7ab1f..989b2020b 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiservicenamespace.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/apiservicenamespace.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,36 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha1 import ( - "context" - "time" + context "context" + time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha1listers "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha1" + 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() kubebindv1alpha1listers.APIServiceNamespaceClusterLister + Lister() kubebindv1alpha1.APIServiceNamespaceClusterLister } type aPIServiceNamespaceClusterInformer struct { @@ -57,76 +53,82 @@ type aPIServiceNamespaceClusterInformer struct { // 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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { +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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredAPIServiceNamespaceClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceNamespaces().List(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceNamespaces().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().APIServiceNamespaces().Watch(context.TODO(), options) + return client.KubeBindV1alpha1().APIServiceNamespaces().Watch(context.Background(), options) }, }, - &kubebindv1alpha1.APIServiceNamespace{}, + &apiskubebindv1alpha1.APIServiceNamespace{}, resyncPeriod, indexers, ) } -func (f *aPIServiceNamespaceClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { +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}, - f.tweakListOptions, - ) + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) } -func (f *aPIServiceNamespaceClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha1.APIServiceNamespace{}, f.defaultInformer) +func (i *aPIServiceNamespaceClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiskubebindv1alpha1.APIServiceNamespace{}, i.defaultInformer) } -func (f *aPIServiceNamespaceClusterInformer) Lister() kubebindv1alpha1listers.APIServiceNamespaceClusterLister { - return kubebindv1alpha1listers.NewAPIServiceNamespaceClusterLister(f.Informer().GetIndexer()) +func (i *aPIServiceNamespaceClusterInformer) Lister() kubebindv1alpha1.APIServiceNamespaceClusterLister { + return kubebindv1alpha1.NewAPIServiceNamespaceClusterLister(i.Informer().GetIndexer()) } -// APIServiceNamespaceInformer provides access to a shared informer and lister for -// APIServiceNamespaces. -type APIServiceNamespaceInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha1listers.APIServiceNamespaceLister +func (i *aPIServiceNamespaceClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceNamespaceInformer { + return &aPIServiceNamespaceInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } } -func (f *aPIServiceNamespaceClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceNamespaceInformer { +func (i *aPIServiceNamespaceClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceNamespaceInformer { return &aPIServiceNamespaceInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().Cluster(clusterName), + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), } } type aPIServiceNamespaceInformer struct { informer cache.SharedIndexInformer - lister kubebindv1alpha1listers.APIServiceNamespaceLister + lister kubebindv1alpha1.APIServiceNamespaceLister } -func (f *aPIServiceNamespaceInformer) Informer() cache.SharedIndexInformer { - return f.informer +func (i *aPIServiceNamespaceInformer) Informer() cache.SharedIndexInformer { + return i.informer } -func (f *aPIServiceNamespaceInformer) Lister() kubebindv1alpha1listers.APIServiceNamespaceLister { - return f.lister +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 { @@ -135,48 +137,48 @@ type aPIServiceNamespaceScopedInformer struct { namespace string } -func (f *aPIServiceNamespaceScopedInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha1.APIServiceNamespace{}, f.defaultInformer) -} - -func (f *aPIServiceNamespaceScopedInformer) Lister() kubebindv1alpha1listers.APIServiceNamespaceLister { - return kubebindv1alpha1listers.NewAPIServiceNamespaceLister(f.Informer().GetIndexer()) -} - // 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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { +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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +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 metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { 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 metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha1.APIServiceNamespace{}, + &apiskubebindv1alpha1.APIServiceNamespace{}, resyncPeriod, indexers, ) } -func (f *aPIServiceNamespaceScopedInformer) defaultInformer(client scopedclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceNamespaceInformer(client, resyncPeriod, f.namespace, cache.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, - }, f.tweakListOptions) + }, i.tweakListOptions) } diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/clusterbinding.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/clusterbinding.go index 226ad297c..92dd6e129 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/clusterbinding.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/clusterbinding.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,36 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha1 import ( - "context" - "time" + context "context" + time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha1listers "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha1" + 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() kubebindv1alpha1listers.ClusterBindingClusterLister + Lister() kubebindv1alpha1.ClusterBindingClusterLister } type clusterBindingClusterInformer struct { @@ -57,76 +53,82 @@ type clusterBindingClusterInformer struct { // 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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { +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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredClusterBindingClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().ClusterBindings().List(context.TODO(), options) + return client.KubeBindV1alpha1().ClusterBindings().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha1().ClusterBindings().Watch(context.TODO(), options) + return client.KubeBindV1alpha1().ClusterBindings().Watch(context.Background(), options) }, }, - &kubebindv1alpha1.ClusterBinding{}, + &apiskubebindv1alpha1.ClusterBinding{}, resyncPeriod, indexers, ) } -func (f *clusterBindingClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { +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}, - f.tweakListOptions, - ) + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) } -func (f *clusterBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha1.ClusterBinding{}, f.defaultInformer) +func (i *clusterBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiskubebindv1alpha1.ClusterBinding{}, i.defaultInformer) } -func (f *clusterBindingClusterInformer) Lister() kubebindv1alpha1listers.ClusterBindingClusterLister { - return kubebindv1alpha1listers.NewClusterBindingClusterLister(f.Informer().GetIndexer()) +func (i *clusterBindingClusterInformer) Lister() kubebindv1alpha1.ClusterBindingClusterLister { + return kubebindv1alpha1.NewClusterBindingClusterLister(i.Informer().GetIndexer()) } -// ClusterBindingInformer provides access to a shared informer and lister for -// ClusterBindings. -type ClusterBindingInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha1listers.ClusterBindingLister +func (i *clusterBindingClusterInformer) Cluster(clusterName logicalcluster.Name) ClusterBindingInformer { + return &clusterBindingInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } } -func (f *clusterBindingClusterInformer) Cluster(clusterName logicalcluster.Name) ClusterBindingInformer { +func (i *clusterBindingClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) ClusterBindingInformer { return &clusterBindingInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().Cluster(clusterName), + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), } } type clusterBindingInformer struct { informer cache.SharedIndexInformer - lister kubebindv1alpha1listers.ClusterBindingLister + lister kubebindv1alpha1.ClusterBindingLister } -func (f *clusterBindingInformer) Informer() cache.SharedIndexInformer { - return f.informer +func (i *clusterBindingInformer) Informer() cache.SharedIndexInformer { + return i.informer } -func (f *clusterBindingInformer) Lister() kubebindv1alpha1listers.ClusterBindingLister { - return f.lister +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 { @@ -135,48 +137,48 @@ type clusterBindingScopedInformer struct { namespace string } -func (f *clusterBindingScopedInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha1.ClusterBinding{}, f.defaultInformer) -} - -func (f *clusterBindingScopedInformer) Lister() kubebindv1alpha1listers.ClusterBindingLister { - return kubebindv1alpha1listers.NewClusterBindingLister(f.Informer().GetIndexer()) -} - // 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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { +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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +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 metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { 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 metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha1.ClusterBinding{}, + &apiskubebindv1alpha1.ClusterBinding{}, resyncPeriod, indexers, ) } -func (f *clusterBindingScopedInformer) defaultInformer(client scopedclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredClusterBindingInformer(client, resyncPeriod, f.namespace, cache.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, - }, f.tweakListOptions) + }, i.tweakListOptions) } diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/interface.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/interface.go index 60fd0fa12..7077277fb 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha1/interface.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha1/interface.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,24 +14,24 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha1 import ( - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" + internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" ) type ClusterInterface interface { - // APIServiceBindings returns a APIServiceBindingClusterInformer + // APIServiceBindings returns a APIServiceBindingClusterInformer. APIServiceBindings() APIServiceBindingClusterInformer - // APIServiceExports returns a APIServiceExportClusterInformer + // APIServiceExports returns a APIServiceExportClusterInformer. APIServiceExports() APIServiceExportClusterInformer - // APIServiceExportRequests returns a APIServiceExportRequestClusterInformer + // APIServiceExportRequests returns a APIServiceExportRequestClusterInformer. APIServiceExportRequests() APIServiceExportRequestClusterInformer - // APIServiceNamespaces returns a APIServiceNamespaceClusterInformer + // APIServiceNamespaces returns a APIServiceNamespaceClusterInformer. APIServiceNamespaces() APIServiceNamespaceClusterInformer - // ClusterBindings returns a ClusterBindingClusterInformer + // ClusterBindings returns a ClusterBindingClusterInformer. ClusterBindings() ClusterBindingClusterInformer } @@ -43,46 +40,46 @@ type version struct { tweakListOptions internalinterfaces.TweakListOptionsFunc } -// New returns a new ClusterInterface. +// New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, tweakListOptions internalinterfaces.TweakListOptionsFunc) ClusterInterface { return &version{factory: f, tweakListOptions: tweakListOptions} } -// APIServiceBindings returns a APIServiceBindingClusterInformer +// APIServiceBindings returns a APIServiceBindingClusterInformer. func (v *version) APIServiceBindings() APIServiceBindingClusterInformer { return &aPIServiceBindingClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// APIServiceExports returns a APIServiceExportClusterInformer +// APIServiceExports returns a APIServiceExportClusterInformer. func (v *version) APIServiceExports() APIServiceExportClusterInformer { return &aPIServiceExportClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// APIServiceExportRequests returns a APIServiceExportRequestClusterInformer +// APIServiceExportRequests returns a APIServiceExportRequestClusterInformer. func (v *version) APIServiceExportRequests() APIServiceExportRequestClusterInformer { return &aPIServiceExportRequestClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// APIServiceNamespaces returns a APIServiceNamespaceClusterInformer +// APIServiceNamespaces returns a APIServiceNamespaceClusterInformer. func (v *version) APIServiceNamespaces() APIServiceNamespaceClusterInformer { return &aPIServiceNamespaceClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// ClusterBindings returns a ClusterBindingClusterInformer +// 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 returns a APIServiceBindingInformer. APIServiceBindings() APIServiceBindingInformer - // APIServiceExports returns a APIServiceExportInformer + // APIServiceExports returns a APIServiceExportInformer. APIServiceExports() APIServiceExportInformer - // APIServiceExportRequests returns a APIServiceExportRequestInformer + // APIServiceExportRequests returns a APIServiceExportRequestInformer. APIServiceExportRequests() APIServiceExportRequestInformer - // APIServiceNamespaces returns a APIServiceNamespaceInformer + // APIServiceNamespaces returns a APIServiceNamespaceInformer. APIServiceNamespaces() APIServiceNamespaceInformer - // ClusterBindings returns a ClusterBindingInformer + // ClusterBindings returns a ClusterBindingInformer. ClusterBindings() ClusterBindingInformer } @@ -92,32 +89,32 @@ type scopedVersion struct { namespace string } -// New returns a new ClusterInterface. +// New returns a new Interface. func NewScoped(f internalinterfaces.SharedScopedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &scopedVersion{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} + return &scopedVersion{factory: f, tweakListOptions: tweakListOptions} } -// APIServiceBindings returns a APIServiceBindingInformer +// APIServiceBindings returns a APIServiceBindingInformer. func (v *scopedVersion) APIServiceBindings() APIServiceBindingInformer { return &aPIServiceBindingScopedInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// APIServiceExports returns a APIServiceExportInformer +// APIServiceExports returns a APIServiceExportInformer. func (v *scopedVersion) APIServiceExports() APIServiceExportInformer { return &aPIServiceExportScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } -// APIServiceExportRequests returns a APIServiceExportRequestInformer +// APIServiceExportRequests returns a APIServiceExportRequestInformer. func (v *scopedVersion) APIServiceExportRequests() APIServiceExportRequestInformer { return &aPIServiceExportRequestScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } -// APIServiceNamespaces returns a APIServiceNamespaceInformer +// APIServiceNamespaces returns a APIServiceNamespaceInformer. func (v *scopedVersion) APIServiceNamespaces() APIServiceNamespaceInformer { return &aPIServiceNamespaceScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } -// ClusterBindings returns a ClusterBindingInformer +// 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 index 5713459d6..d87c561e7 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiresourceschema.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiresourceschema.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,36 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha2 import ( - "context" - "time" + context "context" + time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2listers "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" + 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() kubebindv1alpha2listers.APIResourceSchemaClusterLister + Lister() kubebindv1alpha2.APIResourceSchemaClusterLister } type aPIResourceSchemaClusterInformer struct { @@ -57,76 +53,82 @@ type aPIResourceSchemaClusterInformer struct { // 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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { +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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredAPIResourceSchemaClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIResourceSchemas().List(context.TODO(), options) + return client.KubeBindV1alpha2().APIResourceSchemas().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha2.APIResourceSchema{}, + &apiskubebindv1alpha2.APIResourceSchema{}, resyncPeriod, indexers, ) } -func (f *aPIResourceSchemaClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { +func (i *aPIResourceSchemaClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { return NewFilteredAPIResourceSchemaClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - }, - f.tweakListOptions, - ) + kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) } -func (f *aPIResourceSchemaClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.APIResourceSchema{}, f.defaultInformer) +func (i *aPIResourceSchemaClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiskubebindv1alpha2.APIResourceSchema{}, i.defaultInformer) } -func (f *aPIResourceSchemaClusterInformer) Lister() kubebindv1alpha2listers.APIResourceSchemaClusterLister { - return kubebindv1alpha2listers.NewAPIResourceSchemaClusterLister(f.Informer().GetIndexer()) +func (i *aPIResourceSchemaClusterInformer) Lister() kubebindv1alpha2.APIResourceSchemaClusterLister { + return kubebindv1alpha2.NewAPIResourceSchemaClusterLister(i.Informer().GetIndexer()) } -// APIResourceSchemaInformer provides access to a shared informer and lister for -// APIResourceSchemas. -type APIResourceSchemaInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2listers.APIResourceSchemaLister +func (i *aPIResourceSchemaClusterInformer) Cluster(clusterName logicalcluster.Name) APIResourceSchemaInformer { + return &aPIResourceSchemaInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } } -func (f *aPIResourceSchemaClusterInformer) Cluster(clusterName logicalcluster.Name) APIResourceSchemaInformer { +func (i *aPIResourceSchemaClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIResourceSchemaInformer { return &aPIResourceSchemaInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().Cluster(clusterName), + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), } } type aPIResourceSchemaInformer struct { informer cache.SharedIndexInformer - lister kubebindv1alpha2listers.APIResourceSchemaLister + lister kubebindv1alpha2.APIResourceSchemaLister } -func (f *aPIResourceSchemaInformer) Informer() cache.SharedIndexInformer { - return f.informer +func (i *aPIResourceSchemaInformer) Informer() cache.SharedIndexInformer { + return i.informer } -func (f *aPIResourceSchemaInformer) Lister() kubebindv1alpha2listers.APIResourceSchemaLister { - return f.lister +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 { @@ -134,46 +136,46 @@ type aPIResourceSchemaScopedInformer struct { tweakListOptions internalinterfaces.TweakListOptionsFunc } -func (f *aPIResourceSchemaScopedInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.APIResourceSchema{}, f.defaultInformer) -} - -func (f *aPIResourceSchemaScopedInformer) Lister() kubebindv1alpha2listers.APIResourceSchemaLister { - return kubebindv1alpha2listers.NewAPIResourceSchemaLister(f.Informer().GetIndexer()) -} - // 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 scopedclientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { +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 scopedclientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +func NewFilteredAPIResourceSchemaInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIResourceSchemas().List(context.TODO(), options) + return client.KubeBindV1alpha2().APIResourceSchemas().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha2.APIResourceSchema{}, + &apiskubebindv1alpha2.APIResourceSchema{}, resyncPeriod, indexers, ) } -func (f *aPIResourceSchemaScopedInformer) defaultInformer(client scopedclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIResourceSchemaInformer(client, resyncPeriod, cache.Indexers{}, f.tweakListOptions) +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 index 706dcfd0f..7fcb11137 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiservicebinding.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiservicebinding.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,36 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha2 import ( - "context" - "time" + context "context" + time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2listers "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" + 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() kubebindv1alpha2listers.APIServiceBindingClusterLister + Lister() kubebindv1alpha2.APIServiceBindingClusterLister } type aPIServiceBindingClusterInformer struct { @@ -57,76 +53,82 @@ type aPIServiceBindingClusterInformer struct { // 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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { +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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredAPIServiceBindingClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceBindings().List(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceBindings().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha2.APIServiceBinding{}, + &apiskubebindv1alpha2.APIServiceBinding{}, resyncPeriod, indexers, ) } -func (f *aPIServiceBindingClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { +func (i *aPIServiceBindingClusterInformer) defaultInformer(client versioned.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { return NewFilteredAPIServiceBindingClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - }, - f.tweakListOptions, - ) + kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) } -func (f *aPIServiceBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.APIServiceBinding{}, f.defaultInformer) +func (i *aPIServiceBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiskubebindv1alpha2.APIServiceBinding{}, i.defaultInformer) } -func (f *aPIServiceBindingClusterInformer) Lister() kubebindv1alpha2listers.APIServiceBindingClusterLister { - return kubebindv1alpha2listers.NewAPIServiceBindingClusterLister(f.Informer().GetIndexer()) +func (i *aPIServiceBindingClusterInformer) Lister() kubebindv1alpha2.APIServiceBindingClusterLister { + return kubebindv1alpha2.NewAPIServiceBindingClusterLister(i.Informer().GetIndexer()) } -// APIServiceBindingInformer provides access to a shared informer and lister for -// APIServiceBindings. -type APIServiceBindingInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2listers.APIServiceBindingLister +func (i *aPIServiceBindingClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceBindingInformer { + return &aPIServiceBindingInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } } -func (f *aPIServiceBindingClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceBindingInformer { +func (i *aPIServiceBindingClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceBindingInformer { return &aPIServiceBindingInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().Cluster(clusterName), + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), } } type aPIServiceBindingInformer struct { informer cache.SharedIndexInformer - lister kubebindv1alpha2listers.APIServiceBindingLister + lister kubebindv1alpha2.APIServiceBindingLister } -func (f *aPIServiceBindingInformer) Informer() cache.SharedIndexInformer { - return f.informer +func (i *aPIServiceBindingInformer) Informer() cache.SharedIndexInformer { + return i.informer } -func (f *aPIServiceBindingInformer) Lister() kubebindv1alpha2listers.APIServiceBindingLister { - return f.lister +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 { @@ -134,46 +136,46 @@ type aPIServiceBindingScopedInformer struct { tweakListOptions internalinterfaces.TweakListOptionsFunc } -func (f *aPIServiceBindingScopedInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.APIServiceBinding{}, f.defaultInformer) -} - -func (f *aPIServiceBindingScopedInformer) Lister() kubebindv1alpha2listers.APIServiceBindingLister { - return kubebindv1alpha2listers.NewAPIServiceBindingLister(f.Informer().GetIndexer()) -} - // 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 scopedclientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { +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 scopedclientset.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +func NewFilteredAPIServiceBindingInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceBindings().List(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceBindings().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha2.APIServiceBinding{}, + &apiskubebindv1alpha2.APIServiceBinding{}, resyncPeriod, indexers, ) } -func (f *aPIServiceBindingScopedInformer) defaultInformer(client scopedclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceBindingInformer(client, resyncPeriod, cache.Indexers{}, f.tweakListOptions) +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 index 92b6673c7..149c4a119 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiserviceexport.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiserviceexport.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,36 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha2 import ( - "context" - "time" + context "context" + time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2listers "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" + 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() kubebindv1alpha2listers.APIServiceExportClusterLister + Lister() kubebindv1alpha2.APIServiceExportClusterLister } type aPIServiceExportClusterInformer struct { @@ -57,76 +53,82 @@ type aPIServiceExportClusterInformer struct { // 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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { +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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredAPIServiceExportClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceExports().List(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceExports().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceExports().Watch(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceExports().Watch(context.Background(), options) }, }, - &kubebindv1alpha2.APIServiceExport{}, + &apiskubebindv1alpha2.APIServiceExport{}, resyncPeriod, indexers, ) } -func (f *aPIServiceExportClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { +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}, - f.tweakListOptions, - ) + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) } -func (f *aPIServiceExportClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.APIServiceExport{}, f.defaultInformer) +func (i *aPIServiceExportClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiskubebindv1alpha2.APIServiceExport{}, i.defaultInformer) } -func (f *aPIServiceExportClusterInformer) Lister() kubebindv1alpha2listers.APIServiceExportClusterLister { - return kubebindv1alpha2listers.NewAPIServiceExportClusterLister(f.Informer().GetIndexer()) +func (i *aPIServiceExportClusterInformer) Lister() kubebindv1alpha2.APIServiceExportClusterLister { + return kubebindv1alpha2.NewAPIServiceExportClusterLister(i.Informer().GetIndexer()) } -// APIServiceExportInformer provides access to a shared informer and lister for -// APIServiceExports. -type APIServiceExportInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2listers.APIServiceExportLister +func (i *aPIServiceExportClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceExportInformer { + return &aPIServiceExportInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } } -func (f *aPIServiceExportClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceExportInformer { +func (i *aPIServiceExportClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceExportInformer { return &aPIServiceExportInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().Cluster(clusterName), + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), } } type aPIServiceExportInformer struct { informer cache.SharedIndexInformer - lister kubebindv1alpha2listers.APIServiceExportLister + lister kubebindv1alpha2.APIServiceExportLister } -func (f *aPIServiceExportInformer) Informer() cache.SharedIndexInformer { - return f.informer +func (i *aPIServiceExportInformer) Informer() cache.SharedIndexInformer { + return i.informer } -func (f *aPIServiceExportInformer) Lister() kubebindv1alpha2listers.APIServiceExportLister { - return f.lister +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 { @@ -135,48 +137,48 @@ type aPIServiceExportScopedInformer struct { namespace string } -func (f *aPIServiceExportScopedInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.APIServiceExport{}, f.defaultInformer) -} - -func (f *aPIServiceExportScopedInformer) Lister() kubebindv1alpha2listers.APIServiceExportLister { - return kubebindv1alpha2listers.NewAPIServiceExportLister(f.Informer().GetIndexer()) -} - // 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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { +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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +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 metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { 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 metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha2.APIServiceExport{}, + &apiskubebindv1alpha2.APIServiceExport{}, resyncPeriod, indexers, ) } -func (f *aPIServiceExportScopedInformer) defaultInformer(client scopedclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceExportInformer(client, resyncPeriod, f.namespace, cache.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, - }, f.tweakListOptions) + }, i.tweakListOptions) } diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiserviceexportrequest.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiserviceexportrequest.go index 3d0968afd..09a06e1e1 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiserviceexportrequest.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiserviceexportrequest.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,36 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha2 import ( - "context" - "time" + context "context" + time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2listers "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" + 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() kubebindv1alpha2listers.APIServiceExportRequestClusterLister + Lister() kubebindv1alpha2.APIServiceExportRequestClusterLister } type aPIServiceExportRequestClusterInformer struct { @@ -57,76 +53,82 @@ type aPIServiceExportRequestClusterInformer struct { // 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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { +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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredAPIServiceExportRequestClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceExportRequests().List(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceExportRequests().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceExportRequests().Watch(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceExportRequests().Watch(context.Background(), options) }, }, - &kubebindv1alpha2.APIServiceExportRequest{}, + &apiskubebindv1alpha2.APIServiceExportRequest{}, resyncPeriod, indexers, ) } -func (f *aPIServiceExportRequestClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { +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}, - f.tweakListOptions, - ) + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) } -func (f *aPIServiceExportRequestClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.APIServiceExportRequest{}, f.defaultInformer) +func (i *aPIServiceExportRequestClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiskubebindv1alpha2.APIServiceExportRequest{}, i.defaultInformer) } -func (f *aPIServiceExportRequestClusterInformer) Lister() kubebindv1alpha2listers.APIServiceExportRequestClusterLister { - return kubebindv1alpha2listers.NewAPIServiceExportRequestClusterLister(f.Informer().GetIndexer()) +func (i *aPIServiceExportRequestClusterInformer) Lister() kubebindv1alpha2.APIServiceExportRequestClusterLister { + return kubebindv1alpha2.NewAPIServiceExportRequestClusterLister(i.Informer().GetIndexer()) } -// APIServiceExportRequestInformer provides access to a shared informer and lister for -// APIServiceExportRequests. -type APIServiceExportRequestInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2listers.APIServiceExportRequestLister +func (i *aPIServiceExportRequestClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceExportRequestInformer { + return &aPIServiceExportRequestInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } } -func (f *aPIServiceExportRequestClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceExportRequestInformer { +func (i *aPIServiceExportRequestClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceExportRequestInformer { return &aPIServiceExportRequestInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().Cluster(clusterName), + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), } } type aPIServiceExportRequestInformer struct { informer cache.SharedIndexInformer - lister kubebindv1alpha2listers.APIServiceExportRequestLister + lister kubebindv1alpha2.APIServiceExportRequestLister } -func (f *aPIServiceExportRequestInformer) Informer() cache.SharedIndexInformer { - return f.informer +func (i *aPIServiceExportRequestInformer) Informer() cache.SharedIndexInformer { + return i.informer } -func (f *aPIServiceExportRequestInformer) Lister() kubebindv1alpha2listers.APIServiceExportRequestLister { - return f.lister +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 { @@ -135,48 +137,48 @@ type aPIServiceExportRequestScopedInformer struct { namespace string } -func (f *aPIServiceExportRequestScopedInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.APIServiceExportRequest{}, f.defaultInformer) -} - -func (f *aPIServiceExportRequestScopedInformer) Lister() kubebindv1alpha2listers.APIServiceExportRequestLister { - return kubebindv1alpha2listers.NewAPIServiceExportRequestLister(f.Informer().GetIndexer()) -} - // 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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { +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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +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 metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { 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 metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha2.APIServiceExportRequest{}, + &apiskubebindv1alpha2.APIServiceExportRequest{}, resyncPeriod, indexers, ) } -func (f *aPIServiceExportRequestScopedInformer) defaultInformer(client scopedclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceExportRequestInformer(client, resyncPeriod, f.namespace, cache.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, - }, f.tweakListOptions) + }, i.tweakListOptions) } diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiservicenamespace.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiservicenamespace.go index 778662261..e0ac8776d 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiservicenamespace.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/apiservicenamespace.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,36 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha2 import ( - "context" - "time" + context "context" + time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2listers "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" + 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() kubebindv1alpha2listers.APIServiceNamespaceClusterLister + Lister() kubebindv1alpha2.APIServiceNamespaceClusterLister } type aPIServiceNamespaceClusterInformer struct { @@ -57,76 +53,82 @@ type aPIServiceNamespaceClusterInformer struct { // 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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { +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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredAPIServiceNamespaceClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceNamespaces().List(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceNamespaces().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().APIServiceNamespaces().Watch(context.TODO(), options) + return client.KubeBindV1alpha2().APIServiceNamespaces().Watch(context.Background(), options) }, }, - &kubebindv1alpha2.APIServiceNamespace{}, + &apiskubebindv1alpha2.APIServiceNamespace{}, resyncPeriod, indexers, ) } -func (f *aPIServiceNamespaceClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { +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}, - f.tweakListOptions, - ) + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) } -func (f *aPIServiceNamespaceClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.APIServiceNamespace{}, f.defaultInformer) +func (i *aPIServiceNamespaceClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiskubebindv1alpha2.APIServiceNamespace{}, i.defaultInformer) } -func (f *aPIServiceNamespaceClusterInformer) Lister() kubebindv1alpha2listers.APIServiceNamespaceClusterLister { - return kubebindv1alpha2listers.NewAPIServiceNamespaceClusterLister(f.Informer().GetIndexer()) +func (i *aPIServiceNamespaceClusterInformer) Lister() kubebindv1alpha2.APIServiceNamespaceClusterLister { + return kubebindv1alpha2.NewAPIServiceNamespaceClusterLister(i.Informer().GetIndexer()) } -// APIServiceNamespaceInformer provides access to a shared informer and lister for -// APIServiceNamespaces. -type APIServiceNamespaceInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2listers.APIServiceNamespaceLister +func (i *aPIServiceNamespaceClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceNamespaceInformer { + return &aPIServiceNamespaceInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } } -func (f *aPIServiceNamespaceClusterInformer) Cluster(clusterName logicalcluster.Name) APIServiceNamespaceInformer { +func (i *aPIServiceNamespaceClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) APIServiceNamespaceInformer { return &aPIServiceNamespaceInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().Cluster(clusterName), + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), } } type aPIServiceNamespaceInformer struct { informer cache.SharedIndexInformer - lister kubebindv1alpha2listers.APIServiceNamespaceLister + lister kubebindv1alpha2.APIServiceNamespaceLister } -func (f *aPIServiceNamespaceInformer) Informer() cache.SharedIndexInformer { - return f.informer +func (i *aPIServiceNamespaceInformer) Informer() cache.SharedIndexInformer { + return i.informer } -func (f *aPIServiceNamespaceInformer) Lister() kubebindv1alpha2listers.APIServiceNamespaceLister { - return f.lister +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 { @@ -135,48 +137,48 @@ type aPIServiceNamespaceScopedInformer struct { namespace string } -func (f *aPIServiceNamespaceScopedInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.APIServiceNamespace{}, f.defaultInformer) -} - -func (f *aPIServiceNamespaceScopedInformer) Lister() kubebindv1alpha2listers.APIServiceNamespaceLister { - return kubebindv1alpha2listers.NewAPIServiceNamespaceLister(f.Informer().GetIndexer()) -} - // 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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { +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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +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 metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { 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 metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha2.APIServiceNamespace{}, + &apiskubebindv1alpha2.APIServiceNamespace{}, resyncPeriod, indexers, ) } -func (f *aPIServiceNamespaceScopedInformer) defaultInformer(client scopedclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredAPIServiceNamespaceInformer(client, resyncPeriod, f.namespace, cache.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, - }, f.tweakListOptions) + }, i.tweakListOptions) } diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/boundapiresourceschema.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/boundapiresourceschema.go index 772cda048..0fc179cb4 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/boundapiresourceschema.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/boundapiresourceschema.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,36 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha2 import ( - "context" - "time" + context "context" + time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2listers "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" + 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() kubebindv1alpha2listers.BoundAPIResourceSchemaClusterLister + Lister() kubebindv1alpha2.BoundAPIResourceSchemaClusterLister } type boundAPIResourceSchemaClusterInformer struct { @@ -57,76 +53,82 @@ type boundAPIResourceSchemaClusterInformer struct { // 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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { +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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredBoundAPIResourceSchemaClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().BoundAPIResourceSchemas().List(context.TODO(), options) + return client.KubeBindV1alpha2().BoundAPIResourceSchemas().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().BoundAPIResourceSchemas().Watch(context.TODO(), options) + return client.KubeBindV1alpha2().BoundAPIResourceSchemas().Watch(context.Background(), options) }, }, - &kubebindv1alpha2.BoundAPIResourceSchema{}, + &apiskubebindv1alpha2.BoundAPIResourceSchema{}, resyncPeriod, indexers, ) } -func (f *boundAPIResourceSchemaClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { +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}, - f.tweakListOptions, - ) + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) } -func (f *boundAPIResourceSchemaClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.BoundAPIResourceSchema{}, f.defaultInformer) +func (i *boundAPIResourceSchemaClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiskubebindv1alpha2.BoundAPIResourceSchema{}, i.defaultInformer) } -func (f *boundAPIResourceSchemaClusterInformer) Lister() kubebindv1alpha2listers.BoundAPIResourceSchemaClusterLister { - return kubebindv1alpha2listers.NewBoundAPIResourceSchemaClusterLister(f.Informer().GetIndexer()) +func (i *boundAPIResourceSchemaClusterInformer) Lister() kubebindv1alpha2.BoundAPIResourceSchemaClusterLister { + return kubebindv1alpha2.NewBoundAPIResourceSchemaClusterLister(i.Informer().GetIndexer()) } -// BoundAPIResourceSchemaInformer provides access to a shared informer and lister for -// BoundAPIResourceSchemas. -type BoundAPIResourceSchemaInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2listers.BoundAPIResourceSchemaLister +func (i *boundAPIResourceSchemaClusterInformer) Cluster(clusterName logicalcluster.Name) BoundAPIResourceSchemaInformer { + return &boundAPIResourceSchemaInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } } -func (f *boundAPIResourceSchemaClusterInformer) Cluster(clusterName logicalcluster.Name) BoundAPIResourceSchemaInformer { +func (i *boundAPIResourceSchemaClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) BoundAPIResourceSchemaInformer { return &boundAPIResourceSchemaInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().Cluster(clusterName), + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), } } type boundAPIResourceSchemaInformer struct { informer cache.SharedIndexInformer - lister kubebindv1alpha2listers.BoundAPIResourceSchemaLister + lister kubebindv1alpha2.BoundAPIResourceSchemaLister } -func (f *boundAPIResourceSchemaInformer) Informer() cache.SharedIndexInformer { - return f.informer +func (i *boundAPIResourceSchemaInformer) Informer() cache.SharedIndexInformer { + return i.informer } -func (f *boundAPIResourceSchemaInformer) Lister() kubebindv1alpha2listers.BoundAPIResourceSchemaLister { - return f.lister +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 { @@ -135,48 +137,48 @@ type boundAPIResourceSchemaScopedInformer struct { namespace string } -func (f *boundAPIResourceSchemaScopedInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.BoundAPIResourceSchema{}, f.defaultInformer) -} - -func (f *boundAPIResourceSchemaScopedInformer) Lister() kubebindv1alpha2listers.BoundAPIResourceSchemaLister { - return kubebindv1alpha2listers.NewBoundAPIResourceSchemaLister(f.Informer().GetIndexer()) -} - // 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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { +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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +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 metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { 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 metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha2.BoundAPIResourceSchema{}, + &apiskubebindv1alpha2.BoundAPIResourceSchema{}, resyncPeriod, indexers, ) } -func (f *boundAPIResourceSchemaScopedInformer) defaultInformer(client scopedclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredBoundAPIResourceSchemaInformer(client, resyncPeriod, f.namespace, cache.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, - }, f.tweakListOptions) + }, i.tweakListOptions) } diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/clusterbinding.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/clusterbinding.go index 3ff1bb1e0..1dea73adf 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/clusterbinding.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/clusterbinding.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,36 +14,35 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha2 import ( - "context" - "time" + context "context" + time "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - "github.com/kcp-dev/logicalcluster/v3" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/tools/cache" - - kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" - scopedclientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned" - clientset "github.com/kube-bind/kube-bind/sdk/kcp/clientset/versioned/cluster" - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" - kubebindv1alpha2listers "github.com/kube-bind/kube-bind/sdk/kcp/listers/kubebind/v1alpha2" + 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() kubebindv1alpha2listers.ClusterBindingClusterLister + Lister() kubebindv1alpha2.ClusterBindingClusterLister } type clusterBindingClusterInformer struct { @@ -57,76 +53,82 @@ type clusterBindingClusterInformer struct { // 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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { +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 clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredClusterBindingClusterInformer(client versioned.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().ClusterBindings().List(context.TODO(), options) + return client.KubeBindV1alpha2().ClusterBindings().List(context.Background(), options) }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.KubeBindV1alpha2().ClusterBindings().Watch(context.TODO(), options) + return client.KubeBindV1alpha2().ClusterBindings().Watch(context.Background(), options) }, }, - &kubebindv1alpha2.ClusterBinding{}, + &apiskubebindv1alpha2.ClusterBinding{}, resyncPeriod, indexers, ) } -func (f *clusterBindingClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { +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}, - f.tweakListOptions, - ) + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) } -func (f *clusterBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.ClusterBinding{}, f.defaultInformer) +func (i *clusterBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiskubebindv1alpha2.ClusterBinding{}, i.defaultInformer) } -func (f *clusterBindingClusterInformer) Lister() kubebindv1alpha2listers.ClusterBindingClusterLister { - return kubebindv1alpha2listers.NewClusterBindingClusterLister(f.Informer().GetIndexer()) +func (i *clusterBindingClusterInformer) Lister() kubebindv1alpha2.ClusterBindingClusterLister { + return kubebindv1alpha2.NewClusterBindingClusterLister(i.Informer().GetIndexer()) } -// ClusterBindingInformer provides access to a shared informer and lister for -// ClusterBindings. -type ClusterBindingInformer interface { - Informer() cache.SharedIndexInformer - Lister() kubebindv1alpha2listers.ClusterBindingLister +func (i *clusterBindingClusterInformer) Cluster(clusterName logicalcluster.Name) ClusterBindingInformer { + return &clusterBindingInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } } -func (f *clusterBindingClusterInformer) Cluster(clusterName logicalcluster.Name) ClusterBindingInformer { +func (i *clusterBindingClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) ClusterBindingInformer { return &clusterBindingInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().Cluster(clusterName), + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), } } type clusterBindingInformer struct { informer cache.SharedIndexInformer - lister kubebindv1alpha2listers.ClusterBindingLister + lister kubebindv1alpha2.ClusterBindingLister } -func (f *clusterBindingInformer) Informer() cache.SharedIndexInformer { - return f.informer +func (i *clusterBindingInformer) Informer() cache.SharedIndexInformer { + return i.informer } -func (f *clusterBindingInformer) Lister() kubebindv1alpha2listers.ClusterBindingLister { - return f.lister +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 { @@ -135,48 +137,48 @@ type clusterBindingScopedInformer struct { namespace string } -func (f *clusterBindingScopedInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&kubebindv1alpha2.ClusterBinding{}, f.defaultInformer) -} - -func (f *clusterBindingScopedInformer) Lister() kubebindv1alpha2listers.ClusterBindingLister { - return kubebindv1alpha2listers.NewClusterBindingLister(f.Informer().GetIndexer()) -} - // 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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers) cache.SharedIndexInformer { +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 scopedclientset.Interface, resyncPeriod time.Duration, namespace string, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +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 metav1.ListOptions) (runtime.Object, error) { + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { 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 metav1.ListOptions) (watch.Interface, error) { + 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) }, }, - &kubebindv1alpha2.ClusterBinding{}, + &apiskubebindv1alpha2.ClusterBinding{}, resyncPeriod, indexers, ) } -func (f *clusterBindingScopedInformer) defaultInformer(client scopedclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredClusterBindingInformer(client, resyncPeriod, f.namespace, cache.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, - }, f.tweakListOptions) + }, i.tweakListOptions) } diff --git a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/interface.go b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/interface.go index 789830fbd..4889f4d1f 100644 --- a/sdk/kcp/informers/externalversions/kubebind/v1alpha2/interface.go +++ b/sdk/kcp/informers/externalversions/kubebind/v1alpha2/interface.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,28 +14,28 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-informer-gen. DO NOT EDIT. package v1alpha2 import ( - "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" + internalinterfaces "github.com/kube-bind/kube-bind/sdk/kcp/informers/externalversions/internalinterfaces" ) type ClusterInterface interface { - // APIResourceSchemas returns a APIResourceSchemaClusterInformer + // APIResourceSchemas returns a APIResourceSchemaClusterInformer. APIResourceSchemas() APIResourceSchemaClusterInformer - // APIServiceBindings returns a APIServiceBindingClusterInformer + // APIServiceBindings returns a APIServiceBindingClusterInformer. APIServiceBindings() APIServiceBindingClusterInformer - // APIServiceExports returns a APIServiceExportClusterInformer + // APIServiceExports returns a APIServiceExportClusterInformer. APIServiceExports() APIServiceExportClusterInformer - // APIServiceExportRequests returns a APIServiceExportRequestClusterInformer + // APIServiceExportRequests returns a APIServiceExportRequestClusterInformer. APIServiceExportRequests() APIServiceExportRequestClusterInformer - // APIServiceNamespaces returns a APIServiceNamespaceClusterInformer + // APIServiceNamespaces returns a APIServiceNamespaceClusterInformer. APIServiceNamespaces() APIServiceNamespaceClusterInformer - // BoundAPIResourceSchemas returns a BoundAPIResourceSchemaClusterInformer + // BoundAPIResourceSchemas returns a BoundAPIResourceSchemaClusterInformer. BoundAPIResourceSchemas() BoundAPIResourceSchemaClusterInformer - // ClusterBindings returns a ClusterBindingClusterInformer + // ClusterBindings returns a ClusterBindingClusterInformer. ClusterBindings() ClusterBindingClusterInformer } @@ -47,60 +44,60 @@ type version struct { tweakListOptions internalinterfaces.TweakListOptionsFunc } -// New returns a new ClusterInterface. +// New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, tweakListOptions internalinterfaces.TweakListOptionsFunc) ClusterInterface { return &version{factory: f, tweakListOptions: tweakListOptions} } -// APIResourceSchemas returns a APIResourceSchemaClusterInformer +// APIResourceSchemas returns a APIResourceSchemaClusterInformer. func (v *version) APIResourceSchemas() APIResourceSchemaClusterInformer { return &aPIResourceSchemaClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// APIServiceBindings returns a APIServiceBindingClusterInformer +// APIServiceBindings returns a APIServiceBindingClusterInformer. func (v *version) APIServiceBindings() APIServiceBindingClusterInformer { return &aPIServiceBindingClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// APIServiceExports returns a APIServiceExportClusterInformer +// APIServiceExports returns a APIServiceExportClusterInformer. func (v *version) APIServiceExports() APIServiceExportClusterInformer { return &aPIServiceExportClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// APIServiceExportRequests returns a APIServiceExportRequestClusterInformer +// APIServiceExportRequests returns a APIServiceExportRequestClusterInformer. func (v *version) APIServiceExportRequests() APIServiceExportRequestClusterInformer { return &aPIServiceExportRequestClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// APIServiceNamespaces returns a APIServiceNamespaceClusterInformer +// APIServiceNamespaces returns a APIServiceNamespaceClusterInformer. func (v *version) APIServiceNamespaces() APIServiceNamespaceClusterInformer { return &aPIServiceNamespaceClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// BoundAPIResourceSchemas returns a BoundAPIResourceSchemaClusterInformer +// BoundAPIResourceSchemas returns a BoundAPIResourceSchemaClusterInformer. func (v *version) BoundAPIResourceSchemas() BoundAPIResourceSchemaClusterInformer { return &boundAPIResourceSchemaClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// ClusterBindings returns a ClusterBindingClusterInformer +// 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 returns a APIResourceSchemaInformer. APIResourceSchemas() APIResourceSchemaInformer - // APIServiceBindings returns a APIServiceBindingInformer + // APIServiceBindings returns a APIServiceBindingInformer. APIServiceBindings() APIServiceBindingInformer - // APIServiceExports returns a APIServiceExportInformer + // APIServiceExports returns a APIServiceExportInformer. APIServiceExports() APIServiceExportInformer - // APIServiceExportRequests returns a APIServiceExportRequestInformer + // APIServiceExportRequests returns a APIServiceExportRequestInformer. APIServiceExportRequests() APIServiceExportRequestInformer - // APIServiceNamespaces returns a APIServiceNamespaceInformer + // APIServiceNamespaces returns a APIServiceNamespaceInformer. APIServiceNamespaces() APIServiceNamespaceInformer - // BoundAPIResourceSchemas returns a BoundAPIResourceSchemaInformer + // BoundAPIResourceSchemas returns a BoundAPIResourceSchemaInformer. BoundAPIResourceSchemas() BoundAPIResourceSchemaInformer - // ClusterBindings returns a ClusterBindingInformer + // ClusterBindings returns a ClusterBindingInformer. ClusterBindings() ClusterBindingInformer } @@ -110,42 +107,42 @@ type scopedVersion struct { namespace string } -// New returns a new ClusterInterface. +// New returns a new Interface. func NewScoped(f internalinterfaces.SharedScopedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &scopedVersion{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} + return &scopedVersion{factory: f, tweakListOptions: tweakListOptions} } -// APIResourceSchemas returns a APIResourceSchemaInformer +// APIResourceSchemas returns a APIResourceSchemaInformer. func (v *scopedVersion) APIResourceSchemas() APIResourceSchemaInformer { return &aPIResourceSchemaScopedInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// APIServiceBindings returns a APIServiceBindingInformer +// APIServiceBindings returns a APIServiceBindingInformer. func (v *scopedVersion) APIServiceBindings() APIServiceBindingInformer { return &aPIServiceBindingScopedInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } -// APIServiceExports returns a APIServiceExportInformer +// APIServiceExports returns a APIServiceExportInformer. func (v *scopedVersion) APIServiceExports() APIServiceExportInformer { return &aPIServiceExportScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } -// APIServiceExportRequests returns a APIServiceExportRequestInformer +// APIServiceExportRequests returns a APIServiceExportRequestInformer. func (v *scopedVersion) APIServiceExportRequests() APIServiceExportRequestInformer { return &aPIServiceExportRequestScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } -// APIServiceNamespaces returns a APIServiceNamespaceInformer +// APIServiceNamespaces returns a APIServiceNamespaceInformer. func (v *scopedVersion) APIServiceNamespaces() APIServiceNamespaceInformer { return &aPIServiceNamespaceScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } -// BoundAPIResourceSchemas returns a BoundAPIResourceSchemaInformer +// BoundAPIResourceSchemas returns a BoundAPIResourceSchemaInformer. func (v *scopedVersion) BoundAPIResourceSchemas() BoundAPIResourceSchemaInformer { return &boundAPIResourceSchemaScopedInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } -// ClusterBindings returns a ClusterBindingInformer +// 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 index 559841d8b..561a8d05e 100644 --- a/sdk/kcp/listers/kubebind/v1alpha1/apiservicebinding.go +++ b/sdk/kcp/listers/kubebind/v1alpha1/apiservicebinding.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,22 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-lister-gen. DO NOT EDIT. package v1alpha1 import ( - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" ) -// APIServiceBindingClusterLister can list APIServiceBindings across all workspaces, or scope down to a APIServiceBindingLister for one workspace. +// 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. @@ -43,36 +39,43 @@ type APIServiceBindingClusterLister interface { APIServiceBindingClusterListerExpansion } +// aPIServiceBindingClusterLister implements the APIServiceBindingClusterLister interface. type aPIServiceBindingClusterLister struct { - indexer cache.Indexer + 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{indexer: indexer} +func NewAPIServiceBindingClusterLister(indexer cache.Indexer) APIServiceBindingClusterLister { + return &aPIServiceBindingClusterLister{ + kcplisters.NewCluster[*kubebindv1alpha1.APIServiceBinding](indexer, kubebindv1alpha1.Resource("apiservicebinding")), + } } -// List lists all APIServiceBindings in the indexer across all workspaces. -func (s *aPIServiceBindingClusterLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceBinding, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*kubebindv1alpha1.APIServiceBinding)) - }) - return ret, err +// 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), + } } -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceBindings. -func (s *aPIServiceBindingClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceBindingLister { - return &aPIServiceBindingLister{indexer: s.indexer, clusterName: 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 workspace. + // 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. @@ -81,63 +84,19 @@ type APIServiceBindingLister interface { APIServiceBindingListerExpansion } -// aPIServiceBindingLister can list all APIServiceBindings inside a workspace. -type aPIServiceBindingLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name -} - -// List lists all APIServiceBindings in the indexer for a workspace. -func (s *aPIServiceBindingLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceBinding, err error) { - err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceBinding)) - }) - return ret, err -} - -// Get retrieves the APIServiceBinding from the indexer for a given workspace and name. -func (s *aPIServiceBindingLister) Get(name string) (*kubebindv1alpha1.APIServiceBinding, error) { - key := kcpcache.ToClusterAwareKey(s.clusterName.String(), "", name) - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha1.Resource("apiservicebindings"), name) - } - return obj.(*kubebindv1alpha1.APIServiceBinding), nil -} - // NewAPIServiceBindingLister returns a new APIServiceBindingLister. // We assume that the indexer: -// - is fed by a workspace-scoped LIST+WATCH -// - uses cache.MetaNamespaceKeyFunc as the key function -func NewAPIServiceBindingLister(indexer cache.Indexer) *aPIServiceBindingScopedLister { - return &aPIServiceBindingScopedLister{indexer: 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. +// aPIServiceBindingScopedLister can list all APIServiceBindings inside a workspace +// or scope down to a APIServiceBindingNamespaceLister. type aPIServiceBindingScopedLister struct { - indexer cache.Indexer -} - -// List lists all APIServiceBindings in the indexer for a workspace. -func (s *aPIServiceBindingScopedLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceBinding, err error) { - err = cache.ListAll(s.indexer, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceBinding)) - }) - return ret, err -} - -// Get retrieves the APIServiceBinding from the indexer for a given workspace and name. -func (s *aPIServiceBindingScopedLister) Get(name string) (*kubebindv1alpha1.APIServiceBinding, error) { - key := name - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha1.Resource("apiservicebindings"), name) - } - return obj.(*kubebindv1alpha1.APIServiceBinding), nil + kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceBinding] } diff --git a/sdk/kcp/listers/kubebind/v1alpha1/apiservicebinding_expansion.go b/sdk/kcp/listers/kubebind/v1alpha1/apiservicebinding_expansion.go deleted file mode 100644 index de79d8523..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha1/apiservicebinding_expansion.go +++ /dev/null @@ -1,28 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha1 - -// APIServiceBindingClusterListerExpansion allows custom methods to be added to APIServiceBindingClusterLister. -type APIServiceBindingClusterListerExpansion any - -// APIServiceBindingListerExpansion allows custom methods to be added to APIServiceBindingLister. -type APIServiceBindingListerExpansion any diff --git a/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexport.go b/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexport.go index 503562a35..a691ea880 100644 --- a/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexport.go +++ b/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexport.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,22 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-lister-gen. DO NOT EDIT. package v1alpha1 import ( - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" ) -// APIServiceExportClusterLister can list APIServiceExports across all workspaces, or scope down to a APIServiceExportLister for one workspace. +// 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. @@ -43,37 +39,44 @@ type APIServiceExportClusterLister interface { APIServiceExportClusterListerExpansion } +// aPIServiceExportClusterLister implements the APIServiceExportClusterLister interface. type aPIServiceExportClusterLister struct { - indexer cache.Indexer + 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{indexer: indexer} +func NewAPIServiceExportClusterLister(indexer cache.Indexer) APIServiceExportClusterLister { + return &aPIServiceExportClusterLister{ + kcplisters.NewCluster[*kubebindv1alpha1.APIServiceExport](indexer, kubebindv1alpha1.Resource("apiserviceexport")), + } } -// List lists all APIServiceExports in the indexer across all workspaces. -func (s *aPIServiceExportClusterLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExport, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*kubebindv1alpha1.APIServiceExport)) - }) - return ret, err +// 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), + } } -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceExports. -func (s *aPIServiceExportClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceExportLister { - return &aPIServiceExportLister{indexer: s.indexer, clusterName: 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 workspace. + // 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. @@ -81,29 +84,25 @@ type APIServiceExportLister interface { APIServiceExportListerExpansion } -// aPIServiceExportLister can list all APIServiceExports inside a workspace or scope down to a APIServiceExportLister for one namespace. -type aPIServiceExportLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name +// 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), + } } -// List lists all APIServiceExports in the indexer for a workspace. -func (s *aPIServiceExportLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExport, err error) { - err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceExport)) - }) - return ret, err +// aPIServiceExportNamespaceLister implements the APIServiceExportNamespaceLister +// interface. +type aPIServiceExportNamespaceLister struct { + kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceExport] } -// APIServiceExports returns an object that can list and get APIServiceExports in one namespace. -func (s *aPIServiceExportLister) APIServiceExports(namespace string) APIServiceExportNamespaceLister { - return &aPIServiceExportNamespaceLister{indexer: s.indexer, clusterName: s.clusterName, namespace: namespace} -} +var _ APIServiceExportNamespaceLister = new(aPIServiceExportNamespaceLister) -// aPIServiceExportNamespaceLister helps list and get APIServiceExports. +// 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 workspace and namespace. + // 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. @@ -112,85 +111,27 @@ type APIServiceExportNamespaceLister interface { APIServiceExportNamespaceListerExpansion } -// aPIServiceExportNamespaceLister helps list and get APIServiceExports. -// All objects returned here must be treated as read-only. -type aPIServiceExportNamespaceLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name - namespace string -} - -// List lists all APIServiceExports in the indexer for a given workspace and namespace. -func (s *aPIServiceExportNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExport, err error) { - err = kcpcache.ListAllByClusterAndNamespace(s.indexer, s.clusterName, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceExport)) - }) - return ret, err -} - -// Get retrieves the APIServiceExport from the indexer for a given workspace, namespace and name. -func (s *aPIServiceExportNamespaceLister) Get(name string) (*kubebindv1alpha1.APIServiceExport, error) { - key := kcpcache.ToClusterAwareKey(s.clusterName.String(), s.namespace, name) - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha1.Resource("apiserviceexports"), name) - } - return obj.(*kubebindv1alpha1.APIServiceExport), nil -} - // NewAPIServiceExportLister returns a new APIServiceExportLister. // We assume that the indexer: -// - is fed by a workspace-scoped LIST+WATCH -// - uses cache.MetaNamespaceKeyFunc as the key function -// - has the cache.NamespaceIndex as an index -func NewAPIServiceExportLister(indexer cache.Indexer) *aPIServiceExportScopedLister { - return &aPIServiceExportScopedLister{indexer: 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 APIServiceExportLister for one namespace. +// aPIServiceExportScopedLister can list all APIServiceExports inside a workspace +// or scope down to a APIServiceExportNamespaceLister for one namespace. type aPIServiceExportScopedLister struct { - indexer cache.Indexer -} - -// List lists all APIServiceExports in the indexer for a workspace. -func (s *aPIServiceExportScopedLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExport, err error) { - err = cache.ListAll(s.indexer, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceExport)) - }) - return ret, err + kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceExport] } // APIServiceExports returns an object that can list and get APIServiceExports in one namespace. -func (s *aPIServiceExportScopedLister) APIServiceExports(namespace string) APIServiceExportNamespaceLister { - return &aPIServiceExportScopedNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// aPIServiceExportScopedNamespaceLister helps list and get APIServiceExports. -type aPIServiceExportScopedNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all APIServiceExports in the indexer for a given workspace and namespace. -func (s *aPIServiceExportScopedNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExport, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceExport)) - }) - return ret, err -} - -// Get retrieves the APIServiceExport from the indexer for a given workspace, namespace and name. -func (s *aPIServiceExportScopedNamespaceLister) Get(name string) (*kubebindv1alpha1.APIServiceExport, error) { - key := s.namespace + "/" + name - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha1.Resource("apiserviceexports"), name) +func (l *aPIServiceExportScopedLister) APIServiceExports(namespace string) APIServiceExportLister { + return &aPIServiceExportLister{ + l.ResourceIndexer.WithNamespace(namespace), } - return obj.(*kubebindv1alpha1.APIServiceExport), nil } diff --git a/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexport_expansion.go b/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexport_expansion.go deleted file mode 100644 index f0e10323c..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexport_expansion.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha1 - -// APIServiceExportClusterListerExpansion allows custom methods to be added to APIServiceExportClusterLister. -type APIServiceExportClusterListerExpansion any - -// APIServiceExportListerExpansion allows custom methods to be added to APIServiceExportLister. -type APIServiceExportListerExpansion any - -// APIServiceExportNamespaceListerExpansion allows custom methods to be added to APIServiceExportNamespaceLister. -type APIServiceExportNamespaceListerExpansion any diff --git a/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexportrequest.go b/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexportrequest.go index 236eded7b..e79d8ed6a 100644 --- a/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexportrequest.go +++ b/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexportrequest.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,22 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-lister-gen. DO NOT EDIT. package v1alpha1 import ( - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" ) -// APIServiceExportRequestClusterLister can list APIServiceExportRequests across all workspaces, or scope down to a APIServiceExportRequestLister for one workspace. +// 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. @@ -43,37 +39,44 @@ type APIServiceExportRequestClusterLister interface { APIServiceExportRequestClusterListerExpansion } +// aPIServiceExportRequestClusterLister implements the APIServiceExportRequestClusterLister interface. type aPIServiceExportRequestClusterLister struct { - indexer cache.Indexer + 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{indexer: indexer} +func NewAPIServiceExportRequestClusterLister(indexer cache.Indexer) APIServiceExportRequestClusterLister { + return &aPIServiceExportRequestClusterLister{ + kcplisters.NewCluster[*kubebindv1alpha1.APIServiceExportRequest](indexer, kubebindv1alpha1.Resource("apiserviceexportrequest")), + } } -// List lists all APIServiceExportRequests in the indexer across all workspaces. -func (s *aPIServiceExportRequestClusterLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExportRequest, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*kubebindv1alpha1.APIServiceExportRequest)) - }) - return ret, err +// 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), + } } -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceExportRequests. -func (s *aPIServiceExportRequestClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceExportRequestLister { - return &aPIServiceExportRequestLister{indexer: s.indexer, clusterName: 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 workspace. + // 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. @@ -81,29 +84,25 @@ type APIServiceExportRequestLister interface { APIServiceExportRequestListerExpansion } -// aPIServiceExportRequestLister can list all APIServiceExportRequests inside a workspace or scope down to a APIServiceExportRequestLister for one namespace. -type aPIServiceExportRequestLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name +// 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), + } } -// List lists all APIServiceExportRequests in the indexer for a workspace. -func (s *aPIServiceExportRequestLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExportRequest, err error) { - err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceExportRequest)) - }) - return ret, err +// aPIServiceExportRequestNamespaceLister implements the APIServiceExportRequestNamespaceLister +// interface. +type aPIServiceExportRequestNamespaceLister struct { + kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceExportRequest] } -// APIServiceExportRequests returns an object that can list and get APIServiceExportRequests in one namespace. -func (s *aPIServiceExportRequestLister) APIServiceExportRequests(namespace string) APIServiceExportRequestNamespaceLister { - return &aPIServiceExportRequestNamespaceLister{indexer: s.indexer, clusterName: s.clusterName, namespace: namespace} -} +var _ APIServiceExportRequestNamespaceLister = new(aPIServiceExportRequestNamespaceLister) -// aPIServiceExportRequestNamespaceLister helps list and get APIServiceExportRequests. +// 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 workspace and namespace. + // 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. @@ -112,85 +111,27 @@ type APIServiceExportRequestNamespaceLister interface { APIServiceExportRequestNamespaceListerExpansion } -// aPIServiceExportRequestNamespaceLister helps list and get APIServiceExportRequests. -// All objects returned here must be treated as read-only. -type aPIServiceExportRequestNamespaceLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name - namespace string -} - -// List lists all APIServiceExportRequests in the indexer for a given workspace and namespace. -func (s *aPIServiceExportRequestNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExportRequest, err error) { - err = kcpcache.ListAllByClusterAndNamespace(s.indexer, s.clusterName, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceExportRequest)) - }) - return ret, err -} - -// Get retrieves the APIServiceExportRequest from the indexer for a given workspace, namespace and name. -func (s *aPIServiceExportRequestNamespaceLister) Get(name string) (*kubebindv1alpha1.APIServiceExportRequest, error) { - key := kcpcache.ToClusterAwareKey(s.clusterName.String(), s.namespace, name) - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha1.Resource("apiserviceexportrequests"), name) - } - return obj.(*kubebindv1alpha1.APIServiceExportRequest), nil -} - // NewAPIServiceExportRequestLister returns a new APIServiceExportRequestLister. // We assume that the indexer: -// - is fed by a workspace-scoped LIST+WATCH -// - uses cache.MetaNamespaceKeyFunc as the key function -// - has the cache.NamespaceIndex as an index -func NewAPIServiceExportRequestLister(indexer cache.Indexer) *aPIServiceExportRequestScopedLister { - return &aPIServiceExportRequestScopedLister{indexer: 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 APIServiceExportRequestLister for one namespace. +// aPIServiceExportRequestScopedLister can list all APIServiceExportRequests inside a workspace +// or scope down to a APIServiceExportRequestNamespaceLister for one namespace. type aPIServiceExportRequestScopedLister struct { - indexer cache.Indexer -} - -// List lists all APIServiceExportRequests in the indexer for a workspace. -func (s *aPIServiceExportRequestScopedLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExportRequest, err error) { - err = cache.ListAll(s.indexer, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceExportRequest)) - }) - return ret, err + kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceExportRequest] } // APIServiceExportRequests returns an object that can list and get APIServiceExportRequests in one namespace. -func (s *aPIServiceExportRequestScopedLister) APIServiceExportRequests(namespace string) APIServiceExportRequestNamespaceLister { - return &aPIServiceExportRequestScopedNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// aPIServiceExportRequestScopedNamespaceLister helps list and get APIServiceExportRequests. -type aPIServiceExportRequestScopedNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all APIServiceExportRequests in the indexer for a given workspace and namespace. -func (s *aPIServiceExportRequestScopedNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceExportRequest, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceExportRequest)) - }) - return ret, err -} - -// Get retrieves the APIServiceExportRequest from the indexer for a given workspace, namespace and name. -func (s *aPIServiceExportRequestScopedNamespaceLister) Get(name string) (*kubebindv1alpha1.APIServiceExportRequest, error) { - key := s.namespace + "/" + name - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha1.Resource("apiserviceexportrequests"), name) +func (l *aPIServiceExportRequestScopedLister) APIServiceExportRequests(namespace string) APIServiceExportRequestLister { + return &aPIServiceExportRequestLister{ + l.ResourceIndexer.WithNamespace(namespace), } - return obj.(*kubebindv1alpha1.APIServiceExportRequest), nil } diff --git a/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexportrequest_expansion.go b/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexportrequest_expansion.go deleted file mode 100644 index 2116affb2..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha1/apiserviceexportrequest_expansion.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha1 - -// APIServiceExportRequestClusterListerExpansion allows custom methods to be added to APIServiceExportRequestClusterLister. -type APIServiceExportRequestClusterListerExpansion any - -// APIServiceExportRequestListerExpansion allows custom methods to be added to APIServiceExportRequestLister. -type APIServiceExportRequestListerExpansion any - -// APIServiceExportRequestNamespaceListerExpansion allows custom methods to be added to APIServiceExportRequestNamespaceLister. -type APIServiceExportRequestNamespaceListerExpansion any diff --git a/sdk/kcp/listers/kubebind/v1alpha1/apiservicenamespace.go b/sdk/kcp/listers/kubebind/v1alpha1/apiservicenamespace.go index bff3aa7f3..319fa8bda 100644 --- a/sdk/kcp/listers/kubebind/v1alpha1/apiservicenamespace.go +++ b/sdk/kcp/listers/kubebind/v1alpha1/apiservicenamespace.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,22 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-lister-gen. DO NOT EDIT. package v1alpha1 import ( - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" ) -// APIServiceNamespaceClusterLister can list APIServiceNamespaces across all workspaces, or scope down to a APIServiceNamespaceLister for one workspace. +// 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. @@ -43,37 +39,44 @@ type APIServiceNamespaceClusterLister interface { APIServiceNamespaceClusterListerExpansion } +// aPIServiceNamespaceClusterLister implements the APIServiceNamespaceClusterLister interface. type aPIServiceNamespaceClusterLister struct { - indexer cache.Indexer + 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{indexer: indexer} +func NewAPIServiceNamespaceClusterLister(indexer cache.Indexer) APIServiceNamespaceClusterLister { + return &aPIServiceNamespaceClusterLister{ + kcplisters.NewCluster[*kubebindv1alpha1.APIServiceNamespace](indexer, kubebindv1alpha1.Resource("apiservicenamespace")), + } } -// List lists all APIServiceNamespaces in the indexer across all workspaces. -func (s *aPIServiceNamespaceClusterLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceNamespace, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*kubebindv1alpha1.APIServiceNamespace)) - }) - return ret, err +// 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), + } } -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceNamespaces. -func (s *aPIServiceNamespaceClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceNamespaceLister { - return &aPIServiceNamespaceLister{indexer: s.indexer, clusterName: 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 workspace. + // 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. @@ -81,29 +84,25 @@ type APIServiceNamespaceLister interface { APIServiceNamespaceListerExpansion } -// aPIServiceNamespaceLister can list all APIServiceNamespaces inside a workspace or scope down to a APIServiceNamespaceLister for one namespace. -type aPIServiceNamespaceLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name +// 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), + } } -// List lists all APIServiceNamespaces in the indexer for a workspace. -func (s *aPIServiceNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceNamespace, err error) { - err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceNamespace)) - }) - return ret, err +// aPIServiceNamespaceNamespaceLister implements the APIServiceNamespaceNamespaceLister +// interface. +type aPIServiceNamespaceNamespaceLister struct { + kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceNamespace] } -// APIServiceNamespaces returns an object that can list and get APIServiceNamespaces in one namespace. -func (s *aPIServiceNamespaceLister) APIServiceNamespaces(namespace string) APIServiceNamespaceNamespaceLister { - return &aPIServiceNamespaceNamespaceLister{indexer: s.indexer, clusterName: s.clusterName, namespace: namespace} -} +var _ APIServiceNamespaceNamespaceLister = new(aPIServiceNamespaceNamespaceLister) -// aPIServiceNamespaceNamespaceLister helps list and get APIServiceNamespaces. +// 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 workspace and namespace. + // 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. @@ -112,85 +111,27 @@ type APIServiceNamespaceNamespaceLister interface { APIServiceNamespaceNamespaceListerExpansion } -// aPIServiceNamespaceNamespaceLister helps list and get APIServiceNamespaces. -// All objects returned here must be treated as read-only. -type aPIServiceNamespaceNamespaceLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name - namespace string -} - -// List lists all APIServiceNamespaces in the indexer for a given workspace and namespace. -func (s *aPIServiceNamespaceNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceNamespace, err error) { - err = kcpcache.ListAllByClusterAndNamespace(s.indexer, s.clusterName, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceNamespace)) - }) - return ret, err -} - -// Get retrieves the APIServiceNamespace from the indexer for a given workspace, namespace and name. -func (s *aPIServiceNamespaceNamespaceLister) Get(name string) (*kubebindv1alpha1.APIServiceNamespace, error) { - key := kcpcache.ToClusterAwareKey(s.clusterName.String(), s.namespace, name) - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha1.Resource("apiservicenamespaces"), name) - } - return obj.(*kubebindv1alpha1.APIServiceNamespace), nil -} - // NewAPIServiceNamespaceLister returns a new APIServiceNamespaceLister. // We assume that the indexer: -// - is fed by a workspace-scoped LIST+WATCH -// - uses cache.MetaNamespaceKeyFunc as the key function -// - has the cache.NamespaceIndex as an index -func NewAPIServiceNamespaceLister(indexer cache.Indexer) *aPIServiceNamespaceScopedLister { - return &aPIServiceNamespaceScopedLister{indexer: 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 APIServiceNamespaceLister for one namespace. +// aPIServiceNamespaceScopedLister can list all APIServiceNamespaces inside a workspace +// or scope down to a APIServiceNamespaceNamespaceLister for one namespace. type aPIServiceNamespaceScopedLister struct { - indexer cache.Indexer -} - -// List lists all APIServiceNamespaces in the indexer for a workspace. -func (s *aPIServiceNamespaceScopedLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceNamespace, err error) { - err = cache.ListAll(s.indexer, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceNamespace)) - }) - return ret, err + kcplisters.ResourceIndexer[*kubebindv1alpha1.APIServiceNamespace] } // APIServiceNamespaces returns an object that can list and get APIServiceNamespaces in one namespace. -func (s *aPIServiceNamespaceScopedLister) APIServiceNamespaces(namespace string) APIServiceNamespaceNamespaceLister { - return &aPIServiceNamespaceScopedNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// aPIServiceNamespaceScopedNamespaceLister helps list and get APIServiceNamespaces. -type aPIServiceNamespaceScopedNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all APIServiceNamespaces in the indexer for a given workspace and namespace. -func (s *aPIServiceNamespaceScopedNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.APIServiceNamespace, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.APIServiceNamespace)) - }) - return ret, err -} - -// Get retrieves the APIServiceNamespace from the indexer for a given workspace, namespace and name. -func (s *aPIServiceNamespaceScopedNamespaceLister) Get(name string) (*kubebindv1alpha1.APIServiceNamespace, error) { - key := s.namespace + "/" + name - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha1.Resource("apiservicenamespaces"), name) +func (l *aPIServiceNamespaceScopedLister) APIServiceNamespaces(namespace string) APIServiceNamespaceLister { + return &aPIServiceNamespaceLister{ + l.ResourceIndexer.WithNamespace(namespace), } - return obj.(*kubebindv1alpha1.APIServiceNamespace), nil } diff --git a/sdk/kcp/listers/kubebind/v1alpha1/apiservicenamespace_expansion.go b/sdk/kcp/listers/kubebind/v1alpha1/apiservicenamespace_expansion.go deleted file mode 100644 index 01abe877d..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha1/apiservicenamespace_expansion.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha1 - -// APIServiceNamespaceClusterListerExpansion allows custom methods to be added to APIServiceNamespaceClusterLister. -type APIServiceNamespaceClusterListerExpansion any - -// APIServiceNamespaceListerExpansion allows custom methods to be added to APIServiceNamespaceLister. -type APIServiceNamespaceListerExpansion any - -// APIServiceNamespaceNamespaceListerExpansion allows custom methods to be added to APIServiceNamespaceNamespaceLister. -type APIServiceNamespaceNamespaceListerExpansion any diff --git a/sdk/kcp/listers/kubebind/v1alpha1/clusterbinding.go b/sdk/kcp/listers/kubebind/v1alpha1/clusterbinding.go index c04da2f3f..44ccd197d 100644 --- a/sdk/kcp/listers/kubebind/v1alpha1/clusterbinding.go +++ b/sdk/kcp/listers/kubebind/v1alpha1/clusterbinding.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,22 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-lister-gen. DO NOT EDIT. package v1alpha1 import ( - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" kubebindv1alpha1 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha1" ) -// ClusterBindingClusterLister can list ClusterBindings across all workspaces, or scope down to a ClusterBindingLister for one workspace. +// 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. @@ -43,37 +39,44 @@ type ClusterBindingClusterLister interface { ClusterBindingClusterListerExpansion } +// clusterBindingClusterLister implements the ClusterBindingClusterLister interface. type clusterBindingClusterLister struct { - indexer cache.Indexer + 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{indexer: indexer} +func NewClusterBindingClusterLister(indexer cache.Indexer) ClusterBindingClusterLister { + return &clusterBindingClusterLister{ + kcplisters.NewCluster[*kubebindv1alpha1.ClusterBinding](indexer, kubebindv1alpha1.Resource("clusterbinding")), + } } -// List lists all ClusterBindings in the indexer across all workspaces. -func (s *clusterBindingClusterLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.ClusterBinding, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*kubebindv1alpha1.ClusterBinding)) - }) - return ret, err +// 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), + } } -// Cluster scopes the lister to one workspace, allowing users to list and get ClusterBindings. -func (s *clusterBindingClusterLister) Cluster(clusterName logicalcluster.Name) ClusterBindingLister { - return &clusterBindingLister{indexer: s.indexer, clusterName: 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 workspace. + // 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. @@ -81,29 +84,25 @@ type ClusterBindingLister interface { ClusterBindingListerExpansion } -// clusterBindingLister can list all ClusterBindings inside a workspace or scope down to a ClusterBindingLister for one namespace. -type clusterBindingLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name +// 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), + } } -// List lists all ClusterBindings in the indexer for a workspace. -func (s *clusterBindingLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.ClusterBinding, err error) { - err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.ClusterBinding)) - }) - return ret, err +// clusterBindingNamespaceLister implements the ClusterBindingNamespaceLister +// interface. +type clusterBindingNamespaceLister struct { + kcplisters.ResourceIndexer[*kubebindv1alpha1.ClusterBinding] } -// ClusterBindings returns an object that can list and get ClusterBindings in one namespace. -func (s *clusterBindingLister) ClusterBindings(namespace string) ClusterBindingNamespaceLister { - return &clusterBindingNamespaceLister{indexer: s.indexer, clusterName: s.clusterName, namespace: namespace} -} +var _ ClusterBindingNamespaceLister = new(clusterBindingNamespaceLister) -// clusterBindingNamespaceLister helps list and get ClusterBindings. +// 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 workspace and namespace. + // 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. @@ -112,85 +111,27 @@ type ClusterBindingNamespaceLister interface { ClusterBindingNamespaceListerExpansion } -// clusterBindingNamespaceLister helps list and get ClusterBindings. -// All objects returned here must be treated as read-only. -type clusterBindingNamespaceLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name - namespace string -} - -// List lists all ClusterBindings in the indexer for a given workspace and namespace. -func (s *clusterBindingNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.ClusterBinding, err error) { - err = kcpcache.ListAllByClusterAndNamespace(s.indexer, s.clusterName, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.ClusterBinding)) - }) - return ret, err -} - -// Get retrieves the ClusterBinding from the indexer for a given workspace, namespace and name. -func (s *clusterBindingNamespaceLister) Get(name string) (*kubebindv1alpha1.ClusterBinding, error) { - key := kcpcache.ToClusterAwareKey(s.clusterName.String(), s.namespace, name) - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha1.Resource("clusterbindings"), name) - } - return obj.(*kubebindv1alpha1.ClusterBinding), nil -} - // NewClusterBindingLister returns a new ClusterBindingLister. // We assume that the indexer: -// - is fed by a workspace-scoped LIST+WATCH -// - uses cache.MetaNamespaceKeyFunc as the key function -// - has the cache.NamespaceIndex as an index -func NewClusterBindingLister(indexer cache.Indexer) *clusterBindingScopedLister { - return &clusterBindingScopedLister{indexer: 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 ClusterBindingLister for one namespace. +// clusterBindingScopedLister can list all ClusterBindings inside a workspace +// or scope down to a ClusterBindingNamespaceLister for one namespace. type clusterBindingScopedLister struct { - indexer cache.Indexer -} - -// List lists all ClusterBindings in the indexer for a workspace. -func (s *clusterBindingScopedLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.ClusterBinding, err error) { - err = cache.ListAll(s.indexer, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.ClusterBinding)) - }) - return ret, err + kcplisters.ResourceIndexer[*kubebindv1alpha1.ClusterBinding] } // ClusterBindings returns an object that can list and get ClusterBindings in one namespace. -func (s *clusterBindingScopedLister) ClusterBindings(namespace string) ClusterBindingNamespaceLister { - return &clusterBindingScopedNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// clusterBindingScopedNamespaceLister helps list and get ClusterBindings. -type clusterBindingScopedNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all ClusterBindings in the indexer for a given workspace and namespace. -func (s *clusterBindingScopedNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha1.ClusterBinding, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha1.ClusterBinding)) - }) - return ret, err -} - -// Get retrieves the ClusterBinding from the indexer for a given workspace, namespace and name. -func (s *clusterBindingScopedNamespaceLister) Get(name string) (*kubebindv1alpha1.ClusterBinding, error) { - key := s.namespace + "/" + name - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha1.Resource("clusterbindings"), name) +func (l *clusterBindingScopedLister) ClusterBindings(namespace string) ClusterBindingLister { + return &clusterBindingLister{ + l.ResourceIndexer.WithNamespace(namespace), } - return obj.(*kubebindv1alpha1.ClusterBinding), nil } diff --git a/sdk/kcp/listers/kubebind/v1alpha1/clusterbinding_expansion.go b/sdk/kcp/listers/kubebind/v1alpha1/clusterbinding_expansion.go deleted file mode 100644 index 1c6494afe..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha1/clusterbinding_expansion.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha1 - -// ClusterBindingClusterListerExpansion allows custom methods to be added to ClusterBindingClusterLister. -type ClusterBindingClusterListerExpansion any - -// ClusterBindingListerExpansion allows custom methods to be added to ClusterBindingLister. -type ClusterBindingListerExpansion any - -// ClusterBindingNamespaceListerExpansion allows custom methods to be added to ClusterBindingNamespaceLister. -type ClusterBindingNamespaceListerExpansion any diff --git a/sdk/kcp/listers/kubebind/v1alpha1/expansion_generated.go b/sdk/kcp/listers/kubebind/v1alpha1/expansion_generated.go new file mode 100644 index 000000000..9eda6cab4 --- /dev/null +++ b/sdk/kcp/listers/kubebind/v1alpha1/expansion_generated.go @@ -0,0 +1,75 @@ +/* +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/apiconversion_expansion.go b/sdk/kcp/listers/kubebind/v1alpha2/apiconversion_expansion.go deleted file mode 100644 index 24bfd7f03..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiconversion_expansion.go +++ /dev/null @@ -1,28 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -// APIConversionClusterListerExpansion allows custom methods to be added to APIConversionClusterLister. -type APIConversionClusterListerExpansion any - -// APIConversionListerExpansion allows custom methods to be added to APIConversionLister. -type APIConversionListerExpansion any diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiresourceschema.go b/sdk/kcp/listers/kubebind/v1alpha2/apiresourceschema.go index 99025a512..a33fa59cd 100644 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiresourceschema.go +++ b/sdk/kcp/listers/kubebind/v1alpha2/apiresourceschema.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,22 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-lister-gen. DO NOT EDIT. package v1alpha2 import ( - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" ) -// APIResourceSchemaClusterLister can list APIResourceSchemas across all workspaces, or scope down to a APIResourceSchemaLister for one workspace. +// 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. @@ -43,36 +39,43 @@ type APIResourceSchemaClusterLister interface { APIResourceSchemaClusterListerExpansion } +// aPIResourceSchemaClusterLister implements the APIResourceSchemaClusterLister interface. type aPIResourceSchemaClusterLister struct { - indexer cache.Indexer + 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{indexer: indexer} +func NewAPIResourceSchemaClusterLister(indexer cache.Indexer) APIResourceSchemaClusterLister { + return &aPIResourceSchemaClusterLister{ + kcplisters.NewCluster[*kubebindv1alpha2.APIResourceSchema](indexer, kubebindv1alpha2.Resource("apiresourceschema")), + } } -// List lists all APIResourceSchemas in the indexer across all workspaces. -func (s *aPIResourceSchemaClusterLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIResourceSchema, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*kubebindv1alpha2.APIResourceSchema)) - }) - return ret, err +// 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), + } } -// Cluster scopes the lister to one workspace, allowing users to list and get APIResourceSchemas. -func (s *aPIResourceSchemaClusterLister) Cluster(clusterName logicalcluster.Name) APIResourceSchemaLister { - return &aPIResourceSchemaLister{indexer: s.indexer, clusterName: 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 workspace. + // 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. @@ -81,63 +84,19 @@ type APIResourceSchemaLister interface { APIResourceSchemaListerExpansion } -// aPIResourceSchemaLister can list all APIResourceSchemas inside a workspace. -type aPIResourceSchemaLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name -} - -// List lists all APIResourceSchemas in the indexer for a workspace. -func (s *aPIResourceSchemaLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIResourceSchema, err error) { - err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIResourceSchema)) - }) - return ret, err -} - -// Get retrieves the APIResourceSchema from the indexer for a given workspace and name. -func (s *aPIResourceSchemaLister) Get(name string) (*kubebindv1alpha2.APIResourceSchema, error) { - key := kcpcache.ToClusterAwareKey(s.clusterName.String(), "", name) - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("apiresourceschemas"), name) - } - return obj.(*kubebindv1alpha2.APIResourceSchema), nil -} - // NewAPIResourceSchemaLister returns a new APIResourceSchemaLister. // We assume that the indexer: -// - is fed by a workspace-scoped LIST+WATCH -// - uses cache.MetaNamespaceKeyFunc as the key function -func NewAPIResourceSchemaLister(indexer cache.Indexer) *aPIResourceSchemaScopedLister { - return &aPIResourceSchemaScopedLister{indexer: 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. +// aPIResourceSchemaScopedLister can list all APIResourceSchemas inside a workspace +// or scope down to a APIResourceSchemaNamespaceLister. type aPIResourceSchemaScopedLister struct { - indexer cache.Indexer -} - -// List lists all APIResourceSchemas in the indexer for a workspace. -func (s *aPIResourceSchemaScopedLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIResourceSchema, err error) { - err = cache.ListAll(s.indexer, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIResourceSchema)) - }) - return ret, err -} - -// Get retrieves the APIResourceSchema from the indexer for a given workspace and name. -func (s *aPIResourceSchemaScopedLister) Get(name string) (*kubebindv1alpha2.APIResourceSchema, error) { - key := name - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("apiresourceschemas"), name) - } - return obj.(*kubebindv1alpha2.APIResourceSchema), nil + kcplisters.ResourceIndexer[*kubebindv1alpha2.APIResourceSchema] } diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiresourceschema_expansion.go b/sdk/kcp/listers/kubebind/v1alpha2/apiresourceschema_expansion.go deleted file mode 100644 index 74dd459ff..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiresourceschema_expansion.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -// APIResourceSchemaClusterListerExpansion allows custom methods to be added to APIResourceSchemaClusterLister. -type APIResourceSchemaClusterListerExpansion any - -// APIResourceSchemaListerExpansion allows custom methods to be added to APIResourceSchemaLister. -type APIResourceSchemaListerExpansion any - -// APIResourceSchemaNamespaceListerExpansion allows custom methods to be added to APIResourceSchemaNamespaceLister. -type APIResourceSchemaNamespaceListerExpansion any diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiservicebinding.go b/sdk/kcp/listers/kubebind/v1alpha2/apiservicebinding.go index 768604446..20c6a9ef6 100644 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiservicebinding.go +++ b/sdk/kcp/listers/kubebind/v1alpha2/apiservicebinding.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,22 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-lister-gen. DO NOT EDIT. package v1alpha2 import ( - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" ) -// APIServiceBindingClusterLister can list APIServiceBindings across all workspaces, or scope down to a APIServiceBindingLister for one workspace. +// 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. @@ -43,36 +39,43 @@ type APIServiceBindingClusterLister interface { APIServiceBindingClusterListerExpansion } +// aPIServiceBindingClusterLister implements the APIServiceBindingClusterLister interface. type aPIServiceBindingClusterLister struct { - indexer cache.Indexer + 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{indexer: indexer} +func NewAPIServiceBindingClusterLister(indexer cache.Indexer) APIServiceBindingClusterLister { + return &aPIServiceBindingClusterLister{ + kcplisters.NewCluster[*kubebindv1alpha2.APIServiceBinding](indexer, kubebindv1alpha2.Resource("apiservicebinding")), + } } -// List lists all APIServiceBindings in the indexer across all workspaces. -func (s *aPIServiceBindingClusterLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceBinding, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*kubebindv1alpha2.APIServiceBinding)) - }) - return ret, err +// 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), + } } -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceBindings. -func (s *aPIServiceBindingClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceBindingLister { - return &aPIServiceBindingLister{indexer: s.indexer, clusterName: 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 workspace. + // 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. @@ -81,63 +84,19 @@ type APIServiceBindingLister interface { APIServiceBindingListerExpansion } -// aPIServiceBindingLister can list all APIServiceBindings inside a workspace. -type aPIServiceBindingLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name -} - -// List lists all APIServiceBindings in the indexer for a workspace. -func (s *aPIServiceBindingLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceBinding, err error) { - err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceBinding)) - }) - return ret, err -} - -// Get retrieves the APIServiceBinding from the indexer for a given workspace and name. -func (s *aPIServiceBindingLister) Get(name string) (*kubebindv1alpha2.APIServiceBinding, error) { - key := kcpcache.ToClusterAwareKey(s.clusterName.String(), "", name) - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("apiservicebindings"), name) - } - return obj.(*kubebindv1alpha2.APIServiceBinding), nil -} - // NewAPIServiceBindingLister returns a new APIServiceBindingLister. // We assume that the indexer: -// - is fed by a workspace-scoped LIST+WATCH -// - uses cache.MetaNamespaceKeyFunc as the key function -func NewAPIServiceBindingLister(indexer cache.Indexer) *aPIServiceBindingScopedLister { - return &aPIServiceBindingScopedLister{indexer: 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. +// aPIServiceBindingScopedLister can list all APIServiceBindings inside a workspace +// or scope down to a APIServiceBindingNamespaceLister. type aPIServiceBindingScopedLister struct { - indexer cache.Indexer -} - -// List lists all APIServiceBindings in the indexer for a workspace. -func (s *aPIServiceBindingScopedLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceBinding, err error) { - err = cache.ListAll(s.indexer, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceBinding)) - }) - return ret, err -} - -// Get retrieves the APIServiceBinding from the indexer for a given workspace and name. -func (s *aPIServiceBindingScopedLister) Get(name string) (*kubebindv1alpha2.APIServiceBinding, error) { - key := name - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("apiservicebindings"), name) - } - return obj.(*kubebindv1alpha2.APIServiceBinding), nil + kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceBinding] } diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiservicebinding_expansion.go b/sdk/kcp/listers/kubebind/v1alpha2/apiservicebinding_expansion.go deleted file mode 100644 index d683a4da1..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiservicebinding_expansion.go +++ /dev/null @@ -1,28 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -// APIServiceBindingClusterListerExpansion allows custom methods to be added to APIServiceBindingClusterLister. -type APIServiceBindingClusterListerExpansion any - -// APIServiceBindingListerExpansion allows custom methods to be added to APIServiceBindingLister. -type APIServiceBindingListerExpansion any diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexport.go b/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexport.go index c20ac6685..3082c8cf2 100644 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexport.go +++ b/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexport.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,22 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-lister-gen. DO NOT EDIT. package v1alpha2 import ( - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" ) -// APIServiceExportClusterLister can list APIServiceExports across all workspaces, or scope down to a APIServiceExportLister for one workspace. +// 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. @@ -43,37 +39,44 @@ type APIServiceExportClusterLister interface { APIServiceExportClusterListerExpansion } +// aPIServiceExportClusterLister implements the APIServiceExportClusterLister interface. type aPIServiceExportClusterLister struct { - indexer cache.Indexer + 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{indexer: indexer} +func NewAPIServiceExportClusterLister(indexer cache.Indexer) APIServiceExportClusterLister { + return &aPIServiceExportClusterLister{ + kcplisters.NewCluster[*kubebindv1alpha2.APIServiceExport](indexer, kubebindv1alpha2.Resource("apiserviceexport")), + } } -// List lists all APIServiceExports in the indexer across all workspaces. -func (s *aPIServiceExportClusterLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExport, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*kubebindv1alpha2.APIServiceExport)) - }) - return ret, err +// 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), + } } -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceExports. -func (s *aPIServiceExportClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceExportLister { - return &aPIServiceExportLister{indexer: s.indexer, clusterName: 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 workspace. + // 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. @@ -81,29 +84,25 @@ type APIServiceExportLister interface { APIServiceExportListerExpansion } -// aPIServiceExportLister can list all APIServiceExports inside a workspace or scope down to a APIServiceExportLister for one namespace. -type aPIServiceExportLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name +// 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), + } } -// List lists all APIServiceExports in the indexer for a workspace. -func (s *aPIServiceExportLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExport, err error) { - err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceExport)) - }) - return ret, err +// aPIServiceExportNamespaceLister implements the APIServiceExportNamespaceLister +// interface. +type aPIServiceExportNamespaceLister struct { + kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceExport] } -// APIServiceExports returns an object that can list and get APIServiceExports in one namespace. -func (s *aPIServiceExportLister) APIServiceExports(namespace string) APIServiceExportNamespaceLister { - return &aPIServiceExportNamespaceLister{indexer: s.indexer, clusterName: s.clusterName, namespace: namespace} -} +var _ APIServiceExportNamespaceLister = new(aPIServiceExportNamespaceLister) -// aPIServiceExportNamespaceLister helps list and get APIServiceExports. +// 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 workspace and namespace. + // 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. @@ -112,85 +111,27 @@ type APIServiceExportNamespaceLister interface { APIServiceExportNamespaceListerExpansion } -// aPIServiceExportNamespaceLister helps list and get APIServiceExports. -// All objects returned here must be treated as read-only. -type aPIServiceExportNamespaceLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name - namespace string -} - -// List lists all APIServiceExports in the indexer for a given workspace and namespace. -func (s *aPIServiceExportNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExport, err error) { - err = kcpcache.ListAllByClusterAndNamespace(s.indexer, s.clusterName, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceExport)) - }) - return ret, err -} - -// Get retrieves the APIServiceExport from the indexer for a given workspace, namespace and name. -func (s *aPIServiceExportNamespaceLister) Get(name string) (*kubebindv1alpha2.APIServiceExport, error) { - key := kcpcache.ToClusterAwareKey(s.clusterName.String(), s.namespace, name) - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("apiserviceexports"), name) - } - return obj.(*kubebindv1alpha2.APIServiceExport), nil -} - // NewAPIServiceExportLister returns a new APIServiceExportLister. // We assume that the indexer: -// - is fed by a workspace-scoped LIST+WATCH -// - uses cache.MetaNamespaceKeyFunc as the key function -// - has the cache.NamespaceIndex as an index -func NewAPIServiceExportLister(indexer cache.Indexer) *aPIServiceExportScopedLister { - return &aPIServiceExportScopedLister{indexer: 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 APIServiceExportLister for one namespace. +// aPIServiceExportScopedLister can list all APIServiceExports inside a workspace +// or scope down to a APIServiceExportNamespaceLister for one namespace. type aPIServiceExportScopedLister struct { - indexer cache.Indexer -} - -// List lists all APIServiceExports in the indexer for a workspace. -func (s *aPIServiceExportScopedLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExport, err error) { - err = cache.ListAll(s.indexer, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceExport)) - }) - return ret, err + kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceExport] } // APIServiceExports returns an object that can list and get APIServiceExports in one namespace. -func (s *aPIServiceExportScopedLister) APIServiceExports(namespace string) APIServiceExportNamespaceLister { - return &aPIServiceExportScopedNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// aPIServiceExportScopedNamespaceLister helps list and get APIServiceExports. -type aPIServiceExportScopedNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all APIServiceExports in the indexer for a given workspace and namespace. -func (s *aPIServiceExportScopedNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExport, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceExport)) - }) - return ret, err -} - -// Get retrieves the APIServiceExport from the indexer for a given workspace, namespace and name. -func (s *aPIServiceExportScopedNamespaceLister) Get(name string) (*kubebindv1alpha2.APIServiceExport, error) { - key := s.namespace + "/" + name - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("apiserviceexports"), name) +func (l *aPIServiceExportScopedLister) APIServiceExports(namespace string) APIServiceExportLister { + return &aPIServiceExportLister{ + l.ResourceIndexer.WithNamespace(namespace), } - return obj.(*kubebindv1alpha2.APIServiceExport), nil } diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexport_expansion.go b/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexport_expansion.go deleted file mode 100644 index 7b5f5b94e..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexport_expansion.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -// APIServiceExportClusterListerExpansion allows custom methods to be added to APIServiceExportClusterLister. -type APIServiceExportClusterListerExpansion any - -// APIServiceExportListerExpansion allows custom methods to be added to APIServiceExportLister. -type APIServiceExportListerExpansion any - -// APIServiceExportNamespaceListerExpansion allows custom methods to be added to APIServiceExportNamespaceLister. -type APIServiceExportNamespaceListerExpansion any diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexportrequest.go b/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexportrequest.go index d5c414f65..026fe2a3b 100644 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexportrequest.go +++ b/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexportrequest.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,22 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-lister-gen. DO NOT EDIT. package v1alpha2 import ( - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" ) -// APIServiceExportRequestClusterLister can list APIServiceExportRequests across all workspaces, or scope down to a APIServiceExportRequestLister for one workspace. +// 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. @@ -43,37 +39,44 @@ type APIServiceExportRequestClusterLister interface { APIServiceExportRequestClusterListerExpansion } +// aPIServiceExportRequestClusterLister implements the APIServiceExportRequestClusterLister interface. type aPIServiceExportRequestClusterLister struct { - indexer cache.Indexer + 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{indexer: indexer} +func NewAPIServiceExportRequestClusterLister(indexer cache.Indexer) APIServiceExportRequestClusterLister { + return &aPIServiceExportRequestClusterLister{ + kcplisters.NewCluster[*kubebindv1alpha2.APIServiceExportRequest](indexer, kubebindv1alpha2.Resource("apiserviceexportrequest")), + } } -// List lists all APIServiceExportRequests in the indexer across all workspaces. -func (s *aPIServiceExportRequestClusterLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExportRequest, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*kubebindv1alpha2.APIServiceExportRequest)) - }) - return ret, err +// 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), + } } -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceExportRequests. -func (s *aPIServiceExportRequestClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceExportRequestLister { - return &aPIServiceExportRequestLister{indexer: s.indexer, clusterName: 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 workspace. + // 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. @@ -81,29 +84,25 @@ type APIServiceExportRequestLister interface { APIServiceExportRequestListerExpansion } -// aPIServiceExportRequestLister can list all APIServiceExportRequests inside a workspace or scope down to a APIServiceExportRequestLister for one namespace. -type aPIServiceExportRequestLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name +// 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), + } } -// List lists all APIServiceExportRequests in the indexer for a workspace. -func (s *aPIServiceExportRequestLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExportRequest, err error) { - err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceExportRequest)) - }) - return ret, err +// aPIServiceExportRequestNamespaceLister implements the APIServiceExportRequestNamespaceLister +// interface. +type aPIServiceExportRequestNamespaceLister struct { + kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceExportRequest] } -// APIServiceExportRequests returns an object that can list and get APIServiceExportRequests in one namespace. -func (s *aPIServiceExportRequestLister) APIServiceExportRequests(namespace string) APIServiceExportRequestNamespaceLister { - return &aPIServiceExportRequestNamespaceLister{indexer: s.indexer, clusterName: s.clusterName, namespace: namespace} -} +var _ APIServiceExportRequestNamespaceLister = new(aPIServiceExportRequestNamespaceLister) -// aPIServiceExportRequestNamespaceLister helps list and get APIServiceExportRequests. +// 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 workspace and namespace. + // 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. @@ -112,85 +111,27 @@ type APIServiceExportRequestNamespaceLister interface { APIServiceExportRequestNamespaceListerExpansion } -// aPIServiceExportRequestNamespaceLister helps list and get APIServiceExportRequests. -// All objects returned here must be treated as read-only. -type aPIServiceExportRequestNamespaceLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name - namespace string -} - -// List lists all APIServiceExportRequests in the indexer for a given workspace and namespace. -func (s *aPIServiceExportRequestNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExportRequest, err error) { - err = kcpcache.ListAllByClusterAndNamespace(s.indexer, s.clusterName, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceExportRequest)) - }) - return ret, err -} - -// Get retrieves the APIServiceExportRequest from the indexer for a given workspace, namespace and name. -func (s *aPIServiceExportRequestNamespaceLister) Get(name string) (*kubebindv1alpha2.APIServiceExportRequest, error) { - key := kcpcache.ToClusterAwareKey(s.clusterName.String(), s.namespace, name) - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("apiserviceexportrequests"), name) - } - return obj.(*kubebindv1alpha2.APIServiceExportRequest), nil -} - // NewAPIServiceExportRequestLister returns a new APIServiceExportRequestLister. // We assume that the indexer: -// - is fed by a workspace-scoped LIST+WATCH -// - uses cache.MetaNamespaceKeyFunc as the key function -// - has the cache.NamespaceIndex as an index -func NewAPIServiceExportRequestLister(indexer cache.Indexer) *aPIServiceExportRequestScopedLister { - return &aPIServiceExportRequestScopedLister{indexer: 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 APIServiceExportRequestLister for one namespace. +// aPIServiceExportRequestScopedLister can list all APIServiceExportRequests inside a workspace +// or scope down to a APIServiceExportRequestNamespaceLister for one namespace. type aPIServiceExportRequestScopedLister struct { - indexer cache.Indexer -} - -// List lists all APIServiceExportRequests in the indexer for a workspace. -func (s *aPIServiceExportRequestScopedLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExportRequest, err error) { - err = cache.ListAll(s.indexer, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceExportRequest)) - }) - return ret, err + kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceExportRequest] } // APIServiceExportRequests returns an object that can list and get APIServiceExportRequests in one namespace. -func (s *aPIServiceExportRequestScopedLister) APIServiceExportRequests(namespace string) APIServiceExportRequestNamespaceLister { - return &aPIServiceExportRequestScopedNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// aPIServiceExportRequestScopedNamespaceLister helps list and get APIServiceExportRequests. -type aPIServiceExportRequestScopedNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all APIServiceExportRequests in the indexer for a given workspace and namespace. -func (s *aPIServiceExportRequestScopedNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceExportRequest, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceExportRequest)) - }) - return ret, err -} - -// Get retrieves the APIServiceExportRequest from the indexer for a given workspace, namespace and name. -func (s *aPIServiceExportRequestScopedNamespaceLister) Get(name string) (*kubebindv1alpha2.APIServiceExportRequest, error) { - key := s.namespace + "/" + name - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("apiserviceexportrequests"), name) +func (l *aPIServiceExportRequestScopedLister) APIServiceExportRequests(namespace string) APIServiceExportRequestLister { + return &aPIServiceExportRequestLister{ + l.ResourceIndexer.WithNamespace(namespace), } - return obj.(*kubebindv1alpha2.APIServiceExportRequest), nil } diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexportrequest_expansion.go b/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexportrequest_expansion.go deleted file mode 100644 index 652f98783..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiserviceexportrequest_expansion.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -// APIServiceExportRequestClusterListerExpansion allows custom methods to be added to APIServiceExportRequestClusterLister. -type APIServiceExportRequestClusterListerExpansion any - -// APIServiceExportRequestListerExpansion allows custom methods to be added to APIServiceExportRequestLister. -type APIServiceExportRequestListerExpansion any - -// APIServiceExportRequestNamespaceListerExpansion allows custom methods to be added to APIServiceExportRequestNamespaceLister. -type APIServiceExportRequestNamespaceListerExpansion any diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiservicenamespace.go b/sdk/kcp/listers/kubebind/v1alpha2/apiservicenamespace.go index 8bf6c9619..076d1f79a 100644 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiservicenamespace.go +++ b/sdk/kcp/listers/kubebind/v1alpha2/apiservicenamespace.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,22 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-lister-gen. DO NOT EDIT. package v1alpha2 import ( - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" ) -// APIServiceNamespaceClusterLister can list APIServiceNamespaces across all workspaces, or scope down to a APIServiceNamespaceLister for one workspace. +// 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. @@ -43,37 +39,44 @@ type APIServiceNamespaceClusterLister interface { APIServiceNamespaceClusterListerExpansion } +// aPIServiceNamespaceClusterLister implements the APIServiceNamespaceClusterLister interface. type aPIServiceNamespaceClusterLister struct { - indexer cache.Indexer + 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{indexer: indexer} +func NewAPIServiceNamespaceClusterLister(indexer cache.Indexer) APIServiceNamespaceClusterLister { + return &aPIServiceNamespaceClusterLister{ + kcplisters.NewCluster[*kubebindv1alpha2.APIServiceNamespace](indexer, kubebindv1alpha2.Resource("apiservicenamespace")), + } } -// List lists all APIServiceNamespaces in the indexer across all workspaces. -func (s *aPIServiceNamespaceClusterLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceNamespace, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*kubebindv1alpha2.APIServiceNamespace)) - }) - return ret, err +// 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), + } } -// Cluster scopes the lister to one workspace, allowing users to list and get APIServiceNamespaces. -func (s *aPIServiceNamespaceClusterLister) Cluster(clusterName logicalcluster.Name) APIServiceNamespaceLister { - return &aPIServiceNamespaceLister{indexer: s.indexer, clusterName: 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 workspace. + // 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. @@ -81,29 +84,25 @@ type APIServiceNamespaceLister interface { APIServiceNamespaceListerExpansion } -// aPIServiceNamespaceLister can list all APIServiceNamespaces inside a workspace or scope down to a APIServiceNamespaceLister for one namespace. -type aPIServiceNamespaceLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name +// 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), + } } -// List lists all APIServiceNamespaces in the indexer for a workspace. -func (s *aPIServiceNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceNamespace, err error) { - err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceNamespace)) - }) - return ret, err +// aPIServiceNamespaceNamespaceLister implements the APIServiceNamespaceNamespaceLister +// interface. +type aPIServiceNamespaceNamespaceLister struct { + kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceNamespace] } -// APIServiceNamespaces returns an object that can list and get APIServiceNamespaces in one namespace. -func (s *aPIServiceNamespaceLister) APIServiceNamespaces(namespace string) APIServiceNamespaceNamespaceLister { - return &aPIServiceNamespaceNamespaceLister{indexer: s.indexer, clusterName: s.clusterName, namespace: namespace} -} +var _ APIServiceNamespaceNamespaceLister = new(aPIServiceNamespaceNamespaceLister) -// aPIServiceNamespaceNamespaceLister helps list and get APIServiceNamespaces. +// 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 workspace and namespace. + // 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. @@ -112,85 +111,27 @@ type APIServiceNamespaceNamespaceLister interface { APIServiceNamespaceNamespaceListerExpansion } -// aPIServiceNamespaceNamespaceLister helps list and get APIServiceNamespaces. -// All objects returned here must be treated as read-only. -type aPIServiceNamespaceNamespaceLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name - namespace string -} - -// List lists all APIServiceNamespaces in the indexer for a given workspace and namespace. -func (s *aPIServiceNamespaceNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceNamespace, err error) { - err = kcpcache.ListAllByClusterAndNamespace(s.indexer, s.clusterName, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceNamespace)) - }) - return ret, err -} - -// Get retrieves the APIServiceNamespace from the indexer for a given workspace, namespace and name. -func (s *aPIServiceNamespaceNamespaceLister) Get(name string) (*kubebindv1alpha2.APIServiceNamespace, error) { - key := kcpcache.ToClusterAwareKey(s.clusterName.String(), s.namespace, name) - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("apiservicenamespaces"), name) - } - return obj.(*kubebindv1alpha2.APIServiceNamespace), nil -} - // NewAPIServiceNamespaceLister returns a new APIServiceNamespaceLister. // We assume that the indexer: -// - is fed by a workspace-scoped LIST+WATCH -// - uses cache.MetaNamespaceKeyFunc as the key function -// - has the cache.NamespaceIndex as an index -func NewAPIServiceNamespaceLister(indexer cache.Indexer) *aPIServiceNamespaceScopedLister { - return &aPIServiceNamespaceScopedLister{indexer: 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 APIServiceNamespaceLister for one namespace. +// aPIServiceNamespaceScopedLister can list all APIServiceNamespaces inside a workspace +// or scope down to a APIServiceNamespaceNamespaceLister for one namespace. type aPIServiceNamespaceScopedLister struct { - indexer cache.Indexer -} - -// List lists all APIServiceNamespaces in the indexer for a workspace. -func (s *aPIServiceNamespaceScopedLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceNamespace, err error) { - err = cache.ListAll(s.indexer, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceNamespace)) - }) - return ret, err + kcplisters.ResourceIndexer[*kubebindv1alpha2.APIServiceNamespace] } // APIServiceNamespaces returns an object that can list and get APIServiceNamespaces in one namespace. -func (s *aPIServiceNamespaceScopedLister) APIServiceNamespaces(namespace string) APIServiceNamespaceNamespaceLister { - return &aPIServiceNamespaceScopedNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// aPIServiceNamespaceScopedNamespaceLister helps list and get APIServiceNamespaces. -type aPIServiceNamespaceScopedNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all APIServiceNamespaces in the indexer for a given workspace and namespace. -func (s *aPIServiceNamespaceScopedNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.APIServiceNamespace, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.APIServiceNamespace)) - }) - return ret, err -} - -// Get retrieves the APIServiceNamespace from the indexer for a given workspace, namespace and name. -func (s *aPIServiceNamespaceScopedNamespaceLister) Get(name string) (*kubebindv1alpha2.APIServiceNamespace, error) { - key := s.namespace + "/" + name - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("apiservicenamespaces"), name) +func (l *aPIServiceNamespaceScopedLister) APIServiceNamespaces(namespace string) APIServiceNamespaceLister { + return &aPIServiceNamespaceLister{ + l.ResourceIndexer.WithNamespace(namespace), } - return obj.(*kubebindv1alpha2.APIServiceNamespace), nil } diff --git a/sdk/kcp/listers/kubebind/v1alpha2/apiservicenamespace_expansion.go b/sdk/kcp/listers/kubebind/v1alpha2/apiservicenamespace_expansion.go deleted file mode 100644 index b4c9dc910..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/apiservicenamespace_expansion.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -// APIServiceNamespaceClusterListerExpansion allows custom methods to be added to APIServiceNamespaceClusterLister. -type APIServiceNamespaceClusterListerExpansion any - -// APIServiceNamespaceListerExpansion allows custom methods to be added to APIServiceNamespaceLister. -type APIServiceNamespaceListerExpansion any - -// APIServiceNamespaceNamespaceListerExpansion allows custom methods to be added to APIServiceNamespaceNamespaceLister. -type APIServiceNamespaceNamespaceListerExpansion any diff --git a/sdk/kcp/listers/kubebind/v1alpha2/boundapiresourceschema.go b/sdk/kcp/listers/kubebind/v1alpha2/boundapiresourceschema.go index a534da14b..e08ec6b1b 100644 --- a/sdk/kcp/listers/kubebind/v1alpha2/boundapiresourceschema.go +++ b/sdk/kcp/listers/kubebind/v1alpha2/boundapiresourceschema.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,22 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-lister-gen. DO NOT EDIT. package v1alpha2 import ( - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" ) -// BoundAPIResourceSchemaClusterLister can list BoundAPIResourceSchemas across all workspaces, or scope down to a BoundAPIResourceSchemaLister for one workspace. +// 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. @@ -43,37 +39,44 @@ type BoundAPIResourceSchemaClusterLister interface { BoundAPIResourceSchemaClusterListerExpansion } +// boundAPIResourceSchemaClusterLister implements the BoundAPIResourceSchemaClusterLister interface. type boundAPIResourceSchemaClusterLister struct { - indexer cache.Indexer + 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{indexer: indexer} +func NewBoundAPIResourceSchemaClusterLister(indexer cache.Indexer) BoundAPIResourceSchemaClusterLister { + return &boundAPIResourceSchemaClusterLister{ + kcplisters.NewCluster[*kubebindv1alpha2.BoundAPIResourceSchema](indexer, kubebindv1alpha2.Resource("boundapiresourceschema")), + } } -// List lists all BoundAPIResourceSchemas in the indexer across all workspaces. -func (s *boundAPIResourceSchemaClusterLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.BoundAPIResourceSchema, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*kubebindv1alpha2.BoundAPIResourceSchema)) - }) - return ret, err +// 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), + } } -// Cluster scopes the lister to one workspace, allowing users to list and get BoundAPIResourceSchemas. -func (s *boundAPIResourceSchemaClusterLister) Cluster(clusterName logicalcluster.Name) BoundAPIResourceSchemaLister { - return &boundAPIResourceSchemaLister{indexer: s.indexer, clusterName: 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 workspace. + // 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. @@ -81,29 +84,25 @@ type BoundAPIResourceSchemaLister interface { BoundAPIResourceSchemaListerExpansion } -// boundAPIResourceSchemaLister can list all BoundAPIResourceSchemas inside a workspace or scope down to a BoundAPIResourceSchemaLister for one namespace. -type boundAPIResourceSchemaLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name +// 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), + } } -// List lists all BoundAPIResourceSchemas in the indexer for a workspace. -func (s *boundAPIResourceSchemaLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.BoundAPIResourceSchema, err error) { - err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.BoundAPIResourceSchema)) - }) - return ret, err +// boundAPIResourceSchemaNamespaceLister implements the BoundAPIResourceSchemaNamespaceLister +// interface. +type boundAPIResourceSchemaNamespaceLister struct { + kcplisters.ResourceIndexer[*kubebindv1alpha2.BoundAPIResourceSchema] } -// BoundAPIResourceSchemas returns an object that can list and get BoundAPIResourceSchemas in one namespace. -func (s *boundAPIResourceSchemaLister) BoundAPIResourceSchemas(namespace string) BoundAPIResourceSchemaNamespaceLister { - return &boundAPIResourceSchemaNamespaceLister{indexer: s.indexer, clusterName: s.clusterName, namespace: namespace} -} +var _ BoundAPIResourceSchemaNamespaceLister = new(boundAPIResourceSchemaNamespaceLister) -// boundAPIResourceSchemaNamespaceLister helps list and get BoundAPIResourceSchemas. +// 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 workspace and namespace. + // 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. @@ -112,85 +111,27 @@ type BoundAPIResourceSchemaNamespaceLister interface { BoundAPIResourceSchemaNamespaceListerExpansion } -// boundAPIResourceSchemaNamespaceLister helps list and get BoundAPIResourceSchemas. -// All objects returned here must be treated as read-only. -type boundAPIResourceSchemaNamespaceLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name - namespace string -} - -// List lists all BoundAPIResourceSchemas in the indexer for a given workspace and namespace. -func (s *boundAPIResourceSchemaNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.BoundAPIResourceSchema, err error) { - err = kcpcache.ListAllByClusterAndNamespace(s.indexer, s.clusterName, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.BoundAPIResourceSchema)) - }) - return ret, err -} - -// Get retrieves the BoundAPIResourceSchema from the indexer for a given workspace, namespace and name. -func (s *boundAPIResourceSchemaNamespaceLister) Get(name string) (*kubebindv1alpha2.BoundAPIResourceSchema, error) { - key := kcpcache.ToClusterAwareKey(s.clusterName.String(), s.namespace, name) - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("boundapiresourceschemas"), name) - } - return obj.(*kubebindv1alpha2.BoundAPIResourceSchema), nil -} - // NewBoundAPIResourceSchemaLister returns a new BoundAPIResourceSchemaLister. // We assume that the indexer: -// - is fed by a workspace-scoped LIST+WATCH -// - uses cache.MetaNamespaceKeyFunc as the key function -// - has the cache.NamespaceIndex as an index -func NewBoundAPIResourceSchemaLister(indexer cache.Indexer) *boundAPIResourceSchemaScopedLister { - return &boundAPIResourceSchemaScopedLister{indexer: 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 BoundAPIResourceSchemaLister for one namespace. +// boundAPIResourceSchemaScopedLister can list all BoundAPIResourceSchemas inside a workspace +// or scope down to a BoundAPIResourceSchemaNamespaceLister for one namespace. type boundAPIResourceSchemaScopedLister struct { - indexer cache.Indexer -} - -// List lists all BoundAPIResourceSchemas in the indexer for a workspace. -func (s *boundAPIResourceSchemaScopedLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.BoundAPIResourceSchema, err error) { - err = cache.ListAll(s.indexer, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.BoundAPIResourceSchema)) - }) - return ret, err + kcplisters.ResourceIndexer[*kubebindv1alpha2.BoundAPIResourceSchema] } // BoundAPIResourceSchemas returns an object that can list and get BoundAPIResourceSchemas in one namespace. -func (s *boundAPIResourceSchemaScopedLister) BoundAPIResourceSchemas(namespace string) BoundAPIResourceSchemaNamespaceLister { - return &boundAPIResourceSchemaScopedNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// boundAPIResourceSchemaScopedNamespaceLister helps list and get BoundAPIResourceSchemas. -type boundAPIResourceSchemaScopedNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all BoundAPIResourceSchemas in the indexer for a given workspace and namespace. -func (s *boundAPIResourceSchemaScopedNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.BoundAPIResourceSchema, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.BoundAPIResourceSchema)) - }) - return ret, err -} - -// Get retrieves the BoundAPIResourceSchema from the indexer for a given workspace, namespace and name. -func (s *boundAPIResourceSchemaScopedNamespaceLister) Get(name string) (*kubebindv1alpha2.BoundAPIResourceSchema, error) { - key := s.namespace + "/" + name - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("boundapiresourceschemas"), name) +func (l *boundAPIResourceSchemaScopedLister) BoundAPIResourceSchemas(namespace string) BoundAPIResourceSchemaLister { + return &boundAPIResourceSchemaLister{ + l.ResourceIndexer.WithNamespace(namespace), } - return obj.(*kubebindv1alpha2.BoundAPIResourceSchema), nil } diff --git a/sdk/kcp/listers/kubebind/v1alpha2/boundapiresourceschema_expansion.go b/sdk/kcp/listers/kubebind/v1alpha2/boundapiresourceschema_expansion.go deleted file mode 100644 index 236d3a16b..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/boundapiresourceschema_expansion.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -// BoundAPIResourceSchemaClusterListerExpansion allows custom methods to be added to BoundAPIResourceSchemaClusterLister. -type BoundAPIResourceSchemaClusterListerExpansion any - -// BoundAPIResourceSchemaListerExpansion allows custom methods to be added to BoundAPIResourceSchemaLister. -type BoundAPIResourceSchemaListerExpansion any - -// BoundAPIResourceSchemaNamespaceListerExpansion allows custom methods to be added to BoundAPIResourceSchemaNamespaceLister. -type BoundAPIResourceSchemaNamespaceListerExpansion any diff --git a/sdk/kcp/listers/kubebind/v1alpha2/clusterbinding.go b/sdk/kcp/listers/kubebind/v1alpha2/clusterbinding.go index ecda43ff5..ff24a026c 100644 --- a/sdk/kcp/listers/kubebind/v1alpha2/clusterbinding.go +++ b/sdk/kcp/listers/kubebind/v1alpha2/clusterbinding.go @@ -1,6 +1,3 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - /* Copyright The Kube Bind Authors. @@ -17,22 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by kcp code-generator. DO NOT EDIT. +// Code generated by cluster-lister-gen. DO NOT EDIT. package v1alpha2 import ( - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" "github.com/kcp-dev/logicalcluster/v3" - - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/tools/cache" kubebindv1alpha2 "github.com/kube-bind/kube-bind/sdk/apis/kubebind/v1alpha2" ) -// ClusterBindingClusterLister can list ClusterBindings across all workspaces, or scope down to a ClusterBindingLister for one workspace. +// 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. @@ -43,37 +39,44 @@ type ClusterBindingClusterLister interface { ClusterBindingClusterListerExpansion } +// clusterBindingClusterLister implements the ClusterBindingClusterLister interface. type clusterBindingClusterLister struct { - indexer cache.Indexer + 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{indexer: indexer} +func NewClusterBindingClusterLister(indexer cache.Indexer) ClusterBindingClusterLister { + return &clusterBindingClusterLister{ + kcplisters.NewCluster[*kubebindv1alpha2.ClusterBinding](indexer, kubebindv1alpha2.Resource("clusterbinding")), + } } -// List lists all ClusterBindings in the indexer across all workspaces. -func (s *clusterBindingClusterLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.ClusterBinding, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*kubebindv1alpha2.ClusterBinding)) - }) - return ret, err +// 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), + } } -// Cluster scopes the lister to one workspace, allowing users to list and get ClusterBindings. -func (s *clusterBindingClusterLister) Cluster(clusterName logicalcluster.Name) ClusterBindingLister { - return &clusterBindingLister{indexer: s.indexer, clusterName: 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 workspace. + // 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. @@ -81,29 +84,25 @@ type ClusterBindingLister interface { ClusterBindingListerExpansion } -// clusterBindingLister can list all ClusterBindings inside a workspace or scope down to a ClusterBindingLister for one namespace. -type clusterBindingLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name +// 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), + } } -// List lists all ClusterBindings in the indexer for a workspace. -func (s *clusterBindingLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.ClusterBinding, err error) { - err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.ClusterBinding)) - }) - return ret, err +// clusterBindingNamespaceLister implements the ClusterBindingNamespaceLister +// interface. +type clusterBindingNamespaceLister struct { + kcplisters.ResourceIndexer[*kubebindv1alpha2.ClusterBinding] } -// ClusterBindings returns an object that can list and get ClusterBindings in one namespace. -func (s *clusterBindingLister) ClusterBindings(namespace string) ClusterBindingNamespaceLister { - return &clusterBindingNamespaceLister{indexer: s.indexer, clusterName: s.clusterName, namespace: namespace} -} +var _ ClusterBindingNamespaceLister = new(clusterBindingNamespaceLister) -// clusterBindingNamespaceLister helps list and get ClusterBindings. +// 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 workspace and namespace. + // 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. @@ -112,85 +111,27 @@ type ClusterBindingNamespaceLister interface { ClusterBindingNamespaceListerExpansion } -// clusterBindingNamespaceLister helps list and get ClusterBindings. -// All objects returned here must be treated as read-only. -type clusterBindingNamespaceLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name - namespace string -} - -// List lists all ClusterBindings in the indexer for a given workspace and namespace. -func (s *clusterBindingNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.ClusterBinding, err error) { - err = kcpcache.ListAllByClusterAndNamespace(s.indexer, s.clusterName, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.ClusterBinding)) - }) - return ret, err -} - -// Get retrieves the ClusterBinding from the indexer for a given workspace, namespace and name. -func (s *clusterBindingNamespaceLister) Get(name string) (*kubebindv1alpha2.ClusterBinding, error) { - key := kcpcache.ToClusterAwareKey(s.clusterName.String(), s.namespace, name) - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("clusterbindings"), name) - } - return obj.(*kubebindv1alpha2.ClusterBinding), nil -} - // NewClusterBindingLister returns a new ClusterBindingLister. // We assume that the indexer: -// - is fed by a workspace-scoped LIST+WATCH -// - uses cache.MetaNamespaceKeyFunc as the key function -// - has the cache.NamespaceIndex as an index -func NewClusterBindingLister(indexer cache.Indexer) *clusterBindingScopedLister { - return &clusterBindingScopedLister{indexer: 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 ClusterBindingLister for one namespace. +// clusterBindingScopedLister can list all ClusterBindings inside a workspace +// or scope down to a ClusterBindingNamespaceLister for one namespace. type clusterBindingScopedLister struct { - indexer cache.Indexer -} - -// List lists all ClusterBindings in the indexer for a workspace. -func (s *clusterBindingScopedLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.ClusterBinding, err error) { - err = cache.ListAll(s.indexer, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.ClusterBinding)) - }) - return ret, err + kcplisters.ResourceIndexer[*kubebindv1alpha2.ClusterBinding] } // ClusterBindings returns an object that can list and get ClusterBindings in one namespace. -func (s *clusterBindingScopedLister) ClusterBindings(namespace string) ClusterBindingNamespaceLister { - return &clusterBindingScopedNamespaceLister{indexer: s.indexer, namespace: namespace} -} - -// clusterBindingScopedNamespaceLister helps list and get ClusterBindings. -type clusterBindingScopedNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all ClusterBindings in the indexer for a given workspace and namespace. -func (s *clusterBindingScopedNamespaceLister) List(selector labels.Selector) (ret []*kubebindv1alpha2.ClusterBinding, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(i interface{}) { - ret = append(ret, i.(*kubebindv1alpha2.ClusterBinding)) - }) - return ret, err -} - -// Get retrieves the ClusterBinding from the indexer for a given workspace, namespace and name. -func (s *clusterBindingScopedNamespaceLister) Get(name string) (*kubebindv1alpha2.ClusterBinding, error) { - key := s.namespace + "/" + name - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(kubebindv1alpha2.Resource("clusterbindings"), name) +func (l *clusterBindingScopedLister) ClusterBindings(namespace string) ClusterBindingLister { + return &clusterBindingLister{ + l.ResourceIndexer.WithNamespace(namespace), } - return obj.(*kubebindv1alpha2.ClusterBinding), nil } diff --git a/sdk/kcp/listers/kubebind/v1alpha2/clusterbinding_expansion.go b/sdk/kcp/listers/kubebind/v1alpha2/clusterbinding_expansion.go deleted file mode 100644 index 52859ddf5..000000000 --- a/sdk/kcp/listers/kubebind/v1alpha2/clusterbinding_expansion.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -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 kcp code-generator. DO NOT EDIT. - -package v1alpha2 - -// ClusterBindingClusterListerExpansion allows custom methods to be added to ClusterBindingClusterLister. -type ClusterBindingClusterListerExpansion any - -// ClusterBindingListerExpansion allows custom methods to be added to ClusterBindingLister. -type ClusterBindingListerExpansion any - -// ClusterBindingNamespaceListerExpansion allows custom methods to be added to ClusterBindingNamespaceLister. -type ClusterBindingNamespaceListerExpansion any diff --git a/sdk/kcp/listers/kubebind/v1alpha2/expansion_generated.go b/sdk/kcp/listers/kubebind/v1alpha2/expansion_generated.go new file mode 100644 index 000000000..a888db475 --- /dev/null +++ b/sdk/kcp/listers/kubebind/v1alpha2/expansion_generated.go @@ -0,0 +1,95 @@ +/* +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/fixtures/provider/bootstrap.go b/test/e2e/bind/fixtures/provider/bootstrap.go index b663e4e32..eeee5577d 100644 --- a/test/e2e/bind/fixtures/provider/bootstrap.go +++ b/test/e2e/bind/fixtures/provider/bootstrap.go @@ -22,7 +22,6 @@ import ( "testing" "github.com/stretchr/testify/require" - "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/discovery" "k8s.io/client-go/dynamic" diff --git a/test/e2e/bind/happy-case_test.go b/test/e2e/bind/happy-case_test.go index c46a26585..9dab52077 100644 --- a/test/e2e/bind/happy-case_test.go +++ b/test/e2e/bind/happy-case_test.go @@ -25,7 +25,6 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/headzoo/surf.v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/test/e2e/framework/backend.go b/test/e2e/framework/backend.go index 99f9c34f4..9cbb4e33c 100644 --- a/test/e2e/framework/backend.go +++ b/test/e2e/framework/backend.go @@ -30,7 +30,6 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" grpcinsecure "google.golang.org/grpc/credentials/insecure" - apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/rest" diff --git a/test/e2e/framework/bind.go b/test/e2e/framework/bind.go index 9de6051cd..28869467d 100644 --- a/test/e2e/framework/bind.go +++ b/test/e2e/framework/bind.go @@ -27,7 +27,6 @@ import ( "github.com/spf13/cobra" "github.com/stretchr/testify/require" - "k8s.io/cli-runtime/pkg/genericclioptions" bindapiserviceplugin "github.com/kube-bind/kube-bind/cli/pkg/kubectl/bind-apiservice/plugin" diff --git a/test/e2e/framework/browser.go b/test/e2e/framework/browser.go index 6a951daa2..540343d00 100644 --- a/test/e2e/framework/browser.go +++ b/test/e2e/framework/browser.go @@ -22,7 +22,6 @@ import ( "github.com/headzoo/surf/browser" "github.com/stretchr/testify/require" - "k8s.io/apimachinery/pkg/util/wait" ) diff --git a/test/e2e/framework/clients.go b/test/e2e/framework/clients.go index 873de857e..d5cf9d9e1 100644 --- a/test/e2e/framework/clients.go +++ b/test/e2e/framework/clients.go @@ -20,7 +20,6 @@ import ( "testing" "github.com/stretchr/testify/require" - apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" "k8s.io/client-go/discovery" "k8s.io/client-go/dynamic" diff --git a/test/e2e/framework/kcp.go b/test/e2e/framework/kcp.go index fe85bd7b4..8e603bdd1 100644 --- a/test/e2e/framework/kcp.go +++ b/test/e2e/framework/kcp.go @@ -30,7 +30,6 @@ import ( tenancyv1alpha1 "github.com/kcp-dev/kcp/pkg/apis/tenancy/v1alpha1" "github.com/martinlindhe/base36" "github.com/stretchr/testify/require" - "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/test/e2e/framework/konnector.go b/test/e2e/framework/konnector.go index 005299e1b..504832b38 100644 --- a/test/e2e/framework/konnector.go +++ b/test/e2e/framework/konnector.go @@ -22,7 +22,6 @@ import ( "github.com/spf13/pflag" "github.com/stretchr/testify/require" - apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/rest" diff --git a/test/e2e/framework/kubeconfig.go b/test/e2e/framework/kubeconfig.go index 33934ad3f..41ecaf785 100644 --- a/test/e2e/framework/kubeconfig.go +++ b/test/e2e/framework/kubeconfig.go @@ -21,7 +21,6 @@ import ( "testing" "github.com/stretchr/testify/require" - "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" diff --git a/test/e2e/framework/logs.go b/test/e2e/framework/logs.go index 5e5bc1bfd..1007cadae 100644 --- a/test/e2e/framework/logs.go +++ b/test/e2e/framework/logs.go @@ -20,7 +20,6 @@ import ( "os" "github.com/spf13/pflag" - "k8s.io/component-base/logs" logsv1 "k8s.io/component-base/logs/api/v1" )