@@ -221,7 +221,7 @@ CAPI_KIND_CLUSTER_NAME ?= capi-test
221
221
222
222
TAG ?= dev
223
223
ARCH ?= $(shell go env GOARCH)
224
- ALL_ARCH = amd64 arm arm64 ppc64le s390x
224
+ ALL_ARCH ? = amd64 arm arm64 ppc64le s390x
225
225
226
226
# Allow overriding the imagePullPolicy
227
227
PULL_POLICY ?= Always
@@ -694,7 +694,8 @@ docker-build-all: $(addprefix docker-build-,$(ALL_ARCH)) ## Build docker images
694
694
docker-build-% :
695
695
$(MAKE ) ARCH=$* docker-build
696
696
697
- ALL_DOCKER_BUILD = core kubeadm-bootstrap kubeadm-control-plane docker-infrastructure in-memory-infrastructure test-extension clusterctl
697
+ # Choice of images to build/push
698
+ ALL_DOCKER_BUILD ?= core kubeadm-bootstrap kubeadm-control-plane docker-infrastructure in-memory-infrastructure test-extension clusterctl
698
699
699
700
.PHONY : docker-build
700
701
docker-build : docker-pull-prerequisites # # Run docker-build-* targets for all the images
@@ -1041,26 +1042,17 @@ promote-images: $(KPROMO)
1041
1042
1042
1043
.PHONY : docker-push-all
1043
1044
docker-push-all : $(addprefix docker-push-,$(ALL_ARCH ) ) # # Push the docker images to be included in the release for all architectures + related multiarch manifests
1044
- $(MAKE ) docker-push-manifest-core
1045
- $(MAKE ) docker-push-manifest-kubeadm-bootstrap
1046
- $(MAKE ) docker-push-manifest-kubeadm-control-plane
1047
- $(MAKE ) docker-push-manifest-docker-infrastructure
1048
- $(MAKE ) docker-push-manifest-in-memory-infrastructure
1049
- $(MAKE ) docker-push-manifest-test-extension
1050
- $(MAKE ) docker-push-clusterctl
1045
+ $(MAKE ) ALL_ARCH=" $( ALL_ARCH) " $(addprefix docker-push-manifest-,$(ALL_DOCKER_BUILD ) )
1051
1046
1052
1047
docker-push-% :
1053
1048
$(MAKE ) ARCH=$* docker-push
1054
1049
1055
1050
.PHONY : docker-push
1056
- docker-push : # # Push the docker images to be included in the release
1051
+ docker-push : $(addprefix docker-push-,$(ALL_DOCKER_BUILD ) ) # # Push the docker images to be included in the release
1052
+
1053
+ .PHONY : docker-push-core
1054
+ docker-push-core : # # Push the core docker image
1057
1055
docker push $(CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1058
- docker push $(KUBEADM_BOOTSTRAP_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1059
- docker push $(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1060
- docker push $(CLUSTERCTL_IMG ) -$(ARCH ) :$(TAG )
1061
- docker push $(CAPD_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1062
- docker push $(CAPIM_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1063
- docker push $(TEST_EXTENSION_IMG ) -$(ARCH ) :$(TAG )
1064
1056
1065
1057
.PHONY : docker-push-manifest-core
1066
1058
docker-push-manifest-core : # # Push the multiarch manifest for the core docker images
@@ -1070,6 +1062,10 @@ docker-push-manifest-core: ## Push the multiarch manifest for the core docker im
1070
1062
$(MAKE ) set-manifest-image MANIFEST_IMG=$(CONTROLLER_IMG ) MANIFEST_TAG=$(TAG ) TARGET_RESOURCE=" ./config/default/manager_image_patch.yaml"
1071
1063
$(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" ./config/default/manager_pull_policy.yaml"
1072
1064
1065
+ .PHONY : docker-push-kubeadm-bootstrap
1066
+ docker-push-kubeadm-bootstrap : # # Push the kubeadm bootstrap docker image
1067
+ docker push $(KUBEADM_BOOTSTRAP_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1068
+
1073
1069
.PHONY : docker-push-manifest-kubeadm-bootstrap
1074
1070
docker-push-manifest-kubeadm-bootstrap : # # Push the multiarch manifest for the kubeadm bootstrap docker images
1075
1071
docker manifest create --amend $(KUBEADM_BOOTSTRAP_CONTROLLER_IMG ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(KUBEADM_BOOTSTRAP_CONTROLLER_IMG ) \-&:$(TAG ) ~g")
@@ -1078,6 +1074,10 @@ docker-push-manifest-kubeadm-bootstrap: ## Push the multiarch manifest for the k
1078
1074
$(MAKE ) set-manifest-image MANIFEST_IMG=$(KUBEADM_BOOTSTRAP_CONTROLLER_IMG ) MANIFEST_TAG=$(TAG ) TARGET_RESOURCE=" ./bootstrap/kubeadm/config/default/manager_image_patch.yaml"
1079
1075
$(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" ./bootstrap/kubeadm/config/default/manager_pull_policy.yaml"
1080
1076
1077
+ .PHONY : docker-push-kubeadm-control-plane
1078
+ docker-push-kubeadm-control-plane : # # Push the kubeadm control plane docker image
1079
+ docker push $(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1080
+
1081
1081
.PHONY : docker-push-manifest-kubeadm-control-plane
1082
1082
docker-push-manifest-kubeadm-control-plane : # # Push the multiarch manifest for the kubeadm control plane docker images
1083
1083
docker manifest create --amend $(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG ) \-&:$(TAG ) ~g")
@@ -1086,6 +1086,10 @@ docker-push-manifest-kubeadm-control-plane: ## Push the multiarch manifest for t
1086
1086
$(MAKE ) set-manifest-image MANIFEST_IMG=$(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG ) MANIFEST_TAG=$(TAG ) TARGET_RESOURCE=" ./controlplane/kubeadm/config/default/manager_image_patch.yaml"
1087
1087
$(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" ./controlplane/kubeadm/config/default/manager_pull_policy.yaml"
1088
1088
1089
+ .PHONY : docker-push-docker-infrastructure
1090
+ docker-push-docker-infrastructure : # # Push the docker infrastructure provider image
1091
+ docker push $(CAPD_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1092
+
1089
1093
.PHONY : docker-push-manifest-docker-infrastructure
1090
1094
docker-push-manifest-docker-infrastructure : # # Push the multiarch manifest for the docker infrastructure provider images
1091
1095
docker manifest create --amend $(CAPD_CONTROLLER_IMG ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(CAPD_CONTROLLER_IMG ) \-&:$(TAG ) ~g")
@@ -1094,6 +1098,10 @@ docker-push-manifest-docker-infrastructure: ## Push the multiarch manifest for t
1094
1098
$(MAKE ) set-manifest-image MANIFEST_IMG=$(CAPD_CONTROLLER_IMG ) MANIFEST_TAG=$(TAG ) TARGET_RESOURCE=" $( CAPD_DIR) /config/default/manager_image_patch.yaml"
1095
1099
$(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" $( CAPD_DIR) /config/default/manager_pull_policy.yaml"
1096
1100
1101
+ .PHONY : docker-push-in-memory-infrastructure
1102
+ docker-push-in-memory-infrastructure : # # Push the in-memory infrastructure provider image
1103
+ docker push $(CAPIM_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1104
+
1097
1105
.PHONY : docker-push-manifest-in-memory-infrastructure
1098
1106
docker-push-manifest-in-memory-infrastructure : # # Push the multiarch manifest for the in-memory infrastructure provider images
1099
1107
docker manifest create --amend $(CAPIM_CONTROLLER_IMG ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(CAPIM_CONTROLLER_IMG ) \-&:$(TAG ) ~g")
@@ -1102,6 +1110,10 @@ docker-push-manifest-in-memory-infrastructure: ## Push the multiarch manifest fo
1102
1110
$(MAKE ) set-manifest-image MANIFEST_IMG=$(CAPIM_CONTROLLER_IMG ) MANIFEST_TAG=$(TAG ) TARGET_RESOURCE=" $( CAPIM_DIR) /config/default/manager_image_patch.yaml"
1103
1111
$(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" $( CAPIM_DIR) /config/default/manager_pull_policy.yaml"
1104
1112
1113
+ .PHONY : docker-push-test-extension
1114
+ docker-push-test-extension : # # Push the test extension provider image
1115
+ docker push $(TEST_EXTENSION_IMG ) -$(ARCH ) :$(TAG )
1116
+
1105
1117
.PHONY : docker-push-manifest-test-extension
1106
1118
docker-push-manifest-test-extension : # # Push the multiarch manifest for the test extension provider images
1107
1119
docker manifest create --amend $(TEST_EXTENSION_IMG ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(TEST_EXTENSION_IMG ) \-&:$(TAG ) ~g")
@@ -1111,7 +1123,11 @@ docker-push-manifest-test-extension: ## Push the multiarch manifest for the test
1111
1123
$(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" ./test/extension/config/default/manager_pull_policy.yaml"
1112
1124
1113
1125
.PHONY : docker-push-clusterctl
1114
- docker-push-clusterctl : # # Push the clusterctl images
1126
+ docker-push-clusterctl : # # Push the clusterctl image
1127
+ docker push $(CLUSTERCTL_IMG ) -$(ARCH ) :$(TAG )
1128
+
1129
+ .PHONY : docker-push-manifest-clusterctl
1130
+ docker-push-manifest-clusterctl : # # Push the multiarch manifest for the clusterctl images
1115
1131
docker manifest create --amend $(CLUSTERCTL_IMG ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(CLUSTERCTL_IMG ) \-&:$(TAG ) ~g")
1116
1132
@for arch in $(ALL_ARCH ) ; do docker manifest annotate --arch $$ {arch} ${CLUSTERCTL_IMG} :${TAG} ${CLUSTERCTL_IMG} -$$ {arch}:${TAG} ; done
1117
1133
docker manifest push --purge $(CLUSTERCTL_IMG ) :$(TAG )
0 commit comments