From 9c3bc1372773d847e7b5ea67874b46ff0e822dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Tu=C5=BCnik?= Date: Tue, 15 Dec 2020 10:49:37 +0100 Subject: [PATCH 1/2] Make arch-specific releases use separate images instead of tags on the same image This seems to be the current convention in k8s. --- cluster-autoscaler/Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cluster-autoscaler/Makefile b/cluster-autoscaler/Makefile index 84486055a893..3d2d7efcbe52 100644 --- a/cluster-autoscaler/Makefile +++ b/cluster-autoscaler/Makefile @@ -28,6 +28,9 @@ ifdef DOCKER_RM else RM_FLAG= endif +IMAGE=$(REGISTRY)/cluster-autoscaler$(PROVIDER) + +export DOCKER_CLI_EXPERIMENTAL := enabled build: build-arch-$(GOARCH) @@ -53,11 +56,11 @@ make-image: make-image-arch-$(GOARCH) make-image-arch-%: ifdef BASEIMAGE docker build --pull --build-arg BASEIMAGE=${BASEIMAGE} \ - -t ${REGISTRY}/cluster-autoscaler${PROVIDER}:${TAG}-$* \ + -t ${IMAGE}-$*:${TAG} \ -f Dockerfile.$* . else docker build --pull \ - -t ${REGISTRY}/cluster-autoscaler${PROVIDER}:${TAG}-$* \ + -t ${IMAGE}-$*:${TAG} \ -f Dockerfile.$* . endif @echo "Image ${TAG}${FOR_PROVIDER}-$* completed" @@ -65,12 +68,12 @@ endif push-image: push-image-arch-$(GOARCH) push-image-arch-%: - ./push_image.sh ${REGISTRY}/cluster-autoscaler${PROVIDER}:${TAG}-$* + ./push_image.sh ${IMAGE}-$*:${TAG} push-manifest: - DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create ${REGISTRY}/cluster-autoscaler${PROVIDER}:${TAG} \ - $(addprefix $(REGISTRY)/cluster-autoscaler$(PROVIDER):$(TAG)-, $(ALL_ARCH)) - DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push --purge ${REGISTRY}/cluster-autoscaler${PROVIDER}:${TAG} + docker manifest create ${IMAGE}:${TAG} \ + $(addprefix $(REGISTRY)/cluster-autoscaler$(PROVIDER)-, $(addsuffix :$(TAG), $(ALL_ARCH))) + docker manifest push --purge ${IMAGE}:${TAG} execute-release: $(addprefix make-image-arch-,$(ALL_ARCH)) $(addprefix push-image-arch-,$(ALL_ARCH)) push-manifest @echo "Release ${TAG}${FOR_PROVIDER} completed" From ed78aa7642479e7a044d4b9ba71b13f79fe10a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Tu=C5=BCnik?= Date: Fri, 1 Oct 2021 13:54:12 +0200 Subject: [PATCH 2/2] Cluster Autoscaler: add arch-specific build targets to .gitignore --- cluster-autoscaler/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cluster-autoscaler/.gitignore b/cluster-autoscaler/.gitignore index 7a3690aa6185..896a52fb3dc0 100644 --- a/cluster-autoscaler/.gitignore +++ b/cluster-autoscaler/.gitignore @@ -1,4 +1,6 @@ cluster-autoscaler +cluster-autoscaler-amd64 +cluster-autoscaler-arm64 cluster_autoscaler .cover