Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly create and remove buildx builders for VPA components #5867

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions vertical-pod-autoscaler/pkg/admission-controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ifndef TAG
ERR = $(error TAG is undefined)
$(ERR)
endif
docker buildx build --pull --platform linux/$* -t ${REGISTRY}/${FULL_COMPONENT}-$*:${TAG} --build-arg ARCH=$* .
docker buildx build --pull --load --platform linux/$* -t ${REGISTRY}/${FULL_COMPONENT}-$*:${TAG} --build-arg ARCH=$* .

.PHONY: docker-push
docker-push: $(addprefix sub-push-,$(ALL_ARCHITECTURES)) push-multi-arch;
Expand Down Expand Up @@ -83,9 +83,16 @@ build-in-docker-%: clean docker-builder
echo '=============== bulding from the above ==============='
docker run -v `pwd`/../..:/gopath/src/k8s.io/autoscaler/vertical-pod-autoscaler vpa-autoscaling-builder:latest bash -c 'cd /gopath/src/k8s.io/autoscaler/vertical-pod-autoscaler && make build-binary-with-vendor-$* -C pkg/admission-controller'

.PHONY: create-buildx-builder
create-buildx-builder:
BUILDER=$(shell docker buildx create --driver=docker-container --use)

.PHONY: remove-buildx-builder
remove-buildx-builder:
docker buildx rm ${BUILDER}

.PHONY: release
release: build-in-docker docker-build docker-push
release: build-in-docker create-buildx-builder docker-build remove-buildx-builder docker-push
@echo "Full in-docker release ${FULL_COMPONENT}:${TAG} completed"

clean: $(addprefix clean-,$(ALL_ARCHITECTURES))
Expand Down
12 changes: 10 additions & 2 deletions vertical-pod-autoscaler/pkg/recommender/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ifndef TAG
ERR = $(error TAG is undefined)
$(ERR)
endif
docker buildx build --pull --platform linux/$* -t ${REGISTRY}/${FULL_COMPONENT}-$*:${TAG} --build-arg ARCH=$* .
docker buildx build --pull --load --platform linux/$* -t ${REGISTRY}/${FULL_COMPONENT}-$*:${TAG} --build-arg ARCH=$* .

.PHONY: docker-push
docker-push: $(addprefix sub-push-,$(ALL_ARCHITECTURES)) push-multi-arch;
Expand Down Expand Up @@ -83,7 +83,15 @@ build-in-docker-%: clean docker-builder
echo '=============== bulding from the above ==============='
docker run -v `pwd`/../..:/gopath/src/k8s.io/autoscaler/vertical-pod-autoscaler vpa-autoscaling-builder:latest bash -c 'cd /gopath/src/k8s.io/autoscaler/vertical-pod-autoscaler && make build-binary-with-vendor-$* -C pkg/recommender'

release: build-in-docker docker-build docker-push
.PHONY: create-buildx-builder
create-buildx-builder:
BUILDER=$(shell docker buildx create --driver=docker-container --use)

.PHONY: remove-buildx-builder
remove-buildx-builder:
docker buildx rm ${BUILDER}

release: build-in-docker create-buildx-builder docker-build remove-buildx-builder docker-push
@echo "Full in-docker release ${FULL_COMPONENT}:${TAG} completed"

clean: $(addprefix clean-,$(ALL_ARCHITECTURES))
Expand Down
12 changes: 10 additions & 2 deletions vertical-pod-autoscaler/pkg/updater/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ifndef TAG
ERR = $(error TAG is undefined)
$(ERR)
endif
docker buildx build --pull --platform linux/$* -t ${REGISTRY}/${FULL_COMPONENT}-$*:${TAG} --build-arg ARCH=$* .
docker buildx build --pull --load --platform linux/$* -t ${REGISTRY}/${FULL_COMPONENT}-$*:${TAG} --build-arg ARCH=$* .

.PHONY: docker-push
docker-push: $(addprefix sub-push-,$(ALL_ARCHITECTURES)) push-multi-arch;
Expand Down Expand Up @@ -83,8 +83,16 @@ build-in-docker-%: clean docker-builder
echo '=============== bulding from the above ==============='
docker run -v `pwd`/../..:/gopath/src/k8s.io/autoscaler/vertical-pod-autoscaler vpa-autoscaling-builder:latest bash -c 'cd /gopath/src/k8s.io/autoscaler/vertical-pod-autoscaler && make build-binary-with-vendor-$* -C pkg/updater'

.PHONY: create-buildx-builder
create-buildx-builder:
BUILDER=$(shell docker buildx create --driver=docker-container --use)

.PHONY: remove-buildx-builder
remove-buildx-builder:
docker buildx rm ${BUILDER}

.PHONY: release
release: build-in-docker docker-build docker-push
release: build-in-docker create-buildx-builder docker-build remove-buildx-builder docker-push
@echo "Full in-docker release ${FULL_COMPONENT}:${TAG} completed"

clean: $(addprefix clean-,$(ALL_ARCHITECTURES))
Expand Down