@@ -228,7 +228,7 @@ CAPI_KIND_CLUSTER_NAME ?= capi-test
228
228
229
229
TAG ?= dev
230
230
ARCH ?= $(shell go env GOARCH)
231
- ALL_ARCH = amd64 arm arm64 ppc64le s390x
231
+ ALL_ARCH ? = amd64 arm arm64 ppc64le s390x
232
232
233
233
# Allow overriding the imagePullPolicy
234
234
PULL_POLICY ?= Always
@@ -724,7 +724,8 @@ docker-build-all: $(addprefix docker-build-,$(ALL_ARCH)) ## Build docker images
724
724
docker-build-% :
725
725
$(MAKE ) ARCH=$* docker-build
726
726
727
- ALL_DOCKER_BUILD = core kubeadm-bootstrap kubeadm-control-plane docker-infrastructure in-memory-infrastructure test-extension clusterctl
727
+ # Choice of images to build/push
728
+ ALL_DOCKER_BUILD ?= core kubeadm-bootstrap kubeadm-control-plane docker-infrastructure in-memory-infrastructure test-extension clusterctl
728
729
729
730
.PHONY : docker-build
730
731
docker-build : docker-pull-prerequisites # # Run docker-build-* targets for all the images
@@ -1071,26 +1072,17 @@ promote-images: $(KPROMO)
1071
1072
1072
1073
.PHONY : docker-push-all
1073
1074
docker-push-all : $(addprefix docker-push-,$(ALL_ARCH ) ) # # Push the docker images to be included in the release for all architectures + related multiarch manifests
1074
- $(MAKE ) docker-push-manifest-core
1075
- $(MAKE ) docker-push-manifest-kubeadm-bootstrap
1076
- $(MAKE ) docker-push-manifest-kubeadm-control-plane
1077
- $(MAKE ) docker-push-manifest-docker-infrastructure
1078
- $(MAKE ) docker-push-manifest-in-memory-infrastructure
1079
- $(MAKE ) docker-push-manifest-test-extension
1080
- $(MAKE ) docker-push-clusterctl
1075
+ $(MAKE ) ALL_ARCH=" $( ALL_ARCH) " $(addprefix docker-push-manifest-,$(ALL_DOCKER_BUILD ) )
1081
1076
1082
1077
docker-push-% :
1083
1078
$(MAKE ) ARCH=$* docker-push
1084
1079
1085
1080
.PHONY : docker-push
1086
- docker-push : # # Push the docker images to be included in the release
1081
+ docker-push : $(addprefix docker-push-,$(ALL_DOCKER_BUILD ) ) # # Push the docker images to be included in the release
1082
+
1083
+ .PHONY : docker-push-core
1084
+ docker-push-core : # # Push the core docker image
1087
1085
docker push $(CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1088
- docker push $(KUBEADM_BOOTSTRAP_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1089
- docker push $(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1090
- docker push $(CLUSTERCTL_IMG ) -$(ARCH ) :$(TAG )
1091
- docker push $(CAPD_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1092
- docker push $(CAPIM_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1093
- docker push $(TEST_EXTENSION_IMG ) -$(ARCH ) :$(TAG )
1094
1086
1095
1087
.PHONY : docker-push-manifest-core
1096
1088
docker-push-manifest-core : # # Push the multiarch manifest for the core docker images
@@ -1100,6 +1092,10 @@ docker-push-manifest-core: ## Push the multiarch manifest for the core docker im
1100
1092
$(MAKE ) set-manifest-image MANIFEST_IMG=$(CONTROLLER_IMG ) MANIFEST_TAG=$(TAG ) TARGET_RESOURCE=" ./config/default/manager_image_patch.yaml"
1101
1093
$(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" ./config/default/manager_pull_policy.yaml"
1102
1094
1095
+ .PHONY : docker-push-kubeadm-bootstrap
1096
+ docker-push-kubeadm-bootstrap : # # Push the kubeadm bootstrap docker image
1097
+ docker push $(KUBEADM_BOOTSTRAP_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1098
+
1103
1099
.PHONY : docker-push-manifest-kubeadm-bootstrap
1104
1100
docker-push-manifest-kubeadm-bootstrap : # # Push the multiarch manifest for the kubeadm bootstrap docker images
1105
1101
docker manifest create --amend $(KUBEADM_BOOTSTRAP_CONTROLLER_IMG ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(KUBEADM_BOOTSTRAP_CONTROLLER_IMG ) \-&:$(TAG ) ~g")
@@ -1108,6 +1104,10 @@ docker-push-manifest-kubeadm-bootstrap: ## Push the multiarch manifest for the k
1108
1104
$(MAKE ) set-manifest-image MANIFEST_IMG=$(KUBEADM_BOOTSTRAP_CONTROLLER_IMG ) MANIFEST_TAG=$(TAG ) TARGET_RESOURCE=" ./bootstrap/kubeadm/config/default/manager_image_patch.yaml"
1109
1105
$(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" ./bootstrap/kubeadm/config/default/manager_pull_policy.yaml"
1110
1106
1107
+ .PHONY : docker-push-kubeadm-control-plane
1108
+ docker-push-kubeadm-control-plane : # # Push the kubeadm control plane docker image
1109
+ docker push $(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1110
+
1111
1111
.PHONY : docker-push-manifest-kubeadm-control-plane
1112
1112
docker-push-manifest-kubeadm-control-plane : # # Push the multiarch manifest for the kubeadm control plane docker images
1113
1113
docker manifest create --amend $(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG ) \-&:$(TAG ) ~g")
@@ -1116,6 +1116,10 @@ docker-push-manifest-kubeadm-control-plane: ## Push the multiarch manifest for t
1116
1116
$(MAKE ) set-manifest-image MANIFEST_IMG=$(KUBEADM_CONTROL_PLANE_CONTROLLER_IMG ) MANIFEST_TAG=$(TAG ) TARGET_RESOURCE=" ./controlplane/kubeadm/config/default/manager_image_patch.yaml"
1117
1117
$(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" ./controlplane/kubeadm/config/default/manager_pull_policy.yaml"
1118
1118
1119
+ .PHONY : docker-push-docker-infrastructure
1120
+ docker-push-docker-infrastructure : # # Push the docker infrastructure provider image
1121
+ docker push $(CAPD_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1122
+
1119
1123
.PHONY : docker-push-manifest-docker-infrastructure
1120
1124
docker-push-manifest-docker-infrastructure : # # Push the multiarch manifest for the docker infrastructure provider images
1121
1125
docker manifest create --amend $(CAPD_CONTROLLER_IMG ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(CAPD_CONTROLLER_IMG ) \-&:$(TAG ) ~g")
@@ -1124,6 +1128,10 @@ docker-push-manifest-docker-infrastructure: ## Push the multiarch manifest for t
1124
1128
$(MAKE ) set-manifest-image MANIFEST_IMG=$(CAPD_CONTROLLER_IMG ) MANIFEST_TAG=$(TAG ) TARGET_RESOURCE=" $( CAPD_DIR) /config/default/manager_image_patch.yaml"
1125
1129
$(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" $( CAPD_DIR) /config/default/manager_pull_policy.yaml"
1126
1130
1131
+ .PHONY : docker-push-in-memory-infrastructure
1132
+ docker-push-in-memory-infrastructure : # # Push the in-memory infrastructure provider image
1133
+ docker push $(CAPIM_CONTROLLER_IMG ) -$(ARCH ) :$(TAG )
1134
+
1127
1135
.PHONY : docker-push-manifest-in-memory-infrastructure
1128
1136
docker-push-manifest-in-memory-infrastructure : # # Push the multiarch manifest for the in-memory infrastructure provider images
1129
1137
docker manifest create --amend $(CAPIM_CONTROLLER_IMG ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(CAPIM_CONTROLLER_IMG ) \-&:$(TAG ) ~g")
@@ -1132,6 +1140,10 @@ docker-push-manifest-in-memory-infrastructure: ## Push the multiarch manifest fo
1132
1140
$(MAKE ) set-manifest-image MANIFEST_IMG=$(CAPIM_CONTROLLER_IMG ) MANIFEST_TAG=$(TAG ) TARGET_RESOURCE=" $( CAPIM_DIR) /config/default/manager_image_patch.yaml"
1133
1141
$(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" $( CAPIM_DIR) /config/default/manager_pull_policy.yaml"
1134
1142
1143
+ .PHONY : docker-push-test-extension
1144
+ docker-push-test-extension : # # Push the test extension provider image
1145
+ docker push $(TEST_EXTENSION_IMG ) -$(ARCH ) :$(TAG )
1146
+
1135
1147
.PHONY : docker-push-manifest-test-extension
1136
1148
docker-push-manifest-test-extension : # # Push the multiarch manifest for the test extension provider images
1137
1149
docker manifest create --amend $(TEST_EXTENSION_IMG ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(TEST_EXTENSION_IMG ) \-&:$(TAG ) ~g")
@@ -1141,7 +1153,11 @@ docker-push-manifest-test-extension: ## Push the multiarch manifest for the test
1141
1153
$(MAKE ) set-manifest-pull-policy TARGET_RESOURCE=" ./test/extension/config/default/manager_pull_policy.yaml"
1142
1154
1143
1155
.PHONY : docker-push-clusterctl
1144
- docker-push-clusterctl : # # Push the clusterctl images
1156
+ docker-push-clusterctl : # # Push the clusterctl image
1157
+ docker push $(CLUSTERCTL_IMG ) -$(ARCH ) :$(TAG )
1158
+
1159
+ .PHONY : docker-push-manifest-clusterctl
1160
+ docker-push-manifest-clusterctl : # # Push the multiarch manifest for the clusterctl images
1145
1161
docker manifest create --amend $(CLUSTERCTL_IMG ) :$(TAG ) $(shell echo $(ALL_ARCH ) | sed -e "s~[^ ]* ~$(CLUSTERCTL_IMG ) \-&:$(TAG ) ~g")
1146
1162
@for arch in $(ALL_ARCH ) ; do docker manifest annotate --arch $$ {arch} ${CLUSTERCTL_IMG} :${TAG} ${CLUSTERCTL_IMG} -$$ {arch}:${TAG} ; done
1147
1163
docker manifest push --purge $(CLUSTERCTL_IMG ) :$(TAG )
0 commit comments