This repository has been archived by the owner on Mar 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 136
/
Makefile
46 lines (39 loc) · 1.81 KB
/
Makefile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
KONG_BUILD_TOOLS?=2.0.6
KONG_TEST_DATABASE?=postgres
setup-kong-build-tools:
-rm -rf kong-build-tools; \
git clone https://github.com/Kong/kong-build-tools.git; fi
cd kong-build-tools; \
git reset --hard ${KONG_BUILD_TOOLS}; \
test:
./run_tests.sh
k8s_setup:
kubectl apply -f kong-namespace.yaml
-./setup_certificate.sh
run_dbless: k8s_setup
-kubectl create configmap kongdeclarative -n kong --from-file=declarative.yaml
kubectl create configmap kongdeclarative -n kong --from-file=declarative.yaml -o yaml --dry-run | kubectl replace -n kong -f -
kubectl apply -f kong-dbless.yaml
kubectl patch deployment kong-dbless -n kong -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"declarative\":\"`md5sum declarative.yaml | awk '{ print $$1 }'`\"}}}}}}"
run_cassandra: k8s_setup
kubectl apply -f cassandra-service.yaml
kubectl apply -f cassandra-statefulset.yaml
kubectl -n kong apply -f kong-control-plane-cassandra.yaml
kubectl -n kong apply -f kong-ingress-data-plane-cassandra.yaml
run_postgres: k8s_setup
kubectl -n kong apply -f postgres.yaml
kubectl -n kong apply -f kong-control-plane-postgres.yaml
kubectl -n kong apply -f kong-ingress-data-plane-postgres.yaml
cleanup:
-kubectl -n kong delete -f cassandra-service.yaml
-kubectl -n kong delete -f cassandra-statefulset.yaml
-kubectl -n kong delete -f postgres.yaml
-kubectl -n kong delete -f kong-control-plane-cassandra.yaml
-kubectl -n kong delete -f kong-control-plane-postgres.yaml
-kubectl -n kong delete -f kong-ingress-data-plane-cassandra.yaml
-kubectl -n kong delete -f kong-ingress-data-plane-postgres.yaml
-kubectl -n kong delete -f kong-dbless.yaml
-kubectl -n kong delete configmap kongdeclarative
-kubectl certificate approve kong-control-plane.kong.svc
-kubectl delete csr kong-control-plane.kong.svc
kubectl delete -f kong-namespace.yaml