diff --git a/Makefile b/Makefile index e298476c..4b71f514 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,58 @@ -# OPENSHIFT_GIMPORTS_VER defines which version of openshift-goimports to use -# for checking import statements. -OPENSHIFT_GOIMPORTS_VER := c72f1dc2e3aacfa00aece3391d938c9bc734e791 -RECONCILER_GEN_VER := v0.5.0 -## Tool Versions +# Copyright 2025 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. + +# Setting SHELL to bash allows bash commands to be executed by recipes. +# Options are set to exit when a recipe line exits non-zero or a piped command fails. +SHELL = /usr/bin/env bash -o pipefail +.SHELLFLAGS = -ec + +export CGO_ENABLED ?= 0 +export GOFLAGS ?= -mod=readonly -trimpath +export GO111MODULE = on +GOBUILDFLAGS ?= -v +LDFLAGS += -extldflags '-static' +LDFLAGS_EXTRA ?= -w + +ifdef DEBUG_BUILD +GOFLAGS = -mod=readonly +LDFLAGS_EXTRA = +GOTOOLFLAGS_EXTRA = -gcflags=all="-N -l" +endif + +BUILD_DEST ?= _build +GOTOOLFLAGS ?= $(GOBUILDFLAGS) -ldflags '$(LDFLAGS) $(LDFLAGS_EXTRA)' $(GOTOOLFLAGS_EXTRA) + +# Image URL to use all building/pushing image targets +IMG ?= ghcr.io/kcp-dev/kcp-operator + +GOIMPORTS_VERSION ?= c72f1dc2e3aacfa00aece3391d938c9bc734e791 +GOLANGCI_LINT_VERSION ?= 2.1.6 +HELM_VERSION ?= 3.18.6 KUBECTL_VERSION ?= v1.32.0 KUSTOMIZE_VERSION ?= v5.4.3 -CONTROLLER_TOOLS_VERSION ?= v0.16.1 -GOLANGCI_LINT_VERSION ?= 2.1.6 PROTOKOL_VERSION ?= 0.7.2 -HELM_VERSION ?= 3.18.6 -# Image URL to use all building/pushing image targets -IMG ?= ghcr.io/kcp-dev/kcp-operator +# codegen tooling +APPLYCONFIGURATION_GEN_VERSION ?= v0.32.0 +CLIENT_GEN_VERSION ?= v0.32.0 +CONTROLLER_GEN_VERSION ?= v0.16.1 +KCP_CODEGEN_VERSION ?= v2.3.1 +RECONCILER_GEN_VERSION ?= v0.5.0 -TOOLS_DIR = $(shell pwd)/_tools +export UGET_DIRECTORY ?= _tools +export UGET_CHECKSUMS ?= hack/tools.checksums +export UGET_VERSIONED_BINARIES = true # CONTAINER_TOOL defines the container tool to be used for building images. # Be aware that the target commands are only tested with Docker which is @@ -21,11 +60,6 @@ TOOLS_DIR = $(shell pwd)/_tools # tools. (i.e. podman) CONTAINER_TOOL ?= docker -# Setting SHELL to bash allows bash commands to be executed by recipes. -# Options are set to exit when a recipe line exits non-zero or a piped command fails. -SHELL = /usr/bin/env bash -o pipefail -.SHELLFLAGS = -ec - .PHONY: all all: build @@ -49,7 +83,7 @@ help: ## Display this help. ##@ Development .PHONY: codegen -codegen: reconciler-gen openshift-goimports ## Generate manifest, code and the SDK. +codegen: ## Generate manifest, code and the SDK. @hack/update-codegen.sh .PHONY: fmt @@ -62,35 +96,39 @@ vet: ## Run go vet against code. .PHONY: test test: fmt vet ## Run tests. - go test $$(go list ./... | grep -v /e2e) -coverprofile cover.out + go test ./... -coverprofile cover.out # Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors. .PHONY: test-e2e # Run the e2e tests against a kind k8s instance that is already spun up. test-e2e: - go test ./test/e2e/ -v + go test -v -tags e2e ./test/e2e/... # Creates a kind cluster and runs the e2e tests in them. The kind cluster is destroyed after the tests. .PHONY: test-e2e-with-kind # Run the e2e tests against a temporary kind cluster. -test-e2e-with-kind: helm - @./hack/run-e2e-tests.sh +test-e2e-with-kind: + @hack/run-e2e-tests.sh + +GOLANGCI_LINT = $(UGET_DIRECTORY)/golangci-lint-$(GOLANGCI_LINT_VERSION) .PHONY: lint -lint: golangci-lint ## Run golangci-lint linter. +lint: install-golangci-lint ## Run golangci-lint linter. $(GOLANGCI_LINT) run --timeout 10m - cd sdk && $(GOLANGCI_LINT) --config ../.golangci.yml run --timeout 10m + cd sdk && ../$(GOLANGCI_LINT) --config ../.golangci.yml run --timeout 10m .PHONY: lint-fix -lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes. +lint-fix: install-golangci-lint ## Run golangci-lint linter and perform fixes. $(GOLANGCI_LINT) run --timeout 10m --fix - cd sdk && $(GOLANGCI_LINT) --config ../.golangci.yml run --timeout 10m --fix + cd sdk && ../$(GOLANGCI_LINT) --config ../.golangci.yml run --timeout 10m --fix .PHONY: modules modules: ## Run go mod tidy to ensure modules are up to date. hack/update-go-modules.sh +GOIMPORTS = $(UGET_DIRECTORY)/goimports-$(GOIMPORTS_VERSION) + .PHONY: imports -imports: openshift-goimports ## Re-order Go import statements. - $(OPENSHIFT_GOIMPORTS) -m github.com/kcp-dev/kcp-operator +imports: install-goimports ## Re-order Go import statements. + $(GOIMPORTS) -m github.com/kcp-dev/kcp-operator .PHONY: verify verify: codegen fmt vet modules imports ## Run all codegen and formatting targets and check if files have changed. @@ -100,11 +138,15 @@ verify: codegen fmt vet modules imports ## Run all codegen and formatting target .PHONY: clean clean: ## Remove all built binaries. - rm -rf _build + rm -rf $(BUILD_DEST) + +.PHONY: clean-tools +clean-tools: ## Remove all downloaded tools. + rm -rf $(UGET_DIRECTORY) .PHONY: build build: ## Build manager binary. - go build -o _build/manager cmd/main.go + go build $(GOTOOLFLAGS) -o $(BUILD_DEST)/manager cmd/main.go .PHONY: run run: fmt vet ## Run a controller from your host. @@ -121,8 +163,11 @@ docker-build: ## Build docker image with the manager. docker-push: ## Push docker image with the manager. $(CONTAINER_TOOL) push ${IMG} +KUSTOMIZE = $(abspath .)/$(UGET_DIRECTORY)/kustommize-$(KUSTOMIZE_VERSION) +KUBECTL = $(abspath .)/$(UGET_DIRECTORY)/kubectl-$(KUBECTL_VERSION) + .PHONY: build-installer -build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment. +build-installer: manifests generate install-kustomize ## Generate a consolidated YAML with CRDs and deployment. mkdir -p dist cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default > dist/install.yaml @@ -134,81 +179,78 @@ ifndef ignore-not-found endif .PHONY: install -install: kubectl kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config. +install: kubectl install-kustomize install-kubectl ## Install CRDs into the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/crd | $(KUBECTL) apply -f - .PHONY: uninstall -uninstall: kubectl kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. +uninstall: kubectl install-kustomize install-kubectl ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. $(KUSTOMIZE) build config/crd | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f - .PHONY: deploy -deploy: kubectl kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. +deploy: kubectl install-kustomize install-kubectl ## Deploy controller to the K8s cluster specified in ~/.kube/config. cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default | $(KUBECTL) apply -f - .PHONY: undeploy -undeploy: kubectl kustomize ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. +undeploy: kubectl install-kustomize install-kubectl ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. $(KUSTOMIZE) build config/default | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f - ##@ Dependencies -## Tool Binaries -KUBECTL ?= $(TOOLS_DIR)/kubectl -KUSTOMIZE ?= $(TOOLS_DIR)/kustomize -GOLANGCI_LINT = $(TOOLS_DIR)/golangci-lint -PROTOKOL = $(TOOLS_DIR)/protokol -RECONCILER_GEN := $(TOOLS_DIR)/reconciler-gen -OPENSHIFT_GOIMPORTS := $(TOOLS_DIR)/openshift-goimports -HELM := $(TOOLS_DIR)/helm - -.PHONY: kubectl -kubectl: $(KUBECTL) ## Download kubectl locally if necessary. +.PHONY: install-kubectl +install-kubectl: ## Download kubectl locally if necessary. + @UNCOMPRESSED=true hack/uget.sh https://dl.k8s.io/release/{VERSION}/bin/{GOOS}/{GOARCH}/kubectl kubectl $(KUBECTL_VERSION) kubectl -.PHONY: $(KUBECTL) -$(KUBECTL): - @UNCOMPRESSED=true hack/download-tool.sh https://dl.k8s.io/$(KUBECTL_VERSION)/bin/$(shell go env GOOS)/$(shell go env GOARCH)/kubectl kubectl $(KUBECTL_VERSION) kubectl +.PHONY: install-kustomize +install-kustomize: ## Download kustomize locally if necessary. + @GO_MODULE=true hack/uget.sh sigs.k8s.io/kustomize/kustomize/v5 kustomize $(KUSTOMIZE_VERSION) -.PHONY: kustomize -kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. +.PHONY: install-golangci-lint +install-golangci-lint: ## Download golangci-lint locally if necessary. + @hack/uget.sh https://github.com/golangci/golangci-lint/releases/download/v{VERSION}/golangci-lint-{VERSION}-{GOOS}-{GOARCH}.tar.gz golangci-lint $(GOLANGCI_LINT_VERSION) -.PHONY: $(KUSTOMIZE) -$(KUSTOMIZE): - @GO_MODULE=true hack/download-tool.sh sigs.k8s.io/kustomize/kustomize/v5 kustomize $(KUSTOMIZE_VERSION) +.PHONY: install-protokol +install-protokol: ## Download protokol locally if necessary. + @hack/uget.sh https://codeberg.org/xrstf/protokol/releases/download/v{VERSION}/protokol_{VERSION}_{GOOS}_{GOARCH}.tar.gz protokol $(PROTOKOL_VERSION) -.PHONY: golangci-lint -golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary. +.PHONY: install-reconciler-gen +install-reconciler-gen: ## Download reconciler-gen locally if necessary. + @GO_MODULE=true hack/uget.sh k8c.io/reconciler/cmd/reconciler-gen reconciler-gen $(RECONCILER_GEN_VERSION) -.PHONY: $(GOLANGCI_LINT) -$(GOLANGCI_LINT): - @hack/download-tool.sh https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-$(shell go env GOOS)-$(shell go env GOARCH).tar.gz golangci-lint $(GOLANGCI_LINT_VERSION) +.PHONY: install-applyconfiguration-gen +install-applyconfiguration-gen: ## Download applyconfiguration-gen locally if necessary. + @GO_MODULE=true hack/uget.sh k8s.io/code-generator/cmd/applyconfiguration-gen applyconfiguration-gen $(APPLYCONFIGURATION_GEN_VERSION) -.PHONY: protokol -protokol: $(PROTOKOL) ## Download protokol locally if necessary. +.PHONY: install-client-gen +install-client-gen: ## Download client-gen locally if necessary. + @GO_MODULE=true hack/uget.sh k8s.io/code-generator/cmd/client-gen client-gen $(CLIENT_GEN_VERSION) -.PHONY: $(PROTOKOL) -$(PROTOKOL): - @hack/download-tool.sh https://codeberg.org/xrstf/protokol/releases/download/v${PROTOKOL_VERSION}/protokol_${PROTOKOL_VERSION}_$(shell go env GOOS)_$(shell go env GOARCH).tar.gz protokol $(PROTOKOL_VERSION) +# make controller-gen and kcp-codegen compile on Go 1.25; +# this can be removed once they have been updated to more recent versions. +export GO_EXTRA_DEPS=golang.org/x/tools@v0.39.0 -.PHONY: reconciler-gen -reconciler-gen: $(RECONCILER_GEN) ## Download reconciler-gen locally if necessary. +.PHONY: install-controller-gen +install-controller-gen: ## Download controller-gen locally if necessary. + @GO_MODULE=true hack/uget.sh sigs.k8s.io/controller-tools/cmd/controller-gen controller-gen $(CONTROLLER_GEN_VERSION) -.PHONY: $(RECONCILER_GEN) -$(RECONCILER_GEN): - @GO_MODULE=true hack/download-tool.sh k8c.io/reconciler/cmd/reconciler-gen reconciler-gen $(RECONCILER_GEN_VER) +.PHONY: install-kcp-codegen +install-kcp-codegen: ## Download kcp code-generator locally if necessary. + @GO_MODULE=true hack/uget.sh github.com/kcp-dev/code-generator/v2 kcp-code-generator $(KCP_CODEGEN_VERSION) code-generator -.PHONY: openshift-goimports -openshift-goimports: $(OPENSHIFT_GOIMPORTS) ## Download openshift-goimports locally if necessary. +.PHONY: install-goimports +install-goimports: ## Download openshift goimports locally if necessary. + @GO_MODULE=true hack/uget.sh github.com/openshift-eng/openshift-goimports goimports $(GOIMPORTS_VERSION) -.PHONY: $(OPENSHIFT_GOIMPORTS) -$(OPENSHIFT_GOIMPORTS): - @GO_MODULE=true hack/download-tool.sh github.com/openshift-eng/openshift-goimports openshift-goimports $(OPENSHIFT_GOIMPORTS_VER) +.PHONY: install-helm +install-helm: ## Download Helm locally if necessary. + @hack/uget.sh https://get.helm.sh/helm-v{VERSION}-{GOOS}-{GOARCH}.tar.gz helm $(HELM_VERSION) -.PHONY: helm -helm: $(HELM) ## Download Helm locally if necessary. +# This target can be used to conveniently update the checksums for all checksummed tools. +# Combine with GOARCH to update for other archs, like "GOARCH=arm64 make update-tools". -.PHONY: $(HELM) -$(HELM): - @hack/download-tool.sh https://get.helm.sh/helm-v${HELM_VERSION}-$(shell go env GOOS)-$(shell go env GOARCH).tar.gz helm $(HELM_VERSION) +.PHONY: update-tools +update-tools: UGET_UPDATE=true +update-tools: clean-tools install-kubectl install-golangci-lint install-protokol install-helm ##@ Documentation diff --git a/go.mod b/go.mod index 46fc179b..f4a6ca2a 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,6 @@ require ( github.com/go-logr/logr v1.4.2 github.com/go-logr/zapr v1.3.0 github.com/go-test/deep v1.1.0 - github.com/kcp-dev/code-generator/v2 v2.3.1 github.com/kcp-dev/kcp-operator/sdk v0.0.0-00010101000000-000000000000 github.com/kcp-dev/kcp/sdk v0.27.1 github.com/kcp-dev/logicalcluster/v3 v3.0.5 @@ -19,10 +18,8 @@ require ( k8s.io/api v0.32.0 k8s.io/apimachinery v0.32.0 k8s.io/client-go v0.32.0 - k8s.io/code-generator v0.32.0 k8s.io/utils v0.0.0-20241210054802-24370beab758 sigs.k8s.io/controller-runtime v0.19.0 - sigs.k8s.io/controller-tools v0.16.1 sigs.k8s.io/yaml v1.4.0 ) @@ -38,7 +35,6 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect - github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect @@ -46,7 +42,6 @@ require ( github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect - github.com/gobuffalo/flect v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/cel-go v0.22.1 // indirect @@ -60,8 +55,6 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.11 // indirect github.com/mailru/easyjson v0.9.0 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect @@ -87,7 +80,6 @@ require ( go.opentelemetry.io/proto/otlp v1.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect - golang.org/x/mod v0.24.0 // indirect golang.org/x/net v0.40.0 // indirect golang.org/x/oauth2 v0.28.0 // indirect golang.org/x/sync v0.14.0 // indirect @@ -95,7 +87,6 @@ require ( golang.org/x/term v0.32.0 // indirect golang.org/x/text v0.25.0 // indirect golang.org/x/time v0.8.0 // indirect - golang.org/x/tools v0.28.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241219192143-6b3ec007d9bb // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb // indirect @@ -103,12 +94,10 @@ require ( google.golang.org/protobuf v1.36.0 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.32.0 // indirect k8s.io/apiserver v0.32.0 // indirect k8s.io/component-base v0.32.0 // indirect - k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.1 // indirect diff --git a/go.sum b/go.sum index 2731ba1a..553379de 100644 --- a/go.sum +++ b/go.sum @@ -27,8 +27,6 @@ github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lSh github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= @@ -52,8 +50,6 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= -github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= @@ -80,8 +76,6 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kcp-dev/code-generator/v2 v2.3.1 h1:FnGGaDeO033d6wg1gBndhZzO/PZAmU0NKVCretEpQbQ= -github.com/kcp-dev/code-generator/v2 v2.3.1/go.mod h1:uvIHtZzfv8qPzW9Hym+kL4aNpZaiTBONvPJkTWVVCBk= github.com/kcp-dev/kcp/sdk v0.27.1 h1:jBVdrZoJd5hy2RqaBnmCCzldimwOqDkf8FXtNq5HaWA= github.com/kcp-dev/kcp/sdk v0.27.1/go.mod h1:3eRgW42d81Ng60DbG1xbne0FSS2znpcN/GUx4rqJgUo= github.com/kcp-dev/logicalcluster/v3 v3.0.5 h1:JbYakokb+5Uinz09oTXomSUJVQsqfxEvU4RyHUYxHOU= @@ -98,11 +92,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= 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= @@ -110,10 +99,6 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= @@ -187,8 +172,6 @@ golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 h1:1UoZQm6f0P/ZO0w1Ri+f+ifG/ golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c= 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.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= -golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -205,8 +188,6 @@ golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= @@ -244,10 +225,6 @@ gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSP gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -263,12 +240,8 @@ k8s.io/apiserver v0.32.0 h1:VJ89ZvQZ8p1sLeiWdRJpRD6oLozNZD2+qVSLi+ft5Qs= k8s.io/apiserver v0.32.0/go.mod h1:HFh+dM1/BE/Hm4bS4nTXHVfN6Z6tFIZPi649n83b4Ag= k8s.io/client-go v0.32.0 h1:DimtMcnN/JIKZcrSrstiwvvZvLjG0aSxy8PxN8IChp8= k8s.io/client-go v0.32.0/go.mod h1:boDWvdM1Drk4NJj/VddSLnx59X3OPgwrOo0vGbtq9+8= -k8s.io/code-generator v0.32.0 h1:s0lNN8VSWny8LBz5t5iy7MCdgwdOhdg7vAGVxvS+VWU= -k8s.io/code-generator v0.32.0/go.mod h1:b7Q7KMZkvsYFy72A79QYjiv4aTz3GvW0f1T3UfhFq4s= k8s.io/component-base v0.32.0 h1:d6cWHZkCiiep41ObYQS6IcgzOUQUNpywm39KVYaUqzU= k8s.io/component-base v0.32.0/go.mod h1:JLG2W5TUxUu5uDyKiH2R/7NnxJo1HlPoRIIbVLkK5eM= -k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 h1:si3PfKm8dDYxgfbeA6orqrtLkvvIeH8UqffFJDl0bz4= -k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 h1:hcha5B1kVACrLujCKLbr8XWMxCxzQx42DY8QKYJrDLg= @@ -279,8 +252,6 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.1 h1:uOuSLOMBWkJH0 sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.1/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= -sigs.k8s.io/controller-tools v0.16.1 h1:gvIsZm+2aimFDIBiDKumR7EBkc+oLxljoUVfRbDI6RI= -sigs.k8s.io/controller-tools v0.16.1/go.mod h1:0I0xqjR65YTfoO12iR+mZR6s6UAVcUARgXRlsu0ljB0= sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM= sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= diff --git a/hack/ci/run-e2e-tests.sh b/hack/ci/run-e2e-tests.sh index 618224af..b1f41257 100755 --- a/hack/ci/run-e2e-tests.sh +++ b/hack/ci/run-e2e-tests.sh @@ -65,16 +65,17 @@ chmod 600 "$KUBECONFIG" # apply kernel limits job first and wait for completion echo "Applying kernel limits job…" -kubectl apply --filename hack/ci/kernel.yaml -kubectl wait --for=condition=Complete job/kernel-limits --timeout=300s +KUBECTL="$(UGET_PRINT_PATH=absolute make --no-print-directory install-kubectl)" +"$KUBECTL" apply --filename hack/ci/kernel.yaml +"$KUBECTL" wait --for=condition=Complete job/kernel-limits --timeout=300s echo "Kernel limits job completed." # store logs as artifacts -make protokol -_tools/protokol --output "$ARTIFACTS/logs" --namespace 'kcp-*' --namespace 'e2e-*' >/dev/null 2>&1 & +PROTOKOL="$(UGET_PRINT_PATH=absolute make --no-print-directory install-protokol)" +"$PROTOKOL" --output "$ARTIFACTS/logs" --namespace 'kcp-*' --namespace 'e2e-*' >/dev/null 2>&1 & # need Helm to setup etcd -make helm +HELM="$(UGET_PRINT_PATH=absolute make --no-print-directory install-helm)" # load the operator image into the kind cluster image="ghcr.io/kcp-dev/kcp-operator:$IMAGE_TAG" @@ -86,17 +87,17 @@ kind load image-archive "$archive" --name "$KIND_CLUSTER_NAME" # deploy the operator echo "Deploying operator..." -kubectl kustomize hack/ci/testdata | kubectl apply --filename - -kubectl --namespace kcp-operator-system wait deployment kcp-operator-controller-manager --for condition=Available -kubectl --namespace kcp-operator-system wait pod --all --for condition=Ready +"$KUBECTL" kustomize hack/ci/testdata | "$KUBECTL" apply --filename - +"$KUBECTL" --namespace kcp-operator-system wait deployment kcp-operator-controller-manager --for condition=Available +"$KUBECTL" --namespace kcp-operator-system wait pod --all --for condition=Ready # deploying cert-manager echo "Deploying cert-manager..." -_tools/helm repo add jetstack https://charts.jetstack.io --force-update -_tools/helm repo update +"$HELM" repo add jetstack https://charts.jetstack.io --force-update +"$HELM" repo update -_tools/helm upgrade \ +"$HELM" upgrade \ --install \ --namespace cert-manager \ --create-namespace \ @@ -104,11 +105,11 @@ _tools/helm upgrade \ --set crds.enabled=true \ cert-manager jetstack/cert-manager -kubectl apply --filename hack/ci/testdata/clusterissuer.yaml +"$KUBECTL" apply --filename hack/ci/testdata/clusterissuer.yaml echo "Running e2e tests..." -export HELM_BINARY="$(realpath _tools/helm)" +export HELM_BINARY="$HELM" export ETCD_HELM_CHART="$(realpath hack/ci/testdata/etcd)" WHAT="${WHAT:-./test/e2e/...}" diff --git a/hack/download-tool.sh b/hack/download-tool.sh deleted file mode 100755 index 3d9c8e23..00000000 --- a/hack/download-tool.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2025 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. - -set -euo pipefail - -cd $(dirname $0)/.. -# source hack/lib.sh - -mkdir -p _tools -cd _tools - -URL="$1" -BINARY="$2" -VERSION="$3" -BINARY_PATTERN="${4:-**/$BINARY}" -GO_MODULE=${GO_MODULE:-false} -UNCOMPRESSED=${UNCOMPRESSED:-false} - -# Check if and what version we installed already. -versionFile="$BINARY.version" -existingVersion="" -if [ -f "$versionFile" ]; then - existingVersion="$(cat "$versionFile")" -fi - -# If the binary exists and its version matches, we're good. -if [ -f "$BINARY" ] && [ "$VERSION" == "$existingVersion" ]; then - exit 0 -fi - -( - rm -rf tmp - mkdir -p tmp - cd tmp - - echo "Downloading $BINARY version $VERSION ..." >&2 - - if $GO_MODULE; then - GOBIN=$(realpath .) go install "$URL@$VERSION" - mv * "../$BINARY" - else - curl --fail --silent -LO "$URL" - archive="$(ls)" - - if ! $UNCOMPRESSED; then - case "$archive" in - *.tar.gz | *.tgz) - tar xzf "$archive" - ;; - *.zip) - unzip "$archive" - ;; - *) - echo "Unknown file type: $archive" >&2 - exit 1 - esac - fi - - mv $BINARY_PATTERN ../$BINARY - chmod +x ../$BINARY - fi -) - -rm -rf tmp -echo "$VERSION" > "$versionFile" - -echo "Installed at _tools/$BINARY." >&2 diff --git a/hack/run-e2e-tests.sh b/hack/run-e2e-tests.sh index 5d6bf532..25d7d294 100755 --- a/hack/run-e2e-tests.sh +++ b/hack/run-e2e-tests.sh @@ -58,23 +58,27 @@ fi echo "Kubeconfig is in $KUBECONFIG." +KUBECTL="$(UGET_PRINT_PATH=absolute make --no-print-directory install-kubectl)" +HELM="$(UGET_PRINT_PATH=absolute make --no-print-directory install-helm)" +PROTOKOL="$(UGET_PRINT_PATH=absolute make --no-print-directory install-protokol)" + # apply kernel limits job first and wait for completion echo "Applying kernel limits job…" -kubectl apply --filename hack/ci/kernel.yaml -kubectl wait --for=condition=Complete job/kernel-limits --timeout=300s +"$KUBECTL" apply --filename hack/ci/kernel.yaml +"$KUBECTL" wait --for=condition=Complete job/kernel-limits --timeout=300s echo "Kernel limits job completed." # deploying operator CRDs echo "Deploying operator CRDs..." -kubectl apply --kustomize config/crd +"$KUBECTL" apply --kustomize config/crd # deploying cert-manager echo "Deploying cert-manager..." -_tools/helm repo add jetstack https://charts.jetstack.io --force-update -_tools/helm repo update +"$HELM" repo add jetstack https://charts.jetstack.io --force-update +"$HELM" repo update -_tools/helm upgrade \ +"$HELM" upgrade \ --install \ --namespace cert-manager \ --create-namespace \ @@ -83,7 +87,7 @@ _tools/helm upgrade \ --atomic \ cert-manager jetstack/cert-manager -kubectl apply --filename hack/ci/testdata/clusterissuer.yaml +"$KUBECTL" apply --filename hack/ci/testdata/clusterissuer.yaml # start the operator locally echo "Starting kcp-operator..." @@ -97,17 +101,12 @@ _build/manager \ OPERATOR_PID=$! echo "Running as process $OPERATOR_PID." -if command -v protokol &> /dev/null; then - protokol --namespace 'e2e-*' --output "$DATA_DIR/kind-logs" 2>/dev/null & - PROTOKOL_PID=$! -else - echo "Install https://codeberg.org/xrstf/protokol to automatically" - echo "collect logs from the kind cluster." -fi +"$PROTOKOL" --namespace 'e2e-*' --output "$DATA_DIR/kind-logs" 2>/dev/null & +PROTOKOL_PID=$! echo "Running e2e tests..." -export HELM_BINARY="$(realpath _tools/helm)" +export HELM_BINARY="$HELM" export ETCD_HELM_CHART="$(realpath hack/ci/testdata/etcd)" WHAT="${WHAT:-./test/e2e/...}" diff --git a/hack/tools.checksums b/hack/tools.checksums new file mode 100644 index 00000000..3316ce60 --- /dev/null +++ b/hack/tools.checksums @@ -0,0 +1,8 @@ +golangci-lint|GOARCH=amd64;GOOS=linux|7009324a8aad93c1f84dce1c3cf61181bdd6b68e5f1b8b5d6971662258255050 +golangci-lint|GOARCH=arm64;GOOS=linux|c51ff5b21be688b043baea44de7dd855cf07b855c14f0de405bfaf922b1d7634 +helm|GOARCH=amd64;GOOS=linux|c153fd9c1173f39aefe8e9aa9f00fd3daf6b40c8ea01e94a0d2f2c1787fc60e0 +helm|GOARCH=arm64;GOOS=linux|c7550b38b3b7c9df31f7052432b5eb45e0cfec7238310de0133789598c2449e4 +kubectl|GOARCH=amd64;GOOS=linux|646d58f6d98ee670a71d9cdffbf6625aeea2849d567f214bc43a35f8ccb7bf70 +kubectl|GOARCH=arm64;GOOS=linux|ba4004f98f3d3a7b7d2954ff0a424caa2c2b06b78c17b1dccf2acc76a311a896 +protokol|GOARCH=amd64;GOOS=linux|eafcdfd2f4504d5cf7eb191c645fb48bf37fc1bc1ca8ef4986a86fad7126ce4e +protokol|GOARCH=arm64;GOOS=linux|68aec9a5b5862f519e7478c1110a91a9faee36c33c6c6b3ec46868a022a95e12 diff --git a/hack/tools.go b/hack/tools.go deleted file mode 100644 index e0cbfb5a..00000000 --- a/hack/tools.go +++ /dev/null @@ -1,27 +0,0 @@ -//go:build tools - -/* -Copyright 2025 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 tools - -import ( - _ "github.com/kcp-dev/code-generator/v2" - - _ "k8s.io/code-generator/cmd/applyconfiguration-gen" - _ "k8s.io/code-generator/cmd/client-gen" - _ "sigs.k8s.io/controller-tools/cmd/controller-gen" -) diff --git a/hack/uget.sh b/hack/uget.sh new file mode 100755 index 00000000..e501dca1 --- /dev/null +++ b/hack/uget.sh @@ -0,0 +1,702 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: 2025 Christoph Mewes, https://codeberg.org/xrstf/uget +# SPDX-License-Identifier: MIT +# +# µget 0.5.0 – your friendly downloader +# ------------------------------------- +# +# µget can download software as binaries, archives or Go modules. +# +# Usage: ./uget.sh URL_PATTERN BINARY_NAME VERSION [EXTRACT_PATTERN=**/$BINARY_NAME] + +set -eu + +############################################################################### +# Configuration + +# µget supports a large range of environment variables to customize its +# behaviour. Global configuration settings are prefixed with UGET_, settings +# usually meant for a single tool only have no prefix (like GO_MODULE). + +# GO_MODULE can be set to true to create a dummy Go module, add the given +# URL and version as a dependency and then go build the desired binary. Note +# that Go modules do not use checksums by default, see $UGET_GO_CHECKSUMS. +GO_MODULE=${GO_MODULE:-false} + +# GO_EXTRA_DEPS is an optional, space-separated list of additional dependencies +# that should be added to the temporary Go module before the actual dependency +# is added and built. This can be used to override/upgrade individual dependencies +# when needed. +GO_EXTRA_DEPS="${GO_EXTRA_DEPS:-}" + +# UNCOMPRESSED can be set to true if the downloaded file is not an archive, +# but the binary itself and doesn't need decompressing. +UNCOMPRESSED=${UNCOMPRESSED:-false} + +# UGET_UPDATE can be set to true when the VERSION parameter of a program has +# been updated and you want µget to update all known variants (based on the +# checksums file) before installing the correct variant for the current system. +# When UGET_CHECKSUMS is not in use, this variable has no effect. +# Use UGET_UPDATE_ONLY if you want to just update the checksums without also +# installing the binary. +UGET_UPDATE=${UGET_UPDATE:-false} + +# UGET_UPDATE_ONLY is like UGET_UPDATE, but does not install the binary on +# the current system (i.e. it only touches the checksum file). +UGET_UPDATE_ONLY=${UGET_UPDATE_ONLY:-false} + +# UGET_DIRECTORY is where downloaded binaries will be placed. +UGET_DIRECTORY="${UGET_DIRECTORY:-_tools}" + +# UGET_CHECKSUMS is an optional path to a checksum file that µget should use to +# ensure subsequent downloads match previously known checksums to prevent +# tampering on the server side. +UGET_CHECKSUMS="${UGET_CHECKSUMS:-}" + +# UGET_VERSIONED_BINARIES can be set to true to append the binary's version to +# its filename, leading to final paths like "_tools/mytool-v1.2.3". This can +# help when µget is being used in Makefiles to improve staleness detection. +# Note that µget never deletes any installed binaries, so enabling this can +# lead to leftover binaries that you can cleanup at your own convenience. +UGET_VERSIONED_BINARIES=${UGET_VERSIONED_BINARIES:-false} + +# UGET_TEMPDIR is the root directory to use when creating new temporary dirs. +UGET_TEMPDIR="${UGET_TEMPDIR:-/tmp}" + +# UGET_CACHE is an optional path to a directory where binaries are stored/read +# from instead of being downloaded from the internet. This can be useful if you +# have many projects using µget and do not want to re-download the same binary +# for all of them. This does not apply for Go modules since those are already +# effectively cached by Go itself. +UGET_CACHE="${UGET_CACHE:-}" + +# UGET_CACHE_SYMLINK can be set to true to create a symlink between the cached +# file and the local copy in $UGET_DIRECTORY. If left on false, µget will instead +# copy the file from the cache. +UGET_CACHE_SYMLINK=${UGET_CACHE_SYMLINK:-false} + +# UGET_PRINT_PATH can be set to "relative" to make µget only omit log output +# and only print the relative path to the binary, or set to "absolute" to +# output the absolute path. +UGET_PRINT_PATH="${UGET_PRINT_PATH:-no}" + +# UGET_HASHFUNC is the hashing function used to calculate file checksums. The +# output of this program is processed with awk to only print the first column. +UGET_HASHFUNC="${UGET_HASHFUNC:-sha256sum}" + +# UGET_GO_BUILD_CMD overwrites the default call to "go build" when installing +# a Go module. Use this to inject custom Go flags or toolchains. +# The given command is called with "-o BINARY_NAME MODULE_URL" with the pwd +# being inside a fake module that depends on the given module. +UGET_GO_BUILD_CMD="${UGET_GO_BUILD_CMD:-go build}" + +# UGET_GO_CHECKSUMS can be set to true to force checksums even for Go modules. +# This is disabled by default because the exact binaries being built depend on +# a lot of factors and usually it's a hassle to ensure everyone in a project +# has the *exact* same build environment. Go modules already make use of Google's +# GOSUMDB and should be "safe enough" by default with µget checksums. +UGET_GO_CHECKSUMS=${UGET_GO_CHECKSUMS:-false} + +############################################################################### +# Function library + +uget_mktemp() { + set -e + # --tmpdir does not work on MacOS + mktemp -d -p "$ABS_UGET_TEMPDIR" +} + +uget_log() { + if [ "$UGET_PRINT_PATH" = "no" ]; then + echo "$@" >&2 + fi +} + +uget_error() { + echo "$@" >&2 +} + +uget_lowercase() { + set -e + cat | tr '[:upper:]' '[:lower:]' +} + +uget_checksum_enabled() { + set -e + [ -n "$UGET_CHECKSUMS" ] +} + +uget_cache_enabled() { + set -e + [ -n "$UGET_CACHE" ] +} + +uget_checksum_check() { + set -e + + local kvString="$1" + local downloadedBinary="$2" + + if ! uget_checksum_enabled; then return; fi + + local newChecksum + newChecksum="$(uget_checksum_calculate "$downloadedBinary")" + + local oldChecksum + oldChecksum="$(uget_checksum_read "$kvString")" + + if [ -n "$oldChecksum" ] && [ "$oldChecksum" != "$newChecksum" ]; then + uget_error + uget_error " *************************************************************************" + uget_error " SECURITY ERROR" + uget_error + uget_error " The downloaded file $downloadedBinary does not have the expected checksum." + uget_error + uget_error " Expected: $oldChecksum" + uget_error " Actual : $newChecksum" + uget_error + uget_error " If you are updating $IDENTIFIER, this error is expected." + uget_error " Re-run this command with the environment variable UGET_UPDATE=true to make" + uget_error " µget update the checksums for all known variants of $IDENTIFIER." + uget_error " Use UGET_UPDATE_ONLY=true if you want to just update the checksums and not" + uget_error " install the given binary on this machine." + uget_error " *************************************************************************" + uget_error + + return 1 + fi + + if [ -z "$oldChecksum" ]; then + uget_checksum_write "$kvString" "$newChecksum" + fi +} + +uget_checksum_read() { + set -e + + local kvString="$1" + + if [ -f "$UGET_CHECKSUMS" ]; then + awk -F'|' -v "binary=$IDENTIFIER" -v "kv=$kvString" '{ if ($1 == binary && $2 == kv) print $3 }' "$UGET_CHECKSUMS" + fi +} + +uget_checksum_calculate() { + set -e + "$UGET_HASHFUNC" "$1" | awk '{ print $1 }' +} + +# hash_string includes a trailing newline in the hashed data +# (because of echo), but since *all* hashes contain it, it +# doesn't matter. +uget_hash_string() { + set -e + echo "$1" | "$UGET_HASHFUNC" | awk '{ print $1 }' +} + +uget_checksum_write() { + set -e + + local kvString="$1" + local checksum="$2" + + if [ -f "$UGET_CHECKSUMS" ]; then + local tempDir + tempDir="$(uget_mktemp)" + + # use awk to drop any existing hash for this binary/keyvalue combo + # (for better readability, do not invert the condition here); + # checking for NF (number of fields) to drop empty lines + awk \ + -F'|' -v "binary=$IDENTIFIER" -v "kv=$kvString" \ + '{ if (NF == 0 || ($1 == binary && $2 == kv)) {} else print }' \ + "$UGET_CHECKSUMS" > "$tempDir/checksums.txt" + + # add our new checksum + echo "$IDENTIFIER|$kvString|$checksum" >> "$tempDir/checksums.txt" + + # sort the file because it looks nicer and prevents ugly git diffs + sort "$tempDir/checksums.txt" > "$UGET_CHECKSUMS" + + rm -rf -- "$tempDir" + else + # start a new file + echo "$IDENTIFIER|$kvString|$checksum" > "$UGET_CHECKSUMS" + fi +} + +uget_begins_with() { + case $2 in + "$1"*) true ;; + *) false ;; + esac +} + +uget_trim_env_prefix() { + set -e + + echo "${1#ENV:}" +} + +uget_url_placeholder() { + set -e + + # trim potential "ENV:" prefix + local envName + envName="$(uget_trim_env_prefix "$1")" + + if [ "$envName" != "$1" ]; then + if ! printenv "$envName"; then + uget_error "Unexpected placeholder, environment variable $envName is not set." + return 1 + fi + else + # built-in, default placeholders + case "$1" in + GOARCH) go env GOARCH ;; + GOOS) go env GOOS ;; + UARCH) uname -m | uget_lowercase ;; + UOS) uname -s | uget_lowercase ;; + *) uget_error "Unexpected placeholder $1."; return 1 ;; + esac + fi +} + +# valueFromPair returns "foo" for "myvalue=foo;myothervalue=bar" when called with +# "myvalue" as the key. +uget_url_valueFromPair() { + set -e + + local kvString="$1" + local key="$2" + + # adding semicolons makes matching full keys easier + echo ";$kvString;" | sed -E "s/.*;$key=([^;]+).*/\\1/" +} + +uget_url_setKeyInPairs() { + set -e + + local kvString="$1" + local key="$2" + local value="$3" + + # first take the existing pairs and turn it into a multiline string; then + # awk out the existing pair for $key, + # then add a new pair and sort it all together, strip empty lines in case + # kvstring as empty, then join the multiple lines back into a single line + # and drop the trailing ';' + ( + echo "$kvString" | tr ';' "\n" | awk -F'=' -v "key=$key" '{ if ($1 != key) print }' + echo "$key=$value" + ) | sort | sed '/^[[:space:]]*$/d' | tr "\n" ';' | sed 's/;$//' +} + +uget_url_findPlaceholders() { + set -e + + # match all {...}, + # then sort and return only unique values (no need to replace the + # same placeholder multiple times) (this is important to allow for consistent + # matches when awk'ing through the checksum file), + # then remove braces and + # finally turn into a singleline string + echo "$1" | + grep -oE '\{(ENV:)?[A-Z0-9_]+\}' | + sort -u | + tr -d '{}' | + awk '{printf("%s ", $0)}' +} + +# replaceLive() use live system-data to replace placeholders in the given pattern. +# It returns a string of form "KVSTRING|URL". +uget_url_replaceLive() { + set -e + + local urlPattern="$1" + local usedPlaceholders="" + + for placeholder in $(uget_url_findPlaceholders "$urlPattern"); do + # version is treated specially + [ "$placeholder" = "VERSION" ] && continue + + local replacement + replacement="$(uget_url_placeholder "$placeholder")" + urlPattern="$(echo "$urlPattern" | sed "s|{$placeholder}|$replacement|g")" + + # remember this placeholder and its value + placeholder="$(uget_trim_env_prefix "$placeholder")" + usedPlaceholders="$usedPlaceholders;$placeholder=$replacement" + done + + # trim leading ";" + usedPlaceholders="$(echo "$usedPlaceholders" | sed 's/^;//')" + + echo "$usedPlaceholders|$urlPattern" +} + +# replaceWithArgs() does not ask the current system for the values when replacing +# a placeholder, but uses a given key-value pair string as the source. It also +# only returns the resulting string, since the used placeholders are known to +# the caller already. +uget_url_replaceWithArgs() { + set -e + + local urlPattern="$1" + local kvString="$2" + + for placeholder in $(uget_url_findPlaceholders "$urlPattern"); do + # version is treated specially + [ "$placeholder" = "VERSION" ] && continue + + placeholder="$(uget_trim_env_prefix "$placeholder")" + + local replacement + replacement="$(uget_url_valueFromPair "$kvString" "$placeholder")" + if [ -z "$replacement" ]; then + uget_error "Found no replacement string for placeholder $placeholder." + exit 1 + fi + + urlPattern="$(echo "$urlPattern" | sed "s|{$placeholder}|$replacement|g")" + done + + echo "$urlPattern" +} + +# returns "KVSTRING URL" +uget_url_build() { + set -e + + local kvString="${1:-}" + local pattern + + if [ -z "$kvString" ]; then + local result + result="$(uget_url_replaceLive "$URL_PATTERN")" + kvString="$(echo "$result" | cut -d'|' -f1)" + pattern="$(echo "$result" | cut -d'|' -f2)" + else + pattern="$(uget_url_replaceWithArgs "$URL_PATTERN" "$kvString")" + fi + + pattern="$(echo "$pattern" | sed "s|{VERSION}|$VERSION|g")" + + echo "$kvString|$pattern" +} + +# uget_http_download() uses either curl or wget to download the given URL into +# the current directory. +uget_http_download() { + set -e + + local url="$1" + + if command -v curl >/dev/null 2>&1; then + curl --fail -LO "$url" + elif command -v wget >/dev/null 2>&1; then + wget "$url" + else + uget_error "Neither curl nor wget are available." + return 1 + fi +} + +# uget_go_install creates a temporary Go module, adds the given URL as a +# dependency and then builds $BINARY. +uget_go_install() { + set -e + + local destinationDir="$1" + local kvString="$2" + local url="$3" + + # make sure GOARCH and GOOS will be set correctly + local os + local arch + os="$(uget_url_valueFromPair "$kvString" "GOOS")" + arch="$(uget_url_valueFromPair "$kvString" "GOARCH")" + + # since we crosscompile, we cannot do "GOBIN=(somewhere) go install url@version", + # because Go considers this to be dangerous behaviour: + # https://github.com/golang/go/issues/57485 + # Instead we create a dummy module and use the desired program as a dependency, + # *then* we're allowed to crosscompile it anywhere using "go build". Go figure. + + go mod init temp 2>/dev/null + + if [ -n "$GO_EXTRA_DEPS" ]; then + for dependency in $GO_EXTRA_DEPS; do + go get "$dependency" + done + fi + + go get "$url@$VERSION" + + local tmpFilename="__tmp.bin" + + # go build command is meant to be expanded + # shellcheck disable=SC2086 + GOFLAGS=-trimpath GOARCH="$arch" GOOS="$os" $UGET_GO_BUILD_CMD -o "$tmpFilename" "$url" + + mv "$tmpFilename" "$destinationDir/$BINARY" +} + +# uget_extract_archive extracts a downloaded archive and moves the one interesting +# file out of it. +uget_extract_archive() { + set -e + + local destinationDir="$1" + local archive="$2" + + if ! $UNCOMPRESSED; then + case "$archive" in + *.tar.gz | *.tgz) + tar xzf "$archive" + ;; + *.tar.bz2 | *.tbz2) + tar xjf "$archive" + ;; + *.tar.xz | *.txz) + tar xJf "$archive" + ;; + *.zip) + unzip "$archive" + ;; + *) + uget_error "Unknown file type: $archive" + return 1 + esac + fi + + # pattern is explicitly meant to be interpreted by the shell + # shellcheck disable=SC2086 + mv $BINARY_PATTERN "$destinationDir/$BINARY" + chmod +x "$destinationDir/$BINARY" +} + +# uget_download performs the actual download or reads a binary +# from the configured cache (if any), and finally places it +# in a given directory. +uget_download() { + set -e + + local destinationDir="$1" + local kvString="$2" + local url="$3" + + local startDir + startDir="$(pwd)" + + local tempDir + tempDir="$(uget_mktemp)" + + cd "$tempDir" + + if $GO_MODULE; then + uget_go_install "$destinationDir" "$kvString" "$url" + else + local urlHash + urlHash="$(uget_hash_string "$url")" + + cacheFile="$UGET_CACHE/$IDENTIFIER-$VERSION-$urlHash" + + if uget_cache_enabled && [ -f "$cacheFile" ]; then + if $UGET_CACHE_SYMLINK; then + ln -s "$cacheFile" "$destinationDir/$BINARY" + uget_log "Symlinked $BINARY from µget cache." + else + cp "$cacheFile" "$destinationDir/$BINARY" + uget_log "Copied $BINARY from µget cache." + fi + else + uget_http_download "$url" + + local archive + archive="$(ls)" + + uget_extract_archive "$destinationDir" "$archive" + + if uget_cache_enabled; then + cp "$destinationDir/$BINARY" "$cacheFile" + fi + fi + fi + + cd "$startDir" + rm -rf -- "$tempDir" +} + +# ready() checks if the desired binary already exists in the desired version. +uget_ready() { + local fullFinalPath="$ABS_UGET_DIRECTORY/$BINARY" + if ! [ -f "$fullFinalPath" ]; then + return 1 + fi + + # skip further checks if we're using versioned binaries + if $UGET_VERSIONED_BINARIES; then + return 0 + fi + + local versionFile="$fullFinalPath.version" + [ -f "$versionFile" ] && [ "$VERSION" = "$(cat "$versionFile")" ] +} + +# install() downloads the binary, checks the checksum and places it in UGET_DIRECTORY. +uget_install() { + set -e + + local kvString="$1" + local url="$2" + local fullFinalPath="$ABS_UGET_DIRECTORY/$BINARY" + local versionFile="$fullFinalPath.version" + + local startDir + startDir="$(pwd)" + + local tempDir + tempDir="$(uget_mktemp)" + + uget_log "Downloading $IDENTIFIER version $VERSION ..." + uget_download "$tempDir" "$kvString" "$url" + + local fullTempBinary="$tempDir/$BINARY" + uget_checksum_check "$kvString" "$fullTempBinary" + + # if everything is fine, place the binary in its final location + mv "$fullTempBinary" "$fullFinalPath" + + if ! $UGET_VERSIONED_BINARIES; then + echo "$VERSION" > "$versionFile" + fi + + uget_log "Installed at $UGET_DIRECTORY/$BINARY." + + cd "$startDir" + rm -rf -- "$tempDir" +} + +# update() downloads the binary, updates the checksums and discards the binary. +uget_update() { + set -e + + local kvString="$1" + local url="$2" + + local startDir + startDir="$(pwd)" + + local tempDir + tempDir="$(uget_mktemp)" + + uget_log " ~> $kvString" + uget_download "$tempDir" "$kvString" "$url" + + local fullBinaryPath="$tempDir/$BINARY" + + local checksum + checksum="$(uget_checksum_calculate "$fullBinaryPath")" + + uget_checksum_write "$kvString" "$checksum" + + cd "$startDir" + rm -rf -- "$tempDir" +} + +############################################################################### +# General Setup Logic + +# get CLI flags +export URL_PATTERN="$1" +export IDENTIFIER="$2" +export VERSION="$3" +BINARY_PATTERN="${4:-**/$IDENTIFIER}" + +export BINARY="$IDENTIFIER" +if $UGET_VERSIONED_BINARIES; then + BINARY="$IDENTIFIER-$VERSION" +fi + +# ensure target directory exists +mkdir -p "$UGET_DIRECTORY" "$UGET_TEMPDIR" + +ABS_UGET_DIRECTORY="$(realpath "$UGET_DIRECTORY")" +ABS_UGET_TEMPDIR="$(realpath "$UGET_TEMPDIR")" + +if uget_cache_enabled; then + mkdir -p "$UGET_CACHE" + UGET_CACHE="$(realpath "$UGET_CACHE")" +fi + +if $GO_MODULE && ! $UGET_GO_CHECKSUMS; then + UGET_CHECKSUMS="" +fi + +if uget_checksum_enabled; then + touch "$UGET_CHECKSUMS" + UGET_CHECKSUMS="$(realpath "$UGET_CHECKSUMS")" +else + if $GO_MODULE; then + if $UGET_UPDATE || $UGET_UPDATE_ONLY; then + uget_error "Checksums are disabled for Go modules, cannot update $IDENTIFIER checksums." + # This is not an error because in complex Makefiles, there might be 3 binaries required + # for one make target, and if one of them is a Go module and you have no direct way + # to just update a single binary, then running "UGET_UPDATE make complex-task" would + # fail at the Go module. It's simply more convenient to just warn and move on to the next + # binary. + fi + fi + + UGET_UPDATE=false + UGET_UPDATE_ONLY=false +fi + +############################################################################### +# Main application logic + +# When in update-only mode, we do not download the binary for the current system +# only, but instead for all known variants based on the checksums file, +# recalculate the checksums and then discard the temporary binaries. Otherwise +# after updating the checksums we continue with the regular install logic. + +if $UGET_UPDATE || $UGET_UPDATE_ONLY; then + uget_log "Updating checksums for $IDENTIFIER ..." + + # Find and process all known variants... + awk -F'|' -v "binary=$IDENTIFIER" '{ if ($1 == binary) print $2 }' "$UGET_CHECKSUMS" | while IFS= read -r kvString; do + result="$(uget_url_build "$kvString")" + url="$(echo "$result" | cut -d'|' -f2)" + + # download binary into tempdir, update checksums, but then delete it again + uget_update "$kvString" "$url" + done + + uget_log "All checksums were updated." +fi + +if ! $UGET_UPDATE_ONLY; then + if ! uget_ready; then + # Replace placeholders in the URL with system-specific data, like arch or OS + result="$(uget_url_build)" + kvString="$(echo "$result" | cut -d'|' -f1)" + url="$(echo "$result" | cut -d'|' -f2)" + + # Go modules usually do not have arch/os infos in their module names, but + # the resulting binary still depends on the local system. To support checksums + # for different machines, we always assume GOARCH and GOOS are "used placeholders". + if $GO_MODULE; then + kvString="$(uget_url_setKeyInPairs "$kvString" "GOARCH" "$(uget_url_placeholder GOARCH)")" + kvString="$(uget_url_setKeyInPairs "$kvString" "GOOS" "$(uget_url_placeholder GOOS)")" + fi + + uget_install "$kvString" "$url" + fi + + case "$UGET_PRINT_PATH" in + absolute) echo "$ABS_UGET_DIRECTORY/$BINARY" ;; + relative) echo "$UGET_DIRECTORY/$BINARY" ;; + esac +fi diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 250b7e3a..fb28ddde 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -26,13 +26,20 @@ SDK_DIR=sdk SDK_PKG="$MODULE" APIS_PKG="$MODULE/apis" +# install necessary tooling +APPLYCONFIGURATION_GEN="$(UGET_PRINT_PATH=relative make --no-print-directory install-applyconfiguration-gen)" +CLIENT_GEN="$(UGET_PRINT_PATH=relative make --no-print-directory install-client-gen)" +CONTROLLER_GEN="$(UGET_PRINT_PATH=relative make --no-print-directory install-controller-gen)" +KCP_CODEGEN="$(UGET_PRINT_PATH=relative make --no-print-directory install-kcp-codegen)" +RECONCILER_GEN="$(UGET_PRINT_PATH=relative make --no-print-directory install-reconciler-gen)" + set -x # generate reconciling helpers -_tools/reconciler-gen --config hack/reconciling.yaml > internal/reconciling/zz_generated_reconcile.go +"$RECONCILER_GEN" --config hack/reconciling.yaml > internal/reconciling/zz_generated_reconcile.go # generate CRDs -go run sigs.k8s.io/controller-tools/cmd/controller-gen \ +"$CONTROLLER_GEN" \ rbac:roleName=manager-role crd webhook object \ paths="./..." \ output:crd:artifacts:config=config/crd/bases @@ -40,13 +47,13 @@ go run sigs.k8s.io/controller-tools/cmd/controller-gen \ # generate SDK rm -rf -- $SDK_DIR/{applyconfiguration,clientset,informers,listers} -go run k8s.io/code-generator/cmd/applyconfiguration-gen \ +"$APPLYCONFIGURATION_GEN" \ --go-header-file "$BOILERPLATE_HEADER" \ --output-dir $SDK_DIR/applyconfiguration \ --output-pkg $SDK_PKG/applyconfiguration \ $APIS_PKG/operator/v1alpha1 -go run k8s.io/code-generator/cmd/client-gen \ +"$CLIENT_GEN" \ --input-base "" \ --input $APIS_PKG/operator/v1alpha1 \ --clientset-name versioned \ @@ -54,7 +61,7 @@ go run k8s.io/code-generator/cmd/client-gen \ --output-dir $SDK_DIR/clientset \ --output-pkg $SDK_PKG/clientset -go run github.com/kcp-dev/code-generator/v2 \ +"$KCP_CODEGEN" \ "client:headerFile=$BOILERPLATE_HEADER,apiPackagePath=$APIS_PKG,outputPackagePath=$SDK_PKG,singleClusterClientPackagePath=$SDK_PKG/clientset/versioned,singleClusterApplyConfigurationsPackagePath=$SDK_PKG/applyconfiguration" \ "informer:headerFile=$BOILERPLATE_HEADER,apiPackagePath=$APIS_PKG,outputPackagePath=$SDK_PKG,singleClusterClientPackagePath=$SDK_PKG/clientset/versioned" \ "lister:headerFile=$BOILERPLATE_HEADER,apiPackagePath=$APIS_PKG" \ diff --git a/hack/update-go-modules.sh b/hack/update-go-modules.sh index 0a719a2d..aadf7fa4 100755 --- a/hack/update-go-modules.sh +++ b/hack/update-go-modules.sh @@ -26,5 +26,5 @@ mapfile -t DIRS < <(find "${REPO_ROOT}" -name go.mod -print0 | xargs -0 dirname) for dir in "${DIRS[@]}"; do echo "Tidying ${dir}" - go mod tidy + (cd "$dir"; go mod tidy) done diff --git a/sdk/applyconfiguration/internal/internal.go b/sdk/applyconfiguration/internal/internal.go index 26513c05..26d50735 100644 --- a/sdk/applyconfiguration/internal/internal.go +++ b/sdk/applyconfiguration/internal/internal.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package internal diff --git a/sdk/applyconfiguration/operator/v1alpha1/auditspec.go b/sdk/applyconfiguration/operator/v1alpha1/auditspec.go index c990990a..c31b9009 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/auditspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/auditspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/auditwebhookspec.go b/sdk/applyconfiguration/operator/v1alpha1/auditwebhookspec.go index 0afde590..717c65fc 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/auditwebhookspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/auditwebhookspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/authorizationspec.go b/sdk/applyconfiguration/operator/v1alpha1/authorizationspec.go index 3dcd8a78..9ee0866b 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/authorizationspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/authorizationspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/authorizationwebhookspec.go b/sdk/applyconfiguration/operator/v1alpha1/authorizationwebhookspec.go index 8d9c4575..8f3e13eb 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/authorizationwebhookspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/authorizationwebhookspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/authspec.go b/sdk/applyconfiguration/operator/v1alpha1/authspec.go index 97561471..01b8f3d5 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/authspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/authspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/cacheconfig.go b/sdk/applyconfiguration/operator/v1alpha1/cacheconfig.go index 0ce468a0..fea53cc9 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/cacheconfig.go +++ b/sdk/applyconfiguration/operator/v1alpha1/cacheconfig.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/cacheserver.go b/sdk/applyconfiguration/operator/v1alpha1/cacheserver.go index 9c3cedde..1a6f59ba 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/cacheserver.go +++ b/sdk/applyconfiguration/operator/v1alpha1/cacheserver.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/cacheserverspec.go b/sdk/applyconfiguration/operator/v1alpha1/cacheserverspec.go index 7e5a3632..c151ef7f 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/cacheserverspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/cacheserverspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/certificatemetadatatemplate.go b/sdk/applyconfiguration/operator/v1alpha1/certificatemetadatatemplate.go index 1f3af425..c92472e6 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/certificatemetadatatemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/certificatemetadatatemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/certificateprivatekeytemplate.go b/sdk/applyconfiguration/operator/v1alpha1/certificateprivatekeytemplate.go index edf66346..cc58a84a 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/certificateprivatekeytemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/certificateprivatekeytemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/certificates.go b/sdk/applyconfiguration/operator/v1alpha1/certificates.go index 8983ba61..84ffcf9f 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/certificates.go +++ b/sdk/applyconfiguration/operator/v1alpha1/certificates.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/certificatesecrettemplate.go b/sdk/applyconfiguration/operator/v1alpha1/certificatesecrettemplate.go index 45fd8d0e..3af84b68 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/certificatesecrettemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/certificatesecrettemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/certificatespectemplate.go b/sdk/applyconfiguration/operator/v1alpha1/certificatespectemplate.go index 6da990b8..6ed28c15 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/certificatespectemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/certificatespectemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/certificatetemplate.go b/sdk/applyconfiguration/operator/v1alpha1/certificatetemplate.go index 132bae5e..b799f403 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/certificatetemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/certificatetemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/commonshardspec.go b/sdk/applyconfiguration/operator/v1alpha1/commonshardspec.go index cb3c5bc4..077d58fc 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/commonshardspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/commonshardspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/deploymentmetadatatemplate.go b/sdk/applyconfiguration/operator/v1alpha1/deploymentmetadatatemplate.go index 9f8accf3..7a932c04 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/deploymentmetadatatemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/deploymentmetadatatemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/deploymentspectemplate.go b/sdk/applyconfiguration/operator/v1alpha1/deploymentspectemplate.go index 93c6896e..2e3bbcd8 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/deploymentspectemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/deploymentspectemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/deploymenttemplate.go b/sdk/applyconfiguration/operator/v1alpha1/deploymenttemplate.go index ffeebe38..8d4044d5 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/deploymenttemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/deploymenttemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/embeddedcacheconfiguration.go b/sdk/applyconfiguration/operator/v1alpha1/embeddedcacheconfiguration.go index 858de1cd..72503de2 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/embeddedcacheconfiguration.go +++ b/sdk/applyconfiguration/operator/v1alpha1/embeddedcacheconfiguration.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/etcdconfig.go b/sdk/applyconfiguration/operator/v1alpha1/etcdconfig.go index 5eabfc9a..beb09270 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/etcdconfig.go +++ b/sdk/applyconfiguration/operator/v1alpha1/etcdconfig.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/etcdtlsconfig.go b/sdk/applyconfiguration/operator/v1alpha1/etcdtlsconfig.go index 0caf730b..a6115f50 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/etcdtlsconfig.go +++ b/sdk/applyconfiguration/operator/v1alpha1/etcdtlsconfig.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/externalconfig.go b/sdk/applyconfiguration/operator/v1alpha1/externalconfig.go index 022197cb..85c7908a 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/externalconfig.go +++ b/sdk/applyconfiguration/operator/v1alpha1/externalconfig.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/frontproxy.go b/sdk/applyconfiguration/operator/v1alpha1/frontproxy.go index 1fd95997..328be7b1 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/frontproxy.go +++ b/sdk/applyconfiguration/operator/v1alpha1/frontproxy.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/frontproxyspec.go b/sdk/applyconfiguration/operator/v1alpha1/frontproxyspec.go index eb9ccefd..471e3998 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/frontproxyspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/frontproxyspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/frontproxystatus.go b/sdk/applyconfiguration/operator/v1alpha1/frontproxystatus.go index de347137..55c002eb 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/frontproxystatus.go +++ b/sdk/applyconfiguration/operator/v1alpha1/frontproxystatus.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/imagespec.go b/sdk/applyconfiguration/operator/v1alpha1/imagespec.go index e47467e4..2a85afac 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/imagespec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/imagespec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/kubeconfig.go b/sdk/applyconfiguration/operator/v1alpha1/kubeconfig.go index 74b5d064..9222e5da 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/kubeconfig.go +++ b/sdk/applyconfiguration/operator/v1alpha1/kubeconfig.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/kubeconfigspec.go b/sdk/applyconfiguration/operator/v1alpha1/kubeconfigspec.go index 4830a5cb..07c0f24d 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/kubeconfigspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/kubeconfigspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/kubeconfigstatus.go b/sdk/applyconfiguration/operator/v1alpha1/kubeconfigstatus.go index 483c3f2e..70425932 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/kubeconfigstatus.go +++ b/sdk/applyconfiguration/operator/v1alpha1/kubeconfigstatus.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/kubeconfigtarget.go b/sdk/applyconfiguration/operator/v1alpha1/kubeconfigtarget.go index b3fdd728..ff5b8dcb 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/kubeconfigtarget.go +++ b/sdk/applyconfiguration/operator/v1alpha1/kubeconfigtarget.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/loggingspec.go b/sdk/applyconfiguration/operator/v1alpha1/loggingspec.go index df705340..3827d157 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/loggingspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/loggingspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/objectreference.go b/sdk/applyconfiguration/operator/v1alpha1/objectreference.go index 6dd462eb..d000cc45 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/objectreference.go +++ b/sdk/applyconfiguration/operator/v1alpha1/objectreference.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/oidccafileref.go b/sdk/applyconfiguration/operator/v1alpha1/oidccafileref.go index b05a8630..662a2c55 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/oidccafileref.go +++ b/sdk/applyconfiguration/operator/v1alpha1/oidccafileref.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/oidcconfiguration.go b/sdk/applyconfiguration/operator/v1alpha1/oidcconfiguration.go index 6fbfaee4..444388db 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/oidcconfiguration.go +++ b/sdk/applyconfiguration/operator/v1alpha1/oidcconfiguration.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/pathmappingentry.go b/sdk/applyconfiguration/operator/v1alpha1/pathmappingentry.go index f8cf32c4..42f3ce85 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/pathmappingentry.go +++ b/sdk/applyconfiguration/operator/v1alpha1/pathmappingentry.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/podmetadatatemplate.go b/sdk/applyconfiguration/operator/v1alpha1/podmetadatatemplate.go index fbbc82d9..6e804dbc 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/podmetadatatemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/podmetadatatemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/podspectemplate.go b/sdk/applyconfiguration/operator/v1alpha1/podspectemplate.go index 5865783c..0357954e 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/podspectemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/podspectemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/podtemplatespec.go b/sdk/applyconfiguration/operator/v1alpha1/podtemplatespec.go index 948c39ab..40997121 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/podtemplatespec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/podtemplatespec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/rootshard.go b/sdk/applyconfiguration/operator/v1alpha1/rootshard.go index 2f2c6c96..484b494d 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/rootshard.go +++ b/sdk/applyconfiguration/operator/v1alpha1/rootshard.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/rootshardconfig.go b/sdk/applyconfiguration/operator/v1alpha1/rootshardconfig.go index f02e2bd0..f4a1c384 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/rootshardconfig.go +++ b/sdk/applyconfiguration/operator/v1alpha1/rootshardconfig.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/rootshardproxyspec.go b/sdk/applyconfiguration/operator/v1alpha1/rootshardproxyspec.go index f4c3b3d2..ba34e672 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/rootshardproxyspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/rootshardproxyspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/rootshardspec.go b/sdk/applyconfiguration/operator/v1alpha1/rootshardspec.go index 27467c63..c28e7e05 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/rootshardspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/rootshardspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/rootshardstatus.go b/sdk/applyconfiguration/operator/v1alpha1/rootshardstatus.go index 50da544e..6e4bbf74 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/rootshardstatus.go +++ b/sdk/applyconfiguration/operator/v1alpha1/rootshardstatus.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/serviceaccountauthentication.go b/sdk/applyconfiguration/operator/v1alpha1/serviceaccountauthentication.go index 21988f70..6bdb80f6 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/serviceaccountauthentication.go +++ b/sdk/applyconfiguration/operator/v1alpha1/serviceaccountauthentication.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/servicemetadatatemplate.go b/sdk/applyconfiguration/operator/v1alpha1/servicemetadatatemplate.go index e75ed7ac..06fccc2d 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/servicemetadatatemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/servicemetadatatemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/servicespectemplate.go b/sdk/applyconfiguration/operator/v1alpha1/servicespectemplate.go index b86c1875..d9236896 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/servicespectemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/servicespectemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/servicetemplate.go b/sdk/applyconfiguration/operator/v1alpha1/servicetemplate.go index 9263d45d..56149ba1 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/servicetemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/servicetemplate.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/shard.go b/sdk/applyconfiguration/operator/v1alpha1/shard.go index cb3476e0..9a5ffa9f 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/shard.go +++ b/sdk/applyconfiguration/operator/v1alpha1/shard.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/shardreference.go b/sdk/applyconfiguration/operator/v1alpha1/shardreference.go index 29a2e596..7e022217 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/shardreference.go +++ b/sdk/applyconfiguration/operator/v1alpha1/shardreference.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/shardspec.go b/sdk/applyconfiguration/operator/v1alpha1/shardspec.go index c7dcd7d0..5b32a71b 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/shardspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/shardspec.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/shardstatus.go b/sdk/applyconfiguration/operator/v1alpha1/shardstatus.go index d4b1b356..9884033d 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/shardstatus.go +++ b/sdk/applyconfiguration/operator/v1alpha1/shardstatus.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/operator/v1alpha1/x509subject.go b/sdk/applyconfiguration/operator/v1alpha1/x509subject.go index 618a62d2..4e4380c8 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/x509subject.go +++ b/sdk/applyconfiguration/operator/v1alpha1/x509subject.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/applyconfiguration/utils.go b/sdk/applyconfiguration/utils.go index 8a984f51..c5c2be7c 100644 --- a/sdk/applyconfiguration/utils.go +++ b/sdk/applyconfiguration/utils.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by applyconfiguration-gen. DO NOT EDIT. +// Code generated by applyconfiguration-gen-v0.32. DO NOT EDIT. package applyconfiguration diff --git a/sdk/clientset/versioned/clientset.go b/sdk/clientset/versioned/clientset.go index 24bcfb2c..6396f3f6 100644 --- a/sdk/clientset/versioned/clientset.go +++ b/sdk/clientset/versioned/clientset.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package versioned diff --git a/sdk/clientset/versioned/fake/clientset_generated.go b/sdk/clientset/versioned/fake/clientset_generated.go index 5e051dda..d83913ba 100644 --- a/sdk/clientset/versioned/fake/clientset_generated.go +++ b/sdk/clientset/versioned/fake/clientset_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package fake diff --git a/sdk/clientset/versioned/fake/doc.go b/sdk/clientset/versioned/fake/doc.go index ecd5a883..bd3edc0b 100644 --- a/sdk/clientset/versioned/fake/doc.go +++ b/sdk/clientset/versioned/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. // This package has the automatically generated fake clientset. package fake diff --git a/sdk/clientset/versioned/fake/register.go b/sdk/clientset/versioned/fake/register.go index 21392a70..50c37fa1 100644 --- a/sdk/clientset/versioned/fake/register.go +++ b/sdk/clientset/versioned/fake/register.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package fake diff --git a/sdk/clientset/versioned/scheme/doc.go b/sdk/clientset/versioned/scheme/doc.go index f1bc5f34..623035ea 100644 --- a/sdk/clientset/versioned/scheme/doc.go +++ b/sdk/clientset/versioned/scheme/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. // This package contains the scheme of the automatically generated clientset. package scheme diff --git a/sdk/clientset/versioned/scheme/register.go b/sdk/clientset/versioned/scheme/register.go index 6e3f7bda..be798cd0 100644 --- a/sdk/clientset/versioned/scheme/register.go +++ b/sdk/clientset/versioned/scheme/register.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package scheme diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/cacheserver.go b/sdk/clientset/versioned/typed/operator/v1alpha1/cacheserver.go index cb0a79b6..04debfc8 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/cacheserver.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/cacheserver.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/doc.go b/sdk/clientset/versioned/typed/operator/v1alpha1/doc.go index ca785d2d..1780d7c8 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/doc.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. // This package has the automatically generated typed clients. package v1alpha1 diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/doc.go b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/doc.go index 7e5a909b..2188b6b4 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/doc.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. // Package fake has the automatically generated clients. package fake diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_cacheserver.go b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_cacheserver.go index a2916671..c8562b5f 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_cacheserver.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_cacheserver.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package fake diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_frontproxy.go b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_frontproxy.go index c7ebd599..f26b7268 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_frontproxy.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_frontproxy.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package fake diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_kubeconfig.go b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_kubeconfig.go index f3143eda..f3aa7633 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_kubeconfig.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_kubeconfig.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package fake diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go index 036e1ac0..961ca941 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package fake diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_rootshard.go b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_rootshard.go index a1bfbbaa..c338dbda 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_rootshard.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_rootshard.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package fake diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_shard.go b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_shard.go index 734f36ac..be93d93c 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_shard.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_shard.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package fake diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/frontproxy.go b/sdk/clientset/versioned/typed/operator/v1alpha1/frontproxy.go index f80aff1d..9ee433db 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/frontproxy.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/frontproxy.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go b/sdk/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go index be7dc8bf..c5462374 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/generated_expansion.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/kubeconfig.go b/sdk/clientset/versioned/typed/operator/v1alpha1/kubeconfig.go index 05377757..d9ff4fc5 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/kubeconfig.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/kubeconfig.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/operator_client.go b/sdk/clientset/versioned/typed/operator/v1alpha1/operator_client.go index a0fc13de..0ec3c170 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/operator_client.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/operator_client.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/rootshard.go b/sdk/clientset/versioned/typed/operator/v1alpha1/rootshard.go index ea0c4cfb..ac3f90c3 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/rootshard.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/rootshard.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package v1alpha1 diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/shard.go b/sdk/clientset/versioned/typed/operator/v1alpha1/shard.go index 9cc4f429..ad62024b 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/shard.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/shard.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by client-gen. DO NOT EDIT. +// Code generated by client-gen-v0.32. DO NOT EDIT. package v1alpha1