diff --git a/Common.mk b/Common.mk index 03b21b6d7e..e5123b3c7a 100644 --- a/Common.mk +++ b/Common.mk @@ -196,12 +196,13 @@ HELM_TAG?=$(GIT_TAG)-$(GIT_HASH) HELM_USE_UPSTREAM_IMAGE?=false # HELM_DIRECTORY must be a relative path from project root to the directory that contains a chart HELM_DIRECTORY?=. -HELM_DESTINATION_REPOSITORY?=$(IMAGE_COMPONENT) -HELM_IMAGE_LIST?= +HELM_DESTINATION_REPOSITORY?=$(HELM_CHART_NAME) +HELM_IMAGE_LIST?=$(IMAGE_COMPONENT) HELM_GIT_CHECKOUT_TARGET?=$(HELM_SOURCE_REPOSITORY)/eks-anywhere-checkout-$(HELM_GIT_TAG) HELM_GIT_PATCH_TARGET?=$(HELM_SOURCE_REPOSITORY)/eks-anywhere-helm-patched PACKAGE_DEPENDENCIES?= FORCE_JSON_SCHEMA_FILE?= +HELM_CHART_NAMES?=$(IMAGE_COMPONENT) #################################################### #### HELPERS ######## @@ -520,10 +521,10 @@ ifneq ($(REPO_NO_CLONE),true) $(REPO): | ensure-bash-version @echo -e $(call TARGET_START_LOG) ifneq ($(REPO_SPARSE_CHECKOUT),) - source $(BUILD_LIB)/common.sh && retry git clone --depth 1 --filter=blob:none --sparse -b $(GIT_TAG) $(CLONE_URL) $(REPO) + source $(BUILD_LIB)/common.sh && retry git clone --quiet --depth 1 --filter=blob:none --sparse -b $(GIT_TAG) $(CLONE_URL) $(REPO) git -C $(REPO) sparse-checkout set $(REPO_SPARSE_CHECKOUT) --cone --skip-checks else - source $(BUILD_LIB)/common.sh && retry git clone $(CLONE_URL) $(REPO) + source $(BUILD_LIB)/common.sh && retry git clone --quiet $(CLONE_URL) $(REPO) endif @echo -e $(call TARGET_END_LOG) endif @@ -560,7 +561,7 @@ $(REPO)/%ks-anywhere-go-mod-download: $(if $(PATCHES_DIR),$(GIT_PATCH_TARGET),$( ifneq ($(REPO),$(HELM_SOURCE_REPOSITORY)) $(HELM_SOURCE_REPOSITORY): @echo -e $(call TARGET_START_LOG) - source $(BUILD_LIB)/common.sh && retry git clone $(HELM_CLONE_URL) $(HELM_SOURCE_REPOSITORY) + source $(BUILD_LIB)/common.sh && retry git clone --quiet $(HELM_CLONE_URL) $(HELM_SOURCE_REPOSITORY) @echo -e $(call TARGET_END_LOG) endif @@ -569,7 +570,7 @@ $(HELM_GIT_CHECKOUT_TARGET): | $(HELM_SOURCE_REPOSITORY) @echo -e $(call TARGET_START_LOG) @echo rm -f $(HELM_SOURCE_REPOSITORY)/eks-anywhere-* (cd $(HELM_SOURCE_REPOSITORY) && $(BASE_DIRECTORY)/build/lib/wait_for_tag.sh $(HELM_GIT_TAG)) - git -C $(HELM_SOURCE_REPOSITORY) checkout -f $(HELM_GIT_TAG) + git -C $(HELM_SOURCE_REPOSITORY) checkout --quiet -f $(HELM_GIT_TAG) touch $@ @echo -e $(call TARGET_END_LOG) endif @@ -801,30 +802,33 @@ binary-builder/cgo/%: USE_DOCKER_FOR_CGO_BUILD=$(shell command -v docker &> /dev helm/pull: | $$(ENABLE_LOGGING) @$(BUILD_LIB)/helm_pull.sh $(HELM_PULL_LOCATION) $(HELM_REPO_URL) $(HELM_PULL_NAME) $(REPO) $(HELM_DIRECTORY) $(CHART_VERSION) $(COPY_CRDS) +.PHONY: %/helm/copy %/helm/require %/helm/replace %/helm/build %/helm/push +%/helm/copy %/helm/require %/helm/replace %/helm/build %/helm/push: HELM_CHART_NAME=$* -.PHONY: helm/copy helm/require helm/replace helm/build helm/push - -helm/copy: $(LICENSES_TARGETS_FOR_PREREQ) -helm/copy: $(if $(filter true,$(REPO_NO_CLONE)),,$(HELM_GIT_CHECKOUT_TARGET)) -helm/copy: $(if $(wildcard $(PROJECT_ROOT)/helm/patches),$(HELM_GIT_PATCH_TARGET),) | ensure-helm ensure-skopeo $$(ENABLE_LOGGING) +%/helm/copy: $(LICENSES_TARGETS_FOR_PREREQ) +%/helm/copy: $(if $(filter true,$(REPO_NO_CLONE)),,$(HELM_GIT_CHECKOUT_TARGET)) +%/helm/copy: $(if $(wildcard $(PROJECT_ROOT)/helm/patches),$(HELM_GIT_PATCH_TARGET),) | ensure-helm ensure-skopeo $$(ENABLE_LOGGING) @$(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) $(HELM_DESTINATION_REPOSITORY) $(HELM_DIRECTORY) $(OUTPUT_DIR) -helm/require: helm/copy | $$(ENABLE_LOGGING) +%/helm/require: %/helm/copy | $$(ENABLE_LOGGING) @$(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) "$(PACKAGE_DEPENDENCIES)" "$(FORCE_JSON_SCHEMA_FILE)" $(HELM_IMAGE_LIST) -helm/replace: helm/require | $$(ENABLE_LOGGING) +%/helm/replace: %/helm/require | $$(ENABLE_LOGGING) @$(BUILD_LIB)/helm_replace.sh $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR) -helm/build: helm/replace | $$(ENABLE_LOGGING) +%/helm/build: %/helm/replace | $$(ENABLE_LOGGING) @$(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) $(HELM_DESTINATION_REPOSITORY) -helm/push: helm/build | $$(ENABLE_LOGGING) +%/helm/push: %/helm/build | $$(ENABLE_LOGGING) @$(BUILD_LIB)/helm_push.sh $(IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(HELM_TAG) $(GIT_TAG) $(OUTPUT_DIR) $(LATEST) +# Build helm chart +.PHONY: helm/build +helm/build: $(foreach chart,$(HELM_CHART_NAMES),$(chart)/helm/build) + # Build helm chart and push to registry defined in IMAGE_REPO. .PHONY: helm/push -helm/push: helm/build | ensure-helm $$(ENABLE_LOGGING) - @$(BUILD_LIB)/helm_push.sh $(IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(HELM_TAG) $(GIT_TAG) $(OUTPUT_DIR) $(LATEST) +helm/push: $(foreach chart,$(HELM_CHART_NAMES),$(chart)/helm/push) ## Fetch Binary Targets .PHONY: handle-dependencies @@ -946,8 +950,8 @@ patch-for-dep-update: checkout-repo cmd=( ecr-public --region us-east-1 ); \ fi; \ repo=$(IMAGE_REPO_COMPONENT); \ - if [ "$(IMAGE_NAME)" = "__helm__" ]; then \ - repo="$(HELM_DESTINATION_REPOSITORY)"; \ + if [[ "$(IMAGE_NAME)" = *"__helm__"* ]]; then \ + repo="$(IMAGE_NAME:%/__helm__=%)"; \ fi; \ if ! aws $${cmd[*]} describe-repositories --repository-name "$$repo" > /dev/null 2>&1; then \ aws $${cmd[*]} create-repository --repository-name "$$repo"; \ @@ -955,7 +959,7 @@ patch-for-dep-update: checkout-repo .PHONY: create-ecr-repos create-ecr-repos: # Create repos in ECR for project images for local testing -create-ecr-repos: $(foreach image,$(IMAGE_NAMES),$(image)/create-ecr-repo) $(if $(filter true,$(HAS_HELM_CHART)),__helm__/create-ecr-repo,) +create-ecr-repos: $(foreach image,$(IMAGE_NAMES),$(image)/create-ecr-repo) $(if $(filter true,$(HAS_HELM_CHART)),$(foreach chart,$(HELM_CHART_NAMES),$(chart)/__helm__/create-ecr-repo),) .PHONY: var-value-% var-value-%: diff --git a/projects/aws-containers/hello-eks-anywhere/Makefile b/projects/aws-containers/hello-eks-anywhere/Makefile index 7879aeec1c..4564dadf11 100755 --- a/projects/aws-containers/hello-eks-anywhere/Makefile +++ b/projects/aws-containers/hello-eks-anywhere/Makefile @@ -12,8 +12,6 @@ HAS_LICENSES=false HAS_HELM_CHART=true HELM_DIRECTORY=charts/hello-eks-anywhere -HELM_DESTINATION_REPOSITORY=$(REPO) -HELM_IMAGE_LIST=$(REPO) EXCLUDE_FROM_STAGING_BUILDSPEC=true SKIP_ON_RELEASE_BRANCH=true diff --git a/projects/aws-observability/aws-otel-collector/Makefile b/projects/aws-observability/aws-otel-collector/Makefile index 52c5b878e5..992afb60b0 100644 --- a/projects/aws-observability/aws-otel-collector/Makefile +++ b/projects/aws-observability/aws-otel-collector/Makefile @@ -23,11 +23,12 @@ SKIP_ON_RELEASE_BRANCH=true HAS_HELM_CHART=true +HELM_CHART_NAMES=adot/charts/aws-otel-collector + HELM_SOURCE_IMAGE_REPO=public.ecr.aws HELM_SOURCE_OWNER=open-telemetry HELM_SOURCE_REPOSITORY=opentelemetry-helm-charts HELM_DIRECTORY=charts/opentelemetry-collector -HELM_DESTINATION_REPOSITORY=adot/charts/aws-otel-collector HELM_IMAGE_LIST=aws-observability/aws-otel-collector HELM_USE_UPSTREAM_IMAGE=true diff --git a/projects/aws/eks-anywhere-packages/Makefile b/projects/aws/eks-anywhere-packages/Makefile index 6d286e7f85..cf1ae7708d 100644 --- a/projects/aws/eks-anywhere-packages/Makefile +++ b/projects/aws/eks-anywhere-packages/Makefile @@ -32,14 +32,25 @@ FIX_LICENSES_ECRTOKENREFRESHER_TARGET=$(REPO)/ecrtokenrefresher/LICENSE FIX_LICENSES_CREDENTIALPROVIDERPACKAGE_TARGET=$(REPO)/credentialproviderpackage/LICENSE HAS_HELM_CHART=true -HELM_DIRECTORY=charts/eks-anywhere-packages +HELM_DIRECTORY?=charts/$(HELM_CHART_NAME) HELM_IMAGE_LIST=eks-anywhere-packages ecr-token-refresher CRED_HELM_IMAGE_LIST=credential-provider-package +HELM_CHART_NAMES=eks-anywhere-packages-migrations eks-anywhere-packages-crds eks-anywhere-packages credential-provider-package + BUILDSPEC_COMPUTE_TYPE=BUILD_GENERAL1_LARGE include $(BASE_DIRECTORY)/Common.mk +# building multiple helm charts requires overrides +eks-anywhere-packages-crds/helm/%: PACKAGE_DEPENDENCIES=eks-anywhere-packages-migrations + +eks-anywhere-packages/helm/%: PACKAGE_DEPENDENCIES=eks-anywhere-packages-crds + +credential-provider-package/helm/%: HELM_IMAGE_LIST=$(CRED_HELM_IMAGE_LIST) +credential-provider-package/helm/%: HELM_DIRECTORY=credentialproviderpackage/charts/credential-provider-package +credential-provider-package/helm/%: FORCE_JSON_SCHEMA_FILE=$(PROJECT_ROOT)/helm/credential-provider-package.schema.json + $(GATHER_LICENSES_TARGETS): $(FIX_LICENSES_ECRTOKENREFRESHER_TARGET) $(FIX_LICENSES_CREDENTIALPROVIDERPACKAGE_TARGET) # Copy the License to each directory that has a unique go.mod path, @@ -51,40 +62,6 @@ $(FIX_LICENSES_ECRTOKENREFRESHER_TARGET): | $(GO_MOD_DOWNLOAD_TARGETS) $(FIX_LICENSES_CREDENTIALPROVIDERPACKAGE_TARGET): | $(GO_MOD_DOWNLOAD_TARGETS) cp $(REPO)/LICENSE $(REPO)/credentialproviderpackage/LICENSE -# Build helm chart -.PHONY: helm/build -helm/build: $(LICENSES_TARGETS_FOR_PREREQ) -helm/build: $(if $(filter true,$(REPO_NO_CLONE)),,$(HELM_GIT_CHECKOUT_TARGET)) -helm/build: $(if $(wildcard $(PROJECT_ROOT)/helm/patches),$(HELM_GIT_PATCH_TARGET),) - # Pkg controller requires multiple charts. Consider this a temporary work-around (turned too permanent). - $(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) eks-anywhere-packages-migrations charts/eks-anywhere-packages-migrations $(OUTPUT_DIR) - $(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) eks-anywhere-packages-migrations $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) "$(PACKAGE_DEPENDENCIES)" "$(FORCE_JSON_SCHEMA_FILE)" $(HELM_IMAGE_LIST) - $(BUILD_LIB)/helm_replace.sh eks-anywhere-packages-migrations $(OUTPUT_DIR) - $(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) eks-anywhere-packages-migrations - - $(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) eks-anywhere-packages-crds charts/eks-anywhere-packages-crds $(OUTPUT_DIR) - $(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) eks-anywhere-packages-crds $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) eks-anywhere-packages-migrations "$(FORCE_JSON_SCHEMA_FILE)" $(HELM_IMAGE_LIST) - $(BUILD_LIB)/helm_replace.sh eks-anywhere-packages-crds $(OUTPUT_DIR) - $(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) eks-anywhere-packages-crds - - $(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) $(HELM_DESTINATION_REPOSITORY) $(HELM_DIRECTORY) $(OUTPUT_DIR) - $(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) "eks-anywhere-packages-crds" "$(FORCE_JSON_SCHEMA_FILE)" $(HELM_IMAGE_LIST) - $(BUILD_LIB)/helm_replace.sh $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR) - $(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) $(HELM_DESTINATION_REPOSITORY) - - # Credential Provider Package lives in pkg controller repo. Workaround for its sepearate chart - $(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) credential-provider-package credentialproviderpackage/charts/credential-provider-package $(OUTPUT_DIR) - $(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) credential-provider-package $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) "$(PACKAGE_DEPENDENCIES)" "$(PROJECT_ROOT)/helm/credential-provider-package.schema.json" $(CRED_HELM_IMAGE_LIST) - $(BUILD_LIB)/helm_replace.sh credential-provider-package $(OUTPUT_DIR) - $(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) credential-provider-package - -# Build helm chart and push to registry defined in IMAGE_REPO. -.PHONY: helm/push -helm/push: helm/build - $(BUILD_LIB)/helm_push.sh $(IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(HELM_TAG) $(GIT_TAG) $(OUTPUT_DIR) $(LATEST) - $(BUILD_LIB)/helm_push.sh $(IMAGE_REPO) eks-anywhere-packages-crds $(HELM_TAG) $(GIT_TAG) $(OUTPUT_DIR) $(LATEST) - $(BUILD_LIB)/helm_push.sh $(IMAGE_REPO) eks-anywhere-packages-migrations $(HELM_TAG) $(GIT_TAG) $(OUTPUT_DIR) $(LATEST) - $(BUILD_LIB)/helm_push.sh $(IMAGE_REPO) credential-provider-package $(HELM_TAG) $(GIT_TAG) $(OUTPUT_DIR) $(LATEST) ########### DO NOT EDIT ############################# diff --git a/projects/emissary-ingress/emissary/Makefile b/projects/emissary-ingress/emissary/Makefile index 8f092e9d8a..2b52a53c17 100644 --- a/projects/emissary-ingress/emissary/Makefile +++ b/projects/emissary-ingress/emissary/Makefile @@ -24,13 +24,25 @@ COMPILER_IMAGE_VERSION=3.9 HAS_HELM_CHART=true HELM_DIRECTORY=charts/emissary-ingress -HELM_DESTINATION_REPOSITORY=emissary-ingress/emissary -HELM_IMAGE_LIST=emissary-ingress/emissary +HELM_CHART_NAMES=emissary/crds emissary-ingress/emissary AMBASSADOR_VERSION_TARGET=$(REPO)/python/ambassador.version include $(BASE_DIRECTORY)/Common.mk + +emissary-ingress/emissary/helm/%: PACKAGE_DEPENDENCIES=emissary-crds + +emissary/crds/helm/%: HELM_DIRECTORY=charts/crds +# Originially emissary was created with `emissary/crds` as the HELM_DESTINATION_REPOSITORY for everything but the push +# which is `emissary-ingress/crds` +# this really only made a differnece in the helm_require.sh script which uses this value in the EksaPackageRequires file +# otherwise it was always `basename`, which was the same either way +# overriding for push to keep it consistent +emissary/crds/helm/build: HELM_DESTINATION_REPOSITORY=emissary/crds +emissary/crds/helm/push: HELM_DESTINATION_REPOSITORY=emissary-ingress/crds +emissary/crds/__helm__/create-ecr-repo: IMAGE_NAME=emissary-ingress/crds/__helm__ + $(GO_MOD_DOWNLOAD_TARGETS): $(AMBASSADOR_VERSION_TARGET) # do not pass our makeflags down to emissary make since there will be unncessary warnings @@ -38,24 +50,6 @@ $(AMBASSADOR_VERSION_TARGET): MAKEFLAGS= $(AMBASSADOR_VERSION_TARGET): @export VERSION="v3.6.0" && export CHART_VERSION=$(CHART_VERSION) && cd emissary && GOPATH=/var && make python/ambassador.version -# Build helm chart -.PHONY: helm/build -helm/build: $(if $(wildcard $(PROJECT_ROOT)/helm/patches),$(HELM_GIT_PATCH_TARGET),) - # Emissary requires 2 charts. Consider this a temporary work-around. - $(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) emissary/crds charts/crds $(OUTPUT_DIR) - $(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) emissary/crds $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) "$(PACKAGE_DEPENDENCIES)" "$(FORCE_JSON_SCHEMA_FILE)" $(HELM_IMAGE_LIST) - $(BUILD_LIB)/helm_replace.sh emissary/crds $(OUTPUT_DIR) - $(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) emissary/crds - $(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) $(HELM_DESTINATION_REPOSITORY) $(HELM_DIRECTORY) $(OUTPUT_DIR) - $(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) emissary-crds "$(FORCE_JSON_SCHEMA_FILE)" $(HELM_IMAGE_LIST) - $(BUILD_LIB)/helm_replace.sh $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR) - $(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) $(HELM_DESTINATION_REPOSITORY) - -.PHONY: helm/push -helm/push: helm/build - $(BUILD_LIB)/helm_push.sh $(IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(HELM_TAG) $(GIT_TAG) $(OUTPUT_DIR) $(LATEST) - $(BUILD_LIB)/helm_push.sh $(IMAGE_REPO) emissary-ingress/crds $(HELM_TAG) $(GIT_TAG) $(OUTPUT_DIR) $(LATEST) - ########### DO NOT EDIT ############################# # To update call: make add-generated-help-block diff --git a/projects/goharbor/harbor/Makefile b/projects/goharbor/harbor/Makefile index b966e5ec92..4d74b621b1 100644 --- a/projects/goharbor/harbor/Makefile +++ b/projects/goharbor/harbor/Makefile @@ -60,9 +60,10 @@ HAS_HELM_CHART?=true HELM_GIT_TAG=$(shell cat HELM_GIT_TAG) HELM_SOURCE_REPOSITORY=harbor-helm -HELM_DESTINATION_REPOSITORY=harbor/$(HELM_SOURCE_REPOSITORY) HELM_IMAGE_LIST=harbor/harbor-core harbor/harbor-db harbor/harbor-log harbor/harbor-exporter harbor/harbor-jobservice harbor/harbor-nginx harbor/harbor-portal harbor/harbor-redis harbor/harbor-registry harbor/harbor-registryctl harbor/harbor-trivy +HELM_CHART_NAMES=harbor/$(HELM_SOURCE_REPOSITORY) + EXCLUDE_FROM_STAGING_BUILDSPEC=true BUILDSPEC_COMPUTE_TYPE=BUILD_GENERAL1_LARGE diff --git a/projects/kubernetes-sigs/metrics-server/Makefile b/projects/kubernetes-sigs/metrics-server/Makefile index ad23721d56..1eb58cd92a 100644 --- a/projects/kubernetes-sigs/metrics-server/Makefile +++ b/projects/kubernetes-sigs/metrics-server/Makefile @@ -27,10 +27,11 @@ HELM_SOURCE_IMAGE_REPO=public.ecr.aws HELM_SOURCE_OWNER=kubernetes-sigs HELM_SOURCE_REPOSITORY=metrics-server HELM_DIRECTORY=charts/metrics-server -HELM_DESTINATION_REPOSITORY=metrics-server/charts/metrics-server HELM_IMAGE_LIST=eks-distro/kubernetes-sigs/metrics-server HELM_USE_UPSTREAM_IMAGE=true +HELM_CHART_NAMES=metrics-server/charts/metrics-server + EXCLUDE_FROM_CHECKSUMS_BUILDSPEC=true include $(BASE_DIRECTORY)/Common.mk diff --git a/projects/kubernetes/autoscaler/Makefile b/projects/kubernetes/autoscaler/Makefile index 6f426a54cf..944d95d900 100644 --- a/projects/kubernetes/autoscaler/Makefile +++ b/projects/kubernetes/autoscaler/Makefile @@ -24,9 +24,10 @@ HELM_TAG=$(subst cluster-autoscaler-chart-,,$(HELM_GIT_TAG))-$(subst -,.,$(RELEA HELM_SOURCE_OWNER=kubernetes HELM_SOURCE_REPOSITORY=autoscaler HELM_DIRECTORY=charts/cluster-autoscaler -HELM_DESTINATION_REPOSITORY=cluster-autoscaler/charts/cluster-autoscaler HELM_IMAGE_LIST=kubernetes/autoscaler +HELM_CHART_NAMES=cluster-autoscaler/charts/cluster-autoscaler + BUILDSPEC_VARS_KEYS=RELEASE_BRANCH BUILDSPEC_VARS_VALUES=SUPPORTED_K8S_VERSIONS BUILDSPEC_COMPUTE_TYPE=BUILD_GENERAL1_LARGE diff --git a/projects/metallb/metallb/Makefile b/projects/metallb/metallb/Makefile index 8dd19e9137..c0315da20f 100644 --- a/projects/metallb/metallb/Makefile +++ b/projects/metallb/metallb/Makefile @@ -14,38 +14,21 @@ SPEAKER_IMAGE_COMPONENT=metallb/speaker IMAGE_NAMES=controller speaker DOCKERFILE_FOLDER=./docker/linux/$(IMAGE_NAME) - HAS_HELM_CHART=true HELM_DIRECTORY=charts/metallb -HELM_DESTINATION_REPOSITORY=metallb/metallb HELM_IMAGE_LIST=metallb/controller metallb/speaker +HELM_CHART_NAMES=metallb/crds metallb/metallb + EXCLUDE_FROM_STAGING_BUILDSPEC=true SKIP_ON_RELEASE_BRANCH=true include $(BASE_DIRECTORY)/Common.mk -# Build helm chart -.PHONY: helm/build -helm/build: $(LICENSES_TARGETS_FOR_PREREQ) -helm/build: $(if $(filter true,$(REPO_NO_CLONE)),,$(HELM_GIT_CHECKOUT_TARGET)) -helm/build: $(if $(wildcard $(PROJECT_ROOT)/helm/patches),$(HELM_GIT_PATCH_TARGET),) - # Metallb requires 2 charts. Consider this a temporary work-around. - $(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) metallb/crds charts/crds $(OUTPUT_DIR) - $(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) metallb/crds $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) "$(PROJECT_DEPENDENCIES)" "$(FORCE_JSON_SCHEMA_FILE)" $(HELM_IMAGE_LIST) - $(BUILD_LIB)/helm_replace.sh metallb/crds $(OUTPUT_DIR) - $(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) metallb/crds - $(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) $(HELM_DESTINATION_REPOSITORY) $(HELM_DIRECTORY) $(OUTPUT_DIR) - $(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) metallb-crds "$(FORCE_JSON_SCHEMA_FILE)" $(HELM_IMAGE_LIST) - $(BUILD_LIB)/helm_replace.sh $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR) - $(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) $(HELM_DESTINATION_REPOSITORY) - -# Build helm chart and push to registry defined in IMAGE_REPO. -.PHONY: helm/push -helm/push: helm/build - $(BUILD_LIB)/helm_push.sh $(IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(HELM_TAG) $(GIT_TAG) $(OUTPUT_DIR) $(LATEST) - $(BUILD_LIB)/helm_push.sh $(IMAGE_REPO) metallb/crds $(HELM_TAG) $(GIT_TAG) $(OUTPUT_DIR) $(LATEST) +metallb/metallb/helm/%: PACKAGE_DEPENDENCIES=metallb-crds + +metallb/crds/helm/%: HELM_DIRECTORY=charts/crds ########### DO NOT EDIT ############################# # To update call: make add-generated-help-block diff --git a/projects/prometheus/prometheus/Makefile b/projects/prometheus/prometheus/Makefile index f4bfd8b4ce..4bb6787e52 100644 --- a/projects/prometheus/prometheus/Makefile +++ b/projects/prometheus/prometheus/Makefile @@ -33,9 +33,10 @@ HAS_HELM_CHART=true HELM_SOURCE_OWNER=prometheus-community HELM_SOURCE_REPOSITORY=helm-charts HELM_DIRECTORY=charts/prometheus -HELM_DESTINATION_REPOSITORY=prometheus/charts/prometheus HELM_IMAGE_LIST=prometheus/prometheus prometheus/node-exporter +HELM_CHART_NAMES=prometheus/charts/prometheus + include $(BASE_DIRECTORY)/Common.mk # Before running GO_MOD_DOWNLOAD_TARGETS, we need to generate web UI related diff --git a/projects/tinkerbell/tinkerbell-chart/Makefile b/projects/tinkerbell/tinkerbell-chart/Makefile index 8f6930df29..8a26bbbe46 100644 --- a/projects/tinkerbell/tinkerbell-chart/Makefile +++ b/projects/tinkerbell/tinkerbell-chart/Makefile @@ -11,7 +11,6 @@ RELEASE_TARGETS=helm/push HAS_HELM_CHART=true HELM_DIRECTORY=chart HELM_SOURCE_REPOSITORY=. -HELM_DESTINATION_REPOSITORY=$(REPO_OWNER)/$(REPO) include $(BASE_DIRECTORY)/Common.mk