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"