-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
99 lines (80 loc) · 2.95 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
ns=default
ph_targets=(clean test \
get getAll \
createPod applyPod deletePod \
createService createSvc applyService applySvc deleteService deleteSvc\
createDeploy createDeployment applyDeploy applyDeployment deleteDeploy deleteDeployment \
createSts createStatefulSet applySts applyStatefulSet deleteSts deleteStatefulSet\
createDs createDaemonSet applyDs applyDaemonSet deleteDs deleteDaemonSet\
createJob applyJob deleteJob\
createCj createCronJob applyCj applyCronJob deleteCj deleteCronJob)
# todo: the dependcies.
get getAll:
@echo "get all ns, pod, svc, deploy, job and so on"
-@kubectl get ns,pod,svc,deploy,job -n $(ns)
@echo
test:
# waitting for the service started.
@echo "Wait for 20 seconds."
sh ./test.sh
@echo
createCj createCronJob applyCj applyCronJob : deleteService
@echo "Creating CronJob: Wait for 20 seconds."
sh ./kubenets/examples/cronjob/cronjob.sh "apply" $(shell pwd)
@
deleteCj deleteCronJob: deleteService
@echo "Deleting CronJob."
-sh ./kubenets/examples/cronjob/cronjob.sh "delete" $(shell pwd)
@
createJob applyJob: deleteService
@echo "Creating Job: Wait for 20 seconds."
sh ./kubenets/examples/job/job.sh "apply" $(shell pwd)
@
deleteJob: deleteService
@echo "Deleting Job."
-sh ./kubenets/examples/job/job.sh "delete" $(shell pwd)
@
createDs createDaemonSet applyDs applyDaemonSet: deleteService
@echo "Creating DaemonSet: Wait for 20 seconds."
sh ./kubenets/examples/daemonset/daemonSet.sh "apply" $(shell pwd)
@
deleteDs deleteDaemonSet: deleteService
@echo "Deleting DaemonSet."
-sh ./kubenets/examples/daemonset/daemonSet.sh "delete" $(shell pwd)
@
createSts createStatefulSet applySts applyStatefulSet: deleteService
@echo "Creating StatefulSet: Wait for 20 seconds."
sh ./kubenets/examples/statefulset/statefulSet.sh "apply" $(shell pwd)
@
deleteSts deleteStatefulSet: deleteService
@echo "Deleting StatefulSet."
-sh ./kubenets/examples/statefulset/statefulSet.sh "delete" $(shell pwd)
@
createDeploy createDeployment applyDeploy applyDeployment: deleteService
@echo "Creating Deploy: Wait for 20 seconds."
sh ./kubenets/examples/deployment/deployment.sh "apply" $(shell pwd)
@
deleteDeploy deleteDeployment: deleteService
@echo "Deleting deployment."
-sh ./kubenets/examples/deployment/deployment.sh "delete" $(shell pwd)
@
createService createSvc applyService applySvc: createPod deleteService
@echo "Creating Service: Wait for 20 seconds."
sh ./kubenets/examples/service/service.sh "apply" $(shell pwd)
@echo
deleteService deleteSvc: deletePod
@echo "Deleting service."
-sh ./kubenets/examples/service/service.sh "delete" $(shell pwd)
@echo
createPod applyPod: deletePod
@echo "Creating pod: Wait for 20 seconds."
sh ./kubenets/examples/pod/pod.sh "apply" $(shell pwd)
@echo
deletePod:
@echo "Deleting pod."
-sh ./kubenets/examples/pod/pod.sh "delete" $(shell pwd)
@echo
.PHONY: $(ph_targets)
clean:
-rm aaa
# remove all the example deploymented. it wont be done until the all the above finished.