From c8a9022ba90e00c259ef5a8c4ca6a69d69180ed4 Mon Sep 17 00:00:00 2001 From: Jack Francis Date: Thu, 7 Mar 2024 14:08:51 -0800 Subject: [PATCH] =?UTF-8?q?don=E2=80=99t=20deliver=20cert-manager=20CRDs?= =?UTF-8?q?=20with=20cluster-api-operator=20chart?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jack Francis --- Makefile | 2 +- hack/charts/cluster-api-operator/values.yaml | 1 + ...nager-helm.sh => inject-cert-manager-chart-version.sh} | 8 +------- 3 files changed, 3 insertions(+), 8 deletions(-) rename hack/{inject-cert-manager-helm.sh => inject-cert-manager-chart-version.sh} (84%) diff --git a/Makefile b/Makefile index f61c2b224..3707f69ad 100644 --- a/Makefile +++ b/Makefile @@ -476,7 +476,7 @@ release-manifests: $(KUSTOMIZE) $(RELEASE_DIR) ## Builds the manifests to publis release-chart: $(HELM) $(KUSTOMIZE) $(RELEASE_DIR) $(CHART_DIR) $(CHART_PACKAGE_DIR) ## Builds the chart to publish with a release cp -rf $(ROOT)/hack/charts/cluster-api-operator/. $(CHART_DIR) $(KUSTOMIZE) build ./config/chart > $(CHART_DIR)/templates/operator-components.yaml - $(ROOT)/hack/inject-cert-manager-helm.sh $(CERT_MANAGER_VERSION) + $(ROOT)/hack/inject-cert-manager-chart-version.sh $(CERT_MANAGER_VERSION) $(HELM) package $(CHART_DIR) --app-version=$(HELM_CHART_TAG) --version=$(HELM_CHART_TAG) --destination=$(CHART_PACKAGE_DIR) .PHONY: release-staging diff --git a/hack/charts/cluster-api-operator/values.yaml b/hack/charts/cluster-api-operator/values.yaml index aea3cdd2d..d818f9fc3 100644 --- a/hack/charts/cluster-api-operator/values.yaml +++ b/hack/charts/cluster-api-operator/values.yaml @@ -5,6 +5,7 @@ cert-manager: enabled: false fullnameOverride: "cert-manager" namespace: "cert-manager" + installCRDs: true # --- # Cluster API provider options core: "" diff --git a/hack/inject-cert-manager-helm.sh b/hack/inject-cert-manager-chart-version.sh similarity index 84% rename from hack/inject-cert-manager-helm.sh rename to hack/inject-cert-manager-chart-version.sh index e85cb0961..915032320 100755 --- a/hack/inject-cert-manager-helm.sh +++ b/hack/inject-cert-manager-chart-version.sh @@ -32,15 +32,9 @@ if [[ ! "$1" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then fi VERSION=$1 -URL="https://github.com/cert-manager/cert-manager/releases/download/${VERSION}/cert-manager.crds.yaml" -OUTPUT_DIR="${CHART_DIR}/crds" # Create the output directory if it doesn't exist -mkdir -p "$OUTPUT_DIR" - -# Download and save the file -curl -L -o "${OUTPUT_DIR}/cert-manager.crds.yaml" "$URL" -echo "Downloaded cert-manager.crds.yaml for ${VERSION} and saved it in ${OUTPUT_DIR}" +mkdir -p "$CHART_DIR" # Modify version in Chart.yaml CHART_FILE="${CHART_DIR}/Chart.yaml"