From 9cbde1ddbd6215d5b4da66964caa9b432804833b Mon Sep 17 00:00:00 2001 From: Stefan Riepenhausen Date: Thu, 15 Feb 2024 09:57:49 +0100 Subject: [PATCH] helm type modifications --- helm.mk | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/helm.mk b/helm.mk index f8ba138..a1ef5ab 100644 --- a/helm.mk +++ b/helm.mk @@ -17,17 +17,24 @@ ifdef NAMESPACE @ $(eval K8S_NAMESPACE = $(NAMESPACE)) endif +ifdef HELM_REPO_URL + @- echo "Helm Repo: $(HELM_REPO_URL)" + @ helm repo add $(HELM_CHART_NAME) $(HELM_REPO_URL) + @- helm repo update $(HELM_CHART_NAME) +endif + ifdef DEBUG_MODE @- echo "\n### deploying helm chart with --debug flag" @- echo "-- DEBUG DEPLOYMENT --------------------" @- echo " " @- echo "Namespace: $(K8S_NAMESPACE)" @- echo "Helm Chart: $(HELM_CHART_PATH)" + @- echo "Helm Version (use latest if empty): $(HELM_CHART_VERSION)" @- echo "Values File: $(HELM_VALUES_FILE)" @- echo " " @- echo "----------------------------------" - @ envsubst < $(HELM_VALUES_FILE) | helm upgrade $(HELM_CHART_NAME) $(HELM_CHART_PATH) -n $(K8S_NAMESPACE) --install --debug --wait --values - + @ envsubst < $(HELM_VALUES_FILE) | helm upgrade $(HELM_CHART_NAME) $(HELM_CHART_PATH) -n $(K8S_NAMESPACE) --install --debug --wait --values - --version "$(HELM_CHART_VERSION)" else @@ -36,11 +43,12 @@ else @- echo " " @- echo "Namespace: $(K8S_NAMESPACE)" @- echo "Helm Chart: $(HELM_CHART_PATH)" + @- echo "Helm Version (use latest if empty): $(HELM_CHART_VERSION)" @- echo "Values File: $(HELM_VALUES_FILE)" @- echo " " @- echo "----------------------------------" - @ envsubst < $(HELM_VALUES_FILE) | helm upgrade $(HELM_CHART_NAME) $(HELM_CHART_PATH) -n $(K8S_NAMESPACE) --install --wait --values - + @ envsubst < $(HELM_VALUES_FILE) | helm upgrade $(HELM_CHART_NAME) $(HELM_CHART_PATH) -n $(K8S_NAMESPACE) --install --wait --values - --version "$(HELM_CHART_VERSION)" endif