diff --git a/.github/workflows/docs-gen-and-push.yaml b/.github/workflows/docs-gen-and-push.yaml index 6bfd156dc56..e1e01e80d39 100644 --- a/.github/workflows/docs-gen-and-push.yaml +++ b/.github/workflows/docs-gen-and-push.yaml @@ -33,7 +33,7 @@ jobs: - uses: actions/setup-go@v4 with: - go-version: v1.19 + go-version: v1.20 cache: true - uses: actions/setup-python@v4 diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 089a151c9c6..b9da2ee67e5 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -22,7 +22,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-go@v4 with: - go-version: v1.19 + go-version: v1.20 - name: Delete non-semver tags run: 'git tag -d $(git tag -l | grep -v "^v")' - name: Set LDFLAGS diff --git a/.golangci.yaml b/.golangci.yaml index d18bc2afb67..53d5c9aa7f0 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -10,7 +10,6 @@ linters: - bidichk - bodyclose - containedctx - - depguard - dupword - durationcheck - errcheck diff --git a/.prow.yaml b/.prow.yaml index c124c1e360a..247c2b4feae 100644 --- a/.prow.yaml +++ b/.prow.yaml @@ -7,7 +7,7 @@ presubmits: preset-goproxy: "true" spec: containers: - - image: ghcr.io/kcp-dev/infra/build:1.19.9-2 + - image: ghcr.io/kcp-dev/infra/build:1.20.8-1 command: - make - verify-boilerplate @@ -27,7 +27,7 @@ presubmits: preset-goproxy: "true" spec: containers: - - image: ghcr.io/kcp-dev/infra/build:1.19.9-2 + - image: ghcr.io/kcp-dev/infra/build:1.20.8-1 command: - make - verify-codegen @@ -44,7 +44,7 @@ presubmits: preset-goproxy: "true" spec: containers: - - image: ghcr.io/kcp-dev/infra/build:1.19.9-2 + - image: ghcr.io/kcp-dev/infra/build:1.20.8-1 command: - make - lint @@ -83,7 +83,7 @@ presubmits: preset-goproxy: "true" spec: containers: - - image: ghcr.io/kcp-dev/infra/build:1.19.9-2 + - image: ghcr.io/kcp-dev/infra/build:1.20.8-1 command: - make - test @@ -103,7 +103,7 @@ presubmits: preset-goproxy: "true" spec: containers: - - image: ghcr.io/kcp-dev/infra/build:1.19.9-2 + - image: ghcr.io/kcp-dev/infra/build:1.20.8-1 command: - ./hack/run-with-prometheus.sh - make @@ -130,7 +130,7 @@ presubmits: preset-goproxy: "true" spec: containers: - - image: ghcr.io/kcp-dev/infra/build:1.19.9-2 + - image: ghcr.io/kcp-dev/infra/build:1.20.8-1 command: - ./hack/run-with-prometheus.sh - make @@ -159,7 +159,7 @@ presubmits: preset-goproxy: "true" spec: containers: - - image: ghcr.io/kcp-dev/infra/build:1.19.9-2 + - image: ghcr.io/kcp-dev/infra/build:1.20.8-1 command: - ./hack/run-with-prometheus.sh - make @@ -184,7 +184,7 @@ presubmits: preset-goproxy: "true" spec: containers: - - image: ghcr.io/kcp-dev/infra/build:1.19.9-2 + - image: ghcr.io/kcp-dev/infra/build:1.20.8-1 command: - ./hack/run-with-prometheus.sh - make diff --git a/Dockerfile b/Dockerfile index 53ff4a00a98..8e5b2619468 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. # Build the binary -FROM --platform=${BUILDPLATFORM} docker.io/golang:1.19 AS builder +FROM --platform=${BUILDPLATFORM} docker.io/golang:1.20 AS builder WORKDIR /workspace # Install dependencies. diff --git a/Makefile b/Makefile index 0364cbfafa9..9c1ba6321db 100644 --- a/Makefile +++ b/Makefile @@ -54,11 +54,11 @@ 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 := v1.50.1 +GOLANGCI_LINT_VER := v1.54.2 GOLANGCI_LINT_BIN := golangci-lint GOLANGCI_LINT := $(TOOLS_GOBIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER) -STATICCHECK_VER := 2022.1 +STATICCHECK_VER := 2023.1 STATICCHECK_BIN := staticcheck STATICCHECK := $(TOOLS_GOBIN_DIR)/$(STATICCHECK_BIN)-$(STATICCHECK_VER) @@ -66,7 +66,7 @@ GOTESTSUM_VER := v1.8.1 GOTESTSUM_BIN := gotestsum GOTESTSUM := $(abspath $(TOOLS_DIR))/$(GOTESTSUM_BIN)-$(GOTESTSUM_VER) -LOGCHECK_VER := v0.4.0 +LOGCHECK_VER := v0.7.0 LOGCHECK_BIN := logcheck LOGCHECK := $(TOOLS_GOBIN_DIR)/$(LOGCHECK_BIN)-$(LOGCHECK_VER) export LOGCHECK # so hack scripts can use it @@ -141,7 +141,7 @@ $(CODE_GENERATOR): GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) github.com/kcp-dev/code-generator/v2 $(CODE_GENERATOR_BIN) $(CODE_GENERATOR_VER) lint: $(GOLANGCI_LINT) $(STATICCHECK) $(LOGCHECK) ## Verify lint - $(GOLANGCI_LINT) run ./... + $(GOLANGCI_LINT) run --timeout 10m ./... $(STATICCHECK) -checks ST1019,ST1005 ./... ./hack/verify-contextual-logging.sh .PHONY: lint diff --git a/cmd/cache-server/main.go b/cmd/cache-server/main.go index b3d1630ea7d..2ad93226e07 100644 --- a/cmd/cache-server/main.go +++ b/cmd/cache-server/main.go @@ -18,10 +18,8 @@ package main import ( "flag" - "math/rand" "os" "strings" - "time" "github.com/spf13/cobra" @@ -36,8 +34,6 @@ import ( ) func main() { - rand.Seed(time.Now().UTC().UnixNano()) - rootDir := flag.String("root-directory", ".kcp-cache", "Path to the root directory where all files required by this server will be stored") var cacheServerFlags, remainingFlags []string //nolint:prealloc diff --git a/cmd/kcp-core/kcpcore.go b/cmd/kcp-core/kcpcore.go index c6ace6c3d1d..6a3e1873a8e 100644 --- a/cmd/kcp-core/kcpcore.go +++ b/cmd/kcp-core/kcpcore.go @@ -18,10 +18,8 @@ package main import ( "fmt" - "math/rand" "os" "strings" - "time" "github.com/spf13/cobra" @@ -46,8 +44,6 @@ import ( ) func main() { - rand.Seed(time.Now().UTC().UnixNano()) - cmd := &cobra.Command{ Use: "kcp-core", Short: "kcp control plane core", diff --git a/cmd/kcp-front-proxy/main.go b/cmd/kcp-front-proxy/main.go index 48dd1678051..e959c7cd0f8 100644 --- a/cmd/kcp-front-proxy/main.go +++ b/cmd/kcp-front-proxy/main.go @@ -19,10 +19,8 @@ package main import ( "context" goflags "flag" - "math/rand" "net/http" "os" - "time" "github.com/spf13/cobra" "github.com/spf13/pflag" @@ -43,8 +41,6 @@ import ( func main() { ctx := genericapiserver.SetupSignalContext() - rand.Seed(time.Now().UTC().UnixNano()) - pflag.CommandLine.SetNormalizeFunc(utilflag.WordSepNormalizeFunc) pflag.CommandLine.AddGoFlagSet(goflags.CommandLine) diff --git a/cmd/kcp/kcp.go b/cmd/kcp/kcp.go index 0f57063d12b..b797fe25414 100644 --- a/cmd/kcp/kcp.go +++ b/cmd/kcp/kcp.go @@ -18,10 +18,8 @@ package main import ( "fmt" - "math/rand" "os" "strings" - "time" "github.com/spf13/cobra" @@ -46,8 +44,6 @@ import ( ) func main() { - rand.Seed(time.Now().UTC().UnixNano()) - cmd := &cobra.Command{ Use: "kcp", Short: "Kube for Control Plane (KCP)", diff --git a/cmd/sharded-test-server/virtual.go b/cmd/sharded-test-server/virtual.go index e548239095c..3f616231bdf 100644 --- a/cmd/sharded-test-server/virtual.go +++ b/cmd/sharded-test-server/virtual.go @@ -235,7 +235,7 @@ func (v *VirtualWorkspace) waitForReady(ctx context.Context) (<-chan error, erro vwHost := fmt.Sprintf("https://%s", net.JoinHostPort("localhost", virtualWorkspacePort(v.index))) kubeconfigPath := filepath.Join(v.workDirPath, fmt.Sprintf(".kcp-virtual-workspaces-%d/virtualworkspace.kubeconfig", v.index)) - if err := wait.PollImmediateInfiniteWithContext(ctx, time.Millisecond*500, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextCancel(ctx, time.Millisecond*500, true, func(ctx context.Context) (bool, error) { select { case <-ctx.Done(): return false, fmt.Errorf("context canceled") diff --git a/cmd/virtual-workspaces/command/cmd.go b/cmd/virtual-workspaces/command/cmd.go index bc741dba729..db8b2ba15c4 100644 --- a/cmd/virtual-workspaces/command/cmd.go +++ b/cmd/virtual-workspaces/command/cmd.go @@ -118,7 +118,7 @@ func Run(ctx context.Context, o *options.Options) error { // resolve identities for system APIBindings identityConfig, resolveIdentities := bootstrap.NewConfigWithWildcardIdentities(nonIdentityConfig, bootstrap.KcpRootGroupExportNames, bootstrap.KcpRootGroupResourceExportNames, localShardKubeClusterClient) - if err := wait.PollImmediateInfiniteWithContext(ctx, time.Millisecond*500, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextCancel(ctx, time.Millisecond*500, true, func(ctx context.Context) (bool, error) { if err := resolveIdentities(ctx); err != nil { logger.V(3).Info("failed to resolve identities, keeping trying: ", "err", err) return false, nil diff --git a/cmd/virtual-workspaces/main.go b/cmd/virtual-workspaces/main.go index 7ee4b5938d1..4a2ea3aa19c 100644 --- a/cmd/virtual-workspaces/main.go +++ b/cmd/virtual-workspaces/main.go @@ -19,9 +19,7 @@ package main import ( goflag "flag" "fmt" - "math/rand" "os" - "time" "github.com/spf13/pflag" @@ -33,8 +31,6 @@ import ( func main() { ctx := genericapiserver.SetupSignalContext() - rand.Seed(time.Now().UTC().UnixNano()) - pflag.CommandLine.AddGoFlagSet(goflag.CommandLine) command := virtualworkspacecommand.NewCommand(ctx, os.Stderr) diff --git a/config/crds/bootstrap.go b/config/crds/bootstrap.go index 55a7f096320..e658cdea80e 100644 --- a/config/crds/bootstrap.go +++ b/config/crds/bootstrap.go @@ -168,7 +168,7 @@ func CreateSingle(ctx context.Context, client apiextensionsv1client.CustomResour logger.Info("waiting for CRD to be established") var lastMsg string - return wait.PollImmediateInfiniteWithContext(ctx, 100*time.Millisecond, func(ctx context.Context) (bool, error) { + return wait.PollUntilContextCancel(ctx, 100*time.Millisecond, true, func(ctx context.Context) (bool, error) { crd, err := client.Get(ctx, rawCRD.Name, metav1.GetOptions{}) if err != nil { if apierrors.IsNotFound(err) { diff --git a/config/helpers/bootstrap.go b/config/helpers/bootstrap.go index 7b2679ee7e4..578f1616428 100644 --- a/config/helpers/bootstrap.go +++ b/config/helpers/bootstrap.go @@ -86,7 +86,7 @@ func Bootstrap(ctx context.Context, discoveryClient discovery.DiscoveryInterface for _, opt := range opts { transformers = append(transformers, opt.TransformFile) } - return wait.PollImmediateInfiniteWithContext(ctx, time.Second, func(ctx context.Context) (bool, error) { + return wait.PollUntilContextCancel(ctx, time.Second, true, func(ctx context.Context) (bool, error) { if err := CreateResourcesFromFS(ctx, dynamicClient, mapper, batteriesIncluded, fs, transformers...); err != nil { klog.FromContext(ctx).WithValues("err", err).Info("failed to bootstrap resources, retrying") // invalidate cache if resources not found @@ -266,7 +266,7 @@ func BindRootAPIs(ctx context.Context, kcpClient kcpclient.Interface, exportName return err } - if err := wait.PollImmediateInfiniteWithContext(ctx, time.Second, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextCancel(ctx, time.Second, true, func(ctx context.Context) (bool, error) { existing, err := kcpClient.ApisV1alpha1().APIBindings().Get(ctx, exportName, metav1.GetOptions{}) if err != nil { logger.Error(err, "error getting APIBinding", "name", exportName) diff --git a/config/root-phase0/bootstrap.go b/config/root-phase0/bootstrap.go index 4e77d439cfc..f5b631ad64c 100644 --- a/config/root-phase0/bootstrap.go +++ b/config/root-phase0/bootstrap.go @@ -50,7 +50,7 @@ func Bootstrap(ctx context.Context, kcpClient kcpclient.Interface, rootDiscovery } // set LogicalCluster to Initializing - return wait.PollImmediateUntilWithContext(ctx, time.Millisecond*100, func(ctx context.Context) (done bool, err error) { + return wait.PollUntilContextCancel(ctx, time.Millisecond*100, true, func(ctx context.Context) (done bool, err error) { logger := klog.FromContext(ctx).WithValues("bootstrapping", "root-phase0") logicalCluster, err := kcpClient.CoreV1alpha1().LogicalClusters().Get(ctx, corev1alpha1.LogicalClusterName, metav1.GetOptions{}) if err != nil { diff --git a/config/system-crds/bootstrap.go b/config/system-crds/bootstrap.go index ff95fd9d97d..131fb3ee703 100644 --- a/config/system-crds/bootstrap.go +++ b/config/system-crds/bootstrap.go @@ -58,7 +58,7 @@ func Bootstrap(ctx context.Context, crdClient apiextensionsclient.Interface, dis {Group: apis.GroupName, Resource: "apiconversions"}, } - if err := wait.PollImmediateInfiniteWithContext(ctx, time.Second, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextCancel(ctx, time.Second, true, func(ctx context.Context) (bool, error) { if err := configcrds.Create(ctx, crdClient.ApiextensionsV1().CustomResourceDefinitions(), crds...); err != nil { logger.Error(err, "failed to bootstrap system CRDs, retrying") return false, nil // keep retrying diff --git a/docs/content/CONTRIBUTING.md b/docs/content/CONTRIBUTING.md index 9d4cace8cd1..3a596ed56c6 100644 --- a/docs/content/CONTRIBUTING.md +++ b/docs/content/CONTRIBUTING.md @@ -17,7 +17,7 @@ contribution. See the [DCO](https://github.com/kcp-dev/kcp/tree/main/DCO) file f ### Prerequisites 1. Clone this repository. -2. [Install Go](https://golang.org/doc/install) (currently 1.19). +2. [Install Go](https://golang.org/doc/install) (currently 1.20). 3. Install [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl). Please note that the go language version numbers in these files must exactly agree: go/go.mod file, kcp/.ci-operator.yaml, kcp/Dockerfile, and in all the kcp/.github/workflows yaml files that specify go-version. In kcp/.ci-operator.yaml the go version is indicated by the "tag" attribute. In kcp/Dockerfile it is indicated by the "golang" attribute. In go.mod it is indicated by the "go" directive." In the .github/workflows yaml files it is indicated by "go-version" diff --git a/go.mod b/go.mod index eb07ab03404..b8acde1f083 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/kcp-dev/kcp -go 1.19 +go 1.20 require ( github.com/MakeNowJust/heredoc v1.0.0 @@ -11,80 +11,81 @@ require ( github.com/evanphx/json-patch v5.6.0+incompatible github.com/fatih/color v1.12.0 github.com/go-logr/logr v1.2.4 - github.com/google/cel-go v0.14.0 github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.3.0 - github.com/kcp-dev/apimachinery/v2 v2.0.0-alpha.0.0.20230419125703-767ac05aebce - github.com/kcp-dev/client-go v0.0.0-20230519100911-e16eb4c2bf18 + github.com/kcp-dev/apimachinery/v2 v2.0.0-alpha.0.0.20230926071920-57d168bcbe34 + github.com/kcp-dev/client-go v0.0.0-20230927101349-0416c830e3b1 github.com/kcp-dev/kcp/sdk v0.0.0-00010101000000-000000000000 github.com/kcp-dev/logicalcluster/v3 v3.0.4 github.com/martinlindhe/base36 v1.1.1 github.com/muesli/reflow v0.1.0 github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 - github.com/prometheus/client_golang v1.15.0 - github.com/spf13/cobra v1.6.0 + github.com/prometheus/client_golang v1.16.0 + github.com/spf13/cobra v1.7.0 github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace - github.com/stretchr/testify v1.8.2 - github.com/xlab/treeprint v1.1.0 - go.etcd.io/etcd/client/pkg/v3 v3.5.5 - go.etcd.io/etcd/server/v3 v3.5.5 - go.uber.org/multierr v1.7.0 - gopkg.in/square/go-jose.v2 v2.2.2 + github.com/stretchr/testify v1.8.4 + github.com/xlab/treeprint v1.2.0 + go.etcd.io/etcd/client/pkg/v3 v3.5.9 + go.etcd.io/etcd/server/v3 v3.5.9 + go.uber.org/multierr v1.11.0 + go.uber.org/zap v1.19.0 + gopkg.in/square/go-jose.v2 v2.6.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.26.3 - k8s.io/apiextensions-apiserver v0.26.3 - k8s.io/apimachinery v0.26.3 - k8s.io/apiserver v0.26.3 + k8s.io/api v0.28.2 + k8s.io/apiextensions-apiserver v0.28.2 + k8s.io/apimachinery v0.28.2 + k8s.io/apiserver v0.28.2 k8s.io/cli-runtime v0.26.3 - k8s.io/client-go v0.26.3 + k8s.io/client-go v0.28.2 k8s.io/code-generator v0.26.3 - k8s.io/component-base v0.26.3 - k8s.io/klog/v2 v2.90.1 - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 - k8s.io/kubernetes v1.26.3 - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 + k8s.io/component-base v0.28.2 + k8s.io/klog/v2 v2.100.1 + k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 + k8s.io/kubernetes v1.28.1 + k8s.io/utils v0.0.0-20230726121419-3b25d923346b + sigs.k8s.io/structured-merge-diff/v4 v4.3.0 sigs.k8s.io/yaml v1.3.0 ) require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect - github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect + github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // 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 - github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/coreos/go-oidc v2.1.0+incompatible // indirect - github.com/coreos/go-semver v0.3.0 // indirect - github.com/coreos/go-systemd/v22 v22.3.2 // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/dustin/go-humanize v1.0.0 // indirect + github.com/coreos/go-oidc v2.2.1+incompatible // indirect + github.com/coreos/go-semver v0.3.1 // indirect + github.com/coreos/go-systemd/v22 v22.5.0 // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect + github.com/dustin/go-humanize v1.0.1 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect - github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-errors/errors v1.0.1 // indirect + github.com/go-errors/errors v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.2.3 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/btree v1.0.1 // indirect - github.com/google/gnostic v0.6.9 // indirect + github.com/google/cel-go v0.16.1 // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/gorilla/websocket v1.4.2 // indirect + github.com/gorilla/websocket v1.5.0 // indirect github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect github.com/imdario/mergo v0.3.12 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jonboulle/clockwork v0.2.2 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -94,36 +95,36 @@ require ( github.com/mattn/go-isatty v0.0.12 // indirect github.com/mattn/go-runewidth v0.0.7 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/sys/mountinfo v0.6.2 // indirect - github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect + github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect - github.com/onsi/gomega v1.27.4 // indirect + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect + github.com/onsi/gomega v1.27.6 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/selinux v1.10.0 // indirect + github.com/opencontainers/selinux v1.11.0 // 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.0 // indirect github.com/pquerna/cachecontrol v0.1.0 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect - github.com/sirupsen/logrus v1.8.1 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect + github.com/robfig/cron/v3 v3.0.1 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect - github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect + github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect - go.etcd.io/bbolt v1.3.6 // indirect - go.etcd.io/etcd/api/v3 v3.5.5 // indirect - go.etcd.io/etcd/client/v2 v2.305.5 // indirect - go.etcd.io/etcd/client/v3 v3.5.5 // indirect - go.etcd.io/etcd/pkg/v3 v3.5.5 // indirect - go.etcd.io/etcd/raft/v3 v3.5.5 // indirect + go.etcd.io/bbolt v1.3.7 // indirect + go.etcd.io/etcd/api/v3 v3.5.9 // indirect + go.etcd.io/etcd/client/v2 v2.305.9 // indirect + go.etcd.io/etcd/client/v3 v3.5.9 // indirect + go.etcd.io/etcd/pkg/v3 v3.5.9 // indirect + go.etcd.io/etcd/raft/v3 v3.5.9 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 // indirect go.opentelemetry.io/otel v1.10.0 // indirect go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 // indirect @@ -132,73 +133,77 @@ require ( go.opentelemetry.io/otel/sdk v1.10.0 // indirect go.opentelemetry.io/otel/trace v1.10.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect - go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect - go.uber.org/atomic v1.9.0 // indirect - go.uber.org/zap v1.19.0 // indirect - golang.org/x/crypto v0.1.0 // indirect - golang.org/x/mod v0.9.0 // indirect - golang.org/x/net v0.9.0 // indirect - golang.org/x/oauth2 v0.7.0 // indirect - golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.7.0 // indirect - golang.org/x/term v0.7.0 // indirect - golang.org/x/text v0.9.0 // indirect + go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect + go.uber.org/atomic v1.10.0 // indirect + golang.org/x/crypto v0.11.0 // indirect + golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect + golang.org/x/mod v0.10.0 // indirect + golang.org/x/net v0.13.0 // indirect + golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/sync v0.2.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.7.0 // indirect + golang.org/x/tools v0.8.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.54.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect + google.golang.org/grpc v1.55.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/cloud-provider v0.0.0 // indirect + k8s.io/cluster-bootstrap v0.0.0 // indirect k8s.io/component-helpers v0.0.0 // indirect k8s.io/controller-manager v0.0.0 // indirect - k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect + k8s.io/dynamic-resource-allocation v0.0.0 // indirect + k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect k8s.io/kms v0.0.0 // indirect k8s.io/kube-aggregator v0.0.0 // indirect k8s.io/kube-controller-manager v0.0.0 // indirect k8s.io/kubelet v0.0.0 // indirect k8s.io/mount-utils v0.0.0 // indirect k8s.io/pod-security-admission v0.0.0 // indirect - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.36 // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/kustomize/api v0.12.1 // indirect - sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect + sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect + sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect ) replace ( - github.com/google/cel-go => github.com/google/cel-go v0.12.6 github.com/kcp-dev/kcp/sdk => ./sdk - k8s.io/api => github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20230526104423-c790f4246d25 - k8s.io/apiextensions-apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20230526104423-c790f4246d25 - k8s.io/apimachinery => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20230526104423-c790f4246d25 - k8s.io/apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20230526104423-c790f4246d25 - k8s.io/cli-runtime => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20230526104423-c790f4246d25 - k8s.io/client-go => github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20230526104423-c790f4246d25 - k8s.io/cloud-provider => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20230526104423-c790f4246d25 - k8s.io/cluster-bootstrap => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20230526104423-c790f4246d25 - k8s.io/code-generator => github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20230526104423-c790f4246d25 - k8s.io/component-base => github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20230526104423-c790f4246d25 - k8s.io/component-helpers => github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20230526104423-c790f4246d25 - k8s.io/controller-manager => github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20230526104423-c790f4246d25 - k8s.io/cri-api => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20230526104423-c790f4246d25 - k8s.io/csi-translation-lib => github.com/kcp-dev/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20230526104423-c790f4246d25 - k8s.io/dynamic-resource-allocation => github.com/kcp-dev/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v0.0.0-20230526104423-c790f4246d25 - k8s.io/kms => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20230526104423-c790f4246d25 - k8s.io/kube-aggregator => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20230526104423-c790f4246d25 - k8s.io/kube-controller-manager => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20230526104423-c790f4246d25 - k8s.io/kube-proxy => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-proxy v0.0.0-20230526104423-c790f4246d25 - k8s.io/kube-scheduler => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-scheduler v0.0.0-20230526104423-c790f4246d25 - k8s.io/kubectl => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20230526104423-c790f4246d25 - k8s.io/kubelet => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20230526104423-c790f4246d25 - k8s.io/kubernetes => github.com/kcp-dev/kubernetes v0.0.0-20230526104423-c790f4246d25 - k8s.io/legacy-cloud-providers => github.com/kcp-dev/kubernetes/staging/src/k8s.io/legacy-cloud-providers v0.0.0-20230526104423-c790f4246d25 - k8s.io/metrics => github.com/kcp-dev/kubernetes/staging/src/k8s.io/metrics v0.0.0-20230526104423-c790f4246d25 - k8s.io/mount-utils => github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20230526104423-c790f4246d25 - k8s.io/pod-security-admission => github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20230526104423-c790f4246d25 - k8s.io/sample-apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-apiserver v0.0.0-20230526104423-c790f4246d25 - k8s.io/sample-cli-plugin => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-cli-plugin v0.0.0-20230526104423-c790f4246d25 - k8s.io/sample-controller => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-controller v0.0.0-20230526104423-c790f4246d25 + k8s.io/api => github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20231008123256-10a06602223e + k8s.io/apiextensions-apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20231008123256-10a06602223e + k8s.io/apimachinery => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20231008123256-10a06602223e + k8s.io/apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20231008123256-10a06602223e + k8s.io/cli-runtime => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20231008123256-10a06602223e + k8s.io/client-go => github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20231008123256-10a06602223e + k8s.io/cloud-provider => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20231008123256-10a06602223e + k8s.io/cluster-bootstrap => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20231008123256-10a06602223e + k8s.io/code-generator => github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20231008123256-10a06602223e + k8s.io/component-base => github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20231008123256-10a06602223e + k8s.io/component-helpers => github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20231008123256-10a06602223e + k8s.io/controller-manager => github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20231008123256-10a06602223e + k8s.io/cri-api => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20231008123256-10a06602223e + k8s.io/csi-translation-lib => github.com/kcp-dev/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20231008123256-10a06602223e + k8s.io/dynamic-resource-allocation => github.com/kcp-dev/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v0.0.0-20231008123256-10a06602223e + k8s.io/endpointslice => github.com/kcp-dev/kubernetes/staging/src/k8s.io/endpointslice v0.0.0-20231008123256-10a06602223e + k8s.io/kms => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20231008123256-10a06602223e + k8s.io/kube-aggregator => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20231008123256-10a06602223e + k8s.io/kube-controller-manager => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20231008123256-10a06602223e + k8s.io/kube-proxy => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-proxy v0.0.0-20231008123256-10a06602223e + k8s.io/kube-scheduler => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-scheduler v0.0.0-20231008123256-10a06602223e + k8s.io/kubectl => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20231008123256-10a06602223e + k8s.io/kubelet => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20231008123256-10a06602223e + k8s.io/kubernetes => github.com/kcp-dev/kubernetes v0.0.0-20231008123256-10a06602223e + k8s.io/legacy-cloud-providers => github.com/kcp-dev/kubernetes/staging/src/k8s.io/legacy-cloud-providers v0.0.0-20231008123256-10a06602223e + k8s.io/metrics => github.com/kcp-dev/kubernetes/staging/src/k8s.io/metrics v0.0.0-20231008123256-10a06602223e + k8s.io/mount-utils => github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20231008123256-10a06602223e + k8s.io/pod-security-admission => github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20231008123256-10a06602223e + k8s.io/sample-apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-apiserver v0.0.0-20231008123256-10a06602223e + k8s.io/sample-cli-plugin => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-cli-plugin v0.0.0-20231008123256-10a06602223e + k8s.io/sample-controller => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-controller v0.0.0-20231008123256-10a06602223e ) diff --git a/go.sum b/go.sum index e15d7b37512..024a8b3237e 100644 --- a/go.sum +++ b/go.sum @@ -20,11 +20,10 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ= +cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -37,7 +36,6 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= @@ -47,37 +45,20 @@ github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMo github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/abiosoft/lineprefix v0.1.4 h1:fXu3jc+B2EaS98mTpEL5OH9EKv3scHRb7/gsvlqAD1A= github.com/abiosoft/lineprefix v0.1.4/go.mod h1:Myq9hfXs8e2OmHFvajp3pHxxThZL645XK+BrEQNvNSs= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 h1:yL7+Jz0jTC6yykIK/Wh74gnTJnrGr5AyrNMXuA0gves= -github.com/antlr/antlr4/runtime/Go/antlr v1.4.10/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= +github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= 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/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= 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/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5PW5zdZ39xEwfS9an067BirqA+P4QaLI= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -93,37 +74,23 @@ github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5 h1:xD/lrqdvwsc+O2bjSSi3YqY73Ke3LAiSCx49aCesA0E= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4 h1:Lap807SXTH5tri2TivECb/4abUkMZC9zRoLarvcKDqs= -github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom8DBE9so9EBsM= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= +github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk= +github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +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/egymgmbh/go-prefix-writer v0.0.0-20180609083313-7326ea162eca h1:7oodhZp9MZW0DBkrZXyUsJWKQFy35SVxjZ8K4vHXnk8= github.com/egymgmbh/go-prefix-writer v0.0.0-20180609083313-7326ea162eca/go.mod h1:UhMFM+dnOcm1f0Pve8uqRaxAhEYki+/CuA2BTDp2T04= github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= @@ -132,37 +99,25 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 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/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/getsentry/raven-go v0.2.0 h1:no+xWJRb5ZI7eE8TWgIq1jLulQiIoLG0IfYxv5JYMGs= -github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -179,17 +134,15 @@ github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -217,7 +170,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -225,10 +177,10 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 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.12.6 h1:kjeKudqV0OygrAqA9fX6J55S8gj+Jre2tckIm5RoG4M= -github.com/google/cel-go v0.12.6/go.mod h1:Jk7ljRzLBhkmiAwBoUxB1sZSCVBAzkqPF25olK/iRDw= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= +github.com/google/cel-go v0.16.1 h1:3hZfSNiAU3KOiNtxuFXVp5WFy4hf/Ly3Sa4/7F8SXNo= +github.com/google/cel-go v0.16.1/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -236,7 +188,6 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= @@ -263,112 +214,84 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= 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.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +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.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 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/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kcp-dev/apimachinery/v2 v2.0.0-alpha.0.0.20230419125703-767ac05aebce h1:7hx8OwONJwJAoaJWXhYYMoYGpN6vMpjwFacGPB2yM54= -github.com/kcp-dev/apimachinery/v2 v2.0.0-alpha.0.0.20230419125703-767ac05aebce/go.mod h1:zjNivgz2FtvyUPPLNpx5yDxFoFHNQqFrP3FKKTSMvvw= -github.com/kcp-dev/client-go v0.0.0-20230519100911-e16eb4c2bf18 h1:2DoPVFTfqQe9nq2msBs8oMhFxgsvGE6pOg15tqx9p28= -github.com/kcp-dev/client-go v0.0.0-20230519100911-e16eb4c2bf18/go.mod h1:C4i5aU8Mufjgjjm+alv5c2hufNsMvO530Rq2sZ3KgHk= -github.com/kcp-dev/kubernetes v0.0.0-20230526104423-c790f4246d25 h1:7+OgdM7/fMeK6Obe7aRwSObgj80yUEuuIPKD8sUVfD8= -github.com/kcp-dev/kubernetes v0.0.0-20230526104423-c790f4246d25/go.mod h1:nyJTa0Fiq+nOYp4Eb1EeuVNDu1HFyj7BqFOXqNsl0Ic= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20230526104423-c790f4246d25 h1:nd2tAjYI8hvaTyNPAXW/hXzItlNrO5I1hEbcNbbeBHA= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20230526104423-c790f4246d25/go.mod h1:eIheCVopU8kraTsv9cS1caP6mp/YBCwpY1U3OHdeyvM= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20230526104423-c790f4246d25 h1:9cCk1mG80yO+9XSTf01P0hU1iIbzXerhwLAcx4xYKlo= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20230526104423-c790f4246d25/go.mod h1:w7FkAnlOQ20KyHuAgY31dzBwdZtb9/POiTTAWcGYIVs= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20230526104423-c790f4246d25 h1:/gnR8xDKS1eK5gjjPxy666F9H869q6ziN7Z8eRNG08M= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20230526104423-c790f4246d25/go.mod h1:TcVji1KrMs7Xd0+jGHNojZL4fwpP15/Rw6G3/aebn4M= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20230526104423-c790f4246d25 h1:via9lwnZO7b3BqKQ3d3ghCIy4kAFwonh6mebbB9ai8Y= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20230526104423-c790f4246d25/go.mod h1:wHOIJM0ZQjG6tD1UYEtF7yrsyFa6Nsb97QVhFxhvNUA= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20230526104423-c790f4246d25 h1:8hQgKLrGN5IWNUlJOAjx5SDIG4/dcCFHuvYmQVTejWg= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20230526104423-c790f4246d25/go.mod h1:Lhc8PVTjtHS+iEze3aXIO34Ybyn2n+ZTGmeEPycgv8U= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20230526104423-c790f4246d25 h1:sdLxkXp8BULkW+xYRdIBLommti253O1H7kmdiUfH1Y8= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20230526104423-c790f4246d25/go.mod h1:g+jW3Msl6Hse2X9+HgkmXO42YG3/CHJd+oGu2ePp4hg= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20230526104423-c790f4246d25 h1:TIiyYv8lhCBVfR0bP+VBic4MiRq8O2JUaNRDRZxqolA= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20230526104423-c790f4246d25/go.mod h1:A+dP86fTPkFL5Cg/6FE+8BEft0hw07u2xFyttJETC24= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20230526104423-c790f4246d25 h1:HYbxsM+bgLFIl/f35DG1EhEIQUdSxoayK613yvPulC4= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20230526104423-c790f4246d25/go.mod h1:VjT7uI+F7zRkR6NGFO/C2nvCbk7zjte5gszxW4OGG4Y= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20230526104423-c790f4246d25 h1:MAi15IMPF3ksf8diHeu4I1mj9RO+26XrPBLNWp1Kcto= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20230526104423-c790f4246d25/go.mod h1:onL9fZfuG0PG7140IloexaHfBHnikwyM3rmICatXP54= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20230526104423-c790f4246d25 h1:AfhooJEEXNIP4HEoPjD3ngkm/Gf3RB5kIPsOq3CIlUc= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20230526104423-c790f4246d25/go.mod h1:M340a15pRUiHxm1APjhQWZBa7zKehuuL7InZwSmb1ns= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20230526104423-c790f4246d25 h1:c4mUijvaesnVsla2AsQ4C2IVEOJt1CLg4GJXQS6TVdU= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20230526104423-c790f4246d25/go.mod h1:nKT0a4Dkw7YGhEwDu6g0PKzF4f92hVdoVyzhnQsAgag= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20230526104423-c790f4246d25 h1:lUn5VLJ0+elz1vUQeOEuuMqWd6EHeXMRXtbiAcLQBjU= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20230526104423-c790f4246d25 h1:AsFglm1l8lfW6mtO9AUkOi7L3NyQvzBaToB4Ntd5e3c= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20230526104423-c790f4246d25/go.mod h1:RBaXXXu0TgOgwWU+GKrNbBjVj6I6mZ3Kuwxphmx83hM= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20230526104423-c790f4246d25 h1:4vLVrkLOhVS2ZJR6iIPapG5aW6d3zPjYKKa+UoMK9kU= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20230526104423-c790f4246d25/go.mod h1:BLg6qxF/llY4n05G0/+edlwBEeB4Ib5jFfJLwU83fg4= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20230526104423-c790f4246d25 h1:iq6nc9mveiA22k/Ekcm6PagHezxwgGKb077/eM5fg6c= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20230526104423-c790f4246d25/go.mod h1:m+qRxYr01v4ARL+kg3Hinmz6/ZGcZRGcUYCt2BiuWHE= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20230526104423-c790f4246d25 h1:1OSzEFpS/hcjsaIBgTPIsoboqUt/9/BENtS0czOz1JI= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20230526104423-c790f4246d25/go.mod h1:4WFi5TlI0zZqk+KLMbVPS8B0ZgHUkJXh+rsFKlWSMwo= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20230526104423-c790f4246d25 h1:aW7UGNXytrqKsaqiAM8qzq3IaZCxLlgCISgg8VSYiv8= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20230526104423-c790f4246d25/go.mod h1:1PgQc8yQxp+tnTD2lzlyNGTngwImNyANUq74eRnHT5U= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20230526104423-c790f4246d25 h1:G1DvD7Oqw8o6p3V6C28Hrx7N2o4gtwepB4jqm6g0z2Y= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20230526104423-c790f4246d25/go.mod h1:dFM+NF7v50rXOwr6E9FKYLq+JoC0XTgg1DwQHeJSreA= +github.com/kcp-dev/apimachinery/v2 v2.0.0-alpha.0.0.20230926071920-57d168bcbe34 h1:tom0JX5OmAeOOmkGv8LaYHDtA1xAKDiQL5U0vhYYgdM= +github.com/kcp-dev/apimachinery/v2 v2.0.0-alpha.0.0.20230926071920-57d168bcbe34/go.mod h1:cWoaYGHl1nlzdEM2xvMzIASkEZJZLSf5nhe17M7wDhw= +github.com/kcp-dev/client-go v0.0.0-20230927101349-0416c830e3b1 h1:cyRhjhVSmcUqsMg0wh+DB/DjlpV58nhRpJYxRgCjayA= +github.com/kcp-dev/client-go v0.0.0-20230927101349-0416c830e3b1/go.mod h1:XfQFbR0lb2SsNEiAcR0ktxzgjlcJQpiWLX+OHw3a5ac= +github.com/kcp-dev/kubernetes v0.0.0-20231008123256-10a06602223e h1:Qe8KZk2EzGOeoMiXKx0rHzxgAdwTphVmf9cZYeIhK7k= +github.com/kcp-dev/kubernetes v0.0.0-20231008123256-10a06602223e/go.mod h1:5a0ZmCQ9v00mANiU81C1rUcCGj4DleSh+lb//3PS7wg= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20231008123256-10a06602223e h1:HHOx71/12DADD78bbEwEz1q9xDhD/E4Qt+WqPVdoxMM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20231008123256-10a06602223e/go.mod h1:piD28YpWWkHPGxcaIIkKjvXaiapiOJJ3RiwsigMjFeM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20231008123256-10a06602223e h1:J16a1zSlqfGKDqf/C5O5fwp6L3UpiGq6xYCMVrmMpqI= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20231008123256-10a06602223e/go.mod h1:QT+AMzbhlTWm8LFyoOY4kh0wO4JLymh5/zb6rQ8aRo8= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20231008123256-10a06602223e h1:v7gywXhkWQwt9dH+IOInSEtJJwdDJYd0nyeKY9VjVf4= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20231008123256-10a06602223e/go.mod h1:P7xPCsuh6Mz10bWAH3HONFdRdffSu3mLQSHSyWutwLA= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20231008123256-10a06602223e h1:mtM/H9D541tx3jc3y3QPmpujVH3W6RIVpDi6kGNwDvA= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20231008123256-10a06602223e/go.mod h1:C+7gGfwXGct7ddeL51r0qozVZ/B/ccX6uRkF8YKYIIk= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20231008123256-10a06602223e h1:GNSzbMbUetzH/CuBFVhdqsrHD7fZ+5geNebqvW1aSrY= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20231008123256-10a06602223e/go.mod h1:fsb+S+tdbCfRFCQzB2TzEPHgckAXktQh4QtnuDD3yv8= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20231008123256-10a06602223e h1:Ky/iMr05tgC2Vnih79fkdEvUP0aC07H08vTBGkPUfhM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20231008123256-10a06602223e/go.mod h1:smSqYEw/n3//f5mgyG/b8wOvTR4mEnt0lkWyoA7+xSs= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20231008123256-10a06602223e h1:4jY2Hmu/JPXocc3x6yRqltw6g+R6/I+HSRAOLgmls/Q= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20231008123256-10a06602223e/go.mod h1:Qp37m9Q6+GABW6C35yv+Z+kcAe52HO9gT7yYZa2RVfc= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20231008123256-10a06602223e h1:SPDsHFH1IM407GlRGzB1MuG1a0w36Ohm/zovTTQJ+NM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20231008123256-10a06602223e/go.mod h1:Xho42TD+sExgIYndQ/aVFa/cRpfOQD0xQNgeG7S2fjY= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20231008123256-10a06602223e h1:8LiMl6fVzUmZbmRxf7dSlnE97EYE1cIiPMNzoHKWLuY= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20231008123256-10a06602223e/go.mod h1:ZPNAhxKcDVyUKgmw+PKKIPASVNLOhpc3MQ1ClP0WJ4Q= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20231008123256-10a06602223e h1:u7V+PaSr1Vu+rZxMcr4d+9zfcoB2qFtfQtljeVqtrB0= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20231008123256-10a06602223e/go.mod h1:4XMBg2x2XYGQihErVcceA1/OqjqcGqqq2bdMgz/8hWQ= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20231008123256-10a06602223e h1:/YgWogbROd6zLEbxTvRMAzgBJun7/xqCEloIcbz5xUw= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20231008123256-10a06602223e/go.mod h1:ffnebevIJpHLv3bagIeMk9+52JRFxMX9Igy3m1ifUAk= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20231008123256-10a06602223e h1:sD3jVrTnGhJLG+fM3jKBC9VOy4KhHArFve/bt/NUfHs= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20231008123256-10a06602223e/go.mod h1:6Vp/HAKAdRcqOg1MRhelyABcdlfa+30eNlh78B/W4jM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20231008123256-10a06602223e h1:yboxgZBI7VK1AuiJ4sBHvqUuQvZzkwMbzuANCWs+xNM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v0.0.0-20231008123256-10a06602223e h1:lzXBeP3ote0yWUBrcC67ZLY7DGmFVB15eCrM4glWZnA= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v0.0.0-20231008123256-10a06602223e/go.mod h1:Y1VXLU1InATV3CaJ5IMrAVxjFPHSpzf9+83h+QspzJQ= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20231008123256-10a06602223e h1:nHGJ6OOQPGNM+6E4op8LLeNzc8t03GDf5dr7Svz3Puc= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20231008123256-10a06602223e/go.mod h1:Qh0Pucync0H3KpVS4duoHiqGJv/exFFpgjYDfq3N3OQ= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20231008123256-10a06602223e h1:75rXfME8ReBPJ7m0iqd/NyR6jRXGIglE5IsdPvrfbMA= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20231008123256-10a06602223e/go.mod h1:izBajJkU7hM24qoiSDXPcVh5T90CTnYWf2XOBRyQuKo= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20231008123256-10a06602223e h1:IKVP+Q2y1MZQEeCAhM+1V+HrwErIdMSvCQC67v1PL5s= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20231008123256-10a06602223e/go.mod h1:bRlPzFhN4/ggxAZXrGvJ7tE5dWux/W4tpBu9PIzwASQ= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20231008123256-10a06602223e h1:FxB8bjUy/uVmZveruX0w6eosKGzqUHISyIclKOisoaw= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20231008123256-10a06602223e/go.mod h1:abK8LLplClD8AuMOtfYzCqTZG/WYiWc3Xr4wfngH8Gk= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20231008123256-10a06602223e h1:R8SH7/NuxtKYQeZ2SfbkVy+lGxxnwEmH9GtXAw0MQ9U= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20231008123256-10a06602223e/go.mod h1:GskFYsCeCClgcjHXQ2tt3FDaSJaqfSjyKAFxGmHAxz0= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20231008123256-10a06602223e h1:LDBD0zigjHB2Kh0CZOojLwp6pYdEmFax7+X3G1qlyWc= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20231008123256-10a06602223e/go.mod h1:Zj+yrQmI/mVdhQejCA9Iytwn0YMdR3Ko+djVqDRMNug= github.com/kcp-dev/logicalcluster/v3 v3.0.4 h1:q7KngML/QM7sWl8aVzmfZF0TPMnBwYNxsPKfwUvvBvU= github.com/kcp-dev/logicalcluster/v3 v3.0.4/go.mod h1:EWBUBxdr49fUB1cLMO4nOdBWmYifLbP1LfoL20KkXYY= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 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/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -380,42 +303,25 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= 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/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= 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.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= @@ -424,93 +330,53 @@ github.com/muesli/reflow v0.1.0 h1:oQdpLfO56lr5pgLvqD0TcjW85rDjSYSBVdiG1Ch1ddM= github.com/muesli/reflow v0.1.0/go.mod h1:I9bWAt7QTg/que/qmUCJBGlj7wEq8OAFBjPNjc6xK4I= 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/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= -github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= -github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= +github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/selinux v1.10.0 h1:rAiKF8hTcgLI3w0DHm6i0ylVVcOrlgR1kK99DRLDhyU= -github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= +github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= 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.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= 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 v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= -github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= +github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/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/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= -github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= 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/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= 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= @@ -527,100 +393,82 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ 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.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= +github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= -github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= +github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= +github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= -go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= -go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8= -go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= -go.etcd.io/etcd/client/v2 v2.305.5 h1:DktRP60//JJpnPC0VBymAN/7V71GHMdjDCBt4ZPXDjI= -go.etcd.io/etcd/client/v2 v2.305.5/go.mod h1:zQjKllfqfBVyVStbt4FaosoX2iYd8fV/GRy/PbowgP4= -go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI= -go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= -go.etcd.io/etcd/pkg/v3 v3.5.5 h1:Ablg7T7OkR+AeeeU32kdVhw/AGDsitkKPl7aW73ssjU= -go.etcd.io/etcd/pkg/v3 v3.5.5/go.mod h1:6ksYFxttiUGzC2uxyqiyOEvhAiD0tuIqSZkX3TyPdaE= -go.etcd.io/etcd/raft/v3 v3.5.5 h1:Ibz6XyZ60OYyRopu73lLM/P+qco3YtlZMOhnXNS051I= -go.etcd.io/etcd/raft/v3 v3.5.5/go.mod h1:76TA48q03g1y1VpTue92jZLr9lIHKUNcYdZOOGyx8rI= -go.etcd.io/etcd/server/v3 v3.5.5 h1:jNjYm/9s+f9A9r6+SC4RvNaz6AqixpOvhrFdT0PvIj0= -go.etcd.io/etcd/server/v3 v3.5.5/go.mod h1:rZ95vDw/jrvsbj9XpTqPrTAB9/kzchVdhRirySPkUBc= +go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= +go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= +go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= +go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= +go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= +go.etcd.io/etcd/client/v2 v2.305.9 h1:YZ2OLi0OvR0H75AcgSUajjd5uqKDKocQUqROTG11jIo= +go.etcd.io/etcd/client/v2 v2.305.9/go.mod h1:0NBdNx9wbxtEQLwAQtrDHwx58m02vXpDcgSYI2seohQ= +go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= +go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= +go.etcd.io/etcd/pkg/v3 v3.5.9 h1:6R2jg/aWd/zB9+9JxmijDKStGJAPFsX3e6BeJkMi6eQ= +go.etcd.io/etcd/pkg/v3 v3.5.9/go.mod h1:BZl0SAShQFk0IpLWR78T/+pyt8AruMHhTNNX73hkNVY= +go.etcd.io/etcd/raft/v3 v3.5.9 h1:ZZ1GIHoUlHsn0QVqiRysAm3/81Xx7+i2d7nSdWxlOiI= +go.etcd.io/etcd/raft/v3 v3.5.9/go.mod h1:WnFkqzFdZua4LVlVXQEGhmooLeyS7mqzS4Pf4BCVqXg= +go.etcd.io/etcd/server/v3 v3.5.9 h1:vomEmmxeztLtS5OEH7d0hBAg4cjVIu9wXuNzUZx2ZA0= +go.etcd.io/etcd/server/v3 v3.5.9/go.mod h1:GgI1fQClQCFIzuVjlvdbMxNbnISt90gdfYyqiAIt65g= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.25.0/go.mod h1:E5NNboN0UqSAki0Atn9kVwaN7I+l25gGxDqBueo/74E= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 h1:xFSRQBbXF6VvYRf2lqMJXxoB72XI1K/azav8TekHHSw= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0/go.mod h1:h8TWwRAhQpOd0aM5nYsRD8+flnkj+526GEIVlarH7eY= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.0 h1:Ajldaqhxqw/gNzQA45IKFWLdG7jZuXX/wBW1d5qvbUI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.0/go.mod h1:9NiG9I2aHTKkcxqCILhjtyNA1QEiCjdBACv4IvrFQ+c= -go.opentelemetry.io/otel v1.0.1/go.mod h1:OPEOD4jIT2SlZPMmwT6FqZz2C0ZNdQqiWcoK6M0SNFU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 h1:sxoY9kG1s1WpSYNyzm24rlwH4lnRYFXUVVBmKMBfRgw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1/go.mod h1:9NiG9I2aHTKkcxqCILhjtyNA1QEiCjdBACv4IvrFQ+c= go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 h1:TaB+1rQhddO1sF71MpZOZAuSPW1klK2M8XxfrBMfK7Y= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.0.1/go.mod h1:Kv8liBeVNFkkkbilbgWRpV+wWuu+H5xdOT6HAgd30iw= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 h1:pDDYmo0QadUPal5fwXoY1pmMpFcdyhXOmL5drCrI3vU= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0/go.mod h1:Krqnjl22jUJ0HgMzw5eveuCvFDXY4nSYb4F8t5gdrag= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1/go.mod h1:xOvWoTOrQjxjW61xtOmD/WKGRYb/P4NzRo3bs65U6Rk= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 h1:KtiUEhQmj/Pa874bVYKGNVdq8NPKiacPbaRRtgXi+t4= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0/go.mod h1:OfUCyyIiDvNXHWpcWgbF+MWvqPZiNa3YDEnivcnYsV0= go.opentelemetry.io/otel/metric v0.31.0 h1:6SiklT+gfWAwWUR0meEMxQBtihpiEs4c+vL9spDTqUs= go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A= -go.opentelemetry.io/otel/sdk v1.0.1/go.mod h1:HrdXne+BiwsOHYYkBE5ysIcv2bvdZstxzmCQhxTcZkI= go.opentelemetry.io/otel/sdk v1.10.0 h1:jZ6K7sVn04kk/3DNUdJ4mqRlGDiXAVuIG+MMENpTNdY= go.opentelemetry.io/otel/sdk v1.10.0/go.mod h1:vO06iKzD5baltJz1zarxMCNHFpUlUiOy4s65ECtn6kE= -go.opentelemetry.io/otel/trace v1.0.1/go.mod h1:5g4i4fKLaX2BQpSBsxw8YYcgKpMMSW3x7ZTuYBr3sUk= go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E= go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.9.0/go.mod h1:1vKfU9rv61e9EVGthD1zNvUbiwPcimSsOPU9brfSHJg= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= -go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= +go.starlark.net v0.0.0-20230525235612-a134d8f9ddca h1:VdD38733bfYv5tUZwEIskMM93VanwNIi5bIKnDrJdEY= +go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= -go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0 h1:mZQZefskPPCMIBCSEH0v2/iUqqLrYtaeqwD6FUGUnFE= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -631,6 +479,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= +golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -643,7 +493,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -652,15 +501,10 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -668,7 +512,6 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/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-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -689,18 +532,17 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -710,16 +552,9 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -730,12 +565,9 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -749,28 +581,23 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/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-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/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-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -778,35 +605,29 @@ 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.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -835,9 +656,8 @@ golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= 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= @@ -897,11 +717,13 @@ google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7Fc google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc h1:8DyZCyvI8mE1IdLy/60bS+52xfymkE72wv1asokgtao= +google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -916,13 +738,10 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -936,9 +755,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= 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-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -947,29 +765,20 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2 h1:orlkJ3myw8CN1nVQHBFfloD+L3egixIa4FvUP6RosSA= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= +gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= +gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 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.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/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= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -977,28 +786,28 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= -k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= +k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= -k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.36 h1:PUuX1qIFv309AT8hF/CdPKDmsG/hn/L8zRX7VvISM3A= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.36/go.mod h1:WxjusMwXlKzfAs4p9km6XJRndVt2FROgMVCE4cdohFo= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 h1:TgtAeesdhpm2SGwkQasmbeqDo8th5wOBA5h/AjTKA4I= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0/go.mod h1:VHVDI/KrK4fjnV61bE2g3sA7tiETLn8sooImelsCx3Y= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/kustomize/api v0.12.1 h1:7YM7gW3kYBwtKvoY216ZzY+8hM+lV53LUayghNRJ0vM= -sigs.k8s.io/kustomize/api v0.12.1/go.mod h1:y3JUhimkZkR6sbLNwfJHxvo1TCLwuwm14sCYnkH6S1s= -sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= -sigs.k8s.io/kustomize/kyaml v0.13.9/go.mod h1:QsRbD0/KcU+wdk0/L0fIp2KLnohkVzs6fQ85/nOXac4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= +sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3/go.mod h1:9n16EZKMhXBNSiUC5kSdFQJkdH3zbxS/JoO619G1VAY= +sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 h1:W6cLQc5pnqM7vh3b7HvGNfXrJ/xL6BDMS0v1V/HHg5U= +sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3/go.mod h1:JWP1Fj0VWGHyw3YUPjXSQnRnrwezrZSrApfX5S0nIag= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/hack/go-install.sh b/hack/go-install.sh index 63d420a4973..ef6f8af6345 100755 --- a/hack/go-install.sh +++ b/hack/go-install.sh @@ -57,6 +57,6 @@ cd "${tmp_dir}" go mod init fake/mod # install the golang module specified as the first argument -go install -tags tools "${1}@${3}" +go install -tags kcptools "${1}@${3}" mv "${GOBIN}/${2}" "${GOBIN}/${2}-${3}" ln -sf "${GOBIN}/${2}-${3}" "${GOBIN}/${2}" \ No newline at end of file diff --git a/hack/tools.go b/hack/tools.go index af2787fa2c3..56d9117f664 100644 --- a/hack/tools.go +++ b/hack/tools.go @@ -1,5 +1,5 @@ -//go:build tools -// +build tools +//go:build kcptools +// +build kcptools /* Copyright 2021 The KCP Authors. diff --git a/hack/update-codegen-clients.sh b/hack/update-codegen-clients.sh index cb154ba5545..f4d9559479e 100755 --- a/hack/update-codegen-clients.sh +++ b/hack/update-codegen-clients.sh @@ -31,13 +31,16 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; go list -f '{{.Dir}}' -m k8s.i 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 + "$GOPATH"/bin/applyconfiguration-gen \ --input-dirs github.com/kcp-dev/kcp/sdk/apis/core/v1alpha1 \ --input-dirs github.com/kcp-dev/kcp/sdk/apis/tenancy/v1alpha1 \ --input-dirs github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1 \ --input-dirs github.com/kcp-dev/kcp/sdk/apis/topology/v1alpha1 \ --input-dirs github.com/kcp-dev/kcp/sdk/apis/third_party/conditions/apis/conditions/v1alpha1 \ - --input-dirs k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/version,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 \ + --input-dirs k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/runtime,k8s.io/apimachinery/pkg/version \ --output-package github.com/kcp-dev/kcp/sdk/client/applyconfiguration \ --go-header-file ./hack/../hack/boilerplate/boilerplate.generatego.txt \ --output-base "${SCRIPT_ROOT}" \ diff --git a/pkg/admission/apiconversion/apiconversion_admission.go b/pkg/admission/apiconversion/apiconversion_admission.go deleted file mode 100644 index 8dce2c4e76b..00000000000 --- a/pkg/admission/apiconversion/apiconversion_admission.go +++ /dev/null @@ -1,144 +0,0 @@ -/* -Copyright 2022 The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package apiconversion - -import ( - "context" - "fmt" - "io" - - "github.com/kcp-dev/logicalcluster/v3" - - apiextensionsinternal "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - structuralschema "k8s.io/apiextensions-apiserver/pkg/apiserver/schema" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/apiserver/pkg/admission" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - - "github.com/kcp-dev/kcp/pkg/admission/initializers" - "github.com/kcp-dev/kcp/pkg/conversion" - "github.com/kcp-dev/kcp/pkg/reconciler/apis/apibinding" - apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" - kcpinformers "github.com/kcp-dev/kcp/sdk/client/informers/externalversions" -) - -const ( - PluginName = "apis.kcp.io/APIConversion" -) - -func Register(plugins *admission.Plugins) { - plugins.Register(PluginName, - func(_ io.Reader) (admission.Interface, error) { - return &apiConversionAdmission{ - Handler: admission.NewHandler(admission.Create, admission.Update), - }, nil - }) -} - -type apiConversionAdmission struct { - *admission.Handler - - getAPIResourceSchema func(clusterName logicalcluster.Name, name string) (*apisv1alpha1.APIResourceSchema, error) -} - -// Ensure that the required admission interfaces are implemented. -var ( - _ admission.ValidationInterface = (*apiConversionAdmission)(nil) - _ admission.InitializationValidator = (*apiConversionAdmission)(nil) - _ initializers.WantsKcpInformers = (*apiConversionAdmission)(nil) -) - -// Validate ensures all the conversion rules specified in an APIConversion are correct. -func (o *apiConversionAdmission) Validate(ctx context.Context, a admission.Attributes, _ admission.ObjectInterfaces) error { - if a.GetResource().GroupResource() != apisv1alpha1.Resource("apiconversions") { - return nil - } - - cluster, err := genericapirequest.ValidClusterFrom(ctx) - if err != nil { - return admission.NewForbidden(a, fmt.Errorf("error determining workspace: %w", err)) - } - - if cluster.Name == apibinding.SystemBoundCRDsClusterName { - // TODO(ncdc): do we also want to validate these conversions? They've already been validated once (in their - // original logical cluster). - return nil - } - - u, ok := a.GetObject().(*unstructured.Unstructured) - if !ok { - return fmt.Errorf("unexpected type %T", a.GetObject()) - } - - apiResourceSchema, err := o.getAPIResourceSchema(cluster.Name, u.GetName()) - if err != nil { - return admission.NewForbidden(a, fmt.Errorf("error getting APIResourceSchema %s: %w", u.GetName(), err)) - } - - apiConversion := &apisv1alpha1.APIConversion{} - if err := runtime.DefaultUnstructuredConverter.FromUnstructured(u.Object, apiConversion); err != nil { - return fmt.Errorf("failed to convert unstructured to APIConversion: %w", err) - } - - structuralSchemas := map[string]*structuralschema.Structural{} - for i, v := range apiResourceSchema.Spec.Versions { - schema, err := v.GetSchema() - if err != nil { - return admission.NewForbidden(a, field.Required(field.NewPath("spec", "versions").Index(i).Child("schema"), "is required")) - } - - internalJSONSchemaProps := &apiextensionsinternal.JSONSchemaProps{} - if err := apiextensionsv1.Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(schema, internalJSONSchemaProps, nil); err != nil { - return fmt.Errorf("failed converting version %s validation to internal version: %w", v.Name, err) - } - - structuralSchema, err := structuralschema.NewStructural(internalJSONSchemaProps) - if err != nil { - return fmt.Errorf("error getting structural schema for version %s: %w", v.Name, err) - } - - structuralSchemas[v.Name] = structuralSchema - } - - if _, err := conversion.Compile(apiConversion, structuralSchemas); err != nil { - return fmt.Errorf("error compiling conversion rules: %w", err) - } - - return nil -} - -// ValidateInitialization ensures the required injected fields are set. -func (o *apiConversionAdmission) ValidateInitialization() error { - if o.getAPIResourceSchema == nil { - return fmt.Errorf("getAPIResourceSchema is unset") - } - - return nil -} - -func (o *apiConversionAdmission) SetKcpInformers(local, global kcpinformers.SharedInformerFactory) { - o.getAPIResourceSchema = func(clusterName logicalcluster.Name, name string) (*apisv1alpha1.APIResourceSchema, error) { - apiResourceSchema, err := local.Apis().V1alpha1().APIResourceSchemas().Lister().Cluster(clusterName).Get(name) - if err == nil { - return apiResourceSchema, nil - } - return global.Apis().V1alpha1().APIResourceSchemas().Lister().Cluster(clusterName).Get(name) - } -} diff --git a/pkg/admission/apiresourceschema/validation.go b/pkg/admission/apiresourceschema/validation.go index 0c8d83d2d8e..404fffb4592 100644 --- a/pkg/admission/apiresourceschema/validation.go +++ b/pkg/admission/apiresourceschema/validation.go @@ -32,6 +32,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" utilvalidation "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apiserver/pkg/cel/environment" apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" ) @@ -176,6 +177,8 @@ var defaultValidationOpts = crdvalidation.ValidationOptions{ RequirePrunedDefaults: true, RequireAtomicSetType: true, RequireMapListKeysMapSetValidation: true, + + CELEnvironmentSet: environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion()), } func ValidateAPIResourceVersion(ctx context.Context, version *apisv1alpha1.APIResourceVersion, fldPath *field.Path) field.ErrorList { diff --git a/pkg/admission/apiresourceschema/validation_test.go b/pkg/admission/apiresourceschema/validation_test.go index 9ce113ebc9c..a91c8c43471 100644 --- a/pkg/admission/apiresourceschema/validation_test.go +++ b/pkg/admission/apiresourceschema/validation_test.go @@ -24,6 +24,8 @@ import ( func TestValidationOptionDrift(t *testing.T) { expectedNonBool := map[string]reflect.Kind{ "DisallowDefaultsReason": reflect.String, + "CELEnvironmentSet": reflect.Ptr, + "PreexistingExpressions": reflect.Struct, } expectedFalse := map[string]bool{ "RequireImmutableNames": true, diff --git a/pkg/admission/crdnooverlappinggvr/crdnooverlappinggvr_admission.go b/pkg/admission/crdnooverlappinggvr/crdnooverlappinggvr_admission.go index 51727dfd845..d64967387ae 100644 --- a/pkg/admission/crdnooverlappinggvr/crdnooverlappinggvr_admission.go +++ b/pkg/admission/crdnooverlappinggvr/crdnooverlappinggvr_admission.go @@ -27,6 +27,7 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/kubernetes/pkg/controlplane/apiserver" "github.com/kcp-dev/kcp/pkg/reconciler/apis/apibinding" apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" @@ -83,7 +84,7 @@ func (p *crdNoOverlappingGVRAdmission) Validate(ctx context.Context, a admission } clusterName := logicalcluster.Name(cluster.String()) // TODO(sttts): remove this cast once ClusterNameFrom returns a tenancy.Name // ignore CRDs targeting system and non-root workspaces - if clusterName == apibinding.SystemBoundCRDsClusterName || clusterName == "system:admin" { + if clusterName == apibinding.SystemBoundCRDsClusterName || clusterName == apiserver.LocalAdminCluster { return nil } diff --git a/pkg/admission/limitranger/admission.go b/pkg/admission/limitranger/admission.go deleted file mode 100644 index 0faa497637e..00000000000 --- a/pkg/admission/limitranger/admission.go +++ /dev/null @@ -1,138 +0,0 @@ -/* -Copyright 2022 The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package limitranger - -import ( - "context" - "fmt" - "io" - "sync" - - kcpkubernetesclient "github.com/kcp-dev/client-go/kubernetes" - kcpcorev1listers "github.com/kcp-dev/client-go/listers/core/v1" - "github.com/kcp-dev/logicalcluster/v3" - - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apiserver/pkg/admission" - "k8s.io/apiserver/pkg/clientsethack" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/apiserver/pkg/informerfactoryhack" - "k8s.io/client-go/informers" - kubernetesclient "k8s.io/client-go/kubernetes" - "k8s.io/kubernetes/plugin/pkg/admission/limitranger" -) - -const ( - // PluginName indicates name of admission plugin. - PluginName = "WorkspaceLimitRanger" -) - -// Register registers a plugin. -func Register(plugins *admission.Plugins) { - plugins.Register(PluginName, func(config io.Reader) (admission.Interface, error) { - return &workspaceLimitRanger{ - Handler: admission.NewHandler(admission.Create, admission.Update), - lock: sync.RWMutex{}, - delegates: map[logicalcluster.Name]*limitranger.LimitRanger{}, - }, nil - }) -} - -// workspaceLimitRanger is a delegating multiplexer for the Kubernetes LimitRanger admission control plugin. -type workspaceLimitRanger struct { - *admission.Handler - client kcpkubernetesclient.ClusterInterface - lister kcpcorev1listers.LimitRangeClusterLister - - lock sync.RWMutex - delegates map[logicalcluster.Name]*limitranger.LimitRanger -} - -// SetExternalKubeInformerFactory implements the WantsExternalKubeInformerFactory interface. -func (l *workspaceLimitRanger) SetExternalKubeInformerFactory(f informers.SharedInformerFactory) { - l.lister = informerfactoryhack.Unwrap(f).Core().V1().LimitRanges().Lister() - l.SetReadyFunc(informerfactoryhack.Unwrap(f).Core().V1().LimitRanges().Informer().HasSynced) -} - -// SetExternalKubeClientSet implements the WantsExternalKubeClientSet interface. -func (l *workspaceLimitRanger) SetExternalKubeClientSet(client kubernetesclient.Interface) { - l.client = clientsethack.Unwrap(client) -} - -// ValidateInitialization implements the InitializationValidator interface. -func (l *workspaceLimitRanger) ValidateInitialization() error { - if l.client == nil { - return fmt.Errorf("missing client") - } - if l.lister == nil { - return fmt.Errorf("missing lister") - } - return nil -} - -// Admit admits resources into cluster that do not violate any defined LimitRange in the namespace. -func (l *workspaceLimitRanger) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) (err error) { - clusterName, err := genericapirequest.ClusterNameFrom(ctx) - if err != nil { - return apierrors.NewInternalError(err) - } - delegate, err := l.delegateFor(clusterName) - if err != nil { - return apierrors.NewInternalError(err) - } - return delegate.Admit(ctx, a, o) -} - -// Validate admits resources into cluster that do not violate any defined LimitRange in the namespace. -func (l *workspaceLimitRanger) Validate(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) (err error) { - clusterName, err := genericapirequest.ClusterNameFrom(ctx) - if err != nil { - return apierrors.NewInternalError(err) - } - delegate, err := l.delegateFor(clusterName) - if err != nil { - return apierrors.NewInternalError(err) - } - return delegate.Validate(ctx, a, o) -} - -func (l *workspaceLimitRanger) delegateFor(cluster logicalcluster.Name) (*limitranger.LimitRanger, error) { - var delegate *limitranger.LimitRanger - l.lock.RLock() - var found bool - delegate, found = l.delegates[cluster] - l.lock.RUnlock() - if found { - return delegate, nil - } - - l.lock.Lock() - defer l.lock.Unlock() - delegate, found = l.delegates[cluster] - if found { - return delegate, nil - } - - var err error - delegate, err = limitranger.NewLimitRanger(&limitranger.DefaultLimitRangerActions{}) - if err != nil { - return nil, err - } - delegate.SetExternalKubeClientSet(l.client.Cluster(cluster.Path())) - delegate.SetExternalKubeLister(l.lister.Cluster(cluster)) - return delegate, nil -} diff --git a/pkg/admission/plugins.go b/pkg/admission/plugins.go index 48498b39655..804e5e47de0 100644 --- a/pkg/admission/plugins.go +++ b/pkg/admission/plugins.go @@ -26,6 +26,7 @@ import ( validatingwebhook "k8s.io/apiserver/pkg/admission/plugin/webhook/validating" kubeapiserveroptions "k8s.io/kubernetes/pkg/kubeapiserver/options" certapproval "k8s.io/kubernetes/plugin/pkg/admission/certificates/approval" + "k8s.io/kubernetes/plugin/pkg/admission/certificates/ctbattest" certsigning "k8s.io/kubernetes/plugin/pkg/admission/certificates/signing" certsubjectrestriction "k8s.io/kubernetes/plugin/pkg/admission/certificates/subjectrestriction" "k8s.io/kubernetes/plugin/pkg/admission/defaulttolerationseconds" @@ -42,13 +43,11 @@ import ( "github.com/kcp-dev/kcp/pkg/admission/apibinding" "github.com/kcp-dev/kcp/pkg/admission/apibindingfinalizer" - "github.com/kcp-dev/kcp/pkg/admission/apiconversion" "github.com/kcp-dev/kcp/pkg/admission/apiexport" "github.com/kcp-dev/kcp/pkg/admission/apiexportendpointslice" "github.com/kcp-dev/kcp/pkg/admission/apiresourceschema" "github.com/kcp-dev/kcp/pkg/admission/crdnooverlappinggvr" "github.com/kcp-dev/kcp/pkg/admission/kubequota" - kcplimitranger "github.com/kcp-dev/kcp/pkg/admission/limitranger" "github.com/kcp-dev/kcp/pkg/admission/logicalcluster" "github.com/kcp-dev/kcp/pkg/admission/logicalclusterfinalizer" kcpmutatingwebhook "github.com/kcp-dev/kcp/pkg/admission/mutatingwebhook" @@ -71,7 +70,6 @@ import ( var AllOrderedPlugins = beforeWebhooks(kubeapiserveroptions.AllOrderedPlugins, workspacenamespacelifecycle.PluginName, apiresourceschema.PluginName, - apiconversion.PluginName, workspace.PluginName, logicalclusterfinalizer.PluginName, shard.PluginName, @@ -85,7 +83,6 @@ var AllOrderedPlugins = beforeWebhooks(kubeapiserveroptions.AllOrderedPlugins, kcpmutatingwebhook.PluginName, kcpvalidatingadmissionpolicy.PluginName, kcpvalidatingwebhook.PluginName, - kcplimitranger.PluginName, reservedcrdannotations.PluginName, reservedcrdgroups.PluginName, reservednames.PluginName, @@ -110,7 +107,6 @@ func beforeWebhooks(recommended []string, plugins ...string) []string { // RegisterAllKcpAdmissionPlugins registers all admission plugins. // The order of registration is irrelevant, see AllOrderedPlugins for execution order. func RegisterAllKcpAdmissionPlugins(plugins *admission.Plugins) { - kubeapiserveroptions.RegisterAllAdmissionPlugins(plugins) workspace.Register(plugins) logicalclusterfinalizer.Register(plugins) shard.Register(plugins) @@ -119,7 +115,6 @@ func RegisterAllKcpAdmissionPlugins(plugins *admission.Plugins) { logicalcluster.Register(plugins) apiresourceschema.Register(plugins) apiexport.Register(plugins) - apiconversion.Register(plugins) apibinding.Register(plugins) apibindingfinalizer.Register(plugins) apiexportendpointslice.Register(plugins) @@ -127,7 +122,6 @@ func RegisterAllKcpAdmissionPlugins(plugins *admission.Plugins) { kcpmutatingwebhook.Register(plugins) kcpvalidatingadmissionpolicy.Register(plugins) kcpvalidatingwebhook.Register(plugins) - kcplimitranger.Register(plugins) reservedcrdannotations.Register(plugins) reservedcrdgroups.Register(plugins) reservednames.Register(plugins) @@ -140,7 +134,6 @@ func RegisterAllKcpAdmissionPlugins(plugins *admission.Plugins) { var defaultOnPluginsInKcp = sets.New[string]( workspacenamespacelifecycle.PluginName, // WorkspaceNamespaceLifecycle - kcplimitranger.PluginName, // WorkspaceLimitRanger certapproval.PluginName, // CertificateApproval certsigning.PluginName, // CertificateSigning certsubjectrestriction.PluginName, // CertificateSubjectRestriction @@ -154,7 +147,6 @@ var defaultOnPluginsInKcp = sets.New[string]( logicalcluster.PluginName, apiresourceschema.PluginName, apiexport.PluginName, - apiconversion.PluginName, apibinding.PluginName, apibindingfinalizer.PluginName, apiexportendpointslice.PluginName, @@ -190,9 +182,11 @@ var defaultOnKubePluginsInKube = sets.New[string]( runtimeclass.PluginName, // RuntimeClass certapproval.PluginName, // CertificateApproval certsigning.PluginName, // CertificateSigning + ctbattest.PluginName, // ClusterTrustBundleAttest certsubjectrestriction.PluginName, // CertificateSubjectRestriction defaultingressclass.PluginName, // DefaultIngressClass - podsecurity.PluginName, // PodSecurity) + podsecurity.PluginName, // PodSecurity + validatingadmissionpolicy.PluginName, // ValidatingAdmissionPolicy, only active when feature gate ValidatingAdmissionPolicy is enabled ) // DefaultOffAdmissionPlugins get admission plugins off by default for kcp. diff --git a/pkg/authorization/bootstrap_policy_authorizer.go b/pkg/authorization/bootstrap_policy_authorizer.go index 905f21c99aa..d7122423491 100644 --- a/pkg/authorization/bootstrap_policy_authorizer.go +++ b/pkg/authorization/bootstrap_policy_authorizer.go @@ -24,7 +24,7 @@ import ( "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/kubernetes/pkg/genericcontrolplane" + controlplaneapiserver "k8s.io/kubernetes/pkg/controlplane/apiserver" "k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac" ) @@ -34,10 +34,10 @@ type BootstrapPolicyAuthorizer struct { func NewBootstrapPolicyAuthorizer(informers kcpkubernetesinformers.SharedInformerFactory) (authorizer.Authorizer, authorizer.RuleResolver) { a := &BootstrapPolicyAuthorizer{bootstrapPolicy: rbac.New( - &rbac.RoleGetter{Lister: informers.Rbac().V1().Roles().Lister().Cluster(genericcontrolplane.LocalAdminCluster)}, - &rbac.RoleBindingLister{Lister: informers.Rbac().V1().RoleBindings().Lister().Cluster(genericcontrolplane.LocalAdminCluster)}, - &rbac.ClusterRoleGetter{Lister: informers.Rbac().V1().ClusterRoles().Lister().Cluster(genericcontrolplane.LocalAdminCluster)}, - &rbac.ClusterRoleBindingLister{Lister: informers.Rbac().V1().ClusterRoleBindings().Lister().Cluster(genericcontrolplane.LocalAdminCluster)}, + &rbac.RoleGetter{Lister: informers.Rbac().V1().Roles().Lister().Cluster(controlplaneapiserver.LocalAdminCluster)}, + &rbac.RoleBindingLister{Lister: informers.Rbac().V1().RoleBindings().Lister().Cluster(controlplaneapiserver.LocalAdminCluster)}, + &rbac.ClusterRoleGetter{Lister: informers.Rbac().V1().ClusterRoles().Lister().Cluster(controlplaneapiserver.LocalAdminCluster)}, + &rbac.ClusterRoleBindingLister{Lister: informers.Rbac().V1().ClusterRoleBindings().Lister().Cluster(controlplaneapiserver.LocalAdminCluster)}, )} return a, a diff --git a/pkg/authorization/decorator_test.go b/pkg/authorization/decorator_test.go index 21c658cba9c..00657856562 100644 --- a/pkg/authorization/decorator_test.go +++ b/pkg/authorization/decorator_test.go @@ -219,7 +219,7 @@ func TestDecorator(t *testing.T) { t.Run(name, func(t *testing.T) { ctx := audit.WithAuditContext(context.Background()) auditCtx := audit.AuditContextFrom(ctx) - auditCtx.Event = &auditapis.Event{ + auditCtx.Event = auditapis.Event{ Level: auditapis.LevelMetadata, } attr := authorizer.AttributesRecord{} diff --git a/pkg/authorization/global_authorizer.go b/pkg/authorization/global_authorizer.go index b4f71898cf0..adceb44ce9e 100644 --- a/pkg/authorization/global_authorizer.go +++ b/pkg/authorization/global_authorizer.go @@ -26,7 +26,7 @@ import ( "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/kubernetes/pkg/genericcontrolplane" + controlplaneapiserver "k8s.io/kubernetes/pkg/controlplane/apiserver" "k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac" rbacwrapper "github.com/kcp-dev/kcp/pkg/virtual/framework/wrappers/rbac" @@ -42,12 +42,12 @@ func NewGlobalAuthorizer(localKubeInformers, globalKubeInformers kcpkubernetesin return rbac.New( &rbac.RoleGetter{Lister: rbacwrapper.NewMergedRoleLister( globalKubeInformers.Rbac().V1().Roles().Lister().Cluster(clusterName), - localKubeInformers.Rbac().V1().Roles().Lister().Cluster(genericcontrolplane.LocalAdminCluster), + localKubeInformers.Rbac().V1().Roles().Lister().Cluster(controlplaneapiserver.LocalAdminCluster), )}, &rbac.RoleBindingLister{Lister: globalKubeInformers.Rbac().V1().RoleBindings().Lister().Cluster(clusterName)}, &rbac.ClusterRoleGetter{Lister: rbacwrapper.NewMergedClusterRoleLister( globalKubeInformers.Rbac().V1().ClusterRoles().Lister().Cluster(clusterName), - localKubeInformers.Rbac().V1().ClusterRoles().Lister().Cluster(genericcontrolplane.LocalAdminCluster), + localKubeInformers.Rbac().V1().ClusterRoles().Lister().Cluster(controlplaneapiserver.LocalAdminCluster), )}, &rbac.ClusterRoleBindingLister{Lister: globalKubeInformers.Rbac().V1().ClusterRoleBindings().Lister().Cluster(clusterName)}, ) diff --git a/pkg/authorization/local_authorizer.go b/pkg/authorization/local_authorizer.go index 3133724c7eb..feb60eabce8 100644 --- a/pkg/authorization/local_authorizer.go +++ b/pkg/authorization/local_authorizer.go @@ -26,7 +26,7 @@ import ( "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/kubernetes/pkg/genericcontrolplane" + controlplaneapiserver "k8s.io/kubernetes/pkg/controlplane/apiserver" "k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac" rbacwrapper "github.com/kcp-dev/kcp/pkg/virtual/framework/wrappers/rbac" @@ -64,12 +64,12 @@ func (a *LocalAuthorizer) Authorize(ctx context.Context, attr authorizer.Attribu scopedAuth := rbac.New( &rbac.RoleGetter{Lister: rbacwrapper.NewMergedRoleLister( a.roleLister.Cluster(cluster.Name), - a.roleLister.Cluster(genericcontrolplane.LocalAdminCluster), + a.roleLister.Cluster(controlplaneapiserver.LocalAdminCluster), )}, &rbac.RoleBindingLister{Lister: a.roleBindingLister.Cluster(cluster.Name)}, &rbac.ClusterRoleGetter{Lister: rbacwrapper.NewMergedClusterRoleLister( a.clusterRoleLister.Cluster(cluster.Name), - a.clusterRoleLister.Cluster(genericcontrolplane.LocalAdminCluster), + a.clusterRoleLister.Cluster(controlplaneapiserver.LocalAdminCluster), )}, &rbac.ClusterRoleBindingLister{Lister: a.clusterRoleBindingLister.Cluster(cluster.Name)}, ) diff --git a/pkg/authorization/maximal_permission_policy_authorizer.go b/pkg/authorization/maximal_permission_policy_authorizer.go index 1c5d21626fd..5155f873cac 100644 --- a/pkg/authorization/maximal_permission_policy_authorizer.go +++ b/pkg/authorization/maximal_permission_policy_authorizer.go @@ -29,7 +29,7 @@ import ( "k8s.io/apiserver/pkg/authorization/authorizer" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/client-go/tools/cache" - "k8s.io/kubernetes/pkg/genericcontrolplane" + controlplaneapiserver "k8s.io/kubernetes/pkg/controlplane/apiserver" "k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac" "github.com/kcp-dev/kcp/pkg/indexers" @@ -76,7 +76,7 @@ func NewMaximalPermissionPolicyAuthorizer(kubeInformers, globalKubeInformers kcp &rbac.RoleGetter{Lister: rbacwrapper.NewMergedRoleLister( kubeInformers.Rbac().V1().Roles().Lister().Cluster(clusterName), globalKubeInformers.Rbac().V1().Roles().Lister().Cluster(clusterName), - kubeInformers.Rbac().V1().Roles().Lister().Cluster(genericcontrolplane.LocalAdminCluster), + kubeInformers.Rbac().V1().Roles().Lister().Cluster(controlplaneapiserver.LocalAdminCluster), )}, &rbac.RoleBindingLister{Lister: rbacwrapper.NewMergedRoleBindingLister( kubeInformers.Rbac().V1().RoleBindings().Lister().Cluster(clusterName), @@ -85,12 +85,12 @@ func NewMaximalPermissionPolicyAuthorizer(kubeInformers, globalKubeInformers kcp &rbac.ClusterRoleGetter{Lister: rbacwrapper.NewMergedClusterRoleLister( kubeInformers.Rbac().V1().ClusterRoles().Lister().Cluster(clusterName), globalKubeInformers.Rbac().V1().ClusterRoles().Lister().Cluster(clusterName), - kubeInformers.Rbac().V1().ClusterRoles().Lister().Cluster(genericcontrolplane.LocalAdminCluster), + kubeInformers.Rbac().V1().ClusterRoles().Lister().Cluster(controlplaneapiserver.LocalAdminCluster), )}, &rbac.ClusterRoleBindingLister{Lister: rbacwrapper.NewMergedClusterRoleBindingLister( kubeInformers.Rbac().V1().ClusterRoleBindings().Lister().Cluster(clusterName), globalKubeInformers.Rbac().V1().ClusterRoleBindings().Lister().Cluster(clusterName), - kubeInformers.Rbac().V1().ClusterRoleBindings().Lister().Cluster(genericcontrolplane.LocalAdminCluster), + kubeInformers.Rbac().V1().ClusterRoleBindings().Lister().Cluster(controlplaneapiserver.LocalAdminCluster), )}, ) }, diff --git a/pkg/authorization/workspace_content_authorizer.go b/pkg/authorization/workspace_content_authorizer.go index 0e620deaa6c..dcefbaf885d 100644 --- a/pkg/authorization/workspace_content_authorizer.go +++ b/pkg/authorization/workspace_content_authorizer.go @@ -31,7 +31,7 @@ import ( "k8s.io/apiserver/pkg/authentication/user" "k8s.io/apiserver/pkg/authorization/authorizer" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/kubernetes/pkg/genericcontrolplane" + controlplaneapiserver "k8s.io/kubernetes/pkg/controlplane/apiserver" "k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac" "github.com/kcp-dev/kcp/pkg/authorization/bootstrap" @@ -145,12 +145,12 @@ func (a *workspaceContentAuthorizer) Authorize(ctx context.Context, attr authori &rbac.ClusterRoleGetter{Lister: rbacwrapper.NewMergedClusterRoleLister( a.localClusterRoleLister.Cluster(cluster.Name), a.globalClusterRoleLister.Cluster(cluster.Name), - a.localClusterRoleLister.Cluster(genericcontrolplane.LocalAdminCluster), + a.localClusterRoleLister.Cluster(controlplaneapiserver.LocalAdminCluster), )}, &rbac.ClusterRoleBindingLister{Lister: rbacwrapper.NewMergedClusterRoleBindingLister( a.localClusterRoleBindingLister.Cluster(cluster.Name), a.globalClusterRoleBindingLister.Cluster(cluster.Name), - a.localClusterRoleBindingLister.Cluster(genericcontrolplane.LocalAdminCluster), + a.localClusterRoleBindingLister.Cluster(controlplaneapiserver.LocalAdminCluster), )}, ) diff --git a/pkg/authorization/workspace_content_authorizer_test.go b/pkg/authorization/workspace_content_authorizer_test.go index 4d5b31b366f..994968e433a 100644 --- a/pkg/authorization/workspace_content_authorizer_test.go +++ b/pkg/authorization/workspace_content_authorizer_test.go @@ -34,7 +34,7 @@ import ( "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/client-go/tools/cache" "k8s.io/kubernetes/pkg/controller" - "k8s.io/kubernetes/pkg/genericcontrolplane" + controlplaneapiserver "k8s.io/kubernetes/pkg/controlplane/apiserver" corev1alpha1 "github.com/kcp-dev/kcp/sdk/apis/core/v1alpha1" corev1alpha1listers "github.com/kcp-dev/kcp/sdk/client/listers/core/v1alpha1" @@ -211,7 +211,7 @@ func TestWorkspaceContentAuthorizer(t *testing.T) { &v1.ClusterRole{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{ - logicalcluster.AnnotationKey: genericcontrolplane.LocalAdminCluster.String(), + logicalcluster.AnnotationKey: controlplaneapiserver.LocalAdminCluster.String(), }, Name: "access", }, diff --git a/pkg/cache/server/bootstrap/bootstrap.go b/pkg/cache/server/bootstrap/bootstrap.go index 9ecd09802d4..27c22b6a507 100644 --- a/pkg/cache/server/bootstrap/bootstrap.go +++ b/pkg/cache/server/bootstrap/bootstrap.go @@ -21,13 +21,13 @@ import ( "fmt" "time" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" "github.com/kcp-dev/logicalcluster/v3" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/klog/v2" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" configcrds "github.com/kcp-dev/kcp/config/crds" cacheclient "github.com/kcp-dev/kcp/pkg/cache/client" @@ -42,7 +42,8 @@ var SystemCRDLogicalCluster = logicalcluster.Name("system:system-crds") const SystemCacheServerShard = "system:cache:server" func Bootstrap(ctx context.Context, apiExtensionsClusterClient kcpapiextensionsclientset.ClusterInterface) error { - crds := []*apiextensionsv1.CustomResourceDefinition{} + var crds []*apiextensionsv1.CustomResourceDefinition //nolint:prealloc + for _, gr := range []struct{ group, resource string }{ {"apis.kcp.io", "apiresourceschemas"}, {"apis.kcp.io", "apiconversions"}, @@ -68,7 +69,7 @@ func Bootstrap(ctx context.Context, apiExtensionsClusterClient kcpapiextensionsc v.Schema = &apiextensionsv1.CustomResourceValidation{ OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{ Type: "object", - XPreserveUnknownFields: pointer.Bool(true), + XPreserveUnknownFields: ptr.To(true), }, } // wipe the schema, we don't need validation v.Subresources = nil // wipe subresources so that updates don't have to be made against the status endpoint @@ -78,7 +79,7 @@ func Bootstrap(ctx context.Context, apiExtensionsClusterClient kcpapiextensionsc logger := klog.FromContext(ctx) ctx = cacheclient.WithShardInContext(ctx, SystemCacheServerShard) - return wait.PollInfiniteWithContext(ctx, time.Second, func(ctx context.Context) (bool, error) { + return wait.PollUntilContextCancel(ctx, time.Second, false, func(ctx context.Context) (bool, error) { for _, crd := range crds { err := configcrds.CreateSingle(ctx, apiExtensionsClusterClient.Cluster(SystemCRDLogicalCluster.Path()).ApiextensionsV1().CustomResourceDefinitions(), crd) if err != nil { diff --git a/pkg/cache/server/config.go b/pkg/cache/server/config.go index 5b613eedd82..fd49a37acf3 100644 --- a/pkg/cache/server/config.go +++ b/pkg/cache/server/config.go @@ -22,15 +22,18 @@ import ( "strings" "time" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" + kcpapiextensionsinformers "github.com/kcp-dev/client-go/apiextensions/informers" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" apiextensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" "k8s.io/apiextensions-apiserver/pkg/apiserver/conversion" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" - kcpapiextensionsinformers "k8s.io/apiextensions-apiserver/pkg/client/kcp/informers/externalversions" apiextensionsoptions "k8s.io/apiextensions-apiserver/pkg/cmd/server/options" + "k8s.io/apiextensions-apiserver/pkg/generated/openapi" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + apiopenapi "k8s.io/apiserver/pkg/endpoints/openapi" "k8s.io/apiserver/pkg/features" genericapiserver "k8s.io/apiserver/pkg/server" utilfeature "k8s.io/apiserver/pkg/util/feature" @@ -105,13 +108,11 @@ func NewConfig(opts *cacheserveroptions.CompletedOptions, optionalLocalShardRest opts.Etcd.StorageConfig.Prefix = "/cache" serverConfig := genericapiserver.NewRecommendedConfig(apiextensionsapiserver.Codecs) + serverConfig.OpenAPIV3Config = genericapiserver.DefaultOpenAPIV3Config(openapi.GetOpenAPIDefinitions, apiopenapi.NewDefinitionNamer(apiextensionsapiserver.Scheme)) if err := opts.ServerRunOptions.ApplyTo(&serverConfig.Config); err != nil { return nil, err } - if err := opts.Etcd.Complete(serverConfig.Config.StorageObjectCountTracker, serverConfig.Config.DrainedNotify(), serverConfig.Config.AddPostStartHook); err != nil { - return nil, err - } if err := opts.Etcd.ApplyTo(&serverConfig.Config); err != nil { return nil, err } @@ -203,21 +204,17 @@ func NewConfig(opts *cacheserveroptions.CompletedOptions, optionalLocalShardRest resyncPeriod, ) - crdRESTOptionsGetter, err := apiextensionsoptions.NewCRDRESTOptionsGetter(*opts.Etcd) - if err != nil { - return nil, err - } + crdRESTOptionsGetter := apiextensionsoptions.NewCRDRESTOptionsGetter(*opts.Etcd, serverConfig.ResourceTransformers, serverConfig.StorageObjectCountTracker) c.ApiExtensions = &apiextensionsapiserver.Config{ GenericConfig: serverConfig, ExtraConfig: apiextensionsapiserver.ExtraConfig{ - CRDRESTOptionsGetter: crdRESTOptionsGetter, - MasterCount: 1, - Client: c.ApiExtensionsClusterClient, - Informers: c.ApiExtensionsSharedInformerFactory, - ClusterAwareCRDLister: &crdClusterLister{lister: c.ApiExtensionsSharedInformerFactory.Apiextensions().V1().CustomResourceDefinitions().Lister()}, - DisableServerSideApply: true, - ConversionFactory: &nopCRConversionFactory{}, + CRDRESTOptionsGetter: crdRESTOptionsGetter, + MasterCount: 1, + Client: c.ApiExtensionsClusterClient, + Informers: c.ApiExtensionsSharedInformerFactory, + ClusterAwareCRDLister: &crdClusterLister{lister: c.ApiExtensionsSharedInformerFactory.Apiextensions().V1().CustomResourceDefinitions().Lister()}, + ConversionFactory: &nopCRConversionFactory{}, }, } diff --git a/pkg/cache/server/crd_lister.go b/pkg/cache/server/crd_lister.go index 85a77853589..9748f3a3b69 100644 --- a/pkg/cache/server/crd_lister.go +++ b/pkg/cache/server/crd_lister.go @@ -19,10 +19,10 @@ package server import ( "context" + kcpapiextensionsv1listers "github.com/kcp-dev/client-go/apiextensions/listers/apiextensions/v1" "github.com/kcp-dev/logicalcluster/v3" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - kcpapiextensionsv1listers "k8s.io/apiextensions-apiserver/pkg/client/kcp/listers/apiextensions/v1" "k8s.io/apiextensions-apiserver/pkg/kcp" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/cliplugins/base/options.go b/pkg/cliplugins/base/options.go index b773aa6eebe..886ec811d23 100644 --- a/pkg/cliplugins/base/options.go +++ b/pkg/cliplugins/base/options.go @@ -71,15 +71,17 @@ func (o *Options) BindFlags(cmd *cobra.Command) { // Complete initializes ClientConfig based on Kubeconfig and KubectlOverrides. func (o *Options) Complete() error { - loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() - loadingRules.ExplicitPath = o.Kubeconfig + if o.ClientConfig == nil { + loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() + loadingRules.ExplicitPath = o.Kubeconfig - startingConfig, err := loadingRules.GetStartingConfig() - if err != nil { - return err - } + startingConfig, err := loadingRules.GetStartingConfig() + if err != nil { + return err + } - o.ClientConfig = clientcmd.NewDefaultClientConfig(*startingConfig, o.KubectlOverrides) + o.ClientConfig = clientcmd.NewDefaultClientConfig(*startingConfig, o.KubectlOverrides) + } return nil } diff --git a/pkg/cliplugins/bind/plugin/bind.go b/pkg/cliplugins/bind/plugin/bind.go index 2b5f4ed6179..cfd96d028fb 100644 --- a/pkg/cliplugins/bind/plugin/bind.go +++ b/pkg/cliplugins/bind/plugin/bind.go @@ -142,7 +142,7 @@ func (b *BindOptions) Run(ctx context.Context) error { // wait for phase to be bound if createdBinding.Status.Phase != apisv1alpha1.APIBindingPhaseBound { - if err := wait.PollImmediate(time.Millisecond*500, b.BindWaitTimeout, func() (done bool, err error) { + if err := wait.PollUntilContextTimeout(ctx, time.Millisecond*500, b.BindWaitTimeout, true, func(ctx context.Context) (done bool, err error) { createdBinding, err := kcpclient.Cluster(currentClusterName).ApisV1alpha1().APIBindings().Get(ctx, binding.Name, metav1.GetOptions{}) if err != nil { return false, err diff --git a/pkg/cliplugins/workspace/plugin/kubeconfig.go b/pkg/cliplugins/workspace/plugin/kubeconfig.go index 1ed83ce1ea5..95182389d67 100644 --- a/pkg/cliplugins/workspace/plugin/kubeconfig.go +++ b/pkg/cliplugins/workspace/plugin/kubeconfig.go @@ -592,7 +592,7 @@ func (o *CreateWorkspaceOptions) Run(ctx context.Context) error { } // STOP THE BLEEDING: the virtual workspace is still informer based (not good). We have to wait until it shows up. - if err := wait.PollImmediate(time.Millisecond*100, time.Second*5, func() (bool, error) { + if err := wait.PollUntilContextTimeout(ctx, time.Millisecond*100, time.Second*5, true, func(ctx context.Context) (bool, error) { if _, err := o.kcpClusterClient.Cluster(currentClusterName).TenancyV1alpha1().Workspaces().Get(ctx, ws.Name, metav1.GetOptions{}); err != nil { if apierrors.IsNotFound(err) { return false, nil @@ -606,7 +606,7 @@ func (o *CreateWorkspaceOptions) Run(ctx context.Context) error { // wait for being ready if ws.Status.Phase != corev1alpha1.LogicalClusterPhaseReady { - if err := wait.PollImmediate(time.Millisecond*500, o.ReadyWaitTimeout, func() (bool, error) { + if err := wait.PollUntilContextTimeout(ctx, time.Millisecond*500, o.ReadyWaitTimeout, true, func(ctx context.Context) (bool, error) { ws, err = o.kcpClusterClient.Cluster(currentClusterName).TenancyV1alpha1().Workspaces().Get(ctx, ws.Name, metav1.GetOptions{}) if err != nil { return false, err diff --git a/pkg/cliplugins/workspace/plugin/kubeconfig_test.go b/pkg/cliplugins/workspace/plugin/kubeconfig_test.go index d48eef87237..4a52c06edbb 100644 --- a/pkg/cliplugins/workspace/plugin/kubeconfig_test.go +++ b/pkg/cliplugins/workspace/plugin/kubeconfig_test.go @@ -183,18 +183,21 @@ func TestCreate(t *testing.T) { }, } for _, tt := range tests { + // TODO(sttts): tt has a data race here due to the parallel test execution. But unaliasing it breaks the tests. WTF. + // tt := tt + t.Run(tt.name, func(t *testing.T) { t.Parallel() var got *clientcmdapi.Config - cluster := tt.config.Clusters[tt.config.Contexts[tt.config.CurrentContext].Cluster] + cluster := tt.config.Clusters[tt.config.Contexts[tt.config.CurrentContext].Cluster] //nolint:govet // TODO(sttts): fixing this above breaks the test u := parseURLOrDie(cluster.Server) currentClusterName := logicalcluster.NewPath(strings.TrimPrefix(u.Path, "/clusters/")) u.Path = "" objects := []runtime.Object{} - for _, name := range tt.existingWorkspaces { + for _, name := range tt.existingWorkspaces { //nolint:govet // TODO(sttts): fixing this above breaks the test objects = append(objects, &tenancyv1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: name, @@ -213,7 +216,7 @@ func TestCreate(t *testing.T) { } client := kcpfakeclient.NewSimpleClientset(objects...) - workspaceType := tt.newWorkspaceType + workspaceType := tt.newWorkspaceType //nolint:govet // TODO(sttts): fixing this above breaks the test empty := tenancyv1alpha1.WorkspaceTypeReference{} if workspaceType == empty { workspaceType = tenancyv1alpha1.WorkspaceTypeReference{ @@ -222,7 +225,7 @@ func TestCreate(t *testing.T) { } } - if tt.markReady { + if tt.markReady { //nolint:govet // TODO(sttts): fixing this above breaks the test client.PrependReactor("create", "workspaces", func(action kcptesting.Action) (handled bool, ret runtime.Object, err error) { obj := action.(kcptesting.CreateAction).GetObject().(*tenancyv1alpha1.Workspace) obj.Status.Phase = corev1alpha1.LogicalClusterPhaseReady @@ -238,30 +241,30 @@ func TestCreate(t *testing.T) { } opts := NewCreateWorkspaceOptions(genericclioptions.NewTestIOStreamsDiscard()) - opts.Name = tt.newWorkspaceName + opts.Name = tt.newWorkspaceName //nolint:govet // TODO(sttts): fixing this above breaks the test opts.Type = workspaceType.Path + ":" + string(workspaceType.Name) - opts.IgnoreExisting = tt.ignoreExisting - opts.EnterAfterCreate = tt.useAfterCreation + opts.IgnoreExisting = tt.ignoreExisting //nolint:govet // TODO(sttts): fixing this above breaks the test + opts.EnterAfterCreate = tt.useAfterCreation //nolint:govet // TODO(sttts): fixing this above breaks the test opts.ReadyWaitTimeout = time.Second opts.modifyConfig = func(configAccess clientcmd.ConfigAccess, config *clientcmdapi.Config) error { got = config return nil } opts.kcpClusterClient = client - opts.ClientConfig = clientcmd.NewDefaultClientConfig(*tt.config.DeepCopy(), nil) + opts.ClientConfig = clientcmd.NewDefaultClientConfig(*tt.config.DeepCopy(), nil) //nolint:govet // TODO(sttts): fixing this above breaks the test err := opts.Run(context.Background()) - if tt.wantErr { + if tt.wantErr { //nolint:govet // TODO(sttts): fixing this above breaks the test require.Error(t, err) } else { require.NoError(t, err) } - if got != nil && tt.expected == nil { + if got != nil && tt.expected == nil { //nolint:govet // TODO(sttts): fixing this above breaks the test t.Errorf("unexpected kubeconfig write") - } else if got == nil && tt.expected != nil { + } else if got == nil && tt.expected != nil { //nolint:govet // TODO(sttts): fixing this above breaks the test t.Errorf("expected a kubeconfig write, but didn't see one") - } else if got != nil && !reflect.DeepEqual(got, tt.expected) { - t.Errorf("unexpected config, diff (expected, got): %s", cmp.Diff(tt.expected, got)) + } else if got != nil && !reflect.DeepEqual(got, tt.expected) { //nolint:govet // TODO(sttts): fixing this above breaks the test + t.Errorf("unexpected config, diff (expected, got): %s", cmp.Diff(tt.expected, got)) //nolint:govet // TODO(sttts): fixing this above breaks the test } }) } @@ -1180,6 +1183,8 @@ func TestUse(t *testing.T) { }, } for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { var got *clientcmdapi.Config @@ -1472,6 +1477,8 @@ func TestCreateContext(t *testing.T) { }, } for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { var got *clientcmdapi.Config diff --git a/pkg/conversion/conversion_factory.go b/pkg/conversion/conversion_factory.go deleted file mode 100644 index 0fb031f3037..00000000000 --- a/pkg/conversion/conversion_factory.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -Copyright 2023 The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "strings" - "time" - - "github.com/kcp-dev/logicalcluster/v3" - - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "k8s.io/apiextensions-apiserver/pkg/apiserver/conversion" - - apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" - apisinformers "github.com/kcp-dev/kcp/sdk/client/informers/externalversions/apis/v1alpha1" -) - -// CRConverterFactory instantiates converters that are capable of converting custom resources between different API -// versions. It supports CEL-based conversion rules from APIConversion resources and the "none" conversion strategy. -type CRConverterFactory struct { - getAPIConversion func(clusterName logicalcluster.Name, name string) (*apisv1alpha1.APIConversion, error) - objectCELTransformationsTimeout time.Duration -} - -var _ conversion.Factory = &CRConverterFactory{} - -// NewCRConverterFactory returns a CRConverterFactory that supports APIConversion-based conversions and the "none" -// conversion strategy. -func NewCRConverterFactory( - apiConversionInformer apisinformers.APIConversionClusterInformer, - objectCELTransformationsTimeout time.Duration, -) *CRConverterFactory { - return &CRConverterFactory{ - getAPIConversion: func(clusterName logicalcluster.Name, name string) (*apisv1alpha1.APIConversion, error) { - return apiConversionInformer.Lister().Cluster(clusterName).Get(name) - }, - objectCELTransformationsTimeout: objectCELTransformationsTimeout, - } -} - -// NewConverter returns the appropriate conversion.Converter based on the CRD. If the CRD identifies as for a "wildcard -// partial metadata request", the nop converter is used. Otherwise, it returns a CEL-based converter if there is an -// associated APIConversion, a nop converter if the strategy is "none", or an error otherwise. -func (f *CRConverterFactory) NewConverter(crd *apiextensionsv1.CustomResourceDefinition) (conversion.CRConverter, error) { - // Wildcard, partial metadata requests never need conversion - if strings.HasSuffix(string(crd.UID), ".wildcard.partial-metadata") { - return conversion.NewNOPConverter(), nil - } - - // We have to return a deferredConverter here instead of an actual one because apiextensions-apiserver creates the - // converter once, when it creates serving info for a CRD. Because we aren't currently guaranteeing order (or cache - // freshness), there is always a chance that serving info is created for a CRD before an associated APIConversion - // exists and is present in the informer cache. - return &deferredConverter{ - crd: crd, - - getAPIConversion: f.getAPIConversion, - newConverter: func(crd *apiextensionsv1.CustomResourceDefinition, apiConversion *apisv1alpha1.APIConversion) (conversion.CRConverter, error) { - return NewConverter(crd, apiConversion, f.objectCELTransformationsTimeout) - }, - }, nil -} diff --git a/pkg/conversion/conversion_factory_test.go b/pkg/conversion/conversion_factory_test.go deleted file mode 100644 index 6eb0e6bb685..00000000000 --- a/pkg/conversion/conversion_factory_test.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2023 The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "testing" - - "github.com/stretchr/testify/require" - - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "k8s.io/apiextensions-apiserver/pkg/apiserver/conversion" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/wait" -) - -func TestNewCRConverterFactory(t *testing.T) { - f := NewCRConverterFactory(nil, wait.ForeverTestTimeout) - - crd := &apiextensionsv1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{ - UID: types.UID("foo.wildcard.partial-metadata"), - }, - } - - // Partial metadata CRDs must use a nopConverter - converter, err := f.NewConverter(crd) - require.NoError(t, err) - require.IsType(t, conversion.NewNOPConverter(), converter) - - // All other CRDs use a real converter - crd.UID = "" - converter, err = f.NewConverter(crd) - require.NoError(t, err) - require.IsType(t, &deferredConverter{}, converter) -} diff --git a/pkg/conversion/conversion_rules.go b/pkg/conversion/conversion_rules.go deleted file mode 100644 index 153c22c565c..00000000000 --- a/pkg/conversion/conversion_rules.go +++ /dev/null @@ -1,235 +0,0 @@ -/* -Copyright 2023 The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "fmt" - "strings" - "time" - - "github.com/google/cel-go/cel" - - structuralschema "k8s.io/apiextensions-apiserver/pkg/apiserver/schema" - "k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/model" - kerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/apimachinery/pkg/util/validation/field" - apiservercel "k8s.io/apiserver/pkg/cel" - "k8s.io/apiserver/pkg/cel/library" - - apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" -) - -const celCheckFrequency = 100 - -// CompiledRule contains the compiled cel.Program to convert a single field. -type CompiledRule struct { - // FromPath is an expression specifying the field in the source version, such as spec.firstName. - FromPath string - // FromFields is FromPath split by '.', with any leading '.' removed. - FromFields []string - // ToPath is an expression specifying the destination field in the target version, such as spec.name.first. - ToPath string - // ToFields is ToPath split by '.', with any leading '.' removed. - ToFields []string - // Program is a compiled set of instructions for a conversion transformation. - Program cel.Program -} - -// Compile compiles conversion rules. -func Compile( - apiConversion *apisv1alpha1.APIConversion, - structuralSchemas map[string]*structuralschema.Structural, -) (map[string][]*CompiledRule, error) { - compiledRules := make(map[string][]*CompiledRule) - var errs []error - - for i := range apiConversion.Spec.Conversions { - c := apiConversion.Spec.Conversions[i] - path := field.NewPath("spec", "conversions").Index(i) - rulesForVersion, err := compileConversion(path, &c, structuralSchemas) - if err != nil { - errs = append(errs, err) - continue - } - - compiledRules[c.From] = rulesForVersion - } - - return compiledRules, kerrors.NewAggregate(errs) -} - -// compileConversion processes an APIVersionConversion, compiles any CEL transformations, and returns a slice of -// CompiledRule objects that the converter uses to perform conversions. -func compileConversion(path *field.Path, c *apisv1alpha1.APIVersionConversion, structuralSchemas map[string]*structuralschema.Structural) ([]*CompiledRule, error) { - rulesForVersion := make([]*CompiledRule, 0, len(c.Rules)) - - schema, exists := structuralSchemas[c.From] - if !exists { - return nil, field.Invalid(path.Child("from"), c.From, "unable to find structural schema for version") - } - - var errs []error - for j, rule := range c.Rules { - rulePath := path.Child("rules").Index(j) - cr, err := compileRule(rulePath, rule, schema) - if err != nil { - errs = append(errs, err) - continue - } - rulesForVersion = append(rulesForVersion, cr) - } - - return rulesForVersion, kerrors.NewAggregate(errs) -} - -// compileRule takes a single APIConversionRule, compiles the CEL transformation (if any), and converts the rule to a -// CompiledRule that the converter uses to perform conversions. -func compileRule(rulePath *field.Path, rule apisv1alpha1.APIConversionRule, schema *structuralschema.Structural) (*CompiledRule, error) { - // if rule.Field starts with a ".", such as .spec.fieldName, strip the leading "." - fromPath := rule.Field - if fromPath[0] == '.' { - fromPath = fromPath[1:] - } - - // if rule.Destination starts with a ".", such as .spec.fieldName, strip the leading "." - toPath := rule.Destination - if toPath[0] == '.' { - toPath = toPath[1:] - } - - cr := &CompiledRule{ - FromPath: fromPath, - FromFields: strings.Split(fromPath, "."), - ToPath: rule.Destination, - ToFields: strings.Split(toPath, "."), - } - - schemaForField, err := getStructuralSchemaForField(schema, cr.FromFields...) - if err != nil { - return nil, field.Invalid(rulePath.Child("field"), rule.Field, err.Error()) - } - - if rule.Transformation == "" { - return cr, nil - } - - env, err := createCELEnv(schemaForField) - if err != nil { - return nil, field.InternalError(rulePath.Child("field"), fmt.Errorf("error creating CEL environment: %w", err)) - } - - ast, issues := env.Compile(rule.Transformation) - if issues != nil { - return nil, field.Invalid(rulePath.Child("transformation"), rule.Transformation, fmt.Sprintf("error compiling CEL program: %v", issues.Err())) - } - - program, err := env.Program(ast, - cel.EvalOptions(cel.OptOptimize), - cel.OptimizeRegex(library.ExtensionLibRegexOptimizations...), - cel.InterruptCheckFrequency(celCheckFrequency), - ) - if err != nil { - return nil, field.Invalid(rulePath.Child("transformation"), rule.Transformation, fmt.Sprintf("error creating CEL program: %v", err)) - } - - cr.Program = program - - return cr, nil -} - -func createCELEnv(structuralSchema *structuralschema.Structural) (*cel.Env, error) { - env, err := cel.NewEnv(cel.HomogeneousAggregateLiterals()) - if err != nil { - return nil, fmt.Errorf("error creating CEL environment: %w", err) - } - - registry := apiservercel.NewRegistry(env) - - // inline local copy of upstream's generateUniqueSelfTypeName() - scopedTypeName := fmt.Sprintf("selfType%d", time.Now().Nanosecond()) - declType := model.SchemaDeclType(structuralSchema, true) - ruleTypes, err := apiservercel.NewRuleTypes(scopedTypeName, declType, registry) - if err != nil { - return nil, fmt.Errorf("error creating rule types: %w", err) - } - if ruleTypes == nil { - return nil, fmt.Errorf("unexpected nil rule types") - } - - opts, err := ruleTypes.EnvOptions(env.TypeProvider()) - if err != nil { - return nil, fmt.Errorf("error getting CEL environment options: %w", err) - } - - root, ok := ruleTypes.FindDeclType(scopedTypeName) - if !ok { - if declType == nil { - return nil, fmt.Errorf("rule declared on schema that does not support validation rules type: '%s' x-kubernetes-preserve-unknown-fields: '%t'", structuralSchema.Type, structuralSchema.XPreserveUnknownFields) - } - root = declType.MaybeAssignTypeName(scopedTypeName) - } - - var propDecls []cel.EnvOption - propDecls = append(propDecls, cel.Variable("self", root.CelType())) - - opts = append(opts, propDecls...) - opts = append(opts, cel.HomogeneousAggregateLiterals(), cel.EagerlyValidateDeclarations(true), cel.DefaultUTCTimeZone(true)) - opts = append(opts, library.ExtensionLibs...) - return env.Extend(opts...) -} - -func getStructuralSchemaForField(s *structuralschema.Structural, fields ...string) (*structuralschema.Structural, error) { - // Cursor keeps track of the current schema subtree as we navigate down through each field segment. We start at the - // root of the object (which has apiVersion, metadata, spec, status, etc.). - cursor := s - - // Keep track of which fields we've already visited so we can be specific in our errors - visited := make([]string, 0, len(fields)) - - // Starting with the initial field (e.g. "spec"), try to resolve the next segment (e.g. "name") until we get - // to the desired field (e.g. "first"). - for _, f := range fields { - // Verify that each intermediate field is an object. - if cursor.Type != "object" { - return nil, fmt.Errorf("expected field %q to be an object", strings.Join(visited, ".")) - } - - visited = append(visited, f) - - // First, check properties - if property, exists := cursor.Properties[f]; exists { - // If we found the field, update cursor to point at its schema, and continue to the next field segment - cursor = &property - continue - } - - // Second, check additional properties - if cursor.AdditionalProperties != nil && cursor.AdditionalProperties.Structural != nil { - if property, exists := cursor.AdditionalProperties.Structural.Properties[f]; exists { - // If we found the field, update cursor to point at its schema, and continue to the next field segment - cursor = &property - continue - } - } - - // The field didn't exist in either properties or additional properties - return nil, fmt.Errorf("field %q doesn't exist", strings.Join(visited, ".")) - } - - // Cursor is now set to the schema representing the desired field. - return cursor, nil -} diff --git a/pkg/conversion/conversion_rules_test.go b/pkg/conversion/conversion_rules_test.go deleted file mode 100644 index a2941f9c115..00000000000 --- a/pkg/conversion/conversion_rules_test.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Copyright 2023 The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "testing" - - "github.com/stretchr/testify/require" - - apiextensionsinternal "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - structuralschema "k8s.io/apiextensions-apiserver/pkg/apiserver/schema" - structuraldefaulting "k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting" - "k8s.io/apimachinery/pkg/util/validation/field" - "sigs.k8s.io/yaml" - - apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" -) - -func TestCompileConversion(t *testing.T) { - t.Parallel() - - crdYAML, err := embeddedResources.ReadFile("widgets-crd.yaml") - require.NoError(t, err, "error reading widgets yaml") - - var crd apiextensionsv1.CustomResourceDefinition - err = yaml.Unmarshal(crdYAML, &crd) - require.NoError(t, err, "error unmarshalling crd") - - structuralSchemas := schemasForCRD(t, crd) - - tests := map[string]struct { - conversion apisv1alpha1.APIVersionConversion - expectedError string - }{ - "unable to find version": { - conversion: apisv1alpha1.APIVersionConversion{ - From: "vNotHere", - }, - expectedError: field.Invalid(field.NewPath("foo").Child("from"), "vNotHere", "unable to find structural schema for version").Error(), - }, - } - - for testName, tc := range tests { - // Needed to avoid t.Parallel() races - tc := tc - - t.Run(testName, func(t *testing.T) { - t.Parallel() - - _, err = compileConversion(field.NewPath("foo"), &tc.conversion, structuralSchemas) - if tc.expectedError != "" { - require.ErrorContains(t, err, tc.expectedError) - } else { - require.NoError(t, err) - } - }) - } -} - -func TestCompileRule(t *testing.T) { - t.Parallel() - - crdYAML, err := embeddedResources.ReadFile("widgets-crd.yaml") - require.NoError(t, err, "error reading widgets yaml") - - var crd apiextensionsv1.CustomResourceDefinition - err = yaml.Unmarshal(crdYAML, &crd) - require.NoError(t, err, "error unmarshalling crd") - - structuralSchemas := schemasForCRD(t, crd) - - tests := map[string]struct { - field string - transformation string - want error - }{ - "invalid field path - root doesn't exist": { - field: "noFieldHere", - want: field.Invalid(field.NewPath("foo").Child("field"), "noFieldHere", `field "noFieldHere" doesn't exist`), - }, - "invalid field path - subpath doesn't exist": { - field: "spec.some.unknown.field", - want: field.Invalid(field.NewPath("foo").Child("field"), "spec.some.unknown.field", `field "spec.some" doesn't exist`), - }, - "invalid field path - parent not an object": { - field: "apiVersion.foo", - want: field.Invalid(field.NewPath("foo").Child("field"), "apiVersion.foo", `expected field "apiVersion" to be an object`), - }, - "invalid transformation": { - field: "spec.firstName", - transformation: "self.foo was here", - want: field.Invalid(field.NewPath("foo").Child("transformation"), "self.foo was here", "error compiling CEL program: ERROR: "), - }, - } - - for testName, tc := range tests { - tc := tc - - t.Run(testName, func(t *testing.T) { - t.Parallel() - - rule := apisv1alpha1.APIConversionRule{ - Field: tc.field, - Destination: "spec.someField", - Transformation: tc.transformation, - } - - cr, err := compileRule(field.NewPath("foo"), rule, structuralSchemas["v1"]) - require.Nil(t, cr) - require.Error(t, err) - require.ErrorContains(t, err, tc.want.Error()) - }) - } -} - -func schemasForCRD(t *testing.T, crd apiextensionsv1.CustomResourceDefinition) map[string]*structuralschema.Structural { - t.Helper() - - structuralSchemas := make(map[string]*structuralschema.Structural) - for _, v := range crd.Spec.Versions { - if v.Schema == nil { - continue - } - - internalJSONSchemaProps := &apiextensionsinternal.JSONSchemaProps{} - err := apiextensionsv1.Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(v.Schema.OpenAPIV3Schema, internalJSONSchemaProps, nil) - require.NoError(t, err, "failed converting version %s validation to internal version", v.Name) - - structuralSchema, err := structuralschema.NewStructural(internalJSONSchemaProps) - require.NoError(t, err, "error getting structural schema for version %s", v.Name) - - err = structuraldefaulting.PruneDefaults(structuralSchema) - require.NoError(t, err, "error pruning defaults for version %s", v.Name) - structuralSchemas[v.Name] = structuralSchema - } - return structuralSchemas -} diff --git a/pkg/conversion/converter.go b/pkg/conversion/converter.go deleted file mode 100644 index ed2d1c2bd43..00000000000 --- a/pkg/conversion/converter.go +++ /dev/null @@ -1,261 +0,0 @@ -/* -Copyright 2023 The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "context" - "encoding/json" - "fmt" - "strings" - "time" - - "github.com/google/cel-go/interpreter" - "github.com/prometheus/client_golang/prometheus" - - apiextensionsinternal "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - structuralschema "k8s.io/apiextensions-apiserver/pkg/apiserver/schema" - structuraldefaulting "k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - compbasemetrics "k8s.io/component-base/metrics" - "k8s.io/component-base/metrics/legacyregistry" - - apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" -) - -func init() { - legacyregistry.MustRegister(celTransformationDuration) -} - -var ( - celTransformationDuration = compbasemetrics.NewHistogramVec( - &compbasemetrics.HistogramOpts{ - Name: "conversion_cel_transformation_duration_seconds", - Help: "CEL transformation execution time distribution in seconds", - // From .001 to 16.384 seconds - Buckets: prometheus.ExponentialBuckets(.001, 2, 15), - StabilityLevel: compbasemetrics.ALPHA, - }, - []string{}, - ) -) - -func NewConverter( - crd *apiextensionsv1.CustomResourceDefinition, - apiConversion *apisv1alpha1.APIConversion, - objectCELTransformationsTimeout time.Duration, -) (*Converter, error) { - structuralSchemas := make(map[string]*structuralschema.Structural) - - // Gather all the structural schemas for easy map-based indexing - for _, v := range crd.Spec.Versions { - if v.Schema == nil { - continue - } - - internalJSONSchemaProps := &apiextensionsinternal.JSONSchemaProps{} - if err := apiextensionsv1.Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(v.Schema.OpenAPIV3Schema, internalJSONSchemaProps, nil); err != nil { - return nil, fmt.Errorf("failed converting version %s validation to internal version: %w", v.Name, err) - } - - structuralSchema, err := structuralschema.NewStructural(internalJSONSchemaProps) - if err != nil { - return nil, fmt.Errorf("error getting structural schema for version %s: %w", v.Name, err) - } - - if err := structuraldefaulting.PruneDefaults(structuralSchema); err != nil { - return nil, fmt.Errorf("error pruning defaults for version %s: %w", v.Name, err) - } - - structuralSchemas[v.Name] = structuralSchema - } - - compiledRules, err := Compile(apiConversion, structuralSchemas) - if err != nil { - return nil, fmt.Errorf("error compiling conversion rules: %w", err) - } - - return &Converter{ - apiConversion: apiConversion, - objectCELTransformationsTimeout: objectCELTransformationsTimeout, - - compiledRules: compiledRules, - }, nil -} - -type Converter struct { - apiConversion *apisv1alpha1.APIConversion - objectCELTransformationsTimeout time.Duration - - compiledRules map[string][]*CompiledRule -} - -func (c *Converter) Convert(list *unstructured.UnstructuredList, targetGV schema.GroupVersion) (*unstructured.UnstructuredList, error) { - // It would be ideal to have ctx passed in, but that is a major change to Kubernetes. - ctx := context.TODO() - - convertedList := &unstructured.UnstructuredList{} - for i := range list.Items { - original := &list.Items[i] - - converted, err := c.convert(ctx, original, targetGV) - if err != nil { - return nil, err - } - - convertedList.Items = append(convertedList.Items, *converted) - } - - return convertedList, nil -} - -func (c *Converter) convert(ctx context.Context, original *unstructured.Unstructured, targetGV schema.GroupVersion) (*unstructured.Unstructured, error) { - converted := original.DeepCopy() - converted.SetAPIVersion(targetGV.String()) - - originalVersion := original.GetObjectKind().GroupVersionKind().Version - compiledRules := c.compiledRules[originalVersion] - - ctx, cancel := context.WithTimeout(ctx, c.objectCELTransformationsTimeout) - defer cancel() - - start := time.Now() - for _, rule := range compiledRules { - value, err := evaluateRule(ctx, original, rule) - if err != nil { - return nil, fmt.Errorf("error converting: %w", err) - } - - if err := unstructured.SetNestedField(converted.Object, value, rule.ToFields...); err != nil { - return nil, fmt.Errorf("error setting destination field %q: %w", rule.ToPath, err) - } - } - celTransformationDuration.WithLabelValues().Observe(time.Since(start).Seconds()) - - annotations := converted.GetAnnotations() - if annotations == nil { - annotations = make(map[string]string) - } - - preserveAnnotation := annotations[preserveAnnotationKey(targetGV.Version)] - if preserveAnnotation != "" { - // If we're going to a version that already has the preserve annotation, restore from it - m := map[string]interface{}{} - if err := json.Unmarshal([]byte(preserveAnnotation), &m); err != nil { - return nil, fmt.Errorf("error unmarshaling preserve annotation: %v", err) - } - if err := restoreFromPreserveMap(m, converted.Object); err != nil { - return nil, fmt.Errorf("error processing preserve map: %w", err) - } - - // Don't save the preserve annotation - delete(annotations, preserveAnnotationKey(targetGV.Version)) - if len(annotations) == 0 { - converted.SetAnnotations(nil) - } else { - converted.SetAnnotations(annotations) - } - } else { - // Otherwise, store it - m, err := generatePreserveMap(original, c.apiConversion.Spec.Conversions) - if err != nil { - return nil, fmt.Errorf("error preserving fields: %w", err) - } - - if len(m) > 0 { - encoded, err := json.Marshal(m) - if err != nil { - return nil, fmt.Errorf("error encoding preserve map: %v", err) - } else { - annotations[preserveAnnotationKey(originalVersion)] = string(encoded) - converted.SetAnnotations(annotations) - } - } - } - - return converted, nil -} - -func preserveAnnotationKey(version string) string { - return apisv1alpha1.VersionPreservationAnnotationKeyPrefix + version -} - -func evaluateRule(ctx context.Context, original *unstructured.Unstructured, rule *CompiledRule) (interface{}, error) { - fromValue, exists, err := unstructured.NestedFieldNoCopy(original.Object, rule.FromFields...) - if err != nil { - return nil, fmt.Errorf("error getting source field %q: %w", rule.FromPath, err) - } - if !exists { - return nil, nil - } - - if rule.Program == nil { - return fromValue, nil - } - - bindings := map[string]interface{}{ - "self": fromValue, - } - activation, err := interpreter.NewActivation(bindings) - if err != nil { - return nil, fmt.Errorf("error creating CEL interpreter activation: %w", err) - } - - evalResult, _, err := rule.Program.ContextEval(ctx, activation) - if err != nil { - return nil, fmt.Errorf("error executing transformation: %w", err) - } - - return evalResult.Value(), nil -} - -func generatePreserveMap(original *unstructured.Unstructured, conversions []apisv1alpha1.APIVersionConversion) (map[string]interface{}, error) { - m := map[string]interface{}{} - originalVersion := original.GetObjectKind().GroupVersionKind().Version - - for _, conversion := range conversions { - if conversion.From != originalVersion { - continue - } - for _, field := range conversion.Preserve { - if field[0] == '.' { - field = field[1:] - } - v, exists, err := unstructured.NestedFieldNoCopy(original.Object, strings.Split(field, ".")...) - if err != nil { - return nil, fmt.Errorf("error getting field %q to preserve: %v", field, err) - } - if !exists { - continue - } - m[field] = v - } - } - - return m, nil -} - -func restoreFromPreserveMap(m map[string]interface{}, obj map[string]interface{}) error { - for field, val := range m { - if err := unstructured.SetNestedField(obj, val, strings.Split(field, ".")...); err != nil { - return fmt.Errorf("error setting nested field %q, value %q: %v", field, val, err) - } - } - - return nil -} diff --git a/pkg/conversion/converter_test.go b/pkg/conversion/converter_test.go deleted file mode 100644 index a62e0363641..00000000000 --- a/pkg/conversion/converter_test.go +++ /dev/null @@ -1,295 +0,0 @@ -/* -Copyright 2023 The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "context" - "testing" - - "github.com/google/go-cmp/cmp" - "github.com/stretchr/testify/require" - - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/wait" - "sigs.k8s.io/yaml" - - apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" -) - -func TestPreserveMap(t *testing.T) { - originalYAML := ` -apiVersion: test.kcp.io/v2 -spec: - sub: - one: two - list: - - a - - b - ignore: this -` - originalMap := make(map[string]interface{}) - err := yaml.Unmarshal([]byte(originalYAML), &originalMap) - require.NoError(t, err) - original := &unstructured.Unstructured{Object: originalMap} - - conversions := []apisv1alpha1.APIVersionConversion{ - { - From: "v1", - Preserve: []string{"ignore"}, - }, - { - From: "v2", - Preserve: []string{"spec.sub.one", "spec.list"}, - }, - { - From: "v3", - Preserve: []string{"ignore"}, - }, - } - - m, err := generatePreserveMap(original, conversions) - require.NoError(t, err) - - restored := make(map[string]interface{}) - err = restoreFromPreserveMap(m, restored) - require.NoError(t, err) - - expectedYAML := ` -spec: - sub: - one: two - list: - - a - - b -` - - expected := make(map[string]interface{}) - err = yaml.Unmarshal([]byte(expectedYAML), &expected) - require.NoError(t, err) - require.Empty(t, cmp.Diff(expected, restored)) -} - -func Test_convert_noTransformations(t *testing.T) { - crd := decode[*apiextensionsv1.CustomResourceDefinition](t, ` -spec: - group: test.kcp.io - names: - kind: Widget - listKind: WidgetList - plural: widgets - singular: widget - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - type: object - properties: - apiVersion: - type: string - spec: - type: object - properties: - unmodifiedV1Struct: - type: object - properties: - a: - type: string - b: - type: string - originalV1Name: - type: string - f1: - type: string - f2: - type: string - - name: v2 - schema: - openAPIV3Schema: - type: object - properties: - apiVersion: - type: string - spec: - type: object - properties: - unmodifiedV1Struct: - type: object - properties: - a: - type: string - b: - type: string - renamedInV2: - type: string - splitInV2: - type: object - properties: - f1: - type: string - f2: - type: string -`) - - // NOTE: this has both v1 and v2 fields because the converter does not do any pruning - that is handled by other - // server machinery. - expectedV1 := toUnstructured(t, ` -apiVersion: test.kcp.io/v1 -metadata: - name: foo - annotations: - preserve.conversion.apis.kcp.io/v2: "{\"spec.newInV2String\":\"new1\",\"spec.newInV2Struct\":{\"c\":\"d\"}}" -spec: - unmodifiedV1Struct: - a: b - originalV1Name: rename-1 - f1: v1 - f2: v2 - newInV2String: new1 - newInV2Struct: - c: d - renamedInV2: rename-1 - splitInV2: - f1: v1 - f2: v2 -`) - - v2 := toUnstructured(t, ` -apiVersion: test.kcp.io/v2 -metadata: - name: foo -spec: - unmodifiedV1Struct: - a: b - renamedInV2: rename-1 - splitInV2: - f1: v1 - f2: v2 - newInV2String: new1 - newInV2Struct: - c: d -`) - - conversion := &apisv1alpha1.APIConversion{ - Spec: apisv1alpha1.APIConversionSpec{ - Conversions: []apisv1alpha1.APIVersionConversion{ - { - From: "v1", - To: "v2", - Rules: []apisv1alpha1.APIConversionRule{ - { - Field: "spec.originalV1Name", - Destination: "spec.renamedInV2", - }, - { - Field: "spec.f1", - Destination: "spec.splitInV2.f1", - }, - { - Field: "spec.f2", - Destination: "spec.splitInV2.f2", - }, - }, - }, - { - From: "v2", - To: "v1", - Rules: []apisv1alpha1.APIConversionRule{ - { - Field: "spec.renamedInV2", - Destination: "spec.originalV1Name", - }, - { - Field: "spec.splitInV2.f1", - Destination: "spec.f1", - }, - { - Field: "spec.splitInV2.f2", - Destination: "spec.f2", - }, - }, - Preserve: []string{"spec.newInV2String", "spec.newInV2Struct"}, - }, - }, - }, - } - - converter, err := NewConverter(crd, conversion, wait.ForeverTestTimeout) - require.NoError(t, err, "error creating converter") - - ctx := context.Background() - converted, err := converter.convert(ctx, v2, schema.GroupVersion{Group: "test.kcp.io", Version: "v1"}) - require.NoError(t, err) - require.Empty(t, cmp.Diff(expectedV1, converted)) - - v1WithPreserveAnnotation := toUnstructured(t, ` -apiVersion: test.kcp.io/v1 -metadata: - name: foo - annotations: - preserve.conversion.apis.kcp.io/v2: "{\"spec.newInV2String\":\"new1\",\"spec.newInV2Struct\":{\"c\":\"d\"}}" -spec: - unmodifiedV1Struct: - a: b - originalV1Name: rename-1 - f1: v1 - f2: v2 -`) - - // NOTE: this has both v1 and v2 fields because the converter does not do any pruning - that is handled by other - // server machinery. - expectedV2 := toUnstructured(t, ` -apiVersion: test.kcp.io/v2 -metadata: - name: foo -spec: - unmodifiedV1Struct: - a: b - originalV1Name: rename-1 - f1: v1 - f2: v2 - newInV2String: new1 - newInV2Struct: - c: d - renamedInV2: rename-1 - splitInV2: - f1: v1 - f2: v2 -`) - - converted, err = converter.convert(ctx, v1WithPreserveAnnotation, schema.GroupVersion{Group: "test.kcp.io", Version: "v2"}) - require.NoError(t, err) - require.Empty(t, cmp.Diff(expectedV2, converted)) -} - -func toUnstructured(t *testing.T, data string) *unstructured.Unstructured { - t.Helper() - m := map[string]interface{}{} - err := yaml.Unmarshal([]byte(data), &m) - require.NoError(t, err, "error unmarshalling") - return &unstructured.Unstructured{Object: m} -} - -func decode[T runtime.Object](t *testing.T, data string) (ret T) { - t.Helper() - err := yaml.Unmarshal([]byte(data), &ret) - require.NoError(t, err) - return ret -} diff --git a/pkg/conversion/deferred_converter.go b/pkg/conversion/deferred_converter.go deleted file mode 100644 index 62b1ffc7be5..00000000000 --- a/pkg/conversion/deferred_converter.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Copyright 2023 The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "fmt" - "sync" - - "github.com/kcp-dev/logicalcluster/v3" - - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "k8s.io/apiextensions-apiserver/pkg/apiserver/conversion" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/klog/v2" - - "github.com/kcp-dev/kcp/pkg/logging" - apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" -) - -// deferredConverter implements conversion.Converter and determines on the fly what type of converter to use. -type deferredConverter struct { - crd *apiextensionsv1.CustomResourceDefinition - - // lock guards delegate - lock sync.Mutex - // delegate is the actual converter - delegate conversion.CRConverter - - getAPIConversion func(clusterName logicalcluster.Name, name string) (*apisv1alpha1.APIConversion, error) - newConverter func(crd *apiextensionsv1.CustomResourceDefinition, apiConversion *apisv1alpha1.APIConversion) (conversion.CRConverter, error) -} - -// Convert converts in to targetGV. If there is an APIConversion for this CRD, a CEL-based converter is used. Otherwise, -// a nop converter is used. -func (f *deferredConverter) Convert(in *unstructured.UnstructuredList, targetGV schema.GroupVersion) (*unstructured.UnstructuredList, error) { - converter, err := f.getConverter() - if err != nil { - return nil, fmt.Errorf("error getting converter: %w", err) - } - - return converter.Convert(in, targetGV) -} - -func (f *deferredConverter) getConverter() (conversion.CRConverter, error) { - f.lock.Lock() - defer f.lock.Unlock() - - if f.delegate != nil { - return f.delegate, nil - } - - var clusterName logicalcluster.Name - var conversionName string - _, boundCRD := f.crd.Annotations[apisv1alpha1.AnnotationBoundCRDKey] - clusterNameAnnotation := f.crd.Annotations[apisv1alpha1.AnnotationSchemaClusterKey] - schemaNameAnnotation := f.crd.Annotations[apisv1alpha1.AnnotationSchemaNameKey] - - switch { - case boundCRD && clusterNameAnnotation != "" && schemaNameAnnotation != "": - // If this is a bound CRD, we need to look up the APIConversion in the workspace where the APIResourceSchema - // lives. - clusterName = logicalcluster.Name(clusterNameAnnotation) - conversionName = schemaNameAnnotation - case !boundCRD: - // Otherwise, it has to be in the same place as the CRD - clusterName = logicalcluster.From(f.crd) - conversionName = f.crd.Name - default: - logging.WithObject(klog.Background(), f.crd).Error(nil, "unable to determine APIConversion name", - "boundCRD", boundCRD, - "crdSchemaClusterNameAnnotation", clusterNameAnnotation, - "crdSchemaNameAnnotation", schemaNameAnnotation, - ) - return nil, fmt.Errorf("unable to get converter") - } - - apiConversion, err := f.getAPIConversion(clusterName, conversionName) - if err != nil && !errors.IsNotFound(err) { - return nil, fmt.Errorf("error checking for APIConversion for CRD %s|%s: %w", clusterNameAnnotation, f.crd.Name, err) - } - if errors.IsNotFound(err) { - switch f.crd.Spec.Conversion.Strategy { - case apiextensionsv1.NoneConverter: - return conversion.NewNOPConverter(), nil - case apiextensionsv1.WebhookConverter: - return nil, fmt.Errorf("conversion strategy %q is not supported for CRD %s", f.crd.Spec.Conversion.Strategy, f.crd.Name) - default: - return nil, fmt.Errorf("unknown conversion strategy %q for CRD %s", f.crd.Spec.Conversion.Strategy, f.crd.Name) - } - } - - converter, err := f.newConverter(f.crd, apiConversion) - if err != nil { - return nil, fmt.Errorf("error creating converter for CRD %s|%s: %w", clusterNameAnnotation, f.crd.Name, err) - } - f.delegate = converter - - return converter, nil -} diff --git a/pkg/conversion/deferred_converter_test.go b/pkg/conversion/deferred_converter_test.go deleted file mode 100644 index 0092803f817..00000000000 --- a/pkg/conversion/deferred_converter_test.go +++ /dev/null @@ -1,157 +0,0 @@ -/* -Copyright 2023 The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "testing" - - "github.com/kcp-dev/logicalcluster/v3" - "github.com/stretchr/testify/require" - - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "k8s.io/apiextensions-apiserver/pkg/apiserver/conversion" - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/yaml" - - apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" -) - -func TestDeferredConverter_getConverter(t *testing.T) { - t.Parallel() - - crdYAML, err := embeddedResources.ReadFile("widgets-crd.yaml") - require.NoError(t, err, "error reading widgets yaml") - - var crd apiextensionsv1.CustomResourceDefinition - err = yaml.Unmarshal(crdYAML, &crd) - require.NoError(t, err, "error unmarshalling crd") - - apiConversionYAML := ` -spec: - conversions: - - from: v1 - to: v2 - rules: - - field: .spec.firstName - destination: .spec.name.first - - field: .spec.lastName - destination: .spec.name.last - transformation: self - - field: .spec.lastName - destination: .spec.name.lastUpper - transformation: self.upperAscii() - - from: v2 - to: v1 - rules: - - field: .spec.name.first - destination: .spec.firstName - - field: .spec.name.last - destination: .spec.lastName - preserve: - - .spec.someNewField -` - var apiConversion apisv1alpha1.APIConversion - err = yaml.Unmarshal([]byte(apiConversionYAML), &apiConversion) - require.NoError(t, err, "error unmarshalling APIConversion") - - tests := map[string]struct { - apiConversionNotFound bool - strategy apiextensionsv1.ConversionStrategyType - expectedType interface{} - wantErrorMatching string - wantNewConverterCalls int - }{ - "APIConversion not found, strategy=none": { - apiConversionNotFound: true, - strategy: apiextensionsv1.NoneConverter, - expectedType: conversion.NewNOPConverter(), - wantNewConverterCalls: 0, - }, - "APIConversion not found, strategy=webhook": { - apiConversionNotFound: true, - strategy: apiextensionsv1.WebhookConverter, - wantErrorMatching: "is not supported for CRD", - wantNewConverterCalls: 0, - }, - "APIConversion not found, strategy=unknown": { - apiConversionNotFound: true, - strategy: "something", - wantErrorMatching: "unknown conversion strategy", - wantNewConverterCalls: 0, - }, - "APIConversion exists": { - expectedType: &fakeConverter{}, - wantNewConverterCalls: 1, - }, - } - - for testName, tc := range tests { - tc := tc - - t.Run(testName, func(t *testing.T) { - t.Parallel() - - crd := crd.DeepCopy() - crd.Spec.Conversion.Strategy = tc.strategy - - newConverterCalls := 0 - - c := &deferredConverter{ - crd: crd, - getAPIConversion: func(clusterName logicalcluster.Name, name string) (*apisv1alpha1.APIConversion, error) { - require.Equal(t, clusterName, logicalcluster.Name("root")) - require.Equal(t, name, "v1.widgets.kcp.io") - - if tc.apiConversionNotFound { - return nil, apierrors.NewNotFound(apisv1alpha1.Resource("apiconversions"), name) - } - - return &apiConversion, nil - }, - newConverter: func(crd *apiextensionsv1.CustomResourceDefinition, apiConversion *apisv1alpha1.APIConversion) (conversion.CRConverter, error) { - newConverterCalls++ - return &fakeConverter{}, nil - }, - } - - converter, err := c.getConverter() - if tc.wantErrorMatching == "" { - require.NoError(t, err) - } else { - require.ErrorContains(t, err, tc.wantErrorMatching) - return - } - - require.IsType(t, tc.expectedType, converter) - require.Equal(t, tc.wantNewConverterCalls, newConverterCalls) - - // Make sure we return the cached converter if we try to get it again - converter, err = c.getConverter() - require.NoError(t, err) - require.IsType(t, tc.expectedType, converter) - require.Equal(t, tc.wantNewConverterCalls, newConverterCalls) - }) - } -} - -type fakeConverter struct{} - -func (f *fakeConverter) Convert(in *unstructured.UnstructuredList, _ schema.GroupVersion) (*unstructured.UnstructuredList, error) { - return in, nil -} diff --git a/pkg/conversion/embedded_test.go b/pkg/conversion/embedded_test.go deleted file mode 100644 index 38eb1f3db01..00000000000 --- a/pkg/conversion/embedded_test.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2023 The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import "embed" - -//go:embed *.yaml -var embeddedResources embed.FS diff --git a/pkg/conversion/widgets-crd.yaml b/pkg/conversion/widgets-crd.yaml deleted file mode 100644 index 03636b01a1a..00000000000 --- a/pkg/conversion/widgets-crd.yaml +++ /dev/null @@ -1,83 +0,0 @@ -metadata: - uid: 1234 - annotations: - apis.kcp.io/bound-crd: "" - apis.kcp.io/schema-cluster: root - apis.kcp.io/schema-name: v1.widgets.kcp.io -spec: - conversion: {} - group: example.io - names: - kind: Widget - listKind: WidgetList - plural: widgets - singular: widget - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - type: object - description: Widgets do things - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - type: object - properties: - firstName: - type: string - lastName: - type: string - status: - type: object - properties: - phase: - type: string - served: true - storage: true - subresources: - status: {} - - name: v2 - schema: - openAPIV3Schema: - type: object - description: Widgets do things - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - type: object - properties: - someNewField: - type: object - properties: - hello: - type: string - name: - type: object - properties: - first: - type: string - last: - type: string - lastUpper: - type: string - status: - type: object - properties: - type: object - phase: - type: string - served: true - storage: false - subresources: - status: {} diff --git a/pkg/crdpuller/discovery.go b/pkg/crdpuller/discovery.go index 9ea8e8ae97f..1573304da7c 100644 --- a/pkg/crdpuller/discovery.go +++ b/pkg/crdpuller/discovery.go @@ -43,8 +43,8 @@ import ( "k8s.io/klog/v2" "k8s.io/kube-openapi/pkg/util" "k8s.io/kube-openapi/pkg/util/proto" - "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" - _ "k8s.io/kubernetes/pkg/genericcontrolplane/apis/install" + + kcpscheme "github.com/kcp-dev/kcp/pkg/server/scheme" ) type schemaPuller struct { @@ -155,14 +155,14 @@ func (sp *schemaPuller) PullCRDs(ctx context.Context, resourceNames ...string) ( logger := logger.WithValues("resource", apiResource.Name) - if genericcontrolplanescheme.Scheme.IsGroupRegistered(gv.Group) && !genericcontrolplanescheme.Scheme.IsVersionRegistered(gv) { + if kcpscheme.Scheme.IsGroupRegistered(gv.Group) && !kcpscheme.Scheme.IsVersionRegistered(gv) { logger.Info("ignoring an apiVersion since it is part of the core KCP resources, but not compatible with KCP version") continue } gvk := gv.WithKind(apiResource.Kind) logger = logger.WithValues("kind", apiResource.Kind) - if (genericcontrolplanescheme.Scheme.Recognizes(gvk) || extensionsapiserver.Scheme.Recognizes(gvk)) && !resourcesToPull.Has(groupResource.String()) { + if (kcpscheme.Scheme.Recognizes(gvk) || extensionsapiserver.Scheme.Recognizes(gvk)) && !resourcesToPull.Has(groupResource.String()) { logger.Info("ignoring a resource since it is part of the core KCP resources") continue } diff --git a/pkg/crypto/rand.go b/pkg/crypto/rand.go index d5c8638aca3..3a191e71b36 100644 --- a/pkg/crypto/rand.go +++ b/pkg/crypto/rand.go @@ -17,8 +17,8 @@ limitations under the License. package crypto import ( + "crypto/rand" "encoding/base64" - "math/rand" ) // RandomBits returns a random byte slice with at least the requested bits of entropy. diff --git a/pkg/embeddedetcd/config.go b/pkg/embeddedetcd/config.go index c4aa907a471..b8e7eeb0c34 100644 --- a/pkg/embeddedetcd/config.go +++ b/pkg/embeddedetcd/config.go @@ -34,6 +34,7 @@ import ( "go.etcd.io/etcd/client/pkg/v3/fileutil" "go.etcd.io/etcd/server/v3/embed" "go.etcd.io/etcd/server/v3/wal" + "go.uber.org/zap" "github.com/kcp-dev/kcp/pkg/embeddedetcd/options" ) @@ -55,13 +56,13 @@ func NewConfig(o options.CompletedOptions, enableWatchCache bool) (*Config, erro cfg.Dir = o.Directory cfg.AuthToken = "" - cfg.LPUrls = []url.URL{{Scheme: "https", Host: "localhost:" + o.PeerPort}} - cfg.APUrls = []url.URL{{Scheme: "https", Host: "localhost:" + o.PeerPort}} - cfg.LCUrls = []url.URL{{Scheme: "https", Host: "localhost:" + o.ClientPort}} - cfg.ACUrls = []url.URL{{Scheme: "https", Host: "localhost:" + o.ClientPort}} + cfg.ListenPeerUrls = []url.URL{{Scheme: "https", Host: "localhost:" + o.PeerPort}} + cfg.AdvertisePeerUrls = []url.URL{{Scheme: "https", Host: "localhost:" + o.PeerPort}} + cfg.ListenClientUrls = []url.URL{{Scheme: "https", Host: "localhost:" + o.ClientPort}} + cfg.AdvertiseClientUrls = []url.URL{{Scheme: "https", Host: "localhost:" + o.ClientPort}} cfg.InitialCluster = cfg.InitialClusterFromName(cfg.Name) - if err := fileutil.TouchDirAll(cfg.Dir); err != nil { + if err := fileutil.TouchDirAll(zap.NewNop(), cfg.Dir); err != nil { return nil, err } diff --git a/pkg/features/kcp_features.go b/pkg/features/kcp_features.go index da98b1ac7f2..30def115951 100644 --- a/pkg/features/kcp_features.go +++ b/pkg/features/kcp_features.go @@ -87,17 +87,15 @@ func (f *kcpFeatureGate) Type() string { var defaultGenericControlPlaneFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ // inherited features from generic apiserver, relisted here to get a conflict if it is changed // unintentionally on either side: - genericfeatures.AdvancedAuditing: {Default: true, PreRelease: featuregate.GA}, genericfeatures.APIResponseCompression: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.APIListChunking: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.APIPriorityAndFairness: {Default: true, PreRelease: featuregate.Beta}, genericfeatures.CustomResourceValidationExpressions: {Default: true, PreRelease: featuregate.Beta}, - genericfeatures.DryRun: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.28 genericfeatures.OpenAPIEnums: {Default: true, PreRelease: featuregate.Beta}, - genericfeatures.OpenAPIV3: {Default: true, PreRelease: featuregate.Beta}, + genericfeatures.OpenAPIV3: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, genericfeatures.ServerSideApply: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.29 - genericfeatures.ServerSideFieldValidation: {Default: true, PreRelease: featuregate.Beta}, - genericfeatures.ValidatingAdmissionPolicy: {Default: false, PreRelease: featuregate.Alpha}, + genericfeatures.ServerSideFieldValidation: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, + genericfeatures.ValidatingAdmissionPolicy: {Default: false, PreRelease: featuregate.Beta}, logsapi.LoggingBetaOptions: {Default: true, PreRelease: featuregate.Beta}, logsapi.ContextualLogging: {Default: true, PreRelease: featuregate.Alpha}, diff --git a/pkg/informer/informer.go b/pkg/informer/informer.go index e56d8106866..ce5c6f6930b 100644 --- a/pkg/informer/informer.go +++ b/pkg/informer/informer.go @@ -836,7 +836,6 @@ type crdGVRSource struct { var builtInInformableTypes map[schema.GroupVersionResource]GVRPartialMetadata = map[schema.GroupVersionResource]GVRPartialMetadata{ gvrFor("", "v1", "configmaps"): withGVRPartialMetadata(apiextensionsv1.NamespaceScoped, "ConfigMap", "configmap"), gvrFor("", "v1", "events"): withGVRPartialMetadata(apiextensionsv1.NamespaceScoped, "Event", "event"), - gvrFor("", "v1", "limitranges"): withGVRPartialMetadata(apiextensionsv1.NamespaceScoped, "LimitRange", "limitrange"), gvrFor("", "v1", "namespaces"): withGVRPartialMetadata(apiextensionsv1.ClusterScoped, "Namespace", "namespace"), gvrFor("", "v1", "resourcequotas"): withGVRPartialMetadata(apiextensionsv1.NamespaceScoped, "ResourceQuota", "resourcequota"), gvrFor("", "v1", "secrets"): withGVRPartialMetadata(apiextensionsv1.NamespaceScoped, "Secret", "secret"), diff --git a/pkg/informer/informer_test.go b/pkg/informer/informer_test.go index 9a0a89e83bd..9c19476089a 100644 --- a/pkg/informer/informer_test.go +++ b/pkg/informer/informer_test.go @@ -29,8 +29,8 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/restmapper" - "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" - _ "k8s.io/kubernetes/pkg/genericcontrolplane/apis/install" + + kcpscheme "github.com/kcp-dev/kcp/pkg/server/scheme" ) // TestBuiltInInformableTypes tests that there is no drift between actual built-in types and the list that is hard-coded @@ -54,10 +54,30 @@ func TestBuiltInInformableTypes(t *testing.T) { gvksToIgnore := map[schema.GroupVersionKind]struct{}{ {Version: "v1", Kind: "APIGroup"}: {}, {Version: "v1", Kind: "APIVersions"}: {}, + {Version: "v1", Kind: "Binding"}: {}, + {Version: "v1", Kind: "ComponentStatus"}: {}, + {Version: "v1", Kind: "Endpoints"}: {}, + {Version: "v1", Kind: "LimitRange"}: {}, + {Version: "v1", Kind: "NodeProxyOptions"}: {}, + {Version: "v1", Kind: "Node"}: {}, + {Version: "v1", Kind: "PersistentVolumeClaim"}: {}, + {Version: "v1", Kind: "PersistentVolume"}: {}, + {Version: "v1", Kind: "Pod"}: {}, + {Version: "v1", Kind: "PodAttachOptions"}: {}, + {Version: "v1", Kind: "PodExecOptions"}: {}, + {Version: "v1", Kind: "PodPortForwardOptions"}: {}, + {Version: "v1", Kind: "PodLogOptions"}: {}, + {Version: "v1", Kind: "PodProxyOptions"}: {}, + {Version: "v1", Kind: "PodStatusResult"}: {}, + {Version: "v1", Kind: "PodTemplate"}: {}, + {Version: "v1", Kind: "ReplicationController"}: {}, {Version: "v1", Kind: "RangeAllocation"}: {}, {Version: "v1", Kind: "SerializedReference"}: {}, + {Version: "v1", Kind: "ServiceProxyOptions"}: {}, + {Version: "v1", Kind: "Service"}: {}, {Version: "v1", Kind: "Status"}: {}, {Group: "authentication.k8s.io", Version: "v1alpha1", Kind: "SelfSubjectReview"}: {}, + {Group: "authentication.k8s.io", Version: "v1", Kind: "SelfSubjectReview"}: {}, {Group: "authentication.k8s.io", Version: "v1", Kind: "TokenRequest"}: {}, {Group: "authentication.k8s.io", Version: "v1", Kind: "TokenReview"}: {}, {Group: "authorization.k8s.io", Version: "v1", Kind: "LocalSubjectAccessReview"}: {}, @@ -74,6 +94,7 @@ func TestBuiltInInformableTypes(t *testing.T) { {Group: "admissionregistration.k8s.io", Version: "v1beta1"}: {}, {Group: "authentication.k8s.io", Version: "v1beta1"}: {}, {Group: "authorization.k8s.io", Version: "v1beta1"}: {}, + {Group: "certificates.k8s.io", Version: "v1alpha1"}: {}, {Group: "certificates.k8s.io", Version: "v1beta1"}: {}, {Group: "coordination.k8s.io", Version: "v1beta1"}: {}, {Group: "events.k8s.io", Version: "v1beta1"}: {}, @@ -81,7 +102,7 @@ func TestBuiltInInformableTypes(t *testing.T) { {Group: "rbac.authorization.k8s.io", Version: "v1beta1"}: {}, } - allKnownTypes := genericcontrolplanescheme.Scheme.AllKnownTypes() + allKnownTypes := kcpscheme.Scheme.AllKnownTypes() // CRDs are not included in the genericcontrolplane scheme (because they're part of the apiextensions apiserver), // so we have to manually add them diff --git a/pkg/openapi/zz_generated.openapi.go b/pkg/openapi/zz_generated.openapi.go index 3ebf7050be1..53f33ba08c4 100644 --- a/pkg/openapi/zz_generated.openapi.go +++ b/pkg/openapi/zz_generated.openapi.go @@ -3496,7 +3496,7 @@ func schema_pkg_apis_meta_v1_CreateOptions(ref common.ReferenceCallback) common. }, "fieldValidation": { SchemaProps: spec.SchemaProps{ - Description: "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23 and is the default behavior when the `ServerSideFieldValidation` feature gate is disabled. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default when the `ServerSideFieldValidation` feature gate is enabled. - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + Description: "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", Type: []string{"string"}, Format: "", }, @@ -3906,12 +3906,6 @@ func schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref common.ReferenceCallba Type: []string{"object"}, Properties: map[string]spec.Schema{ "key": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "key", - "x-kubernetes-patch-strategy": "merge", - }, - }, SchemaProps: spec.SchemaProps{ Description: "key is the label key that the selector applies to.", Default: "", @@ -4125,6 +4119,13 @@ func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.Op Format: "", }, }, + "sendInitialEvents": { + SchemaProps: spec.SchemaProps{ + Description: "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + Type: []string{"boolean"}, + Format: "", + }, + }, }, }, }, @@ -4214,7 +4215,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Description: "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Description: "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names", Type: []string{"string"}, Format: "", }, @@ -4228,7 +4229,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, "namespace": { SchemaProps: spec.SchemaProps{ - Description: "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + Description: "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces", Type: []string{"string"}, Format: "", }, @@ -4242,7 +4243,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, "uid": { SchemaProps: spec.SchemaProps{ - Description: "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Description: "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", Type: []string{"string"}, Format: "", }, @@ -4283,7 +4284,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, "labels": { SchemaProps: spec.SchemaProps{ - Description: "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + Description: "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, @@ -4299,7 +4300,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope }, "annotations": { SchemaProps: spec.SchemaProps{ - Description: "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + Description: "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations", Type: []string{"object"}, AdditionalProperties: &spec.SchemaOrBool{ Allows: true, @@ -4400,7 +4401,7 @@ func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common }, "name": { SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names", Default: "", Type: []string{"string"}, Format: "", @@ -4408,7 +4409,7 @@ func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common }, "uid": { SchemaProps: spec.SchemaProps{ - Description: "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Description: "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", Default: "", Type: []string{"string"}, Format: "", @@ -4590,7 +4591,7 @@ func schema_pkg_apis_meta_v1_PatchOptions(ref common.ReferenceCallback) common.O }, "fieldValidation": { SchemaProps: spec.SchemaProps{ - Description: "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23 and is the default behavior when the `ServerSideFieldValidation` feature gate is disabled. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default when the `ServerSideFieldValidation` feature gate is enabled. - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + Description: "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", Type: []string{"string"}, Format: "", }, @@ -4821,7 +4822,7 @@ func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common. }, "uid": { SchemaProps: spec.SchemaProps{ - Description: "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Description: "UID of the resource. (when there is a single resource which can be described). More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", Type: []string{"string"}, Format: "", }, @@ -5217,7 +5218,7 @@ func schema_pkg_apis_meta_v1_UpdateOptions(ref common.ReferenceCallback) common. }, "fieldValidation": { SchemaProps: spec.SchemaProps{ - Description: "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23 and is the default behavior when the `ServerSideFieldValidation` feature gate is disabled. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default when the `ServerSideFieldValidation` feature gate is enabled. - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + Description: "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", Type: []string{"string"}, Format: "", }, @@ -5313,13 +5314,6 @@ func schema_k8sio_apimachinery_pkg_runtime_Unknown(ref common.ReferenceCallback) Format: "", }, }, - "Raw": { - SchemaProps: spec.SchemaProps{ - Description: "Raw will hold the complete serialized object which couldn't be matched with a registered type. Most likely, nothing should be done with this except for passing it through the system.", - Type: []string{"string"}, - Format: "byte", - }, - }, "ContentEncoding": { SchemaProps: spec.SchemaProps{ Description: "ContentEncoding is encoding used to encode 'Raw' data. Unspecified means no encoding.", @@ -5337,7 +5331,7 @@ func schema_k8sio_apimachinery_pkg_runtime_Unknown(ref common.ReferenceCallback) }, }, }, - Required: []string{"Raw", "ContentEncoding", "ContentType"}, + Required: []string{"ContentEncoding", "ContentType"}, }, }, } diff --git a/pkg/proxy/server.go b/pkg/proxy/server.go index 0860acebf78..0c6fe645bd6 100644 --- a/pkg/proxy/server.go +++ b/pkg/proxy/server.go @@ -121,7 +121,7 @@ func (s *Server) PrepareRun(ctx context.Context) (preparedServer, error) { func (s preparedServer) Run(ctx context.Context) error { logger := klog.FromContext(ctx).WithValues("component", "proxy") - if err := wait.PollImmediateInfiniteWithContext(ctx, time.Millisecond*500, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextCancel(ctx, time.Millisecond*500, true, func(ctx context.Context) (bool, error) { if err := s.CompletedConfig.ResolveIdentities(ctx); err != nil { logger.V(3).Info("failed to resolve identities, keeping trying", "err", err) return false, nil diff --git a/pkg/reconciler/apis/apibinding/apibinding_controller.go b/pkg/reconciler/apis/apibinding/apibinding_controller.go index d800fdc204e..8c86c81f350 100644 --- a/pkg/reconciler/apis/apibinding/apibinding_controller.go +++ b/pkg/reconciler/apis/apibinding/apibinding_controller.go @@ -23,12 +23,12 @@ import ( "github.com/go-logr/logr" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" + kcpapiextensionsv1informers "github.com/kcp-dev/client-go/apiextensions/informers/apiextensions/v1" "github.com/kcp-dev/logicalcluster/v3" "k8s.io/apiextensions-apiserver/pkg/apihelpers" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" - kcpapiextensionsv1informers "k8s.io/apiextensions-apiserver/pkg/client/kcp/informers/externalversions/apiextensions/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" diff --git a/pkg/reconciler/apis/apibinding/apibinding_reconcile.go b/pkg/reconciler/apis/apibinding/apibinding_reconcile.go index 4cdd8d370b6..06b4ebf7462 100644 --- a/pkg/reconciler/apis/apibinding/apibinding_reconcile.go +++ b/pkg/reconciler/apis/apibinding/apibinding_reconcile.go @@ -515,6 +515,7 @@ func generateCRD(schema *apisv1alpha1.APIResourceSchema) (*apiextensionsv1.Custo } for _, version := range schema.Spec.Versions { + version := version crdVersion := apiextensionsv1.CustomResourceDefinitionVersion{ Name: version.Name, Served: version.Served, diff --git a/pkg/reconciler/apis/apibinding/apibinding_reconcile_test.go b/pkg/reconciler/apis/apibinding/apibinding_reconcile_test.go index 38e5d102206..941b95003b3 100644 --- a/pkg/reconciler/apis/apibinding/apibinding_reconcile_test.go +++ b/pkg/reconciler/apis/apibinding/apibinding_reconcile_test.go @@ -32,7 +32,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" conditionsv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" @@ -663,7 +663,7 @@ func TestCRDFromAPIResourceSchema(t *testing.T) { Served: true, Storage: false, Deprecated: true, - DeprecationWarning: pointer.String("deprecated!"), + DeprecationWarning: ptr.To("deprecated!"), Schema: runtime.RawExtension{ Raw: []byte(` { @@ -677,7 +677,7 @@ func TestCRDFromAPIResourceSchema(t *testing.T) { Scale: &apiextensionsv1.CustomResourceSubresourceScale{ SpecReplicasPath: ".spec.replicas", StatusReplicasPath: ".status.replicas", - LabelSelectorPath: pointer.String(".status.selector"), + LabelSelectorPath: ptr.To(".status.selector"), }, }, AdditionalPrinterColumns: []apiextensionsv1.CustomResourceColumnDefinition{ @@ -709,7 +709,7 @@ func TestCRDFromAPIResourceSchema(t *testing.T) { Scale: &apiextensionsv1.CustomResourceSubresourceScale{ SpecReplicasPath: ".spec.replicas", StatusReplicasPath: ".status.replicas", - LabelSelectorPath: pointer.String(".status.selector"), + LabelSelectorPath: ptr.To(".status.selector"), }, }, AdditionalPrinterColumns: []apiextensionsv1.CustomResourceColumnDefinition{ @@ -753,7 +753,7 @@ func TestCRDFromAPIResourceSchema(t *testing.T) { Served: true, Storage: false, Deprecated: true, - DeprecationWarning: pointer.String("deprecated!"), + DeprecationWarning: ptr.To("deprecated!"), Schema: &apiextensionsv1.CustomResourceValidation{ OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{ Description: "foo", @@ -765,7 +765,7 @@ func TestCRDFromAPIResourceSchema(t *testing.T) { Scale: &apiextensionsv1.CustomResourceSubresourceScale{ SpecReplicasPath: ".spec.replicas", StatusReplicasPath: ".status.replicas", - LabelSelectorPath: pointer.String(".status.selector"), + LabelSelectorPath: ptr.To(".status.selector"), }, }, AdditionalPrinterColumns: []apiextensionsv1.CustomResourceColumnDefinition{ @@ -795,7 +795,7 @@ func TestCRDFromAPIResourceSchema(t *testing.T) { Scale: &apiextensionsv1.CustomResourceSubresourceScale{ SpecReplicasPath: ".spec.replicas", StatusReplicasPath: ".status.replicas", - LabelSelectorPath: pointer.String(".status.selector"), + LabelSelectorPath: ptr.To(".status.selector"), }, }, AdditionalPrinterColumns: []apiextensionsv1.CustomResourceColumnDefinition{ diff --git a/pkg/reconciler/apis/crdcleanup/crdcleanup_controller.go b/pkg/reconciler/apis/crdcleanup/crdcleanup_controller.go index d5eed3f7ad2..b4c60e25272 100644 --- a/pkg/reconciler/apis/crdcleanup/crdcleanup_controller.go +++ b/pkg/reconciler/apis/crdcleanup/crdcleanup_controller.go @@ -22,11 +22,11 @@ import ( "time" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" + kcpapiextensionsv1informers "github.com/kcp-dev/client-go/apiextensions/informers/apiextensions/v1" "github.com/kcp-dev/logicalcluster/v3" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" - kcpapiextensionsv1informers "k8s.io/apiextensions-apiserver/pkg/client/kcp/informers/externalversions/apiextensions/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/runtime" diff --git a/pkg/reconciler/cache/labelclusterrolebindings/labelclusterrolebinding_reconcile.go b/pkg/reconciler/cache/labelclusterrolebindings/labelclusterrolebinding_reconcile.go index 7b83f92f913..b7223b73d33 100644 --- a/pkg/reconciler/cache/labelclusterrolebindings/labelclusterrolebinding_reconcile.go +++ b/pkg/reconciler/cache/labelclusterrolebindings/labelclusterrolebinding_reconcile.go @@ -24,7 +24,7 @@ import ( rbacv1 "k8s.io/api/rbac/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/genericcontrolplane" + controlplaneapiserver "k8s.io/kubernetes/pkg/controlplane/apiserver" kcpcorehelper "github.com/kcp-dev/kcp/sdk/apis/core/helper" ) @@ -39,7 +39,7 @@ func (c *controller) reconcile(ctx context.Context, crb *rbacv1.ClusterRoleBindi if err != nil && !errors.IsNotFound(err) { return nil, err } else if errors.IsNotFound(err) { - return c.clusterRoleLister.Cluster(genericcontrolplane.LocalAdminCluster).Get(name) + return c.clusterRoleLister.Cluster(controlplaneapiserver.LocalAdminCluster).Get(name) } return obj, nil }, diff --git a/pkg/reconciler/cache/replication/indexers.go b/pkg/reconciler/cache/replication/indexers.go index d87d4bccd2b..f952145b24e 100644 --- a/pkg/reconciler/cache/replication/indexers.go +++ b/pkg/reconciler/cache/replication/indexers.go @@ -40,8 +40,8 @@ func IndexByShardAndLogicalClusterAndNamespace(obj interface{}) ([]string, error if annotations == nil { annotations = map[string]string{} } - // TODO: rename to genericapirequest.ShardNameAnnotationKey - shardName := annotations[genericapirequest.AnnotationKey] + + shardName := annotations[genericapirequest.ShardAnnotationKey] return []string{ShardAndLogicalClusterAndNamespaceKey(shardName, logicalcluster.From(a), a.GetNamespace(), a.GetName())}, nil } diff --git a/pkg/reconciler/cache/replication/replication_reconcile.go b/pkg/reconciler/cache/replication/replication_reconcile.go index f25045c147f..a936e573f70 100644 --- a/pkg/reconciler/cache/replication/replication_reconcile.go +++ b/pkg/reconciler/cache/replication/replication_reconcile.go @@ -172,7 +172,7 @@ func (r *reconciler) reconcile(ctx context.Context, key string) error { if annotations == nil { annotations = map[string]string{} } - annotations[genericrequest.AnnotationKey] = r.shardName + annotations[genericrequest.ShardAnnotationKey] = r.shardName localCopy.SetAnnotations(annotations) logger.V(2).Info("Creating object in global cache") diff --git a/pkg/reconciler/cache/replication/replication_reconcile_test.go b/pkg/reconciler/cache/replication/replication_reconcile_test.go index 8791ccf2de4..45762119523 100644 --- a/pkg/reconciler/cache/replication/replication_reconcile_test.go +++ b/pkg/reconciler/cache/replication/replication_reconcile_test.go @@ -228,7 +228,7 @@ func WithShardName(u *unstructured.Unstructured, name string) *unstructured.Unst if ann == nil { ann = map[string]string{} } - ann[request.AnnotationKey] = name + ann[request.ShardAnnotationKey] = name u.SetAnnotations(ann) return u } diff --git a/pkg/reconciler/cache/replication/replication_reconcile_unstructured.go b/pkg/reconciler/cache/replication/replication_reconcile_unstructured.go index da8549525d0..6d617a33ea0 100644 --- a/pkg/reconciler/cache/replication/replication_reconcile_unstructured.go +++ b/pkg/reconciler/cache/replication/replication_reconcile_unstructured.go @@ -66,11 +66,11 @@ func ensureMeta(cacheObject *unstructured.Unstructured, localObject *unstructure if !ok { return false, fmt.Errorf("metadata.annotations field of unstructuredCacheObject is of the type %T, expected map[string]interface{}", cacheObjAnnotationsRaw) } - if shard, hasShard := cacheObjAnnotations[genericrequest.AnnotationKey]; hasShard { - unstructured.RemoveNestedField(cacheObjAnnotations, genericrequest.AnnotationKey) + if shard, hasShard := cacheObjAnnotations[genericrequest.ShardAnnotationKey]; hasShard { + unstructured.RemoveNestedField(cacheObjAnnotations, genericrequest.ShardAnnotationKey) defer func() { if err == nil { - err = unstructured.SetNestedField(cacheObject.Object, shard, "metadata", "annotations", genericrequest.AnnotationKey) + err = unstructured.SetNestedField(cacheObject.Object, shard, "metadata", "annotations", genericrequest.ShardAnnotationKey) } }() } diff --git a/pkg/reconciler/tenancy/workspace/workspace_reconcile_scheduling.go b/pkg/reconciler/tenancy/workspace/workspace_reconcile_scheduling.go index 51640e2ef13..097b61060cf 100644 --- a/pkg/reconciler/tenancy/workspace/workspace_reconcile_scheduling.go +++ b/pkg/reconciler/tenancy/workspace/workspace_reconcile_scheduling.go @@ -18,9 +18,10 @@ package workspace import ( "context" + "crypto/rand" "crypto/sha256" "fmt" - "math/rand" + mathrand "math/rand" "net/url" "path" "strings" @@ -63,7 +64,7 @@ const ( ) type schedulingReconciler struct { - generateClusterName func(path logicalcluster.Path) logicalcluster.Name + generateClusterName func(path logicalcluster.Path) (logicalcluster.Name, error) getShard func(name string) (*corev1alpha1.Shard, error) getShardByHash func(hash string) (*corev1alpha1.Shard, error) @@ -121,7 +122,10 @@ func (r *schedulingReconciler) reconcile(ctx context.Context, workspace *tenancy } } if !hasCluster { - cluster := r.generateClusterName(logicalcluster.From(workspace).Path().Join(workspace.Name)) + cluster, err := r.generateClusterName(logicalcluster.From(workspace).Path().Join(workspace.Name)) + if err != nil { + return reconcileStatusStopAndRequeue, err + } if workspace.Annotations == nil { workspace.Annotations = map[string]string{} } @@ -230,7 +234,7 @@ func (r *schedulingReconciler) chooseShardAndMarkCondition(logger klog.Logger, w logger.Error(utilerrors.NewAggregate(failures), "no valid shards found for workspace, skipping") return nil, "No available shards to schedule the workspace", nil // retry is automatic when new shards show up } - targetShard := validShards[rand.Intn(len(validShards))] + targetShard := validShards[mathrand.Intn(len(validShards))] return targetShard, "", nil } @@ -339,10 +343,13 @@ func isValidShard(_ *corev1alpha1.Shard) (valid bool, reason, message string) { return true, "", "" } -func randomClusterName(path logicalcluster.Path) logicalcluster.Name { +func randomClusterName(path logicalcluster.Path) (logicalcluster.Name, error) { token := make([]byte, 32) - rand.Read(token) + _, err := rand.Read(token) + if err != nil { + return "", err + } hash := sha256.Sum224(token) base36hash := strings.ToLower(base36.EncodeBytes(hash[:])) - return logicalcluster.Name(base36hash[:16]) // 36^16 = 82 bits, P(conflict)<10^-9 for 2^26 clusters + return logicalcluster.Name(base36hash[:16]), nil // 36^16 = 82 bits, P(conflict)<10^-9 for 2^26 clusters } diff --git a/pkg/reconciler/tenancy/workspace/workspace_reconcile_scheduling_test.go b/pkg/reconciler/tenancy/workspace/workspace_reconcile_scheduling_test.go index 6541c146460..10f8ed6a8b5 100644 --- a/pkg/reconciler/tenancy/workspace/workspace_reconcile_scheduling_test.go +++ b/pkg/reconciler/tenancy/workspace/workspace_reconcile_scheduling_test.go @@ -299,8 +299,8 @@ func TestReconcileScheduling(t *testing.T) { } target := schedulingReconciler{ - generateClusterName: func(path logicalcluster.Path) logicalcluster.Name { - return logicalcluster.Name(strings.ReplaceAll(path.String(), ":", "-")) + generateClusterName: func(path logicalcluster.Path) (logicalcluster.Name, error) { + return logicalcluster.Name(strings.ReplaceAll(path.String(), ":", "-")), nil }, kubeLogicalClusterAdminClientFor: func(shard *corev1alpha1.Shard) (kcpkubernetesclientset.ClusterInterface, error) { return fakeKubeClient, nil diff --git a/pkg/server/apiextensions.go b/pkg/server/apiextensions.go index 1aea4093d5f..92d85035c30 100644 --- a/pkg/server/apiextensions.go +++ b/pkg/server/apiextensions.go @@ -22,11 +22,11 @@ import ( _ "net/http/pprof" "strings" + kcpapiextensionsv1listers "github.com/kcp-dev/client-go/apiextensions/listers/apiextensions/v1" "github.com/kcp-dev/logicalcluster/v3" apiextensionshelpers "k8s.io/apiextensions-apiserver/pkg/apihelpers" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - kcpapiextensionsv1listers "k8s.io/apiextensions-apiserver/pkg/client/kcp/listers/apiextensions/v1" "k8s.io/apiextensions-apiserver/pkg/kcp" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/server/config.go b/pkg/server/config.go index c0aed12ef9d..11575b72536 100644 --- a/pkg/server/config.go +++ b/pkg/server/config.go @@ -27,14 +27,16 @@ import ( "net/url" "os" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" + kcpapiextensionsinformers "github.com/kcp-dev/client-go/apiextensions/informers" kcpdynamic "github.com/kcp-dev/client-go/dynamic" kcpkubernetesinformers "github.com/kcp-dev/client-go/informers" kcpkubernetesclientset "github.com/kcp-dev/client-go/kubernetes" "github.com/kcp-dev/logicalcluster/v3" apiextensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" - kcpapiextensionsinformers "k8s.io/apiextensions-apiserver/pkg/client/kcp/informers/externalversions" + "k8s.io/apiextensions-apiserver/pkg/apiserver/conversion" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/endpoints/filters" @@ -42,18 +44,20 @@ import ( "k8s.io/apiserver/pkg/quota/v1/generic" genericapiserver "k8s.io/apiserver/pkg/server" serverstorage "k8s.io/apiserver/pkg/server/storage" + "k8s.io/apiserver/pkg/util/webhook" "k8s.io/client-go/rest" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/clientcmd" - "k8s.io/kubernetes/pkg/genericcontrolplane" - "k8s.io/kubernetes/pkg/genericcontrolplane/aggregator" - "k8s.io/kubernetes/pkg/genericcontrolplane/apis" + "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/kubernetes/pkg/controlplane" + controlplaneapiserver "k8s.io/kubernetes/pkg/controlplane/apiserver" + "k8s.io/kubernetes/pkg/controlplane/apiserver/miniaggregator" + generatedopenapi "k8s.io/kubernetes/pkg/generated/openapi" quotainstall "k8s.io/kubernetes/pkg/quota/v1/install" kcpadmissioninitializers "github.com/kcp-dev/kcp/pkg/admission/initializers" "github.com/kcp-dev/kcp/pkg/authorization" bootstrappolicy "github.com/kcp-dev/kcp/pkg/authorization/bootstrap" - "github.com/kcp-dev/kcp/pkg/conversion" "github.com/kcp-dev/kcp/pkg/embeddedetcd" "github.com/kcp-dev/kcp/pkg/informer" "github.com/kcp-dev/kcp/pkg/server/bootstrap" @@ -72,8 +76,8 @@ type Config struct { EmbeddedEtcd *embeddedetcd.Config GenericConfig *genericapiserver.Config // the config embedded into MiniAggregator, the head of the delegation chain - MiniAggregator *aggregator.MiniAggregatorConfig - Apis *apis.Config + MiniAggregator *miniaggregator.MiniAggregatorConfig + Apis *controlplaneapiserver.Config ApiExtensions *apiextensionsapiserver.Config OptionalVirtual *VirtualConfig @@ -129,8 +133,8 @@ type completedConfig struct { GenericConfig genericapiserver.CompletedConfig EmbeddedEtcd embeddedetcd.CompletedConfig - MiniAggregator aggregator.CompletedMiniAggregatorConfig - Apis apis.CompletedConfig + MiniAggregator miniaggregator.CompletedMiniAggregatorConfig + Apis controlplaneapiserver.CompletedConfig ApiExtensions apiextensionsapiserver.CompletedConfig OptionalVirtual CompletedVirtualConfig @@ -186,11 +190,20 @@ func NewConfig(opts kcpserveroptions.CompletedOptions) (*Config, error) { var err error var storageFactory *serverstorage.DefaultStorageFactory - c.GenericConfig, storageFactory, c.KubeSharedInformerFactory, c.KubeClusterClient, err = genericcontrolplane.BuildGenericConfig(opts.GenericControlPlane) + c.GenericConfig, c.KubeSharedInformerFactory, storageFactory, err = controlplaneapiserver.BuildGenericConfig( + opts.GenericControlPlane, + []*runtime.Scheme{legacyscheme.Scheme, apiextensionsapiserver.Scheme}, + controlplane.DefaultAPIResourceConfigSource(), + generatedopenapi.GetOpenAPIDefinitions, + ) if err != nil { return nil, err } + c.KubeClusterClient, err = kcpkubernetesclientset.NewForConfig(rest.CopyConfig(c.GenericConfig.LoopbackClientConfig)) + if err != nil { + return nil, err + } cacheClientConfig, err := c.Options.Cache.Client.RestConfig(rest.CopyConfig(c.GenericConfig.LoopbackClientConfig)) if err != nil { return nil, err @@ -421,6 +434,8 @@ func NewConfig(opts kcpserveroptions.CompletedOptions) (*Config, error) { // But this is not harmful as the kcp warnings are not many. apiHandler = filters.WithWarningRecorder(apiHandler) + apiHandler = kcpfilters.WithAuditEventClusterAnnotation(apiHandler) + // Add a mux before the chain, for other handlers with their own handler chain to hook in. For example, when // the virtual workspace server is running as part of kcp, it registers /services with the mux so it can handle // that path itself, instead of the rest of the handler chain above handling it. @@ -429,7 +444,6 @@ func NewConfig(opts kcpserveroptions.CompletedOptions) (*Config, error) { *c.preHandlerChainMux = append(*c.preHandlerChainMux, mux) apiHandler = mux - apiHandler = kcpfilters.WithAuditEventClusterAnnotation(apiHandler) apiHandler = filters.WithAuditInit(apiHandler) // Must run before any audit annotation is made apiHandler = WithLocalProxy(apiHandler, opts.Extra.ShardName, opts.Extra.ShardBaseURL, c.KcpSharedInformerFactory.Tenancy().V1alpha1().Workspaces(), c.KcpSharedInformerFactory.Core().V1alpha1().LogicalClusters()) apiHandler = WithInClusterServiceAccountRequestRewrite(apiHandler) @@ -478,26 +492,37 @@ func NewConfig(opts kcpserveroptions.CompletedOptions) (*Config, error) { return "https://" + c.GenericConfig.ExternalAddress } - c.Apis, err = genericcontrolplane.CreateKubeAPIServerConfig(c.GenericConfig, opts.GenericControlPlane, c.KubeSharedInformerFactory, admissionPluginInitializers, storageFactory) + serviceResolver := webhook.NewDefaultServiceResolver() + kubeControlPlane, kubePluginInitializer, err := controlplaneapiserver.CreateConfig( + opts.GenericControlPlane, + c.GenericConfig, + c.KubeSharedInformerFactory, + storageFactory, + serviceResolver, + admissionPluginInitializers, + ) if err != nil { return nil, err } + c.Apis = kubeControlPlane + admissionPluginInitializers = append(admissionPluginInitializers, kubePluginInitializer...) - // If additional API servers are added, they should be gated. - c.ApiExtensions, err = genericcontrolplane.CreateAPIExtensionsConfig( - *c.Apis.GenericConfig, - informerfactoryhack.Wrap(c.Apis.ExtraConfig.VersionedInformers), + authInfoResolver := webhook.NewDefaultAuthenticationInfoResolverWrapper(kubeControlPlane.ProxyTransport, kubeControlPlane.Generic.EgressSelector, kubeControlPlane.Generic.LoopbackClientConfig, kubeControlPlane.Generic.TracerProvider) + conversionFactory, err := conversion.NewCRConverterFactory(serviceResolver, authInfoResolver) + if err != nil { + return nil, err + } + c.ApiExtensions, err = controlplaneapiserver.CreateAPIExtensionsConfig( + *c.GenericConfig, + informerfactoryhack.Wrap(c.KubeSharedInformerFactory), admissionPluginInitializers, opts.GenericControlPlane, - ) + 3, + conversionFactory) if err != nil { return nil, fmt.Errorf("error configuring api extensions: %w", err) } - c.ApiExtensions.ExtraConfig.ConversionFactory = conversion.NewCRConverterFactory( - c.KcpSharedInformerFactory.Apis().V1alpha1().APIConversions(), - opts.Extra.ConversionCELTransformationTimeout, - ) // make sure the informer gets started, otherwise conversions will not work! _ = c.KcpSharedInformerFactory.Apis().V1alpha1().APIConversions().Informer() @@ -520,9 +545,12 @@ func NewConfig(opts kcpserveroptions.CompletedOptions) (*Config, error) { c.ApiExtensions.ExtraConfig.Informers = c.ApiExtensionsSharedInformerFactory c.ApiExtensions.ExtraConfig.TableConverterProvider = NewTableConverterProvider() - c.MiniAggregator = &aggregator.MiniAggregatorConfig{ - GenericConfig: c.GenericConfig, + c.MiniAggregator = &miniaggregator.MiniAggregatorConfig{ + GenericConfig: *c.GenericConfig, } + // same as in kube-aggregator, remove hooks and OpenAPI + c.MiniAggregator.GenericConfig.PostStartHooks = map[string]genericapiserver.PostStartHookConfigEntry{} + c.MiniAggregator.GenericConfig.SkipOpenAPIInstallation = true if opts.Virtual.Enabled { virtualWorkspacesConfig := rest.CopyConfig(c.GenericConfig.LoopbackClientConfig) diff --git a/pkg/server/controllers.go b/pkg/server/controllers.go index a9a5769033a..2b3472544a9 100644 --- a/pkg/server/controllers.go +++ b/pkg/server/controllers.go @@ -24,13 +24,13 @@ import ( "os" "time" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" kcpdynamic "github.com/kcp-dev/client-go/dynamic" kcpkubernetesclientset "github.com/kcp-dev/client-go/kubernetes" kcpmetadata "github.com/kcp-dev/client-go/metadata" "github.com/kcp-dev/logicalcluster/v3" corev1 "k8s.io/api/core/v1" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" @@ -176,6 +176,7 @@ func (s *Server) installKubeNamespaceController(ctx context.Context, config *res // which informers need to be started. The shared informer factories are started in their // own post-start hook. c := namespace.NewNamespaceController( + ctx, kubeClient, metadata, discoverResourcesFn, @@ -187,7 +188,7 @@ func (s *Server) installKubeNamespaceController(ctx context.Context, config *res return s.registerController(&controllerWrapper{ Name: controllerName, Runner: func(ctx context.Context) { - c.Run(10, ctx.Done()) + c.Run(ctx, 10) }, }) } @@ -256,7 +257,6 @@ func (s *Server) installKubeServiceAccountTokenController(ctx context.Context, c serviceaccountcontroller.TokensControllerOptions{ TokenGenerator: tokenGenerator, RootCA: rootCA, - AutoGenerate: true, }, ) if err != nil { @@ -267,8 +267,8 @@ func (s *Server) installKubeServiceAccountTokenController(ctx context.Context, c Name: controllerName, Runner: func(ctx context.Context) { controller.Run( + ctx, int(s.Options.Controllers.SAController.ConcurrentSATokenSyncs), - ctx.Done(), ) }, }) @@ -582,7 +582,7 @@ func (s *Server) installAPIBindingController(ctx context.Context, config *rest.C // do custom wait logic here because APIExports+APIBindings are special as system CRDs, // and the controllers must run as soon as these two informers are up in order to bootstrap // the rest of the system. Everything else in the kcp clientset is APIBinding based. - return wait.PollImmediateInfiniteWithContext(ctx, time.Millisecond*100, func(ctx context.Context) (bool, error) { + return wait.PollUntilContextCancel(ctx, time.Millisecond*100, true, func(ctx context.Context) (bool, error) { crdsSynced := s.ApiExtensionsSharedInformerFactory.Apiextensions().V1().CustomResourceDefinitions().Informer().HasSynced() exportsSynced := s.KcpSharedInformerFactory.Apis().V1alpha1().APIExports().Informer().HasSynced() cacheExportsSynced := s.CacheKcpSharedInformerFactory.Apis().V1alpha1().APIExports().Informer().HasSynced() @@ -811,7 +811,7 @@ func (s *Server) installAPIExportController(ctx context.Context, config *rest.Co // do custom wait logic here because APIExports+APIBindings are special as system CRDs, // and the controllers must run as soon as these two informers are up in order to bootstrap // the rest of the system. Everything else in the kcp clientset is APIBinding based. - return wait.PollImmediateInfiniteWithContext(ctx, time.Millisecond*100, func(ctx context.Context) (bool, error) { + return wait.PollUntilContextCancel(ctx, time.Millisecond*100, true, func(ctx context.Context) (bool, error) { crdsSynced := s.ApiExtensionsSharedInformerFactory.Apiextensions().V1().CustomResourceDefinitions().Informer().HasSynced() exportsSynced := s.KcpSharedInformerFactory.Apis().V1alpha1().APIExports().Informer().HasSynced() return crdsSynced && exportsSynced, nil diff --git a/pkg/server/handler.go b/pkg/server/handler.go index d7f82598dd3..6c31f15f48f 100644 --- a/pkg/server/handler.go +++ b/pkg/server/handler.go @@ -46,7 +46,7 @@ import ( "k8s.io/apiserver/pkg/endpoints/request" clientgotransport "k8s.io/client-go/transport" "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/genericcontrolplane/aggregator" + "k8s.io/kubernetes/pkg/controlplane/apiserver/miniaggregator" ) var ( @@ -409,7 +409,7 @@ func serveCoreV1Discovery(ctx context.Context, crdLister kcp.ClusterAwareCRDClus // is "special" - it doesn't have an apiVersion field that the decoder needs to determine the // type. into := &metav1.APIResourceList{} - obj, _, err := aggregator.DiscoveryCodecs.UniversalDeserializer().Decode(writer.data, nil, into) + obj, _, err := miniaggregator.DiscoveryCodecs.UniversalDeserializer().Decode(writer.data, nil, into) if err != nil { err = apierrors.NewInternalError(fmt.Errorf("unable to serve /api/v1 discovery: error decoding /api/v1 response from generic control plane: %w", err)) _ = responsewriters.ErrorNegotiated(err, errorCodecs, schema.GroupVersion{}, res, req) @@ -431,7 +431,7 @@ func serveCoreV1Discovery(ctx context.Context, crdLister kcp.ClusterAwareCRDClus }) // Serve up our combined discovery - versionHandler := apiserverdiscovery.NewAPIVersionHandler(aggregator.DiscoveryCodecs, schema.GroupVersion{Group: "", Version: "v1"}, apiserverdiscovery.APIResourceListerFunc(func() []metav1.APIResource { + versionHandler := apiserverdiscovery.NewAPIVersionHandler(miniaggregator.DiscoveryCodecs, schema.GroupVersion{Group: "", Version: "v1"}, apiserverdiscovery.APIResourceListerFunc(func() []metav1.APIResource { return v1ResourceList.APIResources })) versionHandler.ServeHTTP(res, req) diff --git a/pkg/server/options/flags.go b/pkg/server/options/flags.go index 195ae483c10..4190f6db244 100644 --- a/pkg/server/options/flags.go +++ b/pkg/server/options/flags.go @@ -84,6 +84,7 @@ var ( "service-account-key-file", // File containing PEM-encoded x509 RSA or ECDSA private or public keys, used to verify ServiceAccount tokens. The specified file can contain multiple keys, and the flag can be specified multiple times with different files. If unspecified, --tls-private-key-file is used. Must be specified when --service-account-signing-key is provided "service-account-lookup", // If true, validate ServiceAccount tokens exist in etcd as part of authentication. "service-account-max-token-expiration", // The maximum validity duration of a token created by the service account token issuer. If an otherwise valid TokenRequest with a validity duration larger than this value is requested, a token will be issued with a validity duration of this value. + "service-account-signing-key-file", // Path to the file that contains the current private key of the service account token issuer. The issuer will sign issued ID tokens with this private key. // logs flags "logging-format", // Sets the log format. Permitted formats: "text", "json". @@ -108,13 +109,14 @@ var ( "tls-sni-cert-key", // A pair of x509 certificate and private key file paths, optionally suffixed with a list of domain patterns which are fully qualified domain names, possibly with prefixed wildcard segments. The domain patterns also allow IP addresses, but IPs should only be used if the apiserver has visibility to the IP address requested by a client. If no domain patterns are provided, the names of the certificate are extracted. Non-wildcard matches trump over wildcard matches, explicit domain patterns trump over extracted names. For multiple key/certificate pairs, use the --tls-sni-cert-key multiple times. Examples: "example.crt,example.key" or "foo.crt,foo.key:*.foo.com,foo.com". // generic flags - "cors-allowed-origins", // List of allowed origins for CORS, comma separated. An allowed origin can be a regular expression to support subdomain matching. If this list is empty CORS will not be enabled. - "goaway-chance", // To prevent HTTP/2 clients from getting stuck on a single apiserver, randomly close a connection (GOAWAY). The client's other in-flight requests won't be affected, and the client will reconnect, likely landing on a different apiserver after going through the load balancer again. This argument sets the fraction of requests that will be sent a GOAWAY. Clusters with single apiservers, or which don't use a load balancer, should NOT enable this. Min is 0 (off), Max is .02 (1/50 requests); .001 (1/1000) is a recommended starting point. - "livez-grace-period", // This option represents the maximum amount of time it should take for apiserver to complete its startup sequence and become live. From apiserver's start time to when this amount of time has elapsed, /livez will assume that unfinished post-start hooks will complete successfully and therefore return true. - "shutdown-delay-duration", // Time to delay the termination. During that time the server keeps serving requests normally. The endpoints /healthz and /livez will return success, but /readyz immediately returns failure. Graceful termination starts after this delay has elapsed. This can be used to allow load balancer to stop sending traffic to this server. - "shutdown-send-retry-after", // If true the HTTP Server will continue listening until all non long running request(s) in flight have been drained, during this window all incoming requests will be rejected with a status code 429 and a 'Retry-After' response header, in addition 'Connection: close' response header is set in order to tear down the TCP connection when idle. - "strict-transport-security-directives", // List of directives for HSTS, comma separated. If this list is empty, then HSTS directives will not be added. Example: 'max-age=31536000,includeSubDomains,preload' - "external-hostname", // The hostname to use when generating externalized URLs for this master (e.g. Swagger API Docs or OpenID Discovery). + "cors-allowed-origins", // List of allowed origins for CORS, comma separated. An allowed origin can be a regular expression to support subdomain matching. If this list is empty CORS will not be enabled. + "goaway-chance", // To prevent HTTP/2 clients from getting stuck on a single apiserver, randomly close a connection (GOAWAY). The client's other in-flight requests won't be affected, and the client will reconnect, likely landing on a different apiserver after going through the load balancer again. This argument sets the fraction of requests that will be sent a GOAWAY. Clusters with single apiservers, or which don't use a load balancer, should NOT enable this. Min is 0 (off), Max is .02 (1/50 requests); .001 (1/1000) is a recommended starting point. + "livez-grace-period", // This option represents the maximum amount of time it should take for apiserver to complete its startup sequence and become live. From apiserver's start time to when this amount of time has elapsed, /livez will assume that unfinished post-start hooks will complete successfully and therefore return true. + "shutdown-delay-duration", // Time to delay the termination. During that time the server keeps serving requests normally. The endpoints /healthz and /livez will return success, but /readyz immediately returns failure. Graceful termination starts after this delay has elapsed. This can be used to allow load balancer to stop sending traffic to this server. + "shutdown-send-retry-after", // If true the HTTP Server will continue listening until all non long running request(s) in flight have been drained, during this window all incoming requests will be rejected with a status code 429 and a 'Retry-After' response header, in addition 'Connection: close' response header is set in order to tear down the TCP connection when idle. + "strict-transport-security-directives", // List of directives for HSTS, comma separated. If this list is empty, then HSTS directives will not be added. Example: 'max-age=31536000,includeSubDomains,preload' + "external-hostname", // The hostname to use when generating externalized URLs for this master (e.g. Swagger API Docs or OpenID Discovery). + "shutdown-watch-termination-grace-period", // his option, if set, represents the maximum amount of grace period the apiserver will wait for active watch request(s) to drain during the graceful server shutdown window. // etcd flags "encryption-provider-config-automatic-reload", // Determines if the file set by --encryption-provider-config should be automatically reloaded if the disk contents change. Setting this to true disables the ability to uniquely identify distinct KMS plugins via the API server healthz endpoints. @@ -138,6 +140,7 @@ var ( // features flags "contention-profiling", // Enable lock contention profiling, if profiling is enabled "profiling", // Enable profiling via web interface host:port/debug/pprof/ + "debug-socket-path", // Use an unprotected (no authn/authz) unix-domain socket for profiling with the given path // metrics flags "allow-metric-labels", // The map from metric-label to value allow-list of this label. The key's format is ,. The value's format is ,...e.g. metric1,label1='v1,v2,v3', metric1,label2='v1,v2,v3' metric2,label1='v1,v2,v3'. @@ -157,7 +160,6 @@ var ( "advertise-address", // The IP address on which to advertise the apiserver to members of the cluster. This address must be reachable by the rest of the cluster. If blank, the --bind-address will be used. If --bind-address is unspecified, the host's default interface will be used. "enable-priority-and-fairness", // If true and the APIPriorityAndFairness feature gate is enabled, replace the max-in-flight handler with an enhanced one that queues and dispatches with priority and fairness "feature-gates", // A set of key=value pairs that describe feature gates for alpha/experimental features. Options are: - "master-service-namespace", // DEPRECATED: the namespace from which the Kubernetes master services should be injected into pods. "max-mutating-requests-inflight", // This and --max-requests-inflight are summed to determine the server's total concurrency limit (which must be positive) if --enable-priority-and-fairness is true. Otherwise, this flag limits the maximum number of mutating requests in flight, or a zero value disables the limit completely. "max-requests-inflight", // This and --max-mutating-requests-inflight are summed to determine the server's total concurrency limit (which must be positive) if --enable-priority-and-fairness is true. Otherwise, this flag limits the maximum number of non-mutating requests in flight, or a zero value disables the limit completely. "min-request-timeout", // An optional field indicating the minimum number of seconds a handler must keep a request open before timing it out. Currently only honored by the watch request handler, which picks a randomized value above this number as the connection timeout, to spread out load. @@ -173,11 +175,19 @@ var ( "admission-control-config-file", // File with admission control configuration. "disable-admission-plugins", // admission plugins that should be disabled although they are in the default enabled plugins list (NamespaceLifecycle). Comma-delimited list of admission plugins: MutatingAdmissionWebhook, NamespaceLifecycle, ValidatingAdmissionWebhook. The order of plugins in this flag does not matter. "enable-admission-plugins", // admission plugins that should be enabled in addition to default enabled ones (NamespaceLifecycle). Comma-delimited list of admission plugins: MutatingAdmissionWebhook, NamespaceLifecycle, ValidatingAdmissionWebhook. The order of plugins in this flag does not matter. + "admission-control", // Deprecated: Use --enable-admission-plugins or --disable-admission-plugins instead. Will be removed in a future version. // egress selector flags "egress-selector-config-file", // File with apiserver egress selector configuration. // API enablement flags "runtime-config", // A set of key=value pairs that enable or disable built-in APIs. Supported options are: + + // Aggregation/peering + "aggregator-reject-forwarding-redirect", // Aggregator reject forwarding redirect response back to client. + "enable-aggregator-routing", // Turns on aggregator routing requests to endpoints IP rather than cluster IP. + "peer-advertise-ip", // If set and the UnknownVersionInteroperabilityProxy feature gate is enabled, this IP will be used by peer kube-apiservers to proxy requests to this kube-apiserver when the request cannot be handled by the peer due to version skew between the kube-apiservers. This flag is only used in clusters configured with multiple kube-apiservers for high availability. + "peer-advertise-port", // If set and the UnknownVersionInteroperabilityProxy feature gate is enabled, this port will be used by peer kube-apiservers to proxy requests to this kube-apiserver when the request cannot be handled by the peer due to version skew between the kube-apiservers. This flag is only used in clusters configured with multiple kube-apiservers for high availability. + "peer-ca-file", // If set and the UnknownVersionInteroperabilityProxy feature gate is enabled, this file will be used to verify serving certificates of peer kube-apiservers. This flag is only used in clusters configured with multiple kube-apiservers for high availability. ) ) diff --git a/pkg/server/options/flags_test.go b/pkg/server/options/flags_test.go index bee69ba7ccd..690475f06e4 100644 --- a/pkg/server/options/flags_test.go +++ b/pkg/server/options/flags_test.go @@ -24,11 +24,13 @@ import ( "github.com/spf13/pflag" "k8s.io/apimachinery/pkg/util/sets" + cliflag "k8s.io/component-base/cli/flag" ) func TestAllowedFlagList(t *testing.T) { o := NewOptions(".kcp") - fss := o.GenericControlPlane.Flags() + var fss cliflag.NamedFlagSets + o.GenericControlPlane.AddFlags(&fss) missing := map[string][]*pflag.Flag{} @@ -55,7 +57,8 @@ func TestAllowedFlagList(t *testing.T) { func TestAllowedFlagListCleanup(t *testing.T) { o := NewOptions(".kcp") - fss := o.GenericControlPlane.Flags() + var fss cliflag.NamedFlagSets + o.GenericControlPlane.AddFlags(&fss) allFlags := map[string]*pflag.Flag{} for _, fs := range fss.FlagSets { diff --git a/pkg/server/options/genericcontrolplane.go b/pkg/server/options/genericcontrolplane.go deleted file mode 100644 index 5cfa6e7f0a9..00000000000 --- a/pkg/server/options/genericcontrolplane.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2022 The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package options - -import ( - "k8s.io/kubernetes/pkg/genericcontrolplane/options" - - _ "github.com/kcp-dev/kcp/pkg/features" -) - -type ServerRunOptions struct { - options.ServerRunOptions -} diff --git a/pkg/server/options/options.go b/pkg/server/options/options.go index d9a6166b328..563753255b8 100644 --- a/pkg/server/options/options.go +++ b/pkg/server/options/options.go @@ -28,7 +28,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" genericapiserveroptions "k8s.io/apiserver/pkg/server/options" cliflag "k8s.io/component-base/cli/flag" - "k8s.io/kubernetes/pkg/genericcontrolplane/options" + controlplaneapiserver "k8s.io/kubernetes/pkg/controlplane/apiserver/options" kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options" kcpadmission "github.com/kcp-dev/kcp/pkg/admission" @@ -38,7 +38,7 @@ import ( ) type Options struct { - GenericControlPlane ServerRunOptions + GenericControlPlane controlplaneapiserver.Options EmbeddedEtcd etcdoptions.Options Controllers Controllers Authorization Authorization @@ -70,7 +70,7 @@ type ExtraOptions struct { } type completedOptions struct { - GenericControlPlane options.CompletedServerRunOptions + GenericControlPlane controlplaneapiserver.CompletedOptions EmbeddedEtcd etcdoptions.CompletedOptions Controllers Controllers Authorization Authorization @@ -89,9 +89,7 @@ type CompletedOptions struct { // NewOptions creates a new Options with default parameters. func NewOptions(rootDir string) *Options { o := &Options{ - GenericControlPlane: ServerRunOptions{ - *options.NewServerRunOptions(), - }, + GenericControlPlane: *controlplaneapiserver.NewOptions(), EmbeddedEtcd: *etcdoptions.NewOptions(rootDir), Controllers: *NewControllers(), Authorization: *NewAuthorization(), @@ -127,11 +125,13 @@ func NewOptions(rootDir string) *Options { // WithWebHook() o.GenericControlPlane.Authentication.ServiceAccounts.Issuers = []string{"https://kcp.default.svc"} o.GenericControlPlane.Etcd.StorageConfig.Transport.ServerList = []string{"embedded"} + o.GenericControlPlane.Authorization = nil // we have our own + o.GenericControlPlane.GenericServerRunOptions.EnablePriorityAndFairness = false // override set of admission plugins - kcpadmission.RegisterAllKcpAdmissionPlugins(o.GenericControlPlane.Admission.Plugins) - o.GenericControlPlane.Admission.DisablePlugins = sets.List[string](kcpadmission.DefaultOffAdmissionPlugins()) - o.GenericControlPlane.Admission.RecommendedPluginOrder = kcpadmission.AllOrderedPlugins + kcpadmission.RegisterAllKcpAdmissionPlugins(o.GenericControlPlane.Admission.GenericAdmission.Plugins) + o.GenericControlPlane.Admission.GenericAdmission.DisablePlugins = sets.List[string](kcpadmission.DefaultOffAdmissionPlugins()) + o.GenericControlPlane.Admission.GenericAdmission.RecommendedPluginOrder = kcpadmission.AllOrderedPlugins // turn on the watch cache o.GenericControlPlane.Etcd.EnableWatchCache = true @@ -145,7 +145,9 @@ func NewOptions(rootDir string) *Options { } func (o *Options) AddFlags(fss *cliflag.NamedFlagSets) { - for name, fs := range o.GenericControlPlane.Flags().FlagSets { + raw := &cliflag.NamedFlagSets{} + o.GenericControlPlane.AddFlags(raw) + for name, fs := range raw.FlagSets { fss.FlagSet(name).AddFlagSet(filter(name, fs, allowedFlags)) } @@ -302,11 +304,11 @@ func (o *Options) Complete(rootDir string) (*CompletedOptions, error) { if len(o.GenericControlPlane.Authentication.ServiceAccounts.KeyFiles) == 0 { o.GenericControlPlane.Authentication.ServiceAccounts.KeyFiles = []string{o.Controllers.SAController.ServiceAccountKeyFile} } - if o.GenericControlPlane.ServerRunOptions.ServiceAccountSigningKeyFile == "" { - o.GenericControlPlane.ServerRunOptions.ServiceAccountSigningKeyFile = o.Controllers.SAController.ServiceAccountKeyFile + if o.GenericControlPlane.ServiceAccountSigningKeyFile == "" { + o.GenericControlPlane.ServiceAccountSigningKeyFile = o.Controllers.SAController.ServiceAccountKeyFile } - completedGenericServerRunOptions, err := o.GenericControlPlane.ServerRunOptions.Complete() + completedGenericServerRunOptions, err := o.GenericControlPlane.Complete(nil, nil) if err != nil { return nil, err } diff --git a/pkg/server/scheme/scheme.go b/pkg/server/scheme/scheme.go new file mode 100644 index 00000000000..01b64e9c7ca --- /dev/null +++ b/pkg/server/scheme/scheme.go @@ -0,0 +1,56 @@ +/* +Copyright 2023 The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package scheme + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" + admissionregistrationinstall "k8s.io/kubernetes/pkg/apis/admissionregistration/install" + authenticationinstall "k8s.io/kubernetes/pkg/apis/authentication/install" + authorizationinstall "k8s.io/kubernetes/pkg/apis/authorization/install" + certificatesinstall "k8s.io/kubernetes/pkg/apis/certificates/install" + coordinationinstall "k8s.io/kubernetes/pkg/apis/coordination/install" + "k8s.io/kubernetes/pkg/apis/core/install" + eventsinstall "k8s.io/kubernetes/pkg/apis/events/install" + rbacinstall "k8s.io/kubernetes/pkg/apis/rbac/install" +) + +func init() { + install.Install(Scheme) + authenticationinstall.Install(Scheme) + authorizationinstall.Install(Scheme) + certificatesinstall.Install(Scheme) + coordinationinstall.Install(Scheme) + rbacinstall.Install(Scheme) + eventsinstall.Install(Scheme) + admissionregistrationinstall.Install(Scheme) +} + +var ( + // Scheme is the default instance of runtime.Scheme to which control plane types + // in the Kubernetes API are already registered. + // NOTE: If you are copying this file to start a new api group, STOP! This Scheme + // is special and should appear ONLY in the api group, unless you really know what + // you're doing. + Scheme = runtime.NewScheme() + + // Codecs provides access to encoding and decoding for the scheme. + Codecs = serializer.NewCodecFactory(Scheme) + + // ParameterCodec handles versioning of objects that are converted to query parameters. + ParameterCodec = runtime.NewParameterCodec(Scheme) +) diff --git a/pkg/server/server.go b/pkg/server/server.go index 6cd9c1fb78b..939358a9e49 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -27,18 +27,24 @@ import ( "github.com/kcp-dev/logicalcluster/v3" + extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/apimachinery/pkg/util/wait" + genericapifilters "k8s.io/apiserver/pkg/endpoints/filters" genericapiserver "k8s.io/apiserver/pkg/server" + "k8s.io/apiserver/pkg/util/notfoundhandler" "k8s.io/client-go/rest" "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/leaderelection" "k8s.io/client-go/tools/leaderelection/resourcelock" "k8s.io/klog/v2" - "k8s.io/kubernetes/pkg/genericcontrolplane" + controlplaneapiserver "k8s.io/kubernetes/pkg/controlplane/apiserver" + "k8s.io/kubernetes/pkg/controlplane/apiserver/miniaggregator" + autoscalingrest "k8s.io/kubernetes/pkg/registry/autoscaling/rest" + flowcontrolrest "k8s.io/kubernetes/pkg/registry/flowcontrol/rest" configroot "github.com/kcp-dev/kcp/config/root" configrootphase0 "github.com/kcp-dev/kcp/config/root-phase0" @@ -57,8 +63,10 @@ const resyncPeriod = 10 * time.Hour type Server struct { CompletedConfig - *genericcontrolplane.ServerChain - virtual *virtualrootapiserver.Server + ApiExtensions *extensionsapiserver.CustomResourceDefinitions + Apis *controlplaneapiserver.Server + MiniAggregator *miniaggregator.MiniAggregatorServer + virtual *virtualrootapiserver.Server syncedCh chan struct{} rootPhase1FinishedCh chan struct{} @@ -82,17 +90,48 @@ func NewServer(c CompletedConfig) (*Server, error) { controllers: make(map[string]*controllerWrapper), } + notFoundHandler := notfoundhandler.New(c.GenericConfig.Serializer, genericapifilters.NoMuxAndDiscoveryIncompleteKey) var err error - s.ServerChain, err = genericcontrolplane.CreateServerChain(c.MiniAggregator, c.Apis, c.ApiExtensions) + s.ApiExtensions, err = c.ApiExtensions.New(genericapiserver.NewEmptyDelegateWithCustomHandler(notFoundHandler)) + if err != nil { + return nil, fmt.Errorf("create api extensions: %v", err) + } + + s.Apis, err = c.Apis.New("generic-control-plane", s.ApiExtensions.GenericAPIServer) + if err != nil { + return nil, fmt.Errorf("failed to create generic controlplane apiserver: %w", err) + } + + // TODO(sttts): that discovery client is used for CEL admission. It looks up + // resources to admit I believe. So that probably must be scoped. + allStorageProviders, err := c.Apis.DefaultStorageProviders(s.KcpClusterClient.Cluster(controlplaneapiserver.LocalAdminCluster.Path()).Discovery()) + if err != nil { + return nil, fmt.Errorf("failed to create storage providers: %w", err) + } + var storageProviders []controlplaneapiserver.RESTStorageProvider + for i := range allStorageProviders { + switch allStorageProviders[i].(type) { + case flowcontrolrest.RESTStorageProvider: + // TODO(sttts): remove this code when P&F is wired + case autoscalingrest.RESTStorageProvider: + default: + storageProviders = append(storageProviders, allStorageProviders[i]) + } + } + if err := s.Apis.InstallAPIs(storageProviders...); err != nil { + return nil, fmt.Errorf("failed to install APIs: %w", err) + } + + s.MiniAggregator, err = c.MiniAggregator.New(s.Apis.GenericAPIServer, s.Apis, s.ApiExtensions) if err != nil { return nil, err } - s.GenericControlPlane.GenericAPIServer.Handler.GoRestfulContainer.Filter( + s.Apis.GenericAPIServer.Handler.GoRestfulContainer.Filter( mergeCRDsIntoCoreGroup( - s.ApiExtensions.ExtraConfig.ClusterAwareCRDLister, - s.CustomResourceDefinitions.GenericAPIServer.Handler.NonGoRestfulMux.ServeHTTP, - s.GenericControlPlane.GenericAPIServer.Handler.GoRestfulContainer.ServeHTTP, + s.ApiExtensions.ClusterAwareCRDLister, + s.ApiExtensions.GenericAPIServer.Handler.NonGoRestfulMux.ServeHTTP, + s.Apis.GenericAPIServer.Handler.GoRestfulContainer.ServeHTTP, ), ) @@ -165,7 +204,7 @@ func (s *Server) Run(ctx context.Context) error { logger.Info("finished starting kube informers") logger.Info("bootstrapping system CRDs") - if err := wait.PollInfiniteWithContext(goContext(hookContext), time.Second, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextCancel(goContext(hookContext), time.Second, true, func(ctx context.Context) (bool, error) { if err := systemcrds.Bootstrap(ctx, s.ApiExtensionsClusterClient.Cluster(SystemCRDClusterName.Path()), s.ApiExtensionsClusterClient.Cluster(SystemCRDClusterName.Path()).Discovery(), @@ -183,7 +222,7 @@ func (s *Server) Run(ctx context.Context) error { logger.Info("finished bootstrapping system CRDs") logger.Info("bootstrapping the shard workspace") - if err := wait.PollInfiniteWithContext(goContext(hookContext), time.Second, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextCancel(goContext(hookContext), time.Second, true, func(ctx context.Context) (bool, error) { if err := configshard.Bootstrap(ctx, s.ApiExtensionsClusterClient.Cluster(configshard.SystemShardCluster.Path()).Discovery(), s.DynamicClusterClient.Cluster(configshard.SystemShardCluster.Path()), @@ -204,7 +243,7 @@ func (s *Server) Run(ctx context.Context) error { go s.KcpSharedInformerFactory.Core().V1alpha1().LogicalClusters().Informer().Run(hookContext.StopCh) logger.Info("starting APIExport, APIBinding and LogicalCluster informers") - if err := wait.PollInfiniteWithContext(goContext(hookContext), time.Millisecond*100, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextCancel(goContext(hookContext), time.Millisecond*100, true, func(ctx context.Context) (bool, error) { exportsSynced := s.KcpSharedInformerFactory.Apis().V1alpha1().APIExports().Informer().HasSynced() cacheExportsSynced := s.KcpSharedInformerFactory.Apis().V1alpha1().APIExports().Informer().HasSynced() logicalClusterSynced := s.KcpSharedInformerFactory.Core().V1alpha1().LogicalClusters().Informer().HasSynced() @@ -232,7 +271,7 @@ func (s *Server) Run(ctx context.Context) error { logger.Info("bootstrapped root workspace phase 0") logger.Info("getting kcp APIExport identities") - if err := wait.PollImmediateInfiniteWithContext(goContext(hookContext), time.Millisecond*500, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextCancel(goContext(hookContext), time.Millisecond*500, true, func(ctx context.Context) (bool, error) { if err := s.resolveIdentities(ctx); err != nil { logger.V(3).Info("failed to resolve identities, keeping trying", "err", err) return false, nil @@ -245,7 +284,7 @@ func (s *Server) Run(ctx context.Context) error { logger.Info("finished getting kcp APIExport identities") } else if len(s.Options.Extra.RootShardKubeconfigFile) > 0 { logger.Info("getting kcp APIExport identities for the root shard") - if err := wait.PollImmediateInfiniteWithContext(goContext(hookContext), time.Millisecond*500, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextCancel(goContext(hookContext), time.Millisecond*500, true, func(ctx context.Context) (bool, error) { if err := s.resolveIdentities(ctx); err != nil { logger.V(3).Info("failed to resolve identities for the root shard, keeping trying", "err", err) return false, nil @@ -280,7 +319,7 @@ func (s *Server) Run(ctx context.Context) error { }, } logger.Info("Creating or updating Shard", "shard", s.Options.Extra.ShardName) - if err := wait.PollInfiniteWithContext(goContext(hookContext), time.Second, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextCancel(goContext(hookContext), time.Second, true, func(ctx context.Context) (bool, error) { existingShard, err := s.RootShardKcpClusterClient.Cluster(core.RootCluster.Path()).CoreV1alpha1().Shards().Get(ctx, shard.Name, metav1.GetOptions{}) if err != nil && !errors.IsNotFound(err) { logger.Error(err, "failed getting Shard from the root workspace") @@ -364,7 +403,7 @@ func (s *Server) Run(ctx context.Context) error { return err } - if err := s.installRootCAConfigMapController(ctx, s.GenericControlPlane.GenericAPIServer.LoopbackClientConfig); err != nil { + if err := s.installRootCAConfigMapController(ctx, s.Apis.GenericAPIServer.LoopbackClientConfig); err != nil { return err } @@ -515,7 +554,7 @@ func (s *Server) Run(ctx context.Context) error { // set up a special *rest.Config that points to the (shard-)local admin cluster. leaderElectionConfig := rest.CopyConfig(s.GenericConfig.LoopbackClientConfig) leaderElectionConfig = rest.AddUserAgent(leaderElectionConfig, "kcp-leader-election") - leaderElectionConfig.Host, err = url.JoinPath(leaderElectionConfig.Host, genericcontrolplane.LocalAdminCluster.Path().RequestPath()) + leaderElectionConfig.Host, err = url.JoinPath(leaderElectionConfig.Host, controlplaneapiserver.LocalAdminCluster.Path().RequestPath()) if err != nil { return fmt.Errorf("failed to determine local shard admin workspace: %w", err) } diff --git a/pkg/virtual/apiexport/builder/forwarding.go b/pkg/virtual/apiexport/builder/forwarding.go index 0a5d878284c..c92a8a21977 100644 --- a/pkg/virtual/apiexport/builder/forwarding.go +++ b/pkg/virtual/apiexport/builder/forwarding.go @@ -24,13 +24,13 @@ import ( "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" structuralschema "k8s.io/apiextensions-apiserver/pkg/apiserver/schema" + "k8s.io/apiextensions-apiserver/pkg/apiserver/validation" "k8s.io/apiextensions-apiserver/pkg/registry/customresource" "k8s.io/apimachinery/pkg/api/validation/path" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/registry/rest" - "k8s.io/kube-openapi/pkg/validation/validate" "github.com/kcp-dev/kcp/pkg/virtual/framework/dynamic/apiserver" registry "github.com/kcp-dev/kcp/pkg/virtual/framework/forwardingregistry" @@ -52,7 +52,7 @@ func provideAPIExportFilteredRestStorage(ctx context.Context, dynamicClusterClie // provideDelegatingRestStorage returns a forwarding storage build function, with an optional storage wrapper e.g. to add label based filtering. func provideDelegatingRestStorage(ctx context.Context, dynamicClusterClientFunc registry.DynamicClusterClientFunc, apiExportIdentityHash string, wrapper registry.StorageWrapper) apiserver.RestProviderFunc { - return func(resource schema.GroupVersionResource, kind schema.GroupVersionKind, listKind schema.GroupVersionKind, typer runtime.ObjectTyper, tableConvertor rest.TableConvertor, namespaceScoped bool, schemaValidator *validate.SchemaValidator, subresourcesSchemaValidator map[string]*validate.SchemaValidator, structuralSchema *structuralschema.Structural) (mainStorage rest.Storage, subresourceStorages map[string]rest.Storage) { + return func(resource schema.GroupVersionResource, kind schema.GroupVersionKind, listKind schema.GroupVersionKind, typer runtime.ObjectTyper, tableConvertor rest.TableConvertor, namespaceScoped bool, schemaValidator validation.SchemaValidator, subresourcesSchemaValidator map[string]validation.SchemaValidator, structuralSchema *structuralschema.Structural) (mainStorage rest.Storage, subresourceStorages map[string]rest.Storage) { statusSchemaValidate, statusEnabled := subresourcesSchemaValidator["status"] var statusSpec *apiextensions.CustomResourceSubresourceStatus diff --git a/pkg/virtual/apiexport/schemas/apis.go b/pkg/virtual/apiexport/schemas/apis.go index 9dc4536a834..5f440ba3bc4 100644 --- a/pkg/virtual/apiexport/schemas/apis.go +++ b/pkg/virtual/apiexport/schemas/apis.go @@ -21,7 +21,7 @@ import ( "fmt" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" configcrds "github.com/kcp-dev/kcp/config/crds" apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" @@ -42,7 +42,7 @@ func init() { } bs, err := json.Marshal(&apiextensionsv1.JSONSchemaProps{ Type: "object", - XPreserveUnknownFields: pointer.Bool(true), + XPreserveUnknownFields: ptr.To(true), }) if err != nil { panic(fmt.Sprintf("failed to marshal JSONSchemaProps: %v", err)) diff --git a/pkg/virtual/apiexport/schemas/builtin/builtin.go b/pkg/virtual/apiexport/schemas/builtin/builtin.go index c64bf2cbd96..f35d4cc1e29 100644 --- a/pkg/virtual/apiexport/schemas/builtin/builtin.go +++ b/pkg/virtual/apiexport/schemas/builtin/builtin.go @@ -30,9 +30,9 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kube-openapi/pkg/common" - "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" generatedopenapi "k8s.io/kubernetes/pkg/generated/openapi" + kcpscheme "github.com/kcp-dev/kcp/pkg/server/scheme" "github.com/kcp-dev/kcp/pkg/virtual/framework/internalapis" apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" ) @@ -41,7 +41,7 @@ import ( // for APIExport virtual workspace. // TODO(hasheddan): this could be handled via code generation. func init() { - schemes := []*runtime.Scheme{genericcontrolplanescheme.Scheme} + schemes := []*runtime.Scheme{kcpscheme.Scheme} openAPIDefinitionsGetters := []common.GetOpenAPIDefinitions{generatedopenapi.GetOpenAPIDefinitions} apis, err := internalapis.CreateAPIResourceSchemas(schemes, openAPIDefinitionsGetters, BuiltInAPIs...) @@ -112,16 +112,6 @@ var BuiltInAPIs = []internalapis.InternalAPI{ Instance: &corev1.Event{}, ResourceScope: apiextensionsv1.NamespaceScoped, }, - { - Names: apiextensionsv1.CustomResourceDefinitionNames{ - Plural: "limitranges", - Singular: "limitrange", - Kind: "LimitRange", - }, - GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, - Instance: &corev1.LimitRange{}, - ResourceScope: apiextensionsv1.NamespaceScoped, - }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ Plural: "resourcequotas", @@ -253,6 +243,7 @@ var BuiltInAPIs = []internalapis.InternalAPI{ GroupVersion: schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1alpha1"}, Instance: &admissionregistrationv1alpha1.ValidatingAdmissionPolicy{}, ResourceScope: apiextensionsv1.ClusterScoped, + HasStatus: true, }, { Names: apiextensionsv1.CustomResourceDefinitionNames{ diff --git a/pkg/virtual/framework/dynamic/apiserver/discovery.go b/pkg/virtual/framework/dynamic/apiserver/discovery.go index 9dd4585a18f..09a0b453fdb 100644 --- a/pkg/virtual/framework/dynamic/apiserver/discovery.go +++ b/pkg/virtual/framework/dynamic/apiserver/discovery.go @@ -33,7 +33,7 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" "k8s.io/apiserver/pkg/registry/rest" - "k8s.io/kubernetes/pkg/genericcontrolplane/aggregator" + "k8s.io/kubernetes/pkg/controlplane/apiserver/miniaggregator" "github.com/kcp-dev/kcp/pkg/virtual/framework/dynamic/apidefinition" dyncamiccontext "github.com/kcp-dev/kcp/pkg/virtual/framework/dynamic/context" @@ -313,7 +313,7 @@ func (r *rootDiscoveryHandler) ServeHTTP(w http.ResponseWriter, req *http.Reques } groupList = append(groupList, g) } - responsewriters.WriteObjectNegotiated(aggregator.DiscoveryCodecs, negotiation.DefaultEndpointRestrictions, schema.GroupVersion{}, w, req, http.StatusOK, &metav1.APIGroupList{Groups: groupList}, false) + responsewriters.WriteObjectNegotiated(miniaggregator.DiscoveryCodecs, negotiation.DefaultEndpointRestrictions, schema.GroupVersion{}, w, req, http.StatusOK, &metav1.APIGroupList{Groups: groupList}, false) } // splitPath returns the segments for a URL path. diff --git a/pkg/virtual/framework/dynamic/apiserver/serving_info.go b/pkg/virtual/framework/dynamic/apiserver/serving_info.go index 35df53bc232..a9093a161db 100644 --- a/pkg/virtual/framework/dynamic/apiserver/serving_info.go +++ b/pkg/virtual/framework/dynamic/apiserver/serving_info.go @@ -36,9 +36,9 @@ import ( "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/managedfields" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/endpoints/handlers" - "k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager" "k8s.io/apiserver/pkg/endpoints/openapi" "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/registry/rest" @@ -46,8 +46,6 @@ import ( utilopenapi "k8s.io/apiserver/pkg/util/openapi" "k8s.io/klog/v2" "k8s.io/kube-openapi/pkg/validation/spec" - "k8s.io/kube-openapi/pkg/validation/strfmt" - "k8s.io/kube-openapi/pkg/validation/validate" kcpfeatures "github.com/kcp-dev/kcp/pkg/features" "github.com/kcp-dev/kcp/pkg/virtual/framework/dynamic/apidefinition" @@ -57,7 +55,7 @@ import ( var _ apidefinition.APIDefinition = (*servingInfo)(nil) // RestProviderFunc is the type of a function that builds REST storage implementations for the main resource and sub-resources, based on information passed by the resource handler about a given API. -type RestProviderFunc func(resource schema.GroupVersionResource, kind schema.GroupVersionKind, listKind schema.GroupVersionKind, typer runtime.ObjectTyper, tableConvertor rest.TableConvertor, namespaceScoped bool, schemaValidator *validate.SchemaValidator, subresourcesSchemaValidator map[string]*validate.SchemaValidator, structuralSchema *structuralschema.Structural) (mainStorage rest.Storage, subresourceStorages map[string]rest.Storage) +type RestProviderFunc func(resource schema.GroupVersionResource, kind schema.GroupVersionKind, listKind schema.GroupVersionKind, typer runtime.ObjectTyper, tableConvertor rest.TableConvertor, namespaceScoped bool, schemaValidator apiservervalidation.SchemaValidator, subresourcesSchemaValidator map[string]apiservervalidation.SchemaValidator, structuralSchema *structuralschema.Structural) (mainStorage rest.Storage, subresourceStorages map[string]rest.Storage) // CreateServingInfoFor builds an APIDefinition for a apiResourceSchema. func CreateServingInfoFor(genericConfig genericapiserver.CompletedConfig, apiResourceSchema *apisv1alpha1.APIResourceSchema, version string, restProvider RestProviderFunc) (apidefinition.APIDefinition, error) { @@ -123,9 +121,14 @@ func CreateServingInfoFor(genericConfig genericapiserver.CompletedConfig, apiRes modelsByGKV = nil } } - var typeConverter fieldmanager.TypeConverter = fieldmanager.DeducedTypeConverter{} + typeConverter := managedfields.NewDeducedTypeConverter() if openAPIModels != nil { - typeConverter, err = fieldmanager.NewTypeConverter(openAPIModels, false) + schemas := make(map[string]*spec.Schema, len(s.Definitions)) + for k, v := range s.Definitions { + v := v + schemas[k] = &v + } + typeConverter, err = managedfields.NewTypeConverter(schemas, false) if err != nil { return nil, err } @@ -157,24 +160,23 @@ func CreateServingInfoFor(genericConfig genericapiserver.CompletedConfig, apiRes internalValidationSchema := &apiextensionsinternal.CustomResourceValidation{ OpenAPIV3Schema: internalSchema, } - validator, _, err := apiservervalidation.NewSchemaValidator(internalValidationSchema) + validator, _, err := apiservervalidation.NewSchemaValidator(internalSchema) if err != nil { return nil, err } - subResourcesValidators := map[string]*validate.SchemaValidator{} + subResourcesValidators := map[string]apiservervalidation.SchemaValidator{} if status := apiResourceVersion.Subresources.Status; status != nil { - var statusValidator *validate.SchemaValidator + var statusValidator apiservervalidation.SchemaValidator equivalentResourceRegistry.RegisterKindFor(gvr, "status", gvk) // for the status subresource, validate only against the status schema if internalValidationSchema != nil && internalValidationSchema.OpenAPIV3Schema != nil && internalValidationSchema.OpenAPIV3Schema.Properties != nil { if statusSchema, ok := internalValidationSchema.OpenAPIV3Schema.Properties["status"]; ok { - openapiSchema := &spec.Schema{} - if err := apiservervalidation.ConvertJSONSchemaPropsWithPostProcess(&statusSchema, openapiSchema, apiservervalidation.StripUnsupportedFormatsPostProcess); err != nil { + statusValidator, _, err = apiservervalidation.NewSchemaValidator(&statusSchema) + if err != nil { return nil, err } - statusValidator = validate.NewSchemaValidator(openapiSchema, nil, "", strfmt.Default) } } subResourcesValidators["status"] = statusValidator diff --git a/pkg/virtual/framework/fixedgvs/register.go b/pkg/virtual/framework/fixedgvs/register.go index 11e789d987d..2d5e9aeb1cd 100644 --- a/pkg/virtual/framework/fixedgvs/register.go +++ b/pkg/virtual/framework/fixedgvs/register.go @@ -120,13 +120,8 @@ func (vw *FixedGroupVersionsVirtualWorkspace) Register(vwName string, rootAPISer return nil, err } } - openAPIService, err := handler.NewOpenAPIService(mergedSpec) - if err != nil { - return nil, err - } - if err := openAPIService.RegisterOpenAPIVersionedService("/openapi/v2", firstAPIServer.Handler.NonGoRestfulMux); err != nil { - return nil, err - } + openAPIService := handler.NewOpenAPIService(mergedSpec) + openAPIService.RegisterOpenAPIVersionedService("/openapi/v2", firstAPIServer.Handler.NonGoRestfulMux) } return delegateAPIServer, nil diff --git a/pkg/virtual/framework/forwardingregistry/rest.go b/pkg/virtual/framework/forwardingregistry/rest.go index c8705446174..01b223cabe6 100644 --- a/pkg/virtual/framework/forwardingregistry/rest.go +++ b/pkg/virtual/framework/forwardingregistry/rest.go @@ -20,17 +20,17 @@ import ( "context" structuralschema "k8s.io/apiextensions-apiserver/pkg/apiserver/schema" + "k8s.io/apiextensions-apiserver/pkg/apiserver/validation" "k8s.io/apiextensions-apiserver/pkg/registry/customresource" "k8s.io/apimachinery/pkg/api/validation/path" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/managedfields" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager" "k8s.io/apiserver/pkg/registry/rest" "k8s.io/client-go/util/retry" - "k8s.io/kube-openapi/pkg/validation/validate" "github.com/kcp-dev/kcp/pkg/virtual/framework/dynamic/apiserver" ) @@ -68,7 +68,7 @@ func NewStorage( strategy customresource.CustomResourceStrategy, categories []string, tableConvertor rest.TableConvertor, - replicasPathMapping fieldmanager.ResourcePathMappings, + replicasPathMapping managedfields.ResourcePathMappings, dynamicClusterClientFunc DynamicClusterClientFunc, patchConflictRetryBackoff *wait.Backoff, wrapper StorageWrapper, @@ -132,8 +132,8 @@ func ProvideReadOnlyRestStorage(ctx context.Context, dynamicClusterClientFunc Dy typer runtime.ObjectTyper, tableConvertor rest.TableConvertor, namespaceScoped bool, - schemaValidator *validate.SchemaValidator, - subresourcesSchemaValidator map[string]*validate.SchemaValidator, + schemaValidator validation.SchemaValidator, + subresourcesSchemaValidator map[string]validation.SchemaValidator, structuralSchema *structuralschema.Structural, ) (mainStorage rest.Storage, subresourceStorages map[string]rest.Storage) { statusSchemaValidate := subresourcesSchemaValidator["status"] diff --git a/pkg/virtual/initializingworkspaces/builder/build.go b/pkg/virtual/initializingworkspaces/builder/build.go index 3011b6b3866..e8a9c214090 100644 --- a/pkg/virtual/initializingworkspaces/builder/build.go +++ b/pkg/virtual/initializingworkspaces/builder/build.go @@ -40,7 +40,7 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/transport" "k8s.io/klog/v2" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" rootphase0 "github.com/kcp-dev/kcp/config/root-phase0" "github.com/kcp-dev/kcp/pkg/authorization/delegated" @@ -77,7 +77,7 @@ func BuildVirtualWorkspace( } bs, err := json.Marshal(&apiextensionsv1.JSONSchemaProps{ Type: "object", - XPreserveUnknownFields: pointer.Bool(true), + XPreserveUnknownFields: ptr.To(true), }) if err != nil { return nil, err diff --git a/pkg/virtual/initializingworkspaces/builder/forwarding.go b/pkg/virtual/initializingworkspaces/builder/forwarding.go index 09fcf01347d..0895d24b395 100644 --- a/pkg/virtual/initializingworkspaces/builder/forwarding.go +++ b/pkg/virtual/initializingworkspaces/builder/forwarding.go @@ -24,6 +24,7 @@ import ( "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" structuralschema "k8s.io/apiextensions-apiserver/pkg/apiserver/schema" + "k8s.io/apiextensions-apiserver/pkg/apiserver/validation" "k8s.io/apiextensions-apiserver/pkg/registry/customresource" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/validation/path" @@ -35,7 +36,6 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apiserver/pkg/registry/rest" "k8s.io/klog/v2" - "k8s.io/kube-openapi/pkg/validation/validate" "github.com/kcp-dev/kcp/pkg/virtual/framework/dynamic/apiserver" registry "github.com/kcp-dev/kcp/pkg/virtual/framework/forwardingregistry" @@ -95,8 +95,8 @@ func delegatingLogicalClusterReadOnlyRestStorage( typer runtime.ObjectTyper, tableConvertor rest.TableConvertor, namespaceScoped bool, - schemaValidator *validate.SchemaValidator, - subresourcesSchemaValidator map[string]*validate.SchemaValidator, + schemaValidator validation.SchemaValidator, + subresourcesSchemaValidator map[string]validation.SchemaValidator, structuralSchema *structuralschema.Structural, ) (mainStorage rest.Storage, subresourceStorages map[string]rest.Storage) { statusSchemaValidate, statusEnabled := subresourcesSchemaValidator["status"] diff --git a/sdk/client/applyconfiguration/apiextensions/v1/customresourcecolumndefinition.go b/sdk/client/applyconfiguration/apiextensions/v1/customresourcecolumndefinition.go deleted file mode 100644 index cd766de7b35..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/customresourcecolumndefinition.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomResourceColumnDefinitionApplyConfiguration represents an declarative configuration of the CustomResourceColumnDefinition type for use -// with apply. -type CustomResourceColumnDefinitionApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Format *string `json:"format,omitempty"` - Description *string `json:"description,omitempty"` - Priority *int32 `json:"priority,omitempty"` - JSONPath *string `json:"jsonPath,omitempty"` -} - -// CustomResourceColumnDefinitionApplyConfiguration constructs an declarative configuration of the CustomResourceColumnDefinition type for use with -// apply. -func CustomResourceColumnDefinition() *CustomResourceColumnDefinitionApplyConfiguration { - return &CustomResourceColumnDefinitionApplyConfiguration{} -} - -// 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 *CustomResourceColumnDefinitionApplyConfiguration) WithName(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.Name = &value - return b -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithType(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.Type = &value - return b -} - -// WithFormat sets the Format field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Format field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithFormat(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.Format = &value - return b -} - -// WithDescription sets the Description field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Description field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithDescription(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.Description = &value - return b -} - -// WithPriority sets the Priority field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Priority field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithPriority(value int32) *CustomResourceColumnDefinitionApplyConfiguration { - b.Priority = &value - return b -} - -// WithJSONPath sets the JSONPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the JSONPath field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithJSONPath(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.JSONPath = &value - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/customresourceconversion.go b/sdk/client/applyconfiguration/apiextensions/v1/customresourceconversion.go deleted file mode 100644 index 02278c0df57..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/customresourceconversion.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" -) - -// CustomResourceConversionApplyConfiguration represents an declarative configuration of the CustomResourceConversion type for use -// with apply. -type CustomResourceConversionApplyConfiguration struct { - Strategy *v1.ConversionStrategyType `json:"strategy,omitempty"` - Webhook *WebhookConversionApplyConfiguration `json:"webhook,omitempty"` -} - -// CustomResourceConversionApplyConfiguration constructs an declarative configuration of the CustomResourceConversion type for use with -// apply. -func CustomResourceConversion() *CustomResourceConversionApplyConfiguration { - return &CustomResourceConversionApplyConfiguration{} -} - -// WithStrategy sets the Strategy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Strategy field is set to the value of the last call. -func (b *CustomResourceConversionApplyConfiguration) WithStrategy(value v1.ConversionStrategyType) *CustomResourceConversionApplyConfiguration { - b.Strategy = &value - return b -} - -// WithWebhook sets the Webhook field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Webhook field is set to the value of the last call. -func (b *CustomResourceConversionApplyConfiguration) WithWebhook(value *WebhookConversionApplyConfiguration) *CustomResourceConversionApplyConfiguration { - b.Webhook = value - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinition.go b/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinition.go deleted file mode 100644 index a28292d1c6a..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinition.go +++ /dev/null @@ -1,219 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - - v1 "github.com/kcp-dev/kcp/sdk/client/applyconfiguration/meta/v1" -) - -// CustomResourceDefinitionApplyConfiguration represents an declarative configuration of the CustomResourceDefinition type for use -// with apply. -type CustomResourceDefinitionApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *CustomResourceDefinitionSpecApplyConfiguration `json:"spec,omitempty"` - Status *CustomResourceDefinitionStatusApplyConfiguration `json:"status,omitempty"` -} - -// CustomResourceDefinition constructs an declarative configuration of the CustomResourceDefinition type for use with -// apply. -func CustomResourceDefinition(name string) *CustomResourceDefinitionApplyConfiguration { - b := &CustomResourceDefinitionApplyConfiguration{} - b.WithName(name) - b.WithKind("CustomResourceDefinition") - b.WithAPIVersion("apiextensions.k8s.io/v1") - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithKind(value string) *CustomResourceDefinitionApplyConfiguration { - b.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithAPIVersion(value string) *CustomResourceDefinitionApplyConfiguration { - b.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithName(value string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithGenerateName(value string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithNamespace(value string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithUID(value types.UID) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithResourceVersion(value string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithGeneration(value int64) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *CustomResourceDefinitionApplyConfiguration) WithLabels(entries map[string]string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *CustomResourceDefinitionApplyConfiguration) WithAnnotations(entries map[string]string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *CustomResourceDefinitionApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *CustomResourceDefinitionApplyConfiguration) WithFinalizers(values ...string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) - } - return b -} - -func (b *CustomResourceDefinitionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithSpec(value *CustomResourceDefinitionSpecApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithStatus(value *CustomResourceDefinitionStatusApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { - b.Status = value - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitioncondition.go b/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitioncondition.go deleted file mode 100644 index f026f108992..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitioncondition.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// CustomResourceDefinitionConditionApplyConfiguration represents an declarative configuration of the CustomResourceDefinitionCondition type for use -// with apply. -type CustomResourceDefinitionConditionApplyConfiguration struct { - Type *v1.CustomResourceDefinitionConditionType `json:"type,omitempty"` - Status *v1.ConditionStatus `json:"status,omitempty"` - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` -} - -// CustomResourceDefinitionConditionApplyConfiguration constructs an declarative configuration of the CustomResourceDefinitionCondition type for use with -// apply. -func CustomResourceDefinitionCondition() *CustomResourceDefinitionConditionApplyConfiguration { - return &CustomResourceDefinitionConditionApplyConfiguration{} -} - -// 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 *CustomResourceDefinitionConditionApplyConfiguration) WithType(value v1.CustomResourceDefinitionConditionType) *CustomResourceDefinitionConditionApplyConfiguration { - b.Type = &value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *CustomResourceDefinitionConditionApplyConfiguration { - b.Status = &value - return b -} - -// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastTransitionTime field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *CustomResourceDefinitionConditionApplyConfiguration { - b.LastTransitionTime = &value - return b -} - -// WithReason sets the Reason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Reason field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithReason(value string) *CustomResourceDefinitionConditionApplyConfiguration { - b.Reason = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithMessage(value string) *CustomResourceDefinitionConditionApplyConfiguration { - b.Message = &value - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitionnames.go b/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitionnames.go deleted file mode 100644 index f57cfad71ba..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitionnames.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomResourceDefinitionNamesApplyConfiguration represents an declarative configuration of the CustomResourceDefinitionNames type for use -// with apply. -type CustomResourceDefinitionNamesApplyConfiguration struct { - Plural *string `json:"plural,omitempty"` - Singular *string `json:"singular,omitempty"` - ShortNames []string `json:"shortNames,omitempty"` - Kind *string `json:"kind,omitempty"` - ListKind *string `json:"listKind,omitempty"` - Categories []string `json:"categories,omitempty"` -} - -// CustomResourceDefinitionNamesApplyConfiguration constructs an declarative configuration of the CustomResourceDefinitionNames type for use with -// apply. -func CustomResourceDefinitionNames() *CustomResourceDefinitionNamesApplyConfiguration { - return &CustomResourceDefinitionNamesApplyConfiguration{} -} - -// WithPlural sets the Plural field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Plural field is set to the value of the last call. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithPlural(value string) *CustomResourceDefinitionNamesApplyConfiguration { - b.Plural = &value - return b -} - -// WithSingular sets the Singular field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Singular field is set to the value of the last call. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithSingular(value string) *CustomResourceDefinitionNamesApplyConfiguration { - b.Singular = &value - return b -} - -// WithShortNames adds the given value to the ShortNames 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 ShortNames field. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithShortNames(values ...string) *CustomResourceDefinitionNamesApplyConfiguration { - for i := range values { - b.ShortNames = append(b.ShortNames, values[i]) - } - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithKind(value string) *CustomResourceDefinitionNamesApplyConfiguration { - b.Kind = &value - return b -} - -// WithListKind sets the ListKind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ListKind field is set to the value of the last call. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithListKind(value string) *CustomResourceDefinitionNamesApplyConfiguration { - b.ListKind = &value - return b -} - -// WithCategories adds the given value to the Categories 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 Categories field. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithCategories(values ...string) *CustomResourceDefinitionNamesApplyConfiguration { - for i := range values { - b.Categories = append(b.Categories, values[i]) - } - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitionspec.go b/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitionspec.go deleted file mode 100644 index 229a31a48db..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitionspec.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" -) - -// CustomResourceDefinitionSpecApplyConfiguration represents an declarative configuration of the CustomResourceDefinitionSpec type for use -// with apply. -type CustomResourceDefinitionSpecApplyConfiguration struct { - Group *string `json:"group,omitempty"` - Names *CustomResourceDefinitionNamesApplyConfiguration `json:"names,omitempty"` - Scope *apiextensionsv1.ResourceScope `json:"scope,omitempty"` - Versions []CustomResourceDefinitionVersionApplyConfiguration `json:"versions,omitempty"` - Conversion *CustomResourceConversionApplyConfiguration `json:"conversion,omitempty"` - PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty"` -} - -// CustomResourceDefinitionSpecApplyConfiguration constructs an declarative configuration of the CustomResourceDefinitionSpec type for use with -// apply. -func CustomResourceDefinitionSpec() *CustomResourceDefinitionSpecApplyConfiguration { - return &CustomResourceDefinitionSpecApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithGroup(value string) *CustomResourceDefinitionSpecApplyConfiguration { - b.Group = &value - return b -} - -// WithNames sets the Names field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Names field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithNames(value *CustomResourceDefinitionNamesApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { - b.Names = value - return b -} - -// WithScope sets the Scope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scope field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithScope(value apiextensionsv1.ResourceScope) *CustomResourceDefinitionSpecApplyConfiguration { - b.Scope = &value - return b -} - -// WithVersions adds the given value to the Versions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Versions field. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithVersions(values ...*CustomResourceDefinitionVersionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithVersions") - } - b.Versions = append(b.Versions, *values[i]) - } - return b -} - -// WithConversion sets the Conversion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conversion field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithConversion(value *CustomResourceConversionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { - b.Conversion = value - return b -} - -// WithPreserveUnknownFields sets the PreserveUnknownFields field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PreserveUnknownFields field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithPreserveUnknownFields(value bool) *CustomResourceDefinitionSpecApplyConfiguration { - b.PreserveUnknownFields = &value - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitionstatus.go b/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitionstatus.go deleted file mode 100644 index a1afd8106b8..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitionstatus.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomResourceDefinitionStatusApplyConfiguration represents an declarative configuration of the CustomResourceDefinitionStatus type for use -// with apply. -type CustomResourceDefinitionStatusApplyConfiguration struct { - Conditions []CustomResourceDefinitionConditionApplyConfiguration `json:"conditions,omitempty"` - AcceptedNames *CustomResourceDefinitionNamesApplyConfiguration `json:"acceptedNames,omitempty"` - StoredVersions []string `json:"storedVersions,omitempty"` -} - -// CustomResourceDefinitionStatusApplyConfiguration constructs an declarative configuration of the CustomResourceDefinitionStatus type for use with -// apply. -func CustomResourceDefinitionStatus() *CustomResourceDefinitionStatusApplyConfiguration { - return &CustomResourceDefinitionStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *CustomResourceDefinitionStatusApplyConfiguration) WithConditions(values ...*CustomResourceDefinitionConditionApplyConfiguration) *CustomResourceDefinitionStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithAcceptedNames sets the AcceptedNames field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AcceptedNames field is set to the value of the last call. -func (b *CustomResourceDefinitionStatusApplyConfiguration) WithAcceptedNames(value *CustomResourceDefinitionNamesApplyConfiguration) *CustomResourceDefinitionStatusApplyConfiguration { - b.AcceptedNames = value - return b -} - -// WithStoredVersions adds the given value to the StoredVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the StoredVersions field. -func (b *CustomResourceDefinitionStatusApplyConfiguration) WithStoredVersions(values ...string) *CustomResourceDefinitionStatusApplyConfiguration { - for i := range values { - b.StoredVersions = append(b.StoredVersions, values[i]) - } - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go b/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go deleted file mode 100644 index 5570c7df556..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomResourceDefinitionVersionApplyConfiguration represents an declarative configuration of the CustomResourceDefinitionVersion type for use -// with apply. -type CustomResourceDefinitionVersionApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Served *bool `json:"served,omitempty"` - Storage *bool `json:"storage,omitempty"` - Deprecated *bool `json:"deprecated,omitempty"` - DeprecationWarning *string `json:"deprecationWarning,omitempty"` - Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` - Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` - AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` -} - -// CustomResourceDefinitionVersionApplyConfiguration constructs an declarative configuration of the CustomResourceDefinitionVersion type for use with -// apply. -func CustomResourceDefinitionVersion() *CustomResourceDefinitionVersionApplyConfiguration { - return &CustomResourceDefinitionVersionApplyConfiguration{} -} - -// 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 *CustomResourceDefinitionVersionApplyConfiguration) WithName(value string) *CustomResourceDefinitionVersionApplyConfiguration { - b.Name = &value - return b -} - -// WithServed sets the Served field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Served field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithServed(value bool) *CustomResourceDefinitionVersionApplyConfiguration { - b.Served = &value - return b -} - -// WithStorage sets the Storage field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Storage field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithStorage(value bool) *CustomResourceDefinitionVersionApplyConfiguration { - b.Storage = &value - return b -} - -// WithDeprecated sets the Deprecated field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Deprecated field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithDeprecated(value bool) *CustomResourceDefinitionVersionApplyConfiguration { - b.Deprecated = &value - return b -} - -// WithDeprecationWarning sets the DeprecationWarning field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeprecationWarning field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithDeprecationWarning(value string) *CustomResourceDefinitionVersionApplyConfiguration { - b.DeprecationWarning = &value - return b -} - -// WithSchema sets the Schema field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Schema field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSchema(value *CustomResourceValidationApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { - b.Schema = value - return b -} - -// WithSubresources sets the Subresources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Subresources field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSubresources(value *CustomResourceSubresourcesApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { - b.Subresources = value - return b -} - -// WithAdditionalPrinterColumns adds the given value to the AdditionalPrinterColumns field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AdditionalPrinterColumns field. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithAdditionalPrinterColumns(values ...*CustomResourceColumnDefinitionApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAdditionalPrinterColumns") - } - b.AdditionalPrinterColumns = append(b.AdditionalPrinterColumns, *values[i]) - } - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/customresourcesubresources.go b/sdk/client/applyconfiguration/apiextensions/v1/customresourcesubresources.go deleted file mode 100644 index 8d937d3bc1f..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/customresourcesubresources.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" -) - -// CustomResourceSubresourcesApplyConfiguration represents an declarative configuration of the CustomResourceSubresources type for use -// with apply. -type CustomResourceSubresourcesApplyConfiguration struct { - Status *v1.CustomResourceSubresourceStatus `json:"status,omitempty"` - Scale *CustomResourceSubresourceScaleApplyConfiguration `json:"scale,omitempty"` -} - -// CustomResourceSubresourcesApplyConfiguration constructs an declarative configuration of the CustomResourceSubresources type for use with -// apply. -func CustomResourceSubresources() *CustomResourceSubresourcesApplyConfiguration { - return &CustomResourceSubresourcesApplyConfiguration{} -} - -// 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 *CustomResourceSubresourcesApplyConfiguration) WithStatus(value v1.CustomResourceSubresourceStatus) *CustomResourceSubresourcesApplyConfiguration { - b.Status = &value - return b -} - -// WithScale sets the Scale field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scale field is set to the value of the last call. -func (b *CustomResourceSubresourcesApplyConfiguration) WithScale(value *CustomResourceSubresourceScaleApplyConfiguration) *CustomResourceSubresourcesApplyConfiguration { - b.Scale = value - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/customresourcesubresourcescale.go b/sdk/client/applyconfiguration/apiextensions/v1/customresourcesubresourcescale.go deleted file mode 100644 index d0f88c3c7f1..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/customresourcesubresourcescale.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomResourceSubresourceScaleApplyConfiguration represents an declarative configuration of the CustomResourceSubresourceScale type for use -// with apply. -type CustomResourceSubresourceScaleApplyConfiguration struct { - SpecReplicasPath *string `json:"specReplicasPath,omitempty"` - StatusReplicasPath *string `json:"statusReplicasPath,omitempty"` - LabelSelectorPath *string `json:"labelSelectorPath,omitempty"` -} - -// CustomResourceSubresourceScaleApplyConfiguration constructs an declarative configuration of the CustomResourceSubresourceScale type for use with -// apply. -func CustomResourceSubresourceScale() *CustomResourceSubresourceScaleApplyConfiguration { - return &CustomResourceSubresourceScaleApplyConfiguration{} -} - -// WithSpecReplicasPath sets the SpecReplicasPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SpecReplicasPath field is set to the value of the last call. -func (b *CustomResourceSubresourceScaleApplyConfiguration) WithSpecReplicasPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { - b.SpecReplicasPath = &value - return b -} - -// WithStatusReplicasPath sets the StatusReplicasPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StatusReplicasPath field is set to the value of the last call. -func (b *CustomResourceSubresourceScaleApplyConfiguration) WithStatusReplicasPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { - b.StatusReplicasPath = &value - return b -} - -// WithLabelSelectorPath sets the LabelSelectorPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LabelSelectorPath field is set to the value of the last call. -func (b *CustomResourceSubresourceScaleApplyConfiguration) WithLabelSelectorPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { - b.LabelSelectorPath = &value - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/customresourcevalidation.go b/sdk/client/applyconfiguration/apiextensions/v1/customresourcevalidation.go deleted file mode 100644 index c314996f5be..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/customresourcevalidation.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomResourceValidationApplyConfiguration represents an declarative configuration of the CustomResourceValidation type for use -// with apply. -type CustomResourceValidationApplyConfiguration struct { - OpenAPIV3Schema *JSONSchemaPropsApplyConfiguration `json:"openAPIV3Schema,omitempty"` -} - -// CustomResourceValidationApplyConfiguration constructs an declarative configuration of the CustomResourceValidation type for use with -// apply. -func CustomResourceValidation() *CustomResourceValidationApplyConfiguration { - return &CustomResourceValidationApplyConfiguration{} -} - -// WithOpenAPIV3Schema sets the OpenAPIV3Schema field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OpenAPIV3Schema field is set to the value of the last call. -func (b *CustomResourceValidationApplyConfiguration) WithOpenAPIV3Schema(value *JSONSchemaPropsApplyConfiguration) *CustomResourceValidationApplyConfiguration { - b.OpenAPIV3Schema = value - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/externaldocumentation.go b/sdk/client/applyconfiguration/apiextensions/v1/externaldocumentation.go deleted file mode 100644 index 415b063e463..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/externaldocumentation.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ExternalDocumentationApplyConfiguration represents an declarative configuration of the ExternalDocumentation type for use -// with apply. -type ExternalDocumentationApplyConfiguration struct { - Description *string `json:"description,omitempty"` - URL *string `json:"url,omitempty"` -} - -// ExternalDocumentationApplyConfiguration constructs an declarative configuration of the ExternalDocumentation type for use with -// apply. -func ExternalDocumentation() *ExternalDocumentationApplyConfiguration { - return &ExternalDocumentationApplyConfiguration{} -} - -// WithDescription sets the Description field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Description field is set to the value of the last call. -func (b *ExternalDocumentationApplyConfiguration) WithDescription(value string) *ExternalDocumentationApplyConfiguration { - b.Description = &value - return b -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *ExternalDocumentationApplyConfiguration) WithURL(value string) *ExternalDocumentationApplyConfiguration { - b.URL = &value - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go b/sdk/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go deleted file mode 100644 index 0ad2a865df7..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go +++ /dev/null @@ -1,463 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" -) - -// JSONSchemaPropsApplyConfiguration represents an declarative configuration of the JSONSchemaProps type for use -// with apply. -type JSONSchemaPropsApplyConfiguration struct { - ID *string `json:"id,omitempty"` - Schema *v1.JSONSchemaURL `json:"$schema,omitempty"` - Ref *string `json:"$ref,omitempty"` - Description *string `json:"description,omitempty"` - Type *string `json:"type,omitempty"` - Format *string `json:"format,omitempty"` - Title *string `json:"title,omitempty"` - Default *v1.JSON `json:"default,omitempty"` - Maximum *float64 `json:"maximum,omitempty"` - ExclusiveMaximum *bool `json:"exclusiveMaximum,omitempty"` - Minimum *float64 `json:"minimum,omitempty"` - ExclusiveMinimum *bool `json:"exclusiveMinimum,omitempty"` - MaxLength *int64 `json:"maxLength,omitempty"` - MinLength *int64 `json:"minLength,omitempty"` - Pattern *string `json:"pattern,omitempty"` - MaxItems *int64 `json:"maxItems,omitempty"` - MinItems *int64 `json:"minItems,omitempty"` - UniqueItems *bool `json:"uniqueItems,omitempty"` - MultipleOf *float64 `json:"multipleOf,omitempty"` - Enum []v1.JSON `json:"enum,omitempty"` - MaxProperties *int64 `json:"maxProperties,omitempty"` - MinProperties *int64 `json:"minProperties,omitempty"` - Required []string `json:"required,omitempty"` - Items *v1.JSONSchemaPropsOrArray `json:"items,omitempty"` - AllOf []JSONSchemaPropsApplyConfiguration `json:"allOf,omitempty"` - OneOf []JSONSchemaPropsApplyConfiguration `json:"oneOf,omitempty"` - AnyOf []JSONSchemaPropsApplyConfiguration `json:"anyOf,omitempty"` - Not *JSONSchemaPropsApplyConfiguration `json:"not,omitempty"` - Properties map[string]JSONSchemaPropsApplyConfiguration `json:"properties,omitempty"` - AdditionalProperties *v1.JSONSchemaPropsOrBool `json:"additionalProperties,omitempty"` - PatternProperties map[string]JSONSchemaPropsApplyConfiguration `json:"patternProperties,omitempty"` - Dependencies *v1.JSONSchemaDependencies `json:"dependencies,omitempty"` - AdditionalItems *v1.JSONSchemaPropsOrBool `json:"additionalItems,omitempty"` - Definitions *v1.JSONSchemaDefinitions `json:"definitions,omitempty"` - ExternalDocs *ExternalDocumentationApplyConfiguration `json:"externalDocs,omitempty"` - Example *v1.JSON `json:"example,omitempty"` - Nullable *bool `json:"nullable,omitempty"` - XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty"` - XEmbeddedResource *bool `json:"x-kubernetes-embedded-resource,omitempty"` - XIntOrString *bool `json:"x-kubernetes-int-or-string,omitempty"` - XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty"` - XListType *string `json:"x-kubernetes-list-type,omitempty"` - XMapType *string `json:"x-kubernetes-map-type,omitempty"` - XValidations *v1.ValidationRules `json:"x-kubernetes-validations,omitempty"` -} - -// JSONSchemaPropsApplyConfiguration constructs an declarative configuration of the JSONSchemaProps type for use with -// apply. -func JSONSchemaProps() *JSONSchemaPropsApplyConfiguration { - return &JSONSchemaPropsApplyConfiguration{} -} - -// WithID sets the ID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ID field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithID(value string) *JSONSchemaPropsApplyConfiguration { - b.ID = &value - return b -} - -// WithSchema sets the Schema field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Schema field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithSchema(value v1.JSONSchemaURL) *JSONSchemaPropsApplyConfiguration { - b.Schema = &value - return b -} - -// WithRef sets the Ref field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Ref field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithRef(value string) *JSONSchemaPropsApplyConfiguration { - b.Ref = &value - return b -} - -// WithDescription sets the Description field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Description field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithDescription(value string) *JSONSchemaPropsApplyConfiguration { - b.Description = &value - return b -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithType(value string) *JSONSchemaPropsApplyConfiguration { - b.Type = &value - return b -} - -// WithFormat sets the Format field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Format field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithFormat(value string) *JSONSchemaPropsApplyConfiguration { - b.Format = &value - return b -} - -// WithTitle sets the Title field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Title field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithTitle(value string) *JSONSchemaPropsApplyConfiguration { - b.Title = &value - return b -} - -// WithDefault sets the Default field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Default field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithDefault(value v1.JSON) *JSONSchemaPropsApplyConfiguration { - b.Default = &value - return b -} - -// WithMaximum sets the Maximum field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Maximum field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMaximum(value float64) *JSONSchemaPropsApplyConfiguration { - b.Maximum = &value - return b -} - -// WithExclusiveMaximum sets the ExclusiveMaximum field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExclusiveMaximum field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithExclusiveMaximum(value bool) *JSONSchemaPropsApplyConfiguration { - b.ExclusiveMaximum = &value - return b -} - -// WithMinimum sets the Minimum field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Minimum field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMinimum(value float64) *JSONSchemaPropsApplyConfiguration { - b.Minimum = &value - return b -} - -// WithExclusiveMinimum sets the ExclusiveMinimum field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExclusiveMinimum field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithExclusiveMinimum(value bool) *JSONSchemaPropsApplyConfiguration { - b.ExclusiveMinimum = &value - return b -} - -// WithMaxLength sets the MaxLength field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxLength field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMaxLength(value int64) *JSONSchemaPropsApplyConfiguration { - b.MaxLength = &value - return b -} - -// WithMinLength sets the MinLength field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinLength field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMinLength(value int64) *JSONSchemaPropsApplyConfiguration { - b.MinLength = &value - return b -} - -// WithPattern sets the Pattern field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Pattern field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithPattern(value string) *JSONSchemaPropsApplyConfiguration { - b.Pattern = &value - return b -} - -// WithMaxItems sets the MaxItems field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxItems field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMaxItems(value int64) *JSONSchemaPropsApplyConfiguration { - b.MaxItems = &value - return b -} - -// WithMinItems sets the MinItems field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinItems field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMinItems(value int64) *JSONSchemaPropsApplyConfiguration { - b.MinItems = &value - return b -} - -// WithUniqueItems sets the UniqueItems field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UniqueItems field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithUniqueItems(value bool) *JSONSchemaPropsApplyConfiguration { - b.UniqueItems = &value - return b -} - -// WithMultipleOf sets the MultipleOf field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MultipleOf field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMultipleOf(value float64) *JSONSchemaPropsApplyConfiguration { - b.MultipleOf = &value - return b -} - -// WithEnum adds the given value to the Enum 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 Enum field. -func (b *JSONSchemaPropsApplyConfiguration) WithEnum(values ...v1.JSON) *JSONSchemaPropsApplyConfiguration { - for i := range values { - b.Enum = append(b.Enum, values[i]) - } - return b -} - -// WithMaxProperties sets the MaxProperties field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxProperties field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMaxProperties(value int64) *JSONSchemaPropsApplyConfiguration { - b.MaxProperties = &value - return b -} - -// WithMinProperties sets the MinProperties field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinProperties field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMinProperties(value int64) *JSONSchemaPropsApplyConfiguration { - b.MinProperties = &value - return b -} - -// WithRequired adds the given value to the Required 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 Required field. -func (b *JSONSchemaPropsApplyConfiguration) WithRequired(values ...string) *JSONSchemaPropsApplyConfiguration { - for i := range values { - b.Required = append(b.Required, values[i]) - } - return b -} - -// WithItems sets the Items field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Items field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithItems(value v1.JSONSchemaPropsOrArray) *JSONSchemaPropsApplyConfiguration { - b.Items = &value - return b -} - -// WithAllOf adds the given value to the AllOf 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 AllOf field. -func (b *JSONSchemaPropsApplyConfiguration) WithAllOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAllOf") - } - b.AllOf = append(b.AllOf, *values[i]) - } - return b -} - -// WithOneOf adds the given value to the OneOf 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 OneOf field. -func (b *JSONSchemaPropsApplyConfiguration) WithOneOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOneOf") - } - b.OneOf = append(b.OneOf, *values[i]) - } - return b -} - -// WithAnyOf adds the given value to the AnyOf 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 AnyOf field. -func (b *JSONSchemaPropsApplyConfiguration) WithAnyOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAnyOf") - } - b.AnyOf = append(b.AnyOf, *values[i]) - } - return b -} - -// WithNot sets the Not field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Not field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithNot(value *JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - b.Not = value - return b -} - -// WithProperties puts the entries into the Properties field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Properties field, -// overwriting an existing map entries in Properties field with the same key. -func (b *JSONSchemaPropsApplyConfiguration) WithProperties(entries map[string]JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - if b.Properties == nil && len(entries) > 0 { - b.Properties = make(map[string]JSONSchemaPropsApplyConfiguration, len(entries)) - } - for k, v := range entries { - b.Properties[k] = v - } - return b -} - -// WithAdditionalProperties sets the AdditionalProperties field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AdditionalProperties field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithAdditionalProperties(value v1.JSONSchemaPropsOrBool) *JSONSchemaPropsApplyConfiguration { - b.AdditionalProperties = &value - return b -} - -// WithPatternProperties puts the entries into the PatternProperties field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the PatternProperties field, -// overwriting an existing map entries in PatternProperties field with the same key. -func (b *JSONSchemaPropsApplyConfiguration) WithPatternProperties(entries map[string]JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - if b.PatternProperties == nil && len(entries) > 0 { - b.PatternProperties = make(map[string]JSONSchemaPropsApplyConfiguration, len(entries)) - } - for k, v := range entries { - b.PatternProperties[k] = v - } - return b -} - -// WithDependencies sets the Dependencies field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Dependencies field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithDependencies(value v1.JSONSchemaDependencies) *JSONSchemaPropsApplyConfiguration { - b.Dependencies = &value - return b -} - -// WithAdditionalItems sets the AdditionalItems field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AdditionalItems field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithAdditionalItems(value v1.JSONSchemaPropsOrBool) *JSONSchemaPropsApplyConfiguration { - b.AdditionalItems = &value - return b -} - -// WithDefinitions sets the Definitions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Definitions field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithDefinitions(value v1.JSONSchemaDefinitions) *JSONSchemaPropsApplyConfiguration { - b.Definitions = &value - return b -} - -// WithExternalDocs sets the ExternalDocs field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExternalDocs field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithExternalDocs(value *ExternalDocumentationApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - b.ExternalDocs = value - return b -} - -// WithExample sets the Example field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Example field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithExample(value v1.JSON) *JSONSchemaPropsApplyConfiguration { - b.Example = &value - return b -} - -// WithNullable sets the Nullable field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Nullable field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithNullable(value bool) *JSONSchemaPropsApplyConfiguration { - b.Nullable = &value - return b -} - -// WithXPreserveUnknownFields sets the XPreserveUnknownFields field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XPreserveUnknownFields field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXPreserveUnknownFields(value bool) *JSONSchemaPropsApplyConfiguration { - b.XPreserveUnknownFields = &value - return b -} - -// WithXEmbeddedResource sets the XEmbeddedResource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XEmbeddedResource field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXEmbeddedResource(value bool) *JSONSchemaPropsApplyConfiguration { - b.XEmbeddedResource = &value - return b -} - -// WithXIntOrString sets the XIntOrString field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XIntOrString field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXIntOrString(value bool) *JSONSchemaPropsApplyConfiguration { - b.XIntOrString = &value - return b -} - -// WithXListMapKeys adds the given value to the XListMapKeys 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 XListMapKeys field. -func (b *JSONSchemaPropsApplyConfiguration) WithXListMapKeys(values ...string) *JSONSchemaPropsApplyConfiguration { - for i := range values { - b.XListMapKeys = append(b.XListMapKeys, values[i]) - } - return b -} - -// WithXListType sets the XListType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XListType field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXListType(value string) *JSONSchemaPropsApplyConfiguration { - b.XListType = &value - return b -} - -// WithXMapType sets the XMapType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XMapType field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXMapType(value string) *JSONSchemaPropsApplyConfiguration { - b.XMapType = &value - return b -} - -// WithXValidations sets the XValidations field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XValidations field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXValidations(value v1.ValidationRules) *JSONSchemaPropsApplyConfiguration { - b.XValidations = &value - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/servicereference.go b/sdk/client/applyconfiguration/apiextensions/v1/servicereference.go deleted file mode 100644 index 4cfa299604e..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/servicereference.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ServiceReferenceApplyConfiguration represents an declarative configuration of the ServiceReference type for use -// with apply. -type ServiceReferenceApplyConfiguration struct { - Namespace *string `json:"namespace,omitempty"` - Name *string `json:"name,omitempty"` - Path *string `json:"path,omitempty"` - Port *int32 `json:"port,omitempty"` -} - -// ServiceReferenceApplyConfiguration constructs an declarative configuration of the ServiceReference type for use with -// apply. -func ServiceReference() *ServiceReferenceApplyConfiguration { - return &ServiceReferenceApplyConfiguration{} -} - -// 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 *ServiceReferenceApplyConfiguration) WithNamespace(value string) *ServiceReferenceApplyConfiguration { - b.Namespace = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithName(value string) *ServiceReferenceApplyConfiguration { - b.Name = &value - return b -} - -// WithPath sets the Path field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Path field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithPath(value string) *ServiceReferenceApplyConfiguration { - b.Path = &value - return b -} - -// WithPort sets the Port field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Port field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithPort(value int32) *ServiceReferenceApplyConfiguration { - b.Port = &value - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/validationrule.go b/sdk/client/applyconfiguration/apiextensions/v1/validationrule.go deleted file mode 100644 index 58fc684e782..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/validationrule.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ValidationRuleApplyConfiguration represents an declarative configuration of the ValidationRule type for use -// with apply. -type ValidationRuleApplyConfiguration struct { - Rule *string `json:"rule,omitempty"` - Message *string `json:"message,omitempty"` -} - -// ValidationRuleApplyConfiguration constructs an declarative configuration of the ValidationRule type for use with -// apply. -func ValidationRule() *ValidationRuleApplyConfiguration { - return &ValidationRuleApplyConfiguration{} -} - -// WithRule sets the Rule field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Rule field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithRule(value string) *ValidationRuleApplyConfiguration { - b.Rule = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithMessage(value string) *ValidationRuleApplyConfiguration { - b.Message = &value - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/webhookclientconfig.go b/sdk/client/applyconfiguration/apiextensions/v1/webhookclientconfig.go deleted file mode 100644 index 46f0a65f0b3..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/webhookclientconfig.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// WebhookClientConfigApplyConfiguration represents an declarative configuration of the WebhookClientConfig type for use -// with apply. -type WebhookClientConfigApplyConfiguration struct { - URL *string `json:"url,omitempty"` - Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"` - CABundle []byte `json:"caBundle,omitempty"` -} - -// WebhookClientConfigApplyConfiguration constructs an declarative configuration of the WebhookClientConfig type for use with -// apply. -func WebhookClientConfig() *WebhookClientConfigApplyConfiguration { - return &WebhookClientConfigApplyConfiguration{} -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *WebhookClientConfigApplyConfiguration) WithURL(value string) *WebhookClientConfigApplyConfiguration { - b.URL = &value - return b -} - -// WithService sets the Service field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Service field is set to the value of the last call. -func (b *WebhookClientConfigApplyConfiguration) WithService(value *ServiceReferenceApplyConfiguration) *WebhookClientConfigApplyConfiguration { - b.Service = value - return b -} - -// WithCABundle adds the given value to the CABundle field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the CABundle field. -func (b *WebhookClientConfigApplyConfiguration) WithCABundle(values ...byte) *WebhookClientConfigApplyConfiguration { - for i := range values { - b.CABundle = append(b.CABundle, values[i]) - } - return b -} diff --git a/sdk/client/applyconfiguration/apiextensions/v1/webhookconversion.go b/sdk/client/applyconfiguration/apiextensions/v1/webhookconversion.go deleted file mode 100644 index 07b4265d233..00000000000 --- a/sdk/client/applyconfiguration/apiextensions/v1/webhookconversion.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// WebhookConversionApplyConfiguration represents an declarative configuration of the WebhookConversion type for use -// with apply. -type WebhookConversionApplyConfiguration struct { - ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` - ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty"` -} - -// WebhookConversionApplyConfiguration constructs an declarative configuration of the WebhookConversion type for use with -// apply. -func WebhookConversion() *WebhookConversionApplyConfiguration { - return &WebhookConversionApplyConfiguration{} -} - -// WithClientConfig sets the ClientConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientConfig field is set to the value of the last call. -func (b *WebhookConversionApplyConfiguration) WithClientConfig(value *WebhookClientConfigApplyConfiguration) *WebhookConversionApplyConfiguration { - b.ClientConfig = value - return b -} - -// WithConversionReviewVersions adds the given value to the ConversionReviewVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ConversionReviewVersions field. -func (b *WebhookConversionApplyConfiguration) WithConversionReviewVersions(values ...string) *WebhookConversionApplyConfiguration { - for i := range values { - b.ConversionReviewVersions = append(b.ConversionReviewVersions, values[i]) - } - return b -} diff --git a/sdk/client/applyconfiguration/apis/v1alpha1/apiresourceschemaspec.go b/sdk/client/applyconfiguration/apis/v1alpha1/apiresourceschemaspec.go index 3509265eff3..8374e104333 100644 --- a/sdk/client/applyconfiguration/apis/v1alpha1/apiresourceschemaspec.go +++ b/sdk/client/applyconfiguration/apis/v1alpha1/apiresourceschemaspec.go @@ -19,18 +19,16 @@ limitations under the License. package v1alpha1 import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - - v1 "github.com/kcp-dev/kcp/sdk/client/applyconfiguration/apiextensions/v1" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" ) // APIResourceSchemaSpecApplyConfiguration represents an declarative configuration of the APIResourceSchemaSpec type for use // with apply. type APIResourceSchemaSpecApplyConfiguration struct { - Group *string `json:"group,omitempty"` - Names *v1.CustomResourceDefinitionNamesApplyConfiguration `json:"names,omitempty"` - Scope *apiextensionsv1.ResourceScope `json:"scope,omitempty"` - Versions []APIResourceVersionApplyConfiguration `json:"versions,omitempty"` + Group *string `json:"group,omitempty"` + Names *v1.CustomResourceDefinitionNames `json:"names,omitempty"` + Scope *v1.ResourceScope `json:"scope,omitempty"` + Versions []APIResourceVersionApplyConfiguration `json:"versions,omitempty"` } // APIResourceSchemaSpecApplyConfiguration constructs an declarative configuration of the APIResourceSchemaSpec type for use with @@ -50,15 +48,15 @@ func (b *APIResourceSchemaSpecApplyConfiguration) WithGroup(value string) *APIRe // WithNames sets the Names field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Names field is set to the value of the last call. -func (b *APIResourceSchemaSpecApplyConfiguration) WithNames(value *v1.CustomResourceDefinitionNamesApplyConfiguration) *APIResourceSchemaSpecApplyConfiguration { - b.Names = value +func (b *APIResourceSchemaSpecApplyConfiguration) WithNames(value v1.CustomResourceDefinitionNames) *APIResourceSchemaSpecApplyConfiguration { + b.Names = &value return b } // WithScope sets the Scope field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Scope field is set to the value of the last call. -func (b *APIResourceSchemaSpecApplyConfiguration) WithScope(value apiextensionsv1.ResourceScope) *APIResourceSchemaSpecApplyConfiguration { +func (b *APIResourceSchemaSpecApplyConfiguration) WithScope(value v1.ResourceScope) *APIResourceSchemaSpecApplyConfiguration { b.Scope = &value return b } diff --git a/sdk/client/applyconfiguration/apis/v1alpha1/apiresourceversion.go b/sdk/client/applyconfiguration/apis/v1alpha1/apiresourceversion.go index 882806c2cb4..f16a29c7cb9 100644 --- a/sdk/client/applyconfiguration/apis/v1alpha1/apiresourceversion.go +++ b/sdk/client/applyconfiguration/apis/v1alpha1/apiresourceversion.go @@ -19,22 +19,21 @@ limitations under the License. package v1alpha1 import ( + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" runtime "k8s.io/apimachinery/pkg/runtime" - - v1 "github.com/kcp-dev/kcp/sdk/client/applyconfiguration/apiextensions/v1" ) // APIResourceVersionApplyConfiguration represents an declarative configuration of the APIResourceVersion type for use // with apply. type APIResourceVersionApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Served *bool `json:"served,omitempty"` - Storage *bool `json:"storage,omitempty"` - Deprecated *bool `json:"deprecated,omitempty"` - DeprecationWarning *string `json:"deprecationWarning,omitempty"` - Schema *runtime.RawExtension `json:"schema,omitempty"` - Subresources *v1.CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` - AdditionalPrinterColumns []v1.CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` + Name *string `json:"name,omitempty"` + Served *bool `json:"served,omitempty"` + Storage *bool `json:"storage,omitempty"` + Deprecated *bool `json:"deprecated,omitempty"` + DeprecationWarning *string `json:"deprecationWarning,omitempty"` + Schema *runtime.RawExtension `json:"schema,omitempty"` + Subresources *v1.CustomResourceSubresources `json:"subresources,omitempty"` + AdditionalPrinterColumns []v1.CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty"` } // APIResourceVersionApplyConfiguration constructs an declarative configuration of the APIResourceVersion type for use with @@ -94,20 +93,17 @@ func (b *APIResourceVersionApplyConfiguration) WithSchema(value runtime.RawExten // WithSubresources sets the Subresources field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Subresources field is set to the value of the last call. -func (b *APIResourceVersionApplyConfiguration) WithSubresources(value *v1.CustomResourceSubresourcesApplyConfiguration) *APIResourceVersionApplyConfiguration { - b.Subresources = value +func (b *APIResourceVersionApplyConfiguration) WithSubresources(value v1.CustomResourceSubresources) *APIResourceVersionApplyConfiguration { + b.Subresources = &value return b } // WithAdditionalPrinterColumns adds the given value to the AdditionalPrinterColumns field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AdditionalPrinterColumns field. -func (b *APIResourceVersionApplyConfiguration) WithAdditionalPrinterColumns(values ...*v1.CustomResourceColumnDefinitionApplyConfiguration) *APIResourceVersionApplyConfiguration { +func (b *APIResourceVersionApplyConfiguration) WithAdditionalPrinterColumns(values ...v1.CustomResourceColumnDefinition) *APIResourceVersionApplyConfiguration { for i := range values { - if values[i] == nil { - panic("nil value passed to WithAdditionalPrinterColumns") - } - b.AdditionalPrinterColumns = append(b.AdditionalPrinterColumns, *values[i]) + b.AdditionalPrinterColumns = append(b.AdditionalPrinterColumns, values[i]) } return b } diff --git a/sdk/client/applyconfiguration/utils.go b/sdk/client/applyconfiguration/utils.go index 6dd77ecce59..2e080cba423 100644 --- a/sdk/client/applyconfiguration/utils.go +++ b/sdk/client/applyconfiguration/utils.go @@ -19,8 +19,7 @@ limitations under the License. package applyconfiguration import ( - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" v1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" @@ -28,11 +27,10 @@ import ( tenancyv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/tenancy/v1alpha1" conditionsv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/third_party/conditions/apis/conditions/v1alpha1" topologyv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/topology/v1alpha1" - apiextensionsv1 "github.com/kcp-dev/kcp/sdk/client/applyconfiguration/apiextensions/v1" apisv1alpha1 "github.com/kcp-dev/kcp/sdk/client/applyconfiguration/apis/v1alpha1" applyconfigurationconditionsv1alpha1 "github.com/kcp-dev/kcp/sdk/client/applyconfiguration/conditions/v1alpha1" applyconfigurationcorev1alpha1 "github.com/kcp-dev/kcp/sdk/client/applyconfiguration/core/v1alpha1" - applyconfigurationmetav1 "github.com/kcp-dev/kcp/sdk/client/applyconfiguration/meta/v1" + metav1 "github.com/kcp-dev/kcp/sdk/client/applyconfiguration/meta/v1" applyconfigurationtenancyv1alpha1 "github.com/kcp-dev/kcp/sdk/client/applyconfiguration/tenancy/v1alpha1" applyconfigurationtopologyv1alpha1 "github.com/kcp-dev/kcp/sdk/client/applyconfiguration/topology/v1alpha1" ) @@ -41,43 +39,7 @@ import ( // apply configuration type exists for the given GroupVersionKind. func ForKind(kind schema.GroupVersionKind) interface{} { switch kind { - // Group=apiextensions.k8s.io, Version=v1 - case v1.SchemeGroupVersion.WithKind("CustomResourceColumnDefinition"): - return &apiextensionsv1.CustomResourceColumnDefinitionApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("CustomResourceConversion"): - return &apiextensionsv1.CustomResourceConversionApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("CustomResourceDefinition"): - return &apiextensionsv1.CustomResourceDefinitionApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("CustomResourceDefinitionCondition"): - return &apiextensionsv1.CustomResourceDefinitionConditionApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("CustomResourceDefinitionNames"): - return &apiextensionsv1.CustomResourceDefinitionNamesApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("CustomResourceDefinitionSpec"): - return &apiextensionsv1.CustomResourceDefinitionSpecApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("CustomResourceDefinitionStatus"): - return &apiextensionsv1.CustomResourceDefinitionStatusApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("CustomResourceDefinitionVersion"): - return &apiextensionsv1.CustomResourceDefinitionVersionApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("CustomResourceSubresources"): - return &apiextensionsv1.CustomResourceSubresourcesApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("CustomResourceSubresourceScale"): - return &apiextensionsv1.CustomResourceSubresourceScaleApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("CustomResourceValidation"): - return &apiextensionsv1.CustomResourceValidationApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("ExternalDocumentation"): - return &apiextensionsv1.ExternalDocumentationApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("JSONSchemaProps"): - return &apiextensionsv1.JSONSchemaPropsApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("ServiceReference"): - return &apiextensionsv1.ServiceReferenceApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("ValidationRule"): - return &apiextensionsv1.ValidationRuleApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("WebhookClientConfig"): - return &apiextensionsv1.WebhookClientConfigApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("WebhookConversion"): - return &apiextensionsv1.WebhookConversionApplyConfiguration{} - - // Group=apis.kcp.io, Version=v1alpha1 + // Group=apis.kcp.io, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithKind("AcceptablePermissionClaim"): return &apisv1alpha1.AcceptablePermissionClaimApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("APIBinding"): @@ -156,18 +118,18 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationcorev1alpha1.ShardStatusApplyConfiguration{} // Group=meta.k8s.io, Version=v1 - case metav1.SchemeGroupVersion.WithKind("LabelSelector"): - return &applyconfigurationmetav1.LabelSelectorApplyConfiguration{} - case metav1.SchemeGroupVersion.WithKind("LabelSelectorRequirement"): - return &applyconfigurationmetav1.LabelSelectorRequirementApplyConfiguration{} - case metav1.SchemeGroupVersion.WithKind("ManagedFieldsEntry"): - return &applyconfigurationmetav1.ManagedFieldsEntryApplyConfiguration{} - case metav1.SchemeGroupVersion.WithKind("ObjectMeta"): - return &applyconfigurationmetav1.ObjectMetaApplyConfiguration{} - case metav1.SchemeGroupVersion.WithKind("OwnerReference"): - return &applyconfigurationmetav1.OwnerReferenceApplyConfiguration{} - case metav1.SchemeGroupVersion.WithKind("TypeMeta"): - return &applyconfigurationmetav1.TypeMetaApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("LabelSelector"): + return &metav1.LabelSelectorApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("LabelSelectorRequirement"): + return &metav1.LabelSelectorRequirementApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ManagedFieldsEntry"): + return &metav1.ManagedFieldsEntryApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ObjectMeta"): + return &metav1.ObjectMetaApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("OwnerReference"): + return &metav1.OwnerReferenceApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("TypeMeta"): + return &metav1.TypeMetaApplyConfiguration{} // Group=tenancy.kcp.io, Version=v1alpha1 case tenancyv1alpha1.SchemeGroupVersion.WithKind("APIExportReference"): diff --git a/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apibinding.go b/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apibinding.go index 0fb9522a9b3..e1babce26e0 100644 --- a/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apibinding.go +++ b/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apibinding.go @@ -25,7 +25,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -39,9 +38,9 @@ type FakeAPIBindings struct { Fake *FakeApisV1alpha1 } -var apibindingsResource = schema.GroupVersionResource{Group: "apis.kcp.io", Version: "v1alpha1", Resource: "apibindings"} +var apibindingsResource = v1alpha1.SchemeGroupVersion.WithResource("apibindings") -var apibindingsKind = schema.GroupVersionKind{Group: "apis.kcp.io", Version: "v1alpha1", Kind: "APIBinding"} +var apibindingsKind = v1alpha1.SchemeGroupVersion.WithKind("APIBinding") // Get takes name of the aPIBinding, and returns the corresponding aPIBinding object, and an error if there is any. func (c *FakeAPIBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.APIBinding, err error) { diff --git a/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiconversion.go b/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiconversion.go index db85fd0cc98..63a70b5a818 100644 --- a/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiconversion.go +++ b/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiconversion.go @@ -25,7 +25,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -39,9 +38,9 @@ type FakeAPIConversions struct { Fake *FakeApisV1alpha1 } -var apiconversionsResource = schema.GroupVersionResource{Group: "apis.kcp.io", Version: "v1alpha1", Resource: "apiconversions"} +var apiconversionsResource = v1alpha1.SchemeGroupVersion.WithResource("apiconversions") -var apiconversionsKind = schema.GroupVersionKind{Group: "apis.kcp.io", Version: "v1alpha1", Kind: "APIConversion"} +var apiconversionsKind = v1alpha1.SchemeGroupVersion.WithKind("APIConversion") // Get takes name of the aPIConversion, and returns the corresponding aPIConversion object, and an error if there is any. func (c *FakeAPIConversions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.APIConversion, err error) { diff --git a/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiexport.go b/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiexport.go index 36f27d8049f..9b422ff223e 100644 --- a/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiexport.go +++ b/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiexport.go @@ -25,7 +25,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -39,9 +38,9 @@ type FakeAPIExports struct { Fake *FakeApisV1alpha1 } -var apiexportsResource = schema.GroupVersionResource{Group: "apis.kcp.io", Version: "v1alpha1", Resource: "apiexports"} +var apiexportsResource = v1alpha1.SchemeGroupVersion.WithResource("apiexports") -var apiexportsKind = schema.GroupVersionKind{Group: "apis.kcp.io", Version: "v1alpha1", Kind: "APIExport"} +var apiexportsKind = v1alpha1.SchemeGroupVersion.WithKind("APIExport") // Get takes name of the aPIExport, and returns the corresponding aPIExport object, and an error if there is any. func (c *FakeAPIExports) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.APIExport, err error) { diff --git a/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiexportendpointslice.go b/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiexportendpointslice.go index bc2a5a45e52..62a0196d48e 100644 --- a/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiexportendpointslice.go +++ b/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiexportendpointslice.go @@ -25,7 +25,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -39,9 +38,9 @@ type FakeAPIExportEndpointSlices struct { Fake *FakeApisV1alpha1 } -var apiexportendpointslicesResource = schema.GroupVersionResource{Group: "apis.kcp.io", Version: "v1alpha1", Resource: "apiexportendpointslices"} +var apiexportendpointslicesResource = v1alpha1.SchemeGroupVersion.WithResource("apiexportendpointslices") -var apiexportendpointslicesKind = schema.GroupVersionKind{Group: "apis.kcp.io", Version: "v1alpha1", Kind: "APIExportEndpointSlice"} +var apiexportendpointslicesKind = v1alpha1.SchemeGroupVersion.WithKind("APIExportEndpointSlice") // Get takes name of the aPIExportEndpointSlice, and returns the corresponding aPIExportEndpointSlice object, and an error if there is any. func (c *FakeAPIExportEndpointSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.APIExportEndpointSlice, err error) { diff --git a/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiresourceschema.go b/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiresourceschema.go index 971bb256518..05fb653584c 100644 --- a/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiresourceschema.go +++ b/sdk/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apiresourceschema.go @@ -25,7 +25,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -39,9 +38,9 @@ type FakeAPIResourceSchemas struct { Fake *FakeApisV1alpha1 } -var apiresourceschemasResource = schema.GroupVersionResource{Group: "apis.kcp.io", Version: "v1alpha1", Resource: "apiresourceschemas"} +var apiresourceschemasResource = v1alpha1.SchemeGroupVersion.WithResource("apiresourceschemas") -var apiresourceschemasKind = schema.GroupVersionKind{Group: "apis.kcp.io", Version: "v1alpha1", Kind: "APIResourceSchema"} +var apiresourceschemasKind = v1alpha1.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 *v1alpha1.APIResourceSchema, err error) { diff --git a/sdk/client/clientset/versioned/typed/core/v1alpha1/fake/fake_logicalcluster.go b/sdk/client/clientset/versioned/typed/core/v1alpha1/fake/fake_logicalcluster.go index ef9d61b092d..0740c64b2c6 100644 --- a/sdk/client/clientset/versioned/typed/core/v1alpha1/fake/fake_logicalcluster.go +++ b/sdk/client/clientset/versioned/typed/core/v1alpha1/fake/fake_logicalcluster.go @@ -25,7 +25,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -39,9 +38,9 @@ type FakeLogicalClusters struct { Fake *FakeCoreV1alpha1 } -var logicalclustersResource = schema.GroupVersionResource{Group: "core.kcp.io", Version: "v1alpha1", Resource: "logicalclusters"} +var logicalclustersResource = v1alpha1.SchemeGroupVersion.WithResource("logicalclusters") -var logicalclustersKind = schema.GroupVersionKind{Group: "core.kcp.io", Version: "v1alpha1", Kind: "LogicalCluster"} +var logicalclustersKind = v1alpha1.SchemeGroupVersion.WithKind("LogicalCluster") // Get takes name of the logicalCluster, and returns the corresponding logicalCluster object, and an error if there is any. func (c *FakeLogicalClusters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.LogicalCluster, err error) { diff --git a/sdk/client/clientset/versioned/typed/core/v1alpha1/fake/fake_shard.go b/sdk/client/clientset/versioned/typed/core/v1alpha1/fake/fake_shard.go index 9130e6b61b0..881de28f411 100644 --- a/sdk/client/clientset/versioned/typed/core/v1alpha1/fake/fake_shard.go +++ b/sdk/client/clientset/versioned/typed/core/v1alpha1/fake/fake_shard.go @@ -25,7 +25,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -39,9 +38,9 @@ type FakeShards struct { Fake *FakeCoreV1alpha1 } -var shardsResource = schema.GroupVersionResource{Group: "core.kcp.io", Version: "v1alpha1", Resource: "shards"} +var shardsResource = v1alpha1.SchemeGroupVersion.WithResource("shards") -var shardsKind = schema.GroupVersionKind{Group: "core.kcp.io", Version: "v1alpha1", Kind: "Shard"} +var shardsKind = v1alpha1.SchemeGroupVersion.WithKind("Shard") // Get takes name of the shard, and returns the corresponding shard object, and an error if there is any. func (c *FakeShards) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Shard, err error) { diff --git a/sdk/client/clientset/versioned/typed/tenancy/v1alpha1/fake/fake_workspace.go b/sdk/client/clientset/versioned/typed/tenancy/v1alpha1/fake/fake_workspace.go index 3c10c3a3eec..5c812b1fa87 100644 --- a/sdk/client/clientset/versioned/typed/tenancy/v1alpha1/fake/fake_workspace.go +++ b/sdk/client/clientset/versioned/typed/tenancy/v1alpha1/fake/fake_workspace.go @@ -25,7 +25,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -39,9 +38,9 @@ type FakeWorkspaces struct { Fake *FakeTenancyV1alpha1 } -var workspacesResource = schema.GroupVersionResource{Group: "tenancy.kcp.io", Version: "v1alpha1", Resource: "workspaces"} +var workspacesResource = v1alpha1.SchemeGroupVersion.WithResource("workspaces") -var workspacesKind = schema.GroupVersionKind{Group: "tenancy.kcp.io", Version: "v1alpha1", Kind: "Workspace"} +var workspacesKind = v1alpha1.SchemeGroupVersion.WithKind("Workspace") // Get takes name of the workspace, and returns the corresponding workspace object, and an error if there is any. func (c *FakeWorkspaces) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Workspace, err error) { diff --git a/sdk/client/clientset/versioned/typed/tenancy/v1alpha1/fake/fake_workspacetype.go b/sdk/client/clientset/versioned/typed/tenancy/v1alpha1/fake/fake_workspacetype.go index 462415b5dc0..6e85ab1adea 100644 --- a/sdk/client/clientset/versioned/typed/tenancy/v1alpha1/fake/fake_workspacetype.go +++ b/sdk/client/clientset/versioned/typed/tenancy/v1alpha1/fake/fake_workspacetype.go @@ -25,7 +25,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -39,9 +38,9 @@ type FakeWorkspaceTypes struct { Fake *FakeTenancyV1alpha1 } -var workspacetypesResource = schema.GroupVersionResource{Group: "tenancy.kcp.io", Version: "v1alpha1", Resource: "workspacetypes"} +var workspacetypesResource = v1alpha1.SchemeGroupVersion.WithResource("workspacetypes") -var workspacetypesKind = schema.GroupVersionKind{Group: "tenancy.kcp.io", Version: "v1alpha1", Kind: "WorkspaceType"} +var workspacetypesKind = v1alpha1.SchemeGroupVersion.WithKind("WorkspaceType") // Get takes name of the workspaceType, and returns the corresponding workspaceType object, and an error if there is any. func (c *FakeWorkspaceTypes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.WorkspaceType, err error) { diff --git a/sdk/client/clientset/versioned/typed/topology/v1alpha1/fake/fake_partition.go b/sdk/client/clientset/versioned/typed/topology/v1alpha1/fake/fake_partition.go index cb84456fa66..17fe3cf9bec 100644 --- a/sdk/client/clientset/versioned/typed/topology/v1alpha1/fake/fake_partition.go +++ b/sdk/client/clientset/versioned/typed/topology/v1alpha1/fake/fake_partition.go @@ -25,7 +25,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -39,9 +38,9 @@ type FakePartitions struct { Fake *FakeTopologyV1alpha1 } -var partitionsResource = schema.GroupVersionResource{Group: "topology.kcp.io", Version: "v1alpha1", Resource: "partitions"} +var partitionsResource = v1alpha1.SchemeGroupVersion.WithResource("partitions") -var partitionsKind = schema.GroupVersionKind{Group: "topology.kcp.io", Version: "v1alpha1", Kind: "Partition"} +var partitionsKind = v1alpha1.SchemeGroupVersion.WithKind("Partition") // Get takes name of the partition, and returns the corresponding partition object, and an error if there is any. func (c *FakePartitions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Partition, err error) { diff --git a/sdk/client/clientset/versioned/typed/topology/v1alpha1/fake/fake_partitionset.go b/sdk/client/clientset/versioned/typed/topology/v1alpha1/fake/fake_partitionset.go index 2b313715f86..1e6e478a114 100644 --- a/sdk/client/clientset/versioned/typed/topology/v1alpha1/fake/fake_partitionset.go +++ b/sdk/client/clientset/versioned/typed/topology/v1alpha1/fake/fake_partitionset.go @@ -25,7 +25,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -39,9 +38,9 @@ type FakePartitionSets struct { Fake *FakeTopologyV1alpha1 } -var partitionsetsResource = schema.GroupVersionResource{Group: "topology.kcp.io", Version: "v1alpha1", Resource: "partitionsets"} +var partitionsetsResource = v1alpha1.SchemeGroupVersion.WithResource("partitionsets") -var partitionsetsKind = schema.GroupVersionKind{Group: "topology.kcp.io", Version: "v1alpha1", Kind: "PartitionSet"} +var partitionsetsKind = v1alpha1.SchemeGroupVersion.WithKind("PartitionSet") // Get takes name of the partitionSet, and returns the corresponding partitionSet object, and an error if there is any. func (c *FakePartitionSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PartitionSet, err error) { diff --git a/sdk/go.mod b/sdk/go.mod index 881df435d3c..28bd1f49464 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -1,6 +1,6 @@ module github.com/kcp-dev/kcp/sdk -go 1.19 +go 1.20 require ( github.com/bombsimon/logrusr/v3 v3.1.0 diff --git a/test/e2e/apibinding/apibinding_deletion_test.go b/test/e2e/apibinding/apibinding_deletion_test.go index 075ac0e73dd..102ddcc60bf 100644 --- a/test/e2e/apibinding/apibinding_deletion_test.go +++ b/test/e2e/apibinding/apibinding_deletion_test.go @@ -124,7 +124,7 @@ func TestAPIBindingDeletion(t *testing.T) { require.NoError(t, err) t.Logf("Make sure %q API group shows up in consumer workspace %q group discovery", wildwest.GroupName, consumerPath) - err = wait.PollImmediateWithContext(ctx, 100*time.Millisecond, wait.ForeverTestTimeout, func(c context.Context) (done bool, err error) { + err = wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, wait.ForeverTestTimeout, true, func(c context.Context) (done bool, err error) { groups, err := consumerWorkspaceClient.Cluster(consumerPath).Discovery().ServerGroups() if err != nil { return false, fmt.Errorf("error retrieving consumer workspace %q group discovery: %w", consumerPath, err) diff --git a/test/e2e/apibinding/apibinding_permissionclaims_test.go b/test/e2e/apibinding/apibinding_permissionclaims_test.go index e404e85be00..9f454e7f5f4 100644 --- a/test/e2e/apibinding/apibinding_permissionclaims_test.go +++ b/test/e2e/apibinding/apibinding_permissionclaims_test.go @@ -227,7 +227,7 @@ func bindConsumerToProvider(ctx context.Context, t *testing.T, consumerWorkspace require.NoError(t, err) t.Logf("Make sure %q API group shows up in consumer workspace %q group discovery", wildwest.GroupName, consumerWorkspace) - err = wait.PollImmediateWithContext(ctx, 100*time.Millisecond, wait.ForeverTestTimeout, func(c context.Context) (done bool, err error) { + err = wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, wait.ForeverTestTimeout, true, func(c context.Context) (done bool, err error) { groups, err := consumerWorkspaceClient.Cluster(consumerWorkspace).Discovery().ServerGroups() if err != nil { return false, fmt.Errorf("error retrieving consumer workspace %q group discovery: %w", consumerWorkspace, err) diff --git a/test/e2e/apibinding/apibinding_test.go b/test/e2e/apibinding/apibinding_test.go index b37f645110a..0b4080ac823 100644 --- a/test/e2e/apibinding/apibinding_test.go +++ b/test/e2e/apibinding/apibinding_test.go @@ -246,7 +246,7 @@ func TestAPIBinding(t *testing.T) { require.NoError(t, err) t.Logf("Make sure %q API group shows up in consumer workspace %q group discovery", wildwest.GroupName, consumerWorkspace) - err = wait.PollImmediateWithContext(ctx, 100*time.Millisecond, wait.ForeverTestTimeout, func(c context.Context) (done bool, err error) { + err = wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, wait.ForeverTestTimeout, true, func(c context.Context) (done bool, err error) { groups, err := consumerWorkspaceClient.Cluster(consumerWorkspace).Discovery().ServerGroups() if err != nil { return false, fmt.Errorf("error retrieving consumer workspace %q group discovery: %w", consumerWorkspace, err) diff --git a/test/e2e/apibinding/maximalpermissionpolicy_authorizer_test.go b/test/e2e/apibinding/maximalpermissionpolicy_authorizer_test.go index 9801c778c9b..79df8aef2fb 100644 --- a/test/e2e/apibinding/maximalpermissionpolicy_authorizer_test.go +++ b/test/e2e/apibinding/maximalpermissionpolicy_authorizer_test.go @@ -204,7 +204,7 @@ func TestMaximalPermissionPolicyAuthorizer(t *testing.T) { require.NoError(t, err) t.Logf("Make sure %q API group shows up in consumer workspace %q group discovery", wildwest.GroupName, consumerWorkspace) - err = wait.PollImmediateWithContext(ctx, 100*time.Millisecond, wait.ForeverTestTimeout, func(c context.Context) (done bool, err error) { + err = wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, wait.ForeverTestTimeout, true, func(c context.Context) (done bool, err error) { groups, err := consumerWorkspaceClient.Cluster(consumerWorkspace).Discovery().ServerGroups() if err != nil { return false, fmt.Errorf("error retrieving consumer workspace %q group discovery: %w", consumerWorkspace, err) diff --git a/test/e2e/authorizer/authorizer_test.go b/test/e2e/authorizer/authorizer_test.go index 7b23104a013..9bacea16e25 100644 --- a/test/e2e/authorizer/authorizer_test.go +++ b/test/e2e/authorizer/authorizer_test.go @@ -41,7 +41,7 @@ import ( "k8s.io/client-go/discovery/cached/memory" "k8s.io/client-go/rest" "k8s.io/client-go/restmapper" - "k8s.io/kubernetes/pkg/genericcontrolplane" + controlplaneapiserver "k8s.io/kubernetes/pkg/controlplane/apiserver" confighelpers "github.com/kcp-dev/kcp/config/helpers" "github.com/kcp-dev/kcp/pkg/authorization" @@ -215,10 +215,10 @@ func TestAuthorizer(t *testing.T) { _, err = user2KubeClusterClient.Cluster(org1.Join("workspace2")).RbacV1().ClusterRoleBindings().Create(ctx, localAuthorizerClusterRoleBinding, metav1.CreateOptions{}) require.NoError(t, err) - t.Logf("Creating matching ClusterRole %s in %s", bootstrapClusterRole.Name, genericcontrolplane.LocalAdminCluster) + t.Logf("Creating matching ClusterRole %s in %s", bootstrapClusterRole.Name, controlplaneapiserver.LocalAdminCluster) shardKubeClusterClient, err := kcpkubernetesclientset.NewForConfig(rootShardCfg) require.NoError(t, err) - _, err = shardKubeClusterClient.Cluster(genericcontrolplane.LocalAdminCluster.Path()).RbacV1().ClusterRoles().Create(ctx, bootstrapClusterRole, metav1.CreateOptions{}) + _, err = shardKubeClusterClient.Cluster(controlplaneapiserver.LocalAdminCluster.Path()).RbacV1().ClusterRoles().Create(ctx, bootstrapClusterRole, metav1.CreateOptions{}) require.NoError(t, err) framework.Eventually(t, func() (bool, string) { diff --git a/test/e2e/authorizer/serviceaccounts_test.go b/test/e2e/authorizer/serviceaccounts_test.go index 1099c943c35..bd8b8d691aa 100644 --- a/test/e2e/authorizer/serviceaccounts_test.go +++ b/test/e2e/authorizer/serviceaccounts_test.go @@ -32,7 +32,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "github.com/kcp-dev/kcp/sdk/apis/tenancy/v1alpha1/helper" "github.com/kcp-dev/kcp/test/e2e/framework" @@ -109,20 +109,30 @@ func TestServiceAccounts(t *testing.T) { helper.QualifiedObjectName(namespace), ) - t.Log("Waiting for service account secret to be created") + t.Log("Creating the service account secret manually") + _, err = kubeClusterClient.Cluster(wsPath).CoreV1().Secrets(namespace.Name).Create(ctx, &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "default-token", + Annotations: map[string]string{ + corev1.ServiceAccountNameKey: "default", + }, + }, + Type: corev1.SecretTypeServiceAccountToken, + }, metav1.CreateOptions{}) + require.NoError(t, err, "failed to create service account secret") + + t.Log("Waiting for service account secret to be filled") var tokenSecret corev1.Secret require.Eventually(t, func() bool { - secrets, err := kubeClusterClient.Cluster(wsPath).CoreV1().Secrets(namespace.Name).List(ctx, metav1.ListOptions{}) - require.NoError(t, err, "failed to list secrets") - - for _, secret := range secrets.Items { - if secret.Annotations[corev1.ServiceAccountNameKey] == "default" { - tokenSecret = secret - return true - } + s, err := kubeClusterClient.Cluster(wsPath).CoreV1().Secrets(namespace.Name).Get(ctx, "default-token", metav1.GetOptions{}) + if apierrors.IsNotFound(err) { + return false + } else if err != nil { + t.Fatalf("unexpected error retrieving service account secret: %v", err) } - return false - }, wait.ForeverTestTimeout, time.Millisecond*100, "token secret for default service account not created") + tokenSecret = *s + return len(s.Data) > 0 + }, wait.ForeverTestTimeout, time.Millisecond*100, "\"default-token\" secret not filled in namespace %s") testCases := []struct { name string @@ -138,7 +148,7 @@ func TestServiceAccounts(t *testing.T) { boundToken, err := kubeClusterClient.Cluster(wsPath).CoreV1().ServiceAccounts(namespace.Name).CreateToken(ctx, "default", &authenticationv1.TokenRequest{ Spec: authenticationv1.TokenRequestSpec{ Audiences: []string{"https://kcp.default.svc"}, - ExpirationSeconds: pointer.Int64(3600), + ExpirationSeconds: ptr.To[int64](3600), BoundObjectRef: &authenticationv1.BoundObjectReference{ APIVersion: "v1", Kind: "Secret", diff --git a/test/e2e/cache/cache_server_test.go b/test/e2e/cache/cache_server_test.go index 03a11b213b5..b361e5044bb 100644 --- a/test/e2e/cache/cache_server_test.go +++ b/test/e2e/cache/cache_server_test.go @@ -144,7 +144,7 @@ func testUIDGenerationCreationTime(ctx context.Context, t *testing.T, cacheClien initialMangoDB.UID = "3" initialMangoDB.Generation = 11 initialMangoDB.CreationTimestamp = metav1.Now().Rfc3339Copy() - initialMangoDB.Annotations = map[string]string{genericrequest.AnnotationKey: "amber"} + initialMangoDB.Annotations = map[string]string{genericrequest.ShardAnnotationKey: "amber"} validateFn := func(mangoDB fakeAPIExport, cachedMangoDBRaw *unstructured.Unstructured) { cachedMangoDBJson, err := cachedMangoDBRaw.MarshalJSON() require.NoError(t, err) diff --git a/test/e2e/conformance/crd_partial_metadata_test.go b/test/e2e/conformance/crd_partial_metadata_test.go index c948103d9c0..047be3dc520 100644 --- a/test/e2e/conformance/crd_partial_metadata_test.go +++ b/test/e2e/conformance/crd_partial_metadata_test.go @@ -23,6 +23,7 @@ import ( "time" "github.com/google/go-cmp/cmp" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" "github.com/kcp-dev/client-go/dynamic" "github.com/kcp-dev/client-go/metadata" "github.com/kcp-dev/logicalcluster/v3" @@ -30,7 +31,6 @@ import ( corev1 "k8s.io/api/core/v1" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/test/e2e/conformance/cross_logical_cluster_list_test.go b/test/e2e/conformance/cross_logical_cluster_list_test.go index bac988e2bdd..6e237f6c277 100644 --- a/test/e2e/conformance/cross_logical_cluster_list_test.go +++ b/test/e2e/conformance/cross_logical_cluster_list_test.go @@ -22,6 +22,9 @@ import ( "testing" "time" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" + kcpapiextensionsv1client "github.com/kcp-dev/client-go/apiextensions/client/typed/apiextensions/v1" + kcpapiextensionsinformers "github.com/kcp-dev/client-go/apiextensions/informers" kcpdynamic "github.com/kcp-dev/client-go/dynamic" kcpkubernetesclientset "github.com/kcp-dev/client-go/kubernetes" "github.com/kcp-dev/logicalcluster/v3" @@ -29,9 +32,6 @@ import ( corev1 "k8s.io/api/core/v1" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" - kcpapiextensionsv1client "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned/typed/apiextensions/v1" - kcpapiextensionsinformers "k8s.io/apiextensions-apiserver/pkg/client/kcp/informers/externalversions" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" diff --git a/test/e2e/conformance/metadata_test.go b/test/e2e/conformance/metadata_test.go index 9b172c0bcd1..e5b294a8e95 100644 --- a/test/e2e/conformance/metadata_test.go +++ b/test/e2e/conformance/metadata_test.go @@ -22,12 +22,12 @@ import ( "testing" "time" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" kcpkubernetesclientset "github.com/kcp-dev/client-go/kubernetes" "github.com/stretchr/testify/require" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/strategicpatch" diff --git a/test/e2e/conformance/webhook_test.go b/test/e2e/conformance/webhook_test.go index 351afa849d2..6a41bf485d2 100644 --- a/test/e2e/conformance/webhook_test.go +++ b/test/e2e/conformance/webhook_test.go @@ -22,13 +22,13 @@ import ( "testing" "time" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" kcpkubernetesclientset "github.com/kcp-dev/client-go/kubernetes" "github.com/kcp-dev/logicalcluster/v3" "github.com/stretchr/testify/require" v1 "k8s.io/api/admission/v1" admissionregistrationv1 "k8s.io/api/admissionregistration/v1" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/test/e2e/conversion/conversion_test.go b/test/e2e/conversion/conversion_test.go deleted file mode 100644 index 579bd0bd305..00000000000 --- a/test/e2e/conversion/conversion_test.go +++ /dev/null @@ -1,172 +0,0 @@ -/* -Copyright 2022 The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package conversion - -import ( - "context" - "embed" - "strings" - "testing" - "time" - - "github.com/google/go-cmp/cmp" - kcpdynamic "github.com/kcp-dev/client-go/dynamic" - "github.com/stretchr/testify/require" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/discovery/cached/memory" - "k8s.io/client-go/restmapper" - - "github.com/kcp-dev/kcp/config/helpers" - apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" - "github.com/kcp-dev/kcp/sdk/apis/third_party/conditions/util/conditions" - kcpclientset "github.com/kcp-dev/kcp/sdk/client/clientset/versioned/cluster" - "github.com/kcp-dev/kcp/test/e2e/framework" -) - -//go:embed *.yaml -var embeddedResources embed.FS - -func TestAPIConversion(t *testing.T) { - t.Parallel() - - server := framework.SharedKcpServer(t) - - ctx, cancel := context.WithCancel(context.Background()) - t.Cleanup(cancel) - - cfg := server.BaseConfig(t) - - kcpClusterClient, err := kcpclientset.NewForConfig(cfg) - require.NoError(t, err, "error creating kube cluster client") - - orgPath, _ := framework.NewOrganizationFixture(t, server) - - cache := memory.NewMemCacheClient(kcpClusterClient.Cluster(orgPath).Discovery()) - mapper := restmapper.NewDeferredDiscoveryRESTMapper(cache) - - dynamicClusterClient, err := kcpdynamic.NewForConfig(cfg) - require.NoError(t, err, "error creating dynamic cluster client") - - t.Logf("Setting up APIResourceSchema, APIConversion, APIExport, and APIBinding for widgets") - framework.Eventually(t, func() (bool, string) { - err := helpers.CreateResourceFromFS(ctx, dynamicClusterClient.Cluster(orgPath), mapper, nil, "resources.yaml", embeddedResources) - if err != nil { - return false, err.Error() - } - return true, "" - }, wait.ForeverTestTimeout, 100.*time.Millisecond, "failed to set up test resources") - - t.Logf("Waiting for initial binding to complete") - framework.EventuallyCondition(t, func() (conditions.Getter, error) { - return kcpClusterClient.Cluster(orgPath).ApisV1alpha1().APIBindings().Get(ctx, "widgets.example.io", metav1.GetOptions{}) - }, framework.Is(apisv1alpha1.InitialBindingCompleted), "APIBinding never completed its initial binding") - - framework.Eventually(t, func() (success bool, reason string) { - t.Logf("Resetting the RESTMapper so it can pick up widgets") - mapper.Reset() - - t.Logf("Creating v1 widget") - err = helpers.CreateResourceFromFS(ctx, dynamicClusterClient.Cluster(orgPath), mapper, nil, "v1-widget.yaml", embeddedResources) - if err == nil { - return true, "" - } - return false, err.Error() - }, wait.ForeverTestTimeout, 100*time.Millisecond, "Unable to create Widget") - - v2GVR := schema.GroupVersionResource{Group: "example.io", Version: "v2", Resource: "widgets"} - - t.Logf("Retrieving the widget as v2") - v2WidgetClient := dynamicClusterClient.Cluster(orgPath).Resource(v2GVR) - v2Widget, err := v2WidgetClient.Get(ctx, "bob", metav1.GetOptions{}) - require.NoError(t, err, "error getting v2 widget") - - t.Logf("Ensuring field conversions work") - requireUnstructuredFieldEqual(t, v2Widget, "Bob", "spec", "name", "first") - requireUnstructuredFieldEqual(t, v2Widget, "Jones", "spec", "name", "last") - requireUnstructuredFieldEqual(t, v2Widget, "JONES", "spec", "name", "lastUpper") - - t.Logf("Setting and storing a v2-only field") - err = unstructured.SetNestedField(v2Widget.Object, "someNewValue", "spec", "someNewField", "hello") - require.NoError(t, err, "error setting spec.someNewField.hello") - _, err = v2WidgetClient.Update(ctx, v2Widget, metav1.UpdateOptions{}) - require.NoError(t, err, "error updating v2 widget") - - t.Logf("Getting the v2 widget again to make sure the field was preserved") - v2Widget, err = v2WidgetClient.Get(ctx, v2Widget.GetName(), metav1.GetOptions{}) - require.NoError(t, err, "error getting v2 widget") - requireUnstructuredFieldEqual(t, v2Widget, "someNewValue", "spec", "someNewField", "hello") - - t.Logf("Make sure we can create a v2 widget") - err = helpers.CreateResourceFromFS(ctx, dynamicClusterClient.Cluster(orgPath), mapper, nil, "v2-widget.yaml", embeddedResources) - require.NoError(t, err, "error creating v2 widget") - - v1GVR := schema.GroupVersionResource{Group: "example.io", Version: "v1", Resource: "widgets"} - t.Logf("Retrieving the widget as v2") - v1WidgetClient := dynamicClusterClient.Cluster(orgPath).Resource(v1GVR) - v1Widget, err := v1WidgetClient.Get(ctx, "alice", metav1.GetOptions{}) - require.NoError(t, err, "error getting v1 widget") - - t.Logf("Ensuring field conversions work") - requireUnstructuredFieldEqual(t, v1Widget, "Alice", "spec", "firstName") - requireUnstructuredFieldEqual(t, v1Widget, "Smith", "spec", "lastName") - - t.Logf("Updating v1 names") - err = unstructured.SetNestedField(v1Widget.Object, "Robot", "spec", "firstName") - require.NoError(t, err, "error setting spec.firstName") - err = unstructured.SetNestedField(v1Widget.Object, "Dragon", "spec", "lastName") - require.NoError(t, err, "error setting spec.lastName") - _, err = v1WidgetClient.Update(ctx, v1Widget, metav1.UpdateOptions{}) - require.NoError(t, err, "error updating v1 widget") - - t.Logf("Getting the widget as v2 to make sure the names were changed and the v2-only field was preserved") - v2Widget, err = v2WidgetClient.Get(ctx, v1Widget.GetName(), metav1.GetOptions{}) - require.NoError(t, err, "error getting v2 widget") - requireUnstructuredFieldEqual(t, v2Widget, "world", "spec", "someNewField", "hello") - requireUnstructuredFieldEqual(t, v2Widget, "Robot", "spec", "name", "first") - requireUnstructuredFieldEqual(t, v2Widget, "Dragon", "spec", "name", "last") - - t.Logf("Creating v1 widget without a last name") - err = helpers.CreateResourceFromFS(ctx, dynamicClusterClient.Cluster(orgPath), mapper, nil, "v1-widget-no-last-name.yaml", embeddedResources) - require.NoError(t, err, "error creating v1 widget") - - t.Logf("Retrieving the widget as v2") - v2Widget, err = v2WidgetClient.Get(ctx, "just-bob", metav1.GetOptions{}) - require.NoError(t, err, "error getting v2 widget") - - t.Logf("Ensuring field conversions work when not all fields are present") - requireUnstructuredFieldEqual(t, v2Widget, "Bob", "spec", "name", "first") - requireUnstructuredFieldAbsent(t, v2Widget, "spec", "name", "last") -} - -func requireUnstructuredFieldEqual(t *testing.T, u *unstructured.Unstructured, expected string, fields ...string) { - t.Helper() - actual, exists, err := unstructured.NestedFieldNoCopy(u.Object, fields...) - require.NoError(t, err, "error getting %s", strings.Join(fields, ".")) - require.True(t, exists, "field %s does not exist", strings.Join(fields, ".")) - require.Empty(t, cmp.Diff(expected, actual), "unexpected value for %s", strings.Join(fields, ".")) -} - -func requireUnstructuredFieldAbsent(t *testing.T, u *unstructured.Unstructured, fields ...string) { - t.Helper() - _, exists, err := unstructured.NestedFieldNoCopy(u.Object, fields...) - require.NoError(t, err, "error getting %s", strings.Join(fields, ".")) - require.False(t, exists, "field %s should not exist", strings.Join(fields, ".")) -} diff --git a/test/e2e/conversion/resources.yaml b/test/e2e/conversion/resources.yaml deleted file mode 100644 index def0294e377..00000000000 --- a/test/e2e/conversion/resources.yaml +++ /dev/null @@ -1,125 +0,0 @@ -apiVersion: apis.kcp.io/v1alpha1 -kind: APIResourceSchema -metadata: - name: rev0002.widgets.example.io - annotations: - bootstrap.kcp.io/create-only: "" -spec: - group: example.io - names: - kind: Widget - listKind: WidgetList - plural: widgets - singular: widget - scope: Cluster - versions: - - name: v1 - schema: - description: Widgets do things - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - firstName: - type: string - lastName: - type: string - type: object - status: - properties: - phase: - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} - - name: v2 - schema: - description: Widgets do things - properties: - apiVersion: - type: string - kind: - type: string - metadata: - type: object - spec: - properties: - someNewField: - type: object - properties: - hello: - type: string - name: - type: object - properties: - first: - type: string - last: - type: string - lastUpper: - type: string - type: object - status: - properties: - phase: - type: string - type: object - type: object - served: true - storage: false - subresources: - status: {} ---- -apiVersion: apis.kcp.io/v1alpha1 -kind: APIConversion -metadata: - name: rev0002.widgets.example.io - annotations: - bootstrap.kcp.io/create-only: "" -spec: - conversions: - - from: v1 - to: v2 - rules: - - field: .spec.firstName - destination: .spec.name.first - - field: .spec.lastName - destination: .spec.name.last - transformation: self - - field: .spec.lastName - destination: .spec.name.lastUpper - transformation: self.upperAscii() - - from: v2 - to: v1 - rules: - - field: .spec.name.first - destination: .spec.firstName - - field: .spec.name.last - destination: .spec.lastName - preserve: - - .spec.someNewField ---- -apiVersion: apis.kcp.io/v1alpha1 -kind: APIExport -metadata: - name: widgets.example.io -spec: - latestResourceSchemas: - - rev0002.widgets.example.io ---- -apiVersion: apis.kcp.io/v1alpha1 -kind: APIBinding -metadata: - name: widgets.example.io -spec: - reference: - export: - name: widgets.example.io diff --git a/test/e2e/conversion/v1-widget-no-last-name.yaml b/test/e2e/conversion/v1-widget-no-last-name.yaml deleted file mode 100644 index 3fc22af001b..00000000000 --- a/test/e2e/conversion/v1-widget-no-last-name.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: example.io/v1 -kind: Widget -metadata: - name: just-bob -spec: - firstName: Bob diff --git a/test/e2e/conversion/v1-widget.yaml b/test/e2e/conversion/v1-widget.yaml deleted file mode 100644 index 1a7cd1a4194..00000000000 --- a/test/e2e/conversion/v1-widget.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: example.io/v1 -kind: Widget -metadata: - name: bob -spec: - firstName: Bob - lastName: Jones diff --git a/test/e2e/conversion/v2-widget.yaml b/test/e2e/conversion/v2-widget.yaml deleted file mode 100644 index 0e3796ac8d0..00000000000 --- a/test/e2e/conversion/v2-widget.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: example.io/v2 -kind: Widget -metadata: - name: alice -spec: - name: - first: Alice - last: Smith - someNewField: - hello: world diff --git a/test/e2e/customresourcedefinition/customresourcedefinition_test.go b/test/e2e/customresourcedefinition/customresourcedefinition_test.go index 8b6c25f5752..9f4856d7edd 100644 --- a/test/e2e/customresourcedefinition/customresourcedefinition_test.go +++ b/test/e2e/customresourcedefinition/customresourcedefinition_test.go @@ -21,10 +21,10 @@ import ( "embed" "testing" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" kcpdynamic "github.com/kcp-dev/client-go/dynamic" "github.com/stretchr/testify/require" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" "k8s.io/client-go/discovery/cached/memory" "k8s.io/client-go/restmapper" diff --git a/test/e2e/fixtures/wildwest/bootstrap.go b/test/e2e/fixtures/wildwest/bootstrap.go index f6c3ddd95be..75c65eec519 100644 --- a/test/e2e/fixtures/wildwest/bootstrap.go +++ b/test/e2e/fixtures/wildwest/bootstrap.go @@ -21,11 +21,11 @@ import ( "embed" "testing" + kcpapiextensionsv1client "github.com/kcp-dev/client-go/apiextensions/client/typed/apiextensions/v1" "github.com/kcp-dev/logicalcluster/v3" "github.com/stretchr/testify/require" apiextensionsv1client "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" - kcpapiextensionsv1client "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned/typed/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/wait" diff --git a/test/e2e/fixtures/wildwest/client/clientset/versioned/typed/wildwest/v1alpha1/fake/fake_cowboy.go b/test/e2e/fixtures/wildwest/client/clientset/versioned/typed/wildwest/v1alpha1/fake/fake_cowboy.go index 71d71f27f03..995e5ea68eb 100644 --- a/test/e2e/fixtures/wildwest/client/clientset/versioned/typed/wildwest/v1alpha1/fake/fake_cowboy.go +++ b/test/e2e/fixtures/wildwest/client/clientset/versioned/typed/wildwest/v1alpha1/fake/fake_cowboy.go @@ -25,7 +25,6 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -40,9 +39,9 @@ type FakeCowboys struct { ns string } -var cowboysResource = schema.GroupVersionResource{Group: "wildwest.dev", Version: "v1alpha1", Resource: "cowboys"} +var cowboysResource = v1alpha1.SchemeGroupVersion.WithResource("cowboys") -var cowboysKind = schema.GroupVersionKind{Group: "wildwest.dev", Version: "v1alpha1", Kind: "Cowboy"} +var cowboysKind = v1alpha1.SchemeGroupVersion.WithKind("Cowboy") // Get takes name of the cowboy, and returns the corresponding cowboy object, and an error if there is any. func (c *FakeCowboys) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Cowboy, err error) { diff --git a/test/e2e/framework/kcp.go b/test/e2e/framework/kcp.go index 564a12837b0..7a4796a033f 100644 --- a/test/e2e/framework/kcp.go +++ b/test/e2e/framework/kcp.go @@ -867,7 +867,7 @@ func (c *kcpServer) RawConfig() (clientcmdapi.Config, error) { func (c *kcpServer) loadCfg() error { var lastError error - if err := wait.PollImmediateWithContext(c.ctx, 100*time.Millisecond, 1*time.Minute, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextTimeout(c.ctx, 100*time.Millisecond, 1*time.Minute, true, func(ctx context.Context) (bool, error) { c.kubeconfigPath = filepath.Join(c.dataDir, "admin.kubeconfig") config, err := LoadKubeConfig(c.kubeconfigPath, "base") if err != nil { @@ -1169,7 +1169,7 @@ func WaitForReady(ctx context.Context, t *testing.T, cfg *rest.Config, keepMonit func waitForEndpoint(ctx context.Context, t *testing.T, client *rest.RESTClient, endpoint string) { var lastError error - if err := wait.PollImmediateWithContext(ctx, 100*time.Millisecond, time.Minute, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, time.Minute, true, func(ctx context.Context) (bool, error) { req := rest.NewRequest(client).RequestURI(endpoint) _, err := req.Do(ctx).Raw() if err != nil { diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 582ef578b5a..e7716aa906b 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -40,13 +40,13 @@ import ( "testing" "time" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" kcpdynamic "github.com/kcp-dev/client-go/dynamic" "github.com/kcp-dev/logicalcluster/v3" "github.com/martinlindhe/base36" "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" diff --git a/test/e2e/garbagecollector/garbagecollector_test.go b/test/e2e/garbagecollector/garbagecollector_test.go index c0be5dd9d9d..03ed87cb6d7 100644 --- a/test/e2e/garbagecollector/garbagecollector_test.go +++ b/test/e2e/garbagecollector/garbagecollector_test.go @@ -23,6 +23,8 @@ import ( "testing" "time" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" + kcpapiextensionsv1client "github.com/kcp-dev/client-go/apiextensions/client/typed/apiextensions/v1" kcpdiscovery "github.com/kcp-dev/client-go/discovery" kcpdynamic "github.com/kcp-dev/client-go/dynamic" kcpkubernetesclientset "github.com/kcp-dev/client-go/kubernetes" @@ -30,8 +32,6 @@ import ( "github.com/stretchr/testify/require" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" - kcpapiextensionsv1client "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned/typed/apiextensions/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/test/e2e/quota/quota_test.go b/test/e2e/quota/quota_test.go index a0f9c410996..1abbcec9f96 100644 --- a/test/e2e/quota/quota_test.go +++ b/test/e2e/quota/quota_test.go @@ -22,6 +22,8 @@ import ( "testing" "time" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" + kcpapiextensionsv1client "github.com/kcp-dev/client-go/apiextensions/client/typed/apiextensions/v1" kcpdynamic "github.com/kcp-dev/client-go/dynamic" kcpkubernetesclientset "github.com/kcp-dev/client-go/kubernetes" "github.com/kcp-dev/logicalcluster/v3" @@ -29,8 +31,6 @@ import ( corev1 "k8s.io/api/core/v1" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" - kcpapiextensionsv1client "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned/typed/apiextensions/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/test/e2e/reconciler/cache/helpers.go b/test/e2e/reconciler/cache/helpers.go index 370e0795013..760b078a105 100644 --- a/test/e2e/reconciler/cache/helpers.go +++ b/test/e2e/reconciler/cache/helpers.go @@ -163,7 +163,7 @@ func waitUntilCacheServerIsReady(ctx context.Context, t *testing.T, cacheClientR func waitForEndpoint(ctx context.Context, t *testing.T, client *rest.RESTClient, endpoint string) { t.Helper() var lastError error - if err := wait.PollImmediateWithContext(ctx, 100*time.Millisecond, time.Minute, func(ctx context.Context) (bool, error) { + if err := wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, time.Minute, true, func(ctx context.Context) (bool, error) { req := rest.NewRequest(client).RequestURI(endpoint) _, err := req.Do(ctx).Raw() if err != nil { diff --git a/test/e2e/reconciler/cache/replication_test.go b/test/e2e/reconciler/cache/replication_test.go index 9ebe3319053..41c56f0a933 100644 --- a/test/e2e/reconciler/cache/replication_test.go +++ b/test/e2e/reconciler/cache/replication_test.go @@ -669,13 +669,13 @@ func (b *replicateResourceScenario) verifyResourceReplicationHelper(ctx context. } return false, err.Error() } - t.Logf("Compare if both the original and replicated resources (%s %s/%s) are the same except %s annotation and ResourceVersion", b.gvr, cluster, b.resourceName, genericapirequest.AnnotationKey) + t.Logf("Compare if both the original and replicated resources (%s %s/%s) are the same except %s annotation and ResourceVersion", b.gvr, cluster, b.resourceName, genericapirequest.ShardAnnotationKey) cachedResourceMeta, err := meta.Accessor(cachedResource) if err != nil { return false, err.Error() } - if _, found := cachedResourceMeta.GetAnnotations()[genericapirequest.AnnotationKey]; !found { - t.Fatalf("replicated %s root|%s/%s, doesn't have %s annotation", b.gvr, cluster, cachedResourceMeta.GetName(), genericapirequest.AnnotationKey) + if _, found := cachedResourceMeta.GetAnnotations()[genericapirequest.ShardAnnotationKey]; !found { + t.Fatalf("replicated %s root|%s/%s, doesn't have %s annotation", b.gvr, cluster, cachedResourceMeta.GetName(), genericapirequest.ShardAnnotationKey) } unstructured.RemoveNestedField(originalResource.Object, "metadata", "resourceVersion") unstructured.RemoveNestedField(cachedResource.Object, "metadata", "resourceVersion") @@ -688,7 +688,7 @@ func (b *replicateResourceScenario) verifyResourceReplicationHelper(ctx context. unstructured.RemoveNestedField(cachedResource.Object, "metadata", "generation") } - unstructured.RemoveNestedField(cachedResource.Object, "metadata", "annotations", genericapirequest.AnnotationKey) + unstructured.RemoveNestedField(cachedResource.Object, "metadata", "annotations", genericapirequest.ShardAnnotationKey) if cachedStatus, ok := cachedResource.Object["status"]; ok && cachedStatus == nil || (cachedStatus != nil && len(cachedStatus.(map[string]interface{})) == 0) { // TODO: worth investigating: // for some reason cached resources have an empty status set whereas the original resources don't diff --git a/test/e2e/virtual/apiexport/authorizer_test.go b/test/e2e/virtual/apiexport/authorizer_test.go index 18cd5d7e464..acf7f4e7905 100644 --- a/test/e2e/virtual/apiexport/authorizer_test.go +++ b/test/e2e/virtual/apiexport/authorizer_test.go @@ -24,6 +24,7 @@ import ( "testing" "time" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" kcpdynamic "github.com/kcp-dev/client-go/dynamic" kcpkubernetesclientset "github.com/kcp-dev/client-go/kubernetes" "github.com/kcp-dev/logicalcluster/v3" @@ -33,7 +34,6 @@ import ( "k8s.io/apiextensions-apiserver/pkg/apihelpers" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/test/e2e/virtual/apiexport/virtualworkspace_test.go b/test/e2e/virtual/apiexport/virtualworkspace_test.go index 55457796000..0565a051d0f 100644 --- a/test/e2e/virtual/apiexport/virtualworkspace_test.go +++ b/test/e2e/virtual/apiexport/virtualworkspace_test.go @@ -49,11 +49,11 @@ import ( "k8s.io/client-go/rest" "k8s.io/client-go/restmapper" "k8s.io/client-go/util/retry" - "k8s.io/kubernetes/pkg/api/genericcontrolplanescheme" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "sigs.k8s.io/yaml" "github.com/kcp-dev/kcp/config/helpers" + kcpscheme "github.com/kcp-dev/kcp/pkg/server/scheme" apiexportbuiltin "github.com/kcp-dev/kcp/pkg/virtual/apiexport/schemas/builtin" "github.com/kcp-dev/kcp/pkg/virtual/framework/internalapis" apisv1alpha1 "github.com/kcp-dev/kcp/sdk/apis/apis/v1alpha1" @@ -267,7 +267,7 @@ func TestAPIExportVirtualWorkspace(t *testing.T) { t.Logf("Verify that user-1 can now patch (application/apply-patch+yaml) cowboys") patch := `{"apiVersion":"wildwest.dev/v1alpha1","kind":"Cowboy","spec":{"intent":"4"}}` - _, err = wwUser1VC.Cluster(consumerClusterName.Path()).WildwestV1alpha1().Cowboys(cowboy.Namespace).Patch(ctx, cowboy.Name, types.ApplyPatchType, []byte(patch), metav1.PatchOptions{FieldManager: "e2e-test-runner", Force: pointer.Bool(true)}) + _, err = wwUser1VC.Cluster(consumerClusterName.Path()).WildwestV1alpha1().Cowboys(cowboy.Namespace).Patch(ctx, cowboy.Name, types.ApplyPatchType, []byte(patch), metav1.PatchOptions{FieldManager: "e2e-test-runner", Force: ptr.To(true)}) require.NoError(t, err) t.Logf("Verify that user-1 can not patch a non-existent cowboy") @@ -853,7 +853,7 @@ func gatherInternalAPIs(t *testing.T, discoveryClient discovery.DiscoveryInterfa resourceScope = apiextensionsv1.NamespaceScoped } - instance, err := genericcontrolplanescheme.Scheme.New(gvk) + instance, err := kcpscheme.Scheme.New(gvk) if err != nil { if extensionsapiserver.Scheme.Recognizes(gvk) { // Not currently supporting permission claim for CustomResourceDefinition. @@ -980,7 +980,7 @@ func bindConsumerToProvider(ctx context.Context, t *testing.T, consumerWorkspace }, wait.ForeverTestTimeout, time.Millisecond*100) t.Logf("Make sure %q API group shows up in consumer workspace %q group discovery", wildwest.GroupName, consumerWorkspace) - err = wait.PollImmediateWithContext(ctx, 100*time.Millisecond, wait.ForeverTestTimeout, func(c context.Context) (done bool, err error) { + err = wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, wait.ForeverTestTimeout, true, func(c context.Context) (done bool, err error) { groups, err := consumerWsClient.Cluster(consumerWorkspace).Discovery().ServerGroups() if err != nil { return false, fmt.Errorf("error retrieving consumer workspace %q group discovery: %w", consumerWorkspace, err) diff --git a/test/e2e/watchcache/watchcache_enabled_test.go b/test/e2e/watchcache/watchcache_enabled_test.go index b1d0f8de0ff..820fbe101e3 100644 --- a/test/e2e/watchcache/watchcache_enabled_test.go +++ b/test/e2e/watchcache/watchcache_enabled_test.go @@ -26,12 +26,12 @@ import ( "testing" "time" + kcpapiextensionsclientset "github.com/kcp-dev/client-go/apiextensions/client" kcpdynamic "github.com/kcp-dev/client-go/dynamic" kcpkubernetesclientset "github.com/kcp-dev/client-go/kubernetes" "github.com/stretchr/testify/require" v1 "k8s.io/api/core/v1" - kcpapiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/kcp/clientset/versioned" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/wait"