From 5829fc8b54c24c87ade03f6447417c334eb9c890 Mon Sep 17 00:00:00 2001 From: heidongxianhua <18207133434@163.com> Date: Wed, 6 Mar 2024 19:36:14 +0800 Subject: [PATCH 01/11] Update Makefile Signed-off-by: heidongxianhua <18207133434@163.com> --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index c466cc87ba73..cab4476b589b 100644 --- a/Makefile +++ b/Makefile @@ -246,6 +246,7 @@ argoexec-image: --build-arg GIT_COMMIT=$(GIT_COMMIT) \ --build-arg GIT_TAG=$(GIT_TAG) \ --build-arg GIT_TREE_STATE=$(GIT_TREE_STATE) \ + --platform linux/amd64,linux/arm64 \ -t $(IMAGE_NAMESPACE)/$*:$(VERSION) \ --target $* \ --load \ From 0fe0ca2b65ffebc6bd79dbc7f4b0b014bc192862 Mon Sep 17 00:00:00 2001 From: heidongxianhua <18207133434@163.com> Date: Thu, 7 Mar 2024 10:36:57 +0800 Subject: [PATCH 02/11] Update Makefile Signed-off-by: heidongxianhua <18207133434@163.com> --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index cab4476b589b..b7adf0c6655e 100644 --- a/Makefile +++ b/Makefile @@ -243,6 +243,7 @@ argoexec-image: %-image: [ ! -e dist/$* ] || mv dist/$* . docker buildx build \ + --platform linux/amd64,linux/arm64 \ --build-arg GIT_COMMIT=$(GIT_COMMIT) \ --build-arg GIT_TAG=$(GIT_TAG) \ --build-arg GIT_TREE_STATE=$(GIT_TREE_STATE) \ From 0479515389dfed04c9383495d6ee86f2f987c5a2 Mon Sep 17 00:00:00 2001 From: heidongxianhua <18207133434@163.com> Date: Thu, 7 Mar 2024 10:38:53 +0800 Subject: [PATCH 03/11] Update Makefile Signed-off-by: heidongxianhua <18207133434@163.com> --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index b7adf0c6655e..2d3b6ff71942 100644 --- a/Makefile +++ b/Makefile @@ -247,7 +247,6 @@ argoexec-image: --build-arg GIT_COMMIT=$(GIT_COMMIT) \ --build-arg GIT_TAG=$(GIT_TAG) \ --build-arg GIT_TREE_STATE=$(GIT_TREE_STATE) \ - --platform linux/amd64,linux/arm64 \ -t $(IMAGE_NAMESPACE)/$*:$(VERSION) \ --target $* \ --load \ From c30c7c0a7c4905ed2af519dfa38c250784e76be1 Mon Sep 17 00:00:00 2001 From: heidongxianhua <18207133434@163.com> Date: Fri, 8 Mar 2024 10:51:08 +0800 Subject: [PATCH 04/11] Update Makefile Signed-off-by: heidongxianhua <18207133434@163.com> --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 2d3b6ff71942..c4a5576dd29d 100644 --- a/Makefile +++ b/Makefile @@ -97,6 +97,7 @@ endif ALWAYS_OFFLOAD_NODE_STATUS := false POD_STATUS_CAPTURE_FINALIZER ?= true +TARGETPLATFORM := linux/amd64 $(info GIT_COMMIT=$(GIT_COMMIT) GIT_BRANCH=$(GIT_BRANCH) GIT_TAG=$(GIT_TAG) GIT_TREE_STATE=$(GIT_TREE_STATE) RELEASE_TAG=$(RELEASE_TAG) DEV_BRANCH=$(DEV_BRANCH) VERSION=$(VERSION)) $(info KUBECTX=$(KUBECTX) DOCKER_DESKTOP=$(DOCKER_DESKTOP) K3D=$(K3D) DOCKER_PUSH=$(DOCKER_PUSH)) @@ -243,6 +244,7 @@ argoexec-image: %-image: [ ! -e dist/$* ] || mv dist/$* . docker buildx build \ + --platform $(TARGETPLATFORM) \ --platform linux/amd64,linux/arm64 \ --build-arg GIT_COMMIT=$(GIT_COMMIT) \ --build-arg GIT_TAG=$(GIT_TAG) \ From 8307cf4a145042edd28118fdce21a636c51b847e Mon Sep 17 00:00:00 2001 From: heidongxianhua <18207133434@163.com> Date: Fri, 8 Mar 2024 10:51:27 +0800 Subject: [PATCH 05/11] Update Makefile Signed-off-by: heidongxianhua <18207133434@163.com> --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index c4a5576dd29d..b49a521dbffa 100644 --- a/Makefile +++ b/Makefile @@ -245,7 +245,6 @@ argoexec-image: [ ! -e dist/$* ] || mv dist/$* . docker buildx build \ --platform $(TARGETPLATFORM) \ - --platform linux/amd64,linux/arm64 \ --build-arg GIT_COMMIT=$(GIT_COMMIT) \ --build-arg GIT_TAG=$(GIT_TAG) \ --build-arg GIT_TREE_STATE=$(GIT_TREE_STATE) \ From e0c5a27aa0fccabea05c6b733e40142dc9d5dd8f Mon Sep 17 00:00:00 2001 From: heidongxianhua <18207133434@163.com> Date: Tue, 2 Apr 2024 20:25:30 +0800 Subject: [PATCH 06/11] Update Makefile Signed-off-by: heidongxianhua <18207133434@163.com> --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b49a521dbffa..fe12e83a8f74 100644 --- a/Makefile +++ b/Makefile @@ -97,8 +97,9 @@ endif ALWAYS_OFFLOAD_NODE_STATUS := false POD_STATUS_CAPTURE_FINALIZER ?= true -TARGETPLATFORM := linux/amd64 +TARGETPLATFORM := $(shell [ `uname -m` = arm64 ] && echo linux/arm64 || echo linux/amd64) +$(info TARGETPLATFORM=$(TARGETPLATFORM)) $(info GIT_COMMIT=$(GIT_COMMIT) GIT_BRANCH=$(GIT_BRANCH) GIT_TAG=$(GIT_TAG) GIT_TREE_STATE=$(GIT_TREE_STATE) RELEASE_TAG=$(RELEASE_TAG) DEV_BRANCH=$(DEV_BRANCH) VERSION=$(VERSION)) $(info KUBECTX=$(KUBECTX) DOCKER_DESKTOP=$(DOCKER_DESKTOP) K3D=$(K3D) DOCKER_PUSH=$(DOCKER_PUSH)) $(info RUN_MODE=$(RUN_MODE) PROFILE=$(PROFILE) AUTH_MODE=$(AUTH_MODE) SECURE=$(SECURE) STATIC_FILES=$(STATIC_FILES) ALWAYS_OFFLOAD_NODE_STATUS=$(ALWAYS_OFFLOAD_NODE_STATUS) UPPERIO_DB_DEBUG=$(UPPERIO_DB_DEBUG) LOG_LEVEL=$(LOG_LEVEL) NAMESPACED=$(NAMESPACED)) From df1ee9dc927b2e79c9f0d83d00b41f97b56ca636 Mon Sep 17 00:00:00 2001 From: heidongxianhua <18207133434@163.com> Date: Tue, 2 Apr 2024 20:27:30 +0800 Subject: [PATCH 07/11] Update Makefile Signed-off-by: heidongxianhua <18207133434@163.com> --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fe12e83a8f74..8c4e4d58d93a 100644 --- a/Makefile +++ b/Makefile @@ -97,9 +97,9 @@ endif ALWAYS_OFFLOAD_NODE_STATUS := false POD_STATUS_CAPTURE_FINALIZER ?= true -TARGETPLATFORM := $(shell [ `uname -m` = arm64 ] && echo linux/arm64 || echo linux/amd64) +TARGET_PLATFORM := $(shell [ `uname -m` = arm64 ] && echo linux/arm64 || echo linux/amd64) -$(info TARGETPLATFORM=$(TARGETPLATFORM)) +$(info TARGET_PLATFORM=$(TARGET_PLATFORM)) $(info GIT_COMMIT=$(GIT_COMMIT) GIT_BRANCH=$(GIT_BRANCH) GIT_TAG=$(GIT_TAG) GIT_TREE_STATE=$(GIT_TREE_STATE) RELEASE_TAG=$(RELEASE_TAG) DEV_BRANCH=$(DEV_BRANCH) VERSION=$(VERSION)) $(info KUBECTX=$(KUBECTX) DOCKER_DESKTOP=$(DOCKER_DESKTOP) K3D=$(K3D) DOCKER_PUSH=$(DOCKER_PUSH)) $(info RUN_MODE=$(RUN_MODE) PROFILE=$(PROFILE) AUTH_MODE=$(AUTH_MODE) SECURE=$(SECURE) STATIC_FILES=$(STATIC_FILES) ALWAYS_OFFLOAD_NODE_STATUS=$(ALWAYS_OFFLOAD_NODE_STATUS) UPPERIO_DB_DEBUG=$(UPPERIO_DB_DEBUG) LOG_LEVEL=$(LOG_LEVEL) NAMESPACED=$(NAMESPACED)) @@ -245,7 +245,7 @@ argoexec-image: %-image: [ ! -e dist/$* ] || mv dist/$* . docker buildx build \ - --platform $(TARGETPLATFORM) \ + --platform $(TARGET_PLATFORM) \ --build-arg GIT_COMMIT=$(GIT_COMMIT) \ --build-arg GIT_TAG=$(GIT_TAG) \ --build-arg GIT_TREE_STATE=$(GIT_TREE_STATE) \ From 31629271d2a19b289e312c91b9c5cb793a05bc77 Mon Sep 17 00:00:00 2001 From: heidongxianhua <18207133434@163.com> Date: Tue, 2 Apr 2024 20:40:15 +0800 Subject: [PATCH 08/11] Update running-locally.md Signed-off-by: heidongxianhua <18207133434@163.com> --- docs/running-locally.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/running-locally.md b/docs/running-locally.md index 5019f12eaa83..a95e05d924ab 100644 --- a/docs/running-locally.md +++ b/docs/running-locally.md @@ -101,6 +101,17 @@ If you made changes to the executor, you need to build the image: make argoexec-image ``` +Or you can use parameters to compile images that support specific platforms or multiple platforms with `TARGET_PLATFORM`: + +```bash +# only support arm64 +make argoexec-image TARGET_PLATFORM=linux/arm64 +# only support amd64 +make argoexec-image TARGET_PLATFORM=linux/amd64 +# support arm64 and amd64 +make argoexec-image TARGET_PLATFORM=linux/arm64,linux/amd64 +``` + To also start the API on : ```bash From 2049def87f0b90f7a0dfb1e8c96e2ab2e6d70331 Mon Sep 17 00:00:00 2001 From: heidongxianhua <18207133434@163.com> Date: Sun, 7 Apr 2024 14:41:29 +0800 Subject: [PATCH 09/11] Update Makefile Signed-off-by: heidongxianhua <18207133434@163.com> --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8c4e4d58d93a..ab615ed9dd7d 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ SRC := $(GOPATH)/src/github.com/argoproj/argo-workflows # docker image publishing options IMAGE_NAMESPACE ?= quay.io/argoproj DEV_IMAGE ?= $(shell [ `uname -s` = Darwin ] && echo true || echo false) +TARGET_PLATFORM := $(shell [ `uname -m` = arm64 ] && echo linux/arm64 || echo linux/amd64) # declares which cluster to import to in case it's not the default name K3D_CLUSTER_NAME ?= k3s-default @@ -97,11 +98,9 @@ endif ALWAYS_OFFLOAD_NODE_STATUS := false POD_STATUS_CAPTURE_FINALIZER ?= true -TARGET_PLATFORM := $(shell [ `uname -m` = arm64 ] && echo linux/arm64 || echo linux/amd64) -$(info TARGET_PLATFORM=$(TARGET_PLATFORM)) $(info GIT_COMMIT=$(GIT_COMMIT) GIT_BRANCH=$(GIT_BRANCH) GIT_TAG=$(GIT_TAG) GIT_TREE_STATE=$(GIT_TREE_STATE) RELEASE_TAG=$(RELEASE_TAG) DEV_BRANCH=$(DEV_BRANCH) VERSION=$(VERSION)) -$(info KUBECTX=$(KUBECTX) DOCKER_DESKTOP=$(DOCKER_DESKTOP) K3D=$(K3D) DOCKER_PUSH=$(DOCKER_PUSH)) +$(info KUBECTX=$(KUBECTX) DOCKER_DESKTOP=$(DOCKER_DESKTOP) K3D=$(K3D) DOCKER_PUSH=$(DOCKER_PUSH) TARGET_PLATFORM=$(TARGET_PLATFORM)) $(info RUN_MODE=$(RUN_MODE) PROFILE=$(PROFILE) AUTH_MODE=$(AUTH_MODE) SECURE=$(SECURE) STATIC_FILES=$(STATIC_FILES) ALWAYS_OFFLOAD_NODE_STATUS=$(ALWAYS_OFFLOAD_NODE_STATUS) UPPERIO_DB_DEBUG=$(UPPERIO_DB_DEBUG) LOG_LEVEL=$(LOG_LEVEL) NAMESPACED=$(NAMESPACED)) override LDFLAGS += \ From d8a89bf7cec2abf80ad9668ec4c3c76f564c47db Mon Sep 17 00:00:00 2001 From: heidongxianhua <18207133434@163.com> Date: Sun, 7 Apr 2024 14:43:06 +0800 Subject: [PATCH 10/11] Update running-locally.md Signed-off-by: heidongxianhua <18207133434@163.com> --- docs/running-locally.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/running-locally.md b/docs/running-locally.md index a95e05d924ab..02f1313502cc 100644 --- a/docs/running-locally.md +++ b/docs/running-locally.md @@ -104,11 +104,7 @@ make argoexec-image Or you can use parameters to compile images that support specific platforms or multiple platforms with `TARGET_PLATFORM`: ```bash -# only support arm64 -make argoexec-image TARGET_PLATFORM=linux/arm64 -# only support amd64 -make argoexec-image TARGET_PLATFORM=linux/amd64 -# support arm64 and amd64 +# compile for both arm64 and amd64 make argoexec-image TARGET_PLATFORM=linux/arm64,linux/amd64 ``` From c39fd55b6de0ea5af6291bc1f1cda19f6cc4db02 Mon Sep 17 00:00:00 2001 From: heidongxianhua <18207133434@163.com> Date: Sun, 7 Apr 2024 14:44:16 +0800 Subject: [PATCH 11/11] Update running-locally.md Signed-off-by: heidongxianhua <18207133434@163.com> --- docs/running-locally.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/running-locally.md b/docs/running-locally.md index 02f1313502cc..ee876b7b2078 100644 --- a/docs/running-locally.md +++ b/docs/running-locally.md @@ -101,7 +101,7 @@ If you made changes to the executor, you need to build the image: make argoexec-image ``` -Or you can use parameters to compile images that support specific platforms or multiple platforms with `TARGET_PLATFORM`: +You can use the `TARGET_PLATFORM` environment variable to compile images for specific platforms: ```bash # compile for both arm64 and amd64