From 9980b5a253b1072d0e9e0d21862080de37aa918c Mon Sep 17 00:00:00 2001 From: jetstack-bot Date: Thu, 25 Jan 2024 00:38:14 +0000 Subject: [PATCH] BOT: run 'make upgrade-klone' and 'make generate' Signed-off-by: jetstack-bot --- klone.yaml | 22 +++++++++++----------- make/_shared/oci-image/01_mod.mk | 4 ++-- make/_shared/oci-image/image_tool/main.go | 2 +- make/_shared/tools/00_mod.mk | 8 ++++++++ 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/klone.yaml b/klone.yaml index 3f0cc4f6..0745a77b 100644 --- a/klone.yaml +++ b/klone.yaml @@ -10,55 +10,55 @@ targets: - folder_name: boilerplate repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 1539e50a1ea7d7c3f97ea37b3f9557971295acc1 + repo_hash: b71107c9c4b222a39a037eeeae017e2adbcfa591 repo_path: modules/boilerplate - folder_name: cert-manager repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 1539e50a1ea7d7c3f97ea37b3f9557971295acc1 + repo_hash: b71107c9c4b222a39a037eeeae017e2adbcfa591 repo_path: modules/cert-manager - folder_name: controller-gen repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 1539e50a1ea7d7c3f97ea37b3f9557971295acc1 + repo_hash: b71107c9c4b222a39a037eeeae017e2adbcfa591 repo_path: modules/controller-gen - folder_name: generate-verify repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 1539e50a1ea7d7c3f97ea37b3f9557971295acc1 + repo_hash: b71107c9c4b222a39a037eeeae017e2adbcfa591 repo_path: modules/generate-verify - folder_name: helm repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 1539e50a1ea7d7c3f97ea37b3f9557971295acc1 + repo_hash: b71107c9c4b222a39a037eeeae017e2adbcfa591 repo_path: modules/helm - folder_name: help repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 1539e50a1ea7d7c3f97ea37b3f9557971295acc1 + repo_hash: b71107c9c4b222a39a037eeeae017e2adbcfa591 repo_path: modules/help - folder_name: kind repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 1539e50a1ea7d7c3f97ea37b3f9557971295acc1 + repo_hash: b71107c9c4b222a39a037eeeae017e2adbcfa591 repo_path: modules/kind - folder_name: klone repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 1539e50a1ea7d7c3f97ea37b3f9557971295acc1 + repo_hash: b71107c9c4b222a39a037eeeae017e2adbcfa591 repo_path: modules/klone - folder_name: oci-image repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 1539e50a1ea7d7c3f97ea37b3f9557971295acc1 + repo_hash: b71107c9c4b222a39a037eeeae017e2adbcfa591 repo_path: modules/oci-image - folder_name: repository-base repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 1539e50a1ea7d7c3f97ea37b3f9557971295acc1 + repo_hash: b71107c9c4b222a39a037eeeae017e2adbcfa591 repo_path: modules/repository-base - folder_name: tools repo_url: https://github.com/cert-manager/makefile-modules.git repo_ref: main - repo_hash: 1539e50a1ea7d7c3f97ea37b3f9557971295acc1 + repo_hash: b71107c9c4b222a39a037eeeae017e2adbcfa591 repo_path: modules/tools diff --git a/make/_shared/oci-image/01_mod.mk b/make/_shared/oci-image/01_mod.mk index 0af914e5..9719feaf 100644 --- a/make/_shared/oci-image/01_mod.mk +++ b/make/_shared/oci-image/01_mod.mk @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -oci_platforms := linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le +oci_platforms ?= linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details @@ -117,7 +117,7 @@ $(oci_build_targets): oci-build-%: | $(NEEDS_KO) $(NEEDS_GO) $(NEEDS_YQ) $(bin_d GOWORK=off \ KO_DOCKER_REPO=$(oci_$*_image_name_development) \ - KOCACHE=$(bin_dir)/scratch/image/ko_cache \ + KOCACHE=$(CURDIR)/$(bin_dir)/scratch/image/ko_cache \ KO_CONFIG_PATH=$(CURDIR)/$(oci_layout_path).ko_config.yaml \ SOURCE_DATE_EPOCH=$(GITEPOCH) \ KO_GO_PATH=$(GO) \ diff --git a/make/_shared/oci-image/image_tool/main.go b/make/_shared/oci-image/image_tool/main.go index ce1f6766..b2a41836 100644 --- a/make/_shared/oci-image/image_tool/main.go +++ b/make/_shared/oci-image/image_tool/main.go @@ -107,7 +107,7 @@ func convertToDockerTar(path string, output string, imageName string) error { return nil, err } - if config.Platform().OS == runtime.GOOS && config.Platform().Architecture == runtime.GOARCH { + if config.Platform().Architecture == runtime.GOARCH { matchingImages = append(matchingImages, obj) } case oci.SignedImageIndex: diff --git a/make/_shared/tools/00_mod.mk b/make/_shared/tools/00_mod.mk index d7c6a7a1..7ff3c9d5 100644 --- a/make/_shared/tools/00_mod.mk +++ b/make/_shared/tools/00_mod.mk @@ -109,6 +109,10 @@ KUBEBUILDER_ASSETS_VERSION=1.28.3 TOOLS += etcd=$(KUBEBUILDER_ASSETS_VERSION) TOOLS += kube-apiserver=$(KUBEBUILDER_ASSETS_VERSION) +# Additional tools can be defined to reuse the tooling in this file +ADDITIONAL_TOOLS ?= +TOOLS += $(ADDITIONAL_TOOLS) + # https://go.dev/dl/ VENDORED_GO_VERSION := 1.21.6 @@ -280,6 +284,10 @@ GO_DEPENDENCIES += defaulter-gen=k8s.io/code-generator/cmd/defaulter-gen GO_DEPENDENCIES += conversion-gen=k8s.io/code-generator/cmd/conversion-gen GO_DEPENDENCIES += helm-tool=github.com/cert-manager/helm-tool +# Additional Go dependencies can be defined to re-use the tooling in this file +ADDITIONAL_GO_DEPENDENCIES ?= +GO_DEPENDENCIES += $(ADDITIONAL_GO_DEPENDENCIES) + define go_dependency $$(bin_dir)/downloaded/tools/$1@$($(call UC,$1)_VERSION)_%: | $$(NEEDS_GO) $$(bin_dir)/downloaded/tools GOWORK=off GOBIN=$$(CURDIR)/$$(dir $$@) $$(GO) install $2@$($(call UC,$1)_VERSION)