-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re-introduce vendor to satisfy reproducible builds requirement (#3518)
Signed-off-by: Zbynek Roubalik <[email protected]>
- Loading branch information
Showing
11,016 changed files
with
3,529,982 additions
and
515 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ GO_LDFLAGS="-X=github.com/kedacore/keda/v2/version.GitCommit=$(GIT_COMMIT) -X=gi | |
COSIGN_FLAGS ?= -a GIT_HASH=${GIT_COMMIT} -a GIT_VERSION=${VERSION} -a BUILD_DATE=${DATE} | ||
|
||
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. | ||
ENVTEST_K8S_VERSION = 1.23 | ||
ENVTEST_K8S_VERSION = 1.24 | ||
|
||
# Setting SHELL to bash allows bash commands to be executed by recipes. | ||
# This is a requirement for 'setup-envtest.sh' in the test target. | ||
|
@@ -124,8 +124,7 @@ generate: controller-gen mockgen-gen ## Generate code containing DeepCopy, DeepC | |
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." | ||
|
||
adapter/generated/openapi/zz_generated.openapi.go: go.mod go.sum ## Generate OpenAPI for KEDA Metrics Adapter. | ||
@OPENAPI_PATH=`go list -mod=readonly -m -f '{{.Dir}}' k8s.io/kube-openapi`; \ | ||
go run $${OPENAPI_PATH}/cmd/openapi-gen/openapi-gen.go --logtostderr \ | ||
go run vendor/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go --logtostderr \ | ||
-i k8s.io/metrics/pkg/apis/custom_metrics,k8s.io/metrics/pkg/apis/custom_metrics/v1beta1,k8s.io/metrics/pkg/apis/custom_metrics/v1beta2,k8s.io/metrics/pkg/apis/external_metrics,k8s.io/metrics/pkg/apis/external_metrics/v1beta1,k8s.io/metrics/pkg/apis/metrics,k8s.io/metrics/pkg/apis/metrics/v1beta1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/api/resource,k8s.io/apimachinery/pkg/version,k8s.io/api/core/v1 \ | ||
--build-tag autogenerated \ | ||
-h ./hack/boilerplate.go.txt \ | ||
|
@@ -144,14 +143,10 @@ golangci: ## Run golangci against code. | |
golangci-lint run | ||
|
||
clientset-verify: ## Verify that generated client-go clientset, listers and informers are up to date. | ||
go mod vendor | ||
./hack/verify-codegen.sh | ||
rm -rf vendor | ||
|
||
clientset-generate: ## Generate client-go clientset, listers and informers. | ||
go mod vendor | ||
./hack/update-codegen.sh | ||
rm -rf vendor | ||
|
||
# Generate Liiklus proto | ||
pkg/scalers/liiklus/LiiklusService.pb.go: protoc-gen-go | ||
|
@@ -172,10 +167,10 @@ pkg/mock/mock_scaling/mock_interface.go: pkg/scaling/scale_handler.go | |
$(MOCKGEN) -destination=$@ -package=mock_scaling -source=$^ | ||
pkg/mock/mock_scaler/mock_scaler.go: pkg/scalers/scaler.go | ||
$(MOCKGEN) -destination=$@ -package=mock_scalers -source=$^ | ||
pkg/mock/mock_scale/mock_interfaces.go: $(shell go list -mod=readonly -f '{{ .Dir }}' -m k8s.io/client-go)/scale/interfaces.go | ||
$(MOCKGEN) -destination=$@ -package=mock_scale -source=$^ | ||
pkg/mock/mock_client/mock_interfaces.go: $(shell go list -mod=readonly -f '{{ .Dir }}' -m sigs.k8s.io/controller-runtime)/pkg/client/interfaces.go | ||
$(MOCKGEN) -destination=$@ -package=mock_client -source=$^ | ||
pkg/mock/mock_scale/mock_interfaces.go: vendor/k8s.io/client-go/scale/interfaces.go | ||
$(MOCKGEN) k8s.io/client-go/scale ScalesGetter,ScaleInterface > $@ | ||
pkg/mock/mock_client/mock_interfaces.go: vendor/sigs.k8s.io/controller-runtime/pkg/client/interfaces.go | ||
$(MOCKGEN) sigs.k8s.io/controller-runtime/pkg/client Patch,Reader,Writer,StatusClient,StatusWriter,Client,WithWatch,FieldIndexer > $@ | ||
pkg/scalers/liiklus/mocks/mock_liiklus.go: | ||
$(MOCKGEN) -destination=$@ github.com/kedacore/keda/v2/pkg/scalers/liiklus LiiklusServiceClient | ||
|
||
|
@@ -188,10 +183,10 @@ pkg/scalers/liiklus/mocks/mock_liiklus.go: | |
build: generate fmt vet manager adapter ## Build Operator (manager) and Metrics Server (adapter) binaries. | ||
|
||
manager: generate | ||
${GO_BUILD_VARS} go build -ldflags $(GO_LDFLAGS) -o bin/keda main.go | ||
${GO_BUILD_VARS} go build -ldflags $(GO_LDFLAGS) -mod=vendor -o bin/keda main.go | ||
|
||
adapter: generate adapter/generated/openapi/zz_generated.openapi.go | ||
${GO_BUILD_VARS} go build -ldflags $(GO_LDFLAGS) -o bin/keda-adapter adapter/main.go | ||
${GO_BUILD_VARS} go build -ldflags $(GO_LDFLAGS) -mod=vendor -o bin/keda-adapter adapter/main.go | ||
|
||
run: manifests generate ## Run a controller from your host. | ||
WATCH_NAMESPACE="" go run -ldflags $(GO_LDFLAGS) ./main.go $(ARGS) | ||
|
@@ -267,36 +262,37 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in | |
undeploy: e2e-test-clean-crds ## Undeploy controller from the K8s cluster specified in ~/.kube/config. | ||
$(KUSTOMIZE) build config/default | kubectl delete -f - | ||
|
||
## Location to install dependencies to | ||
LOCALBIN ?= $(shell pwd)/bin | ||
$(LOCALBIN): | ||
mkdir -p $(LOCALBIN) | ||
|
||
## Tool Binaries | ||
KUSTOMIZE ?= $(LOCALBIN)/kustomize | ||
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen | ||
ENVTEST ?= $(LOCALBIN)/setup-envtest | ||
MOCKGEN ?= $(LOCALBIN)/mockgen | ||
|
||
.PHONY: controller-gen | ||
controller-gen: $(CONTROLLER_GEN) ## Install controller-gen from vendor dir if necessary. | ||
$(CONTROLLER_GEN): $(LOCALBIN) | ||
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen | ||
|
||
.PHONY: kustomize | ||
kustomize: $(KUSTOMIZE) ## Install kustomize from vendor dir if necessary. | ||
$(KUSTOMIZE): $(LOCALBIN) | ||
test -s $(LOCALBIN)/kustomize || GOBIN=$(LOCALBIN) go install sigs.k8s.io/kustomize/kustomize/v4 | ||
|
||
.PHONY: envtest | ||
envtest: $(ENVTEST) ## Install envtest-setup from vendor dir if necessary. | ||
$(ENVTEST): $(LOCALBIN) | ||
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest | ||
|
||
.PHONY: mockgen | ||
mockgen: $(MOCKGEN) ## Install mockgen from vendor dir if necessary. | ||
$(MOCKGEN): $(LOCALBIN) | ||
test -s $(LOCALBIN)/mockgen || GOBIN=$(LOCALBIN) go install github.com/golang/mock/mockgen | ||
|
||
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen | ||
controller-gen: ## Download controller-gen locally if necessary. | ||
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/[email protected]) | ||
|
||
KUSTOMIZE = $(shell pwd)/bin/kustomize | ||
kustomize: ## Download kustomize locally if necessary. | ||
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected]) | ||
|
||
ENVTEST = $(shell pwd)/bin/setup-envtest | ||
envtest: ## Download envtest-setup locally if necessary. | ||
$(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest) | ||
|
||
MOCKGEN = $(shell pwd)/bin/mockgen | ||
mockgen: ## Download mockgen locally if necessary. | ||
$(call go-get-tool,$(MOCKGEN),github.com/golang/mock/[email protected]) | ||
|
||
# go-get-tool will 'go get' any package $2 and install it to $1. | ||
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) | ||
define go-get-tool | ||
@[ -f $(1) ] || { \ | ||
set -e ;\ | ||
TMP_DIR=$$(mktemp -d) ;\ | ||
cd $$TMP_DIR ;\ | ||
go mod init tmp ;\ | ||
echo "Downloading $(2)" ;\ | ||
GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\ | ||
rm -rf $$TMP_DIR ;\ | ||
} | ||
endef | ||
|
||
################################################## | ||
# General # | ||
|
Oops, something went wrong.