Merge branch 'SYS-6762_make-deploy-helm-change_to_support_helm_repositories' into 'master'

helm type modifications

See merge request pub/make-deploy!6
This commit is contained in:
Stefan Riepenhausen 2024-02-15 10:16:10 +01:00
commit 6cdb0632c3
1 changed files with 10 additions and 2 deletions

12
helm.mk
View File

@ -17,17 +17,24 @@ ifdef NAMESPACE
@ $(eval K8S_NAMESPACE = $(NAMESPACE)) @ $(eval K8S_NAMESPACE = $(NAMESPACE))
endif 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 ifdef DEBUG_MODE
@- echo "\n### deploying helm chart with --debug flag" @- echo "\n### deploying helm chart with --debug flag"
@- echo "-- DEBUG DEPLOYMENT --------------------" @- echo "-- DEBUG DEPLOYMENT --------------------"
@- echo " " @- echo " "
@- echo "Namespace: $(K8S_NAMESPACE)" @- echo "Namespace: $(K8S_NAMESPACE)"
@- echo "Helm Chart: $(HELM_CHART_PATH)" @- echo "Helm Chart: $(HELM_CHART_PATH)"
@- echo "Helm Version (use latest if empty): $(HELM_CHART_VERSION)"
@- echo "Values File: $(HELM_VALUES_FILE)" @- echo "Values File: $(HELM_VALUES_FILE)"
@- echo " " @- echo " "
@- 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 else
@ -36,11 +43,12 @@ else
@- echo " " @- echo " "
@- echo "Namespace: $(K8S_NAMESPACE)" @- echo "Namespace: $(K8S_NAMESPACE)"
@- echo "Helm Chart: $(HELM_CHART_PATH)" @- echo "Helm Chart: $(HELM_CHART_PATH)"
@- echo "Helm Version (use latest if empty): $(HELM_CHART_VERSION)"
@- echo "Values File: $(HELM_VALUES_FILE)" @- echo "Values File: $(HELM_VALUES_FILE)"
@- echo " " @- echo " "
@- 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 endif