Add support for multi-arch images

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-04-28 19:42:11 -04:00
parent af910a16d4
commit 5d011db7b3
2 changed files with 10 additions and 3 deletions

View file

@ -124,6 +124,14 @@ push: .push-$(ARCH) ## Publish image for a particular arch.
.push-$(ARCH):
docker push $(REGISTRY)/nginx-ingress-controller-${ARCH}:$(TAG)
.PHONY: push-manifest
push-manifest:
docker manifest create $(REGISTRY)/nginx-ingress-controller:$(TAG) \
$(REGISTRY)/nginx-ingress-controller-amd64:$(TAG) \
$(REGISTRY)/nginx-ingress-controller-arm:$(TAG) \
$(REGISTRY)/nginx-ingress-controller-arm64:$(TAG)
docker manifest push --purge $(REGISTRY)/nginx-ingress-controller:$(TAG)
.PHONY: build
build: check-go-version ## Build ingress controller, debug tool and pre-stop hook.
ifeq ($(USE_DOCKER), true)

View file

@ -93,6 +93,5 @@ ARCH=amd64 make build container push
ARCH=arm make build container push
ARCH=arm64 make build container push
# Requires https://github.com/kubernetes/ingress-nginx/pull/4271
#echo "Creating multi-arch images..."
#make push-manifest
echo "Creating multi-arch images..."
make push-manifest