fail and exit on some errors
This commit is contained in:
parent
251214da7d
commit
8e41a3935d
|
@ -6,7 +6,7 @@ MANDATORY-kustomize = K8S_CONTEXT KUSTOMIZE_FOLDER
|
|||
start-kustomize:
|
||||
@- echo "\n### starting deployment with kustomize"
|
||||
@- echo "\n### setting kubernetes context to $(K8S_CONTEXT)"
|
||||
@- kubectl config use-context $(K8S_CONTEXT)
|
||||
@ kubectl config use-context $(K8S_CONTEXT)
|
||||
|
||||
@- echo "\n### create namespace $(K8S_NAMESPACE)"
|
||||
@- kubectl create namespace "$(K8S_NAMESPACE)" --dry-run=client -o yaml | kubectl apply -f -
|
||||
|
@ -18,12 +18,12 @@ start-kustomize:
|
|||
|
||||
ifdef KUSTOMIZE_EDIT_NAMESPACE
|
||||
@- echo "\n### setting namespace to $(K8S_NAMESPACE)"
|
||||
@- cd $(KUSTOMIZE_FOLDER) && kustomize edit set namespace $(K8S_NAMESPACE)
|
||||
@ cd $(KUSTOMIZE_FOLDER) && kustomize edit set namespace $(K8S_NAMESPACE)
|
||||
endif
|
||||
|
||||
# actual deployment is happening here
|
||||
@- echo "\n### applying kustomizations"
|
||||
@- cd $(KUSTOMIZE_FOLDER) && kubectl apply -k .
|
||||
@ cd $(KUSTOMIZE_FOLDER) && kubectl apply -k .
|
||||
|
||||
pull-kustomize:
|
||||
# nop
|
||||
|
|
Loading…
Reference in New Issue