add --atomic flag and ROLLBACK_MODE

This commit is contained in:
Thomas 2023-09-22 09:41:40 +02:00
parent bb5a388c4f
commit 2f72c0bb35
1 changed files with 15 additions and 2 deletions

17
helm.mk
View File

@ -28,7 +28,20 @@ ifdef DEBUG_MODE
@- 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 --atomic --debug --wait --values -
ifdef ROLLBACK_MODE
@- echo "\n### rollback helm chart"
@- echo "-- DEBUG DEPLOYMENT --------------------"
@- echo " "
@- echo "Namespace: $(K8S_NAMESPACE)"
@- echo "Helm Chart: $(HELM_CHART_PATH)"
@- echo "Helm Release: $(HELM_CHART_NAME)"
@- echo " "
@- echo "----------------------------------"
@ helm rollback -n ${HELM_NAMESPACE} ${HELM_CHART_NAME}
else
@ -41,7 +54,7 @@ else
@- 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 --atomic --wait --values -
endif