2022-12-23 13:48:22 +00:00
|
|
|
MANDATORY-helm = K8S_CONTEXT HELM_CHART_NAME HELM_CHART_PATH HELM_VALUES_FILE NAMESPACE
|
2022-11-03 08:48:22 +00:00
|
|
|
# helm
|
|
|
|
#
|
2022-12-23 13:48:22 +00:00
|
|
|
# deploys helm charts on k8s via helm
|
2022-12-08 09:34:34 +00:00
|
|
|
#
|
2022-11-03 08:48:22 +00:00
|
|
|
start-helm:
|
2022-12-23 13:48:22 +00:00
|
|
|
@- echo "\n### starting deployment with helm"
|
2022-11-03 08:48:22 +00:00
|
|
|
@- echo "\n### setting kubernetes context to $(K8S_CONTEXT)"
|
2022-12-07 13:55:36 +00:00
|
|
|
@ kubectl config use-context $(K8S_CONTEXT)
|
2022-12-23 13:48:22 +00:00
|
|
|
|
2023-03-07 15:55:15 +00:00
|
|
|
ifdef TEST_MODE
|
|
|
|
@- echo "Testing chart with 'helm template --debug'"
|
|
|
|
@ envsubst < ${HELM_VALUES_FILE} | helm template ${HELM_CHART_NAME} ${HELM_CHART_PATH} --debug --values -
|
|
|
|
endif
|
|
|
|
|
2022-11-03 08:48:22 +00:00
|
|
|
@- echo "\n### deploying helm chart"
|
2022-12-23 13:48:22 +00:00
|
|
|
@- echo "-- DEPLOYMENT --------------------"
|
|
|
|
@- echo " "
|
|
|
|
@- echo "Namespace: $(NAMESPACE)"
|
|
|
|
@- echo "Helm Chart: $(HELM_CHART_PATH)"
|
|
|
|
@- echo "Values File: $(HELM_VALUES_FILE)"
|
|
|
|
@- echo " "
|
|
|
|
@- echo "----------------------------------"
|
|
|
|
|
|
|
|
@ envsubst < $(HELM_VALUES_FILE) | helm upgrade $(HELM_CHART_NAME) $(HELM_CHART_PATH) -n $(NAMESPACE) --install --wait --values -
|
|
|
|
|
|
|
|
|
2023-03-07 15:55:15 +00:00
|
|
|
|
|
|
|
|
2022-11-03 08:48:22 +00:00
|
|
|
pull-helm:
|
2022-11-15 14:23:56 +00:00
|
|
|
# nop
|