-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (46 loc) · 1.48 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
47
48
49
50
51
52
53
54
55
56
57
58
PUSH ?= 0
.PHONY: api-http
api-http:
cd http && $(MAKE) api
.PHONY: storage-http
storage-http:
cd http && $(MAKE) storage
.PHONY: both-http
both-http: api-http storage-http
@echo "Made both http!"
.PHONY: api-grpc
api-grpc:
cd grpc && $(MAKE) api
.PHONY: storage-grpc
storage-grpc:
cd grpc && $(MAKE) storage
.PHONY: both-grpc
both-grpc: api-grpc storage-grpc
@echo "Made both grpc!"
.PHONY: install-linkerd
install-linkerd:
@if [ $(shell kubectl config current-context) = "kind-kind-test" ]; then \
linkerd install --crds | kubectl apply -f -; \
linkerd install | kubectl apply -f -; \
fi
.PHONY: upgrade-linkerd
upgrade-linkerd:
@if [ $(shell kubectl config current-context) = "kind-kind-test" ]; then \
linkerd upgrade --crds | kubectl apply -f -; \
linkerd upgrade | kubectl apply -f -; \
fi
.PHONY: uninstall-linkerd
uninstall-linkerd:
@if [ $(shell kubectl config current-context) = "kind-kind-test" ]; then \
linkerd uninstall | kubectl delete -f -; \
fi
.PHONY: inject-http-linkerd
inject-http-linkerd: both-http upgrade-linkerd
@if [ $(shell kubectl config current-context) = "kind-kind-test" ]; then \
kubectl get deploy post-storage-http post-api-http -o yaml | linkerd inject - | kubectl apply -f -; \
fi
.PHONY: inject-grpc-linkerd
inject-grpc-linkerd: both-grpc upgrade-linkerd
@if [ $(shell kubectl config current-context) = "kind-kind-test" ]; then \
kubectl get deploy post-storage-grpc post-api-grpc -o yaml | linkerd inject - | kubectl apply -f -; \
fi