Skip to content

Commit a2d41b7

Browse files
authored
Merge pull request #5577 from mdbooth/issue-5576
🌱 Reduce memory consumption of cluster-api-provider-aws-build-docker
2 parents faf2fdc + 8841520 commit a2d41b7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ LDFLAGS := $(shell source ./hack/version.sh; version::ldflags)
143143
# Set USE_EXISTING_CLUSTER to use an existing kubernetes context
144144
USE_EXISTING_CLUSTER ?= "false"
145145

146+
# GORELEASER_PARALLELISM restricts the number of tasks goreleaser will run
147+
# concurrently. The primary reason to do this is to ensure its memory usage
148+
# remains within the resource limits of the
149+
# cluster-api-provider-aws-build-docker job
150+
GORELEASER_PARALLELISM ?= 2
151+
146152
# Set E2E_SKIP_EKS_UPGRADE to false to test EKS upgrades.
147153
# Warning, this takes a long time
148154
E2E_SKIP_EKS_UPGRADE ?= "false"
@@ -571,7 +577,7 @@ release: clean-release check-release-tag check-release-branch $(RELEASE_DIR) $(G
571577
$(MAKE) release-changelog
572578
CORE_CONTROLLER_IMG=$(PROD_REGISTRY)/$(CORE_IMAGE_NAME) $(MAKE) release-manifests
573579
$(MAKE) release-policies
574-
$(GORELEASER) release --config $(GORELEASER_CONFIG) --release-notes $(RELEASE_DIR)/CHANGELOG.md --clean
580+
$(GORELEASER) release --config $(GORELEASER_CONFIG) --release-notes $(RELEASE_DIR)/CHANGELOG.md --clean --parallelism $(GORELEASER_PARALLELISM)
575581

576582
release-policies: $(RELEASE_POLICIES) ## Release policies
577583

@@ -606,7 +612,7 @@ promote-images: $(KPROMO) $(YQ)
606612

607613
.PHONY: release-binaries
608614
release-binaries: $(GORELEASER) ## Builds only the binaries, not a release.
609-
GOMAXPROCS=2 $(GORELEASER) build --config $(GORELEASER_CONFIG) --snapshot --clean
615+
$(GORELEASER) build --config $(GORELEASER_CONFIG) --snapshot --clean --parallelism $(GORELEASER_PARALLELISM)
610616

611617
.PHONY: release-staging
612618
release-staging: ## Builds and push container images and manifests to the staging bucket.

0 commit comments

Comments
 (0)