Commit 2c889af1 authored by Geoff Simmons's avatar Geoff Simmons

Automate un-/deployment & test of Varnish Ingress and the controller.

parent 08c612e4
#! /bin/bash -ex
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
kubectl wait --timeout=2m pod -n kube-system -l app=varnish-ingress-controller \
--for=delete
#! /bin/bash -ex
kubectl apply -f adm-secret.yaml
kubectl apply -f varnish.yaml
kubectl apply -f nodeport.yaml
# looks like -*- vcl -*-
varnishtest "verify deployment in the not ready state"
client c1 -connect "${localhost} ${localport}" {
txreq
rxresp
expect resp.status == 503
} -run
#! /bin/bash -ex
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
#! /bin/bash -ex
kubectl delete -f nodeport.yaml
kubectl delete -f varnish.yaml
kubectl delete -f adm-secret.yaml
echo Waiting until varnish-ingress Pods are deleted
kubectl wait --timeout=2m pod -l app=varnish-ingress --for=delete
#! /bin/bash -ex
function killforward {
kill $KUBEPID
}
LOCALPORT=${LOCALPORT:-8888}
kubectl wait --timeout=2m pod -n kube-system -l app=varnish-ingress-controller \
--for=condition=Ready
kubectl wait --timeout=2m pod -l app=varnish-ingress --for=condition=Initialized
sleep 1
kubectl port-forward svc/varnish-ingress ${LOCALPORT}:80 >/dev/null &
KUBEPID=$!
trap killforward EXIT
sleep 1
varnishtest ${TESTOPTS} -Dlocalport=${LOCALPORT} deploy.vtc
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