forked from open-policy-agent/opa-envoy-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
32 lines (24 loc) · 757 Bytes
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -e
set -m
helm repo add gloo https://storage.googleapis.com/solo-public-helm
helm upgrade -i -n gloo-system --create-namespace gloo gloo/gloo
kubectl config set-context $(kubectl config current-context) --namespace=gloo-system
kubectl apply -f vs.yaml
kubectl apply -f opa.yaml
helm upgrade -i -n gloo-system --create-namespace -f gloo.yaml gloo gloo/gloo
kubectl patch vs httpbin --type=merge -p "$(cat vs-patch.yaml)"
sleep 10
kubectl port-forward deployment/gateway-proxy 8080:8080 &
sleep 2
echo
echo "Starting tests"
echo
echo "Sending allowed request: "
curl -XGET -Is localhost:8080/get | head -n 1
echo
echo "Sending restricted request: "
curl -XPOST -Is localhost:8080/post | head -n 1
echo
echo "Press CTRL+C to exit"
fg 1