Commit f13aec7d authored by Geoff Simmons's avatar Geoff Simmons

Add make un/deploy targets for controller deployment with kubectl.

make variable DEPLOY=kubectl specifies these variants for the targets
deploy- and undeploy-controller, otherwise un/deploy the helm chart.
parent cdd26851
......@@ -87,6 +87,21 @@ deploy-controller-helm:
--set vikingController.image.repository=$(CONTROLLER_IMAGE) \
--set vikingController.image.tag=$(CONTROLLER_TAG)
deploy-controller-kubectl:
@kubectl apply -f serviceaccount.yaml
@kubectl apply -f rbac.yaml
@kubectl apply -f varnishcfg-crd.yaml
@kubectl apply -f backendcfg-crd.yaml
@kubectl apply -f controller.yaml
deploy-controller:
ifeq ($(DEPLOY),kubectl)
deploy-controller: deploy-controller-kubectl
else
deploy-controller: deploy-controller-helm
endif
deploy-service-helm:
@helm install viking-service $(mkdir)/../charts/viking-service \
--values values-varnish.yaml \
......@@ -111,6 +126,24 @@ undeploy-controller-helm:
@kubectl wait pod --timeout=$(WAIT_TIMEOUT) -n kube-system \
-l app.kubernetes.io/name=viking-controller --for=delete
undeploy-controller-kubectl:
@kubectl delete -f controller.yaml
@kubectl delete -f backendcfg-crd.yaml
@kubectl delete -f varnishcfg-crd.yaml
@kubectl delete -f rbac.yaml
@kubectl delete -f serviceaccount.yaml
@echo Waiting for the viking-controller Pod to be deleted
@kubectl wait pod --timeout=$(WAIT_TIMEOUT) -n kube-system \
-l app=varnish-ingress-controller --for=delete
undeploy-controller:
ifeq ($(DEPLOY),kubectl)
undeploy-controller: undeploy-controller-kubectl
else
undeploy-controller: undeploy-controller-helm
endif
deploy-helm: deploy-controller-helm deploy-service-helm
undeploy-helm: undeploy-service-helm undeploy-controller-helm
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment