-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (39 loc) · 1.24 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
GO_CMD=go
GO_BUILD=$(GO_CMD) build
GO_CLEAN=$(GO_CMD) clean
GO_TEST=$(GO_CMD) test
GO_GET=$(GO_CMD) get
TARGET_ACTIVER=activer
TARGET_KUBELET=kubelet
TARGET_APISERVER=apiserver
TARGET_CONTROLLER=controller
TARGET_KUBECTL=kubectl
TARGET_SCHEDULER=scheduler
TARGET_PROXY=proxy
.DEFAULT_GOAL := default
GO_TEST_PATH= './test/yaml_test'
.PHONY:test
all: test master node
master: kubectl apiServer controller scheduler activer
node: kubelet proxy
default: master node
test:
for path in ${GO_TEST_PATH}; do \
$(GO_TEST) $$path -v ; \
done
run_node:
wget -O cadvisor https://github.com/google/cadvisor/releases/download/v0.46.0/cadvisor-v0.46.0-linux-amd64
$(GO_BUILD) ./components/kubelet/kubelet.go -o TARGET_KUBELET
$(GO_BUILD) ./components/kubeproxy/proxy.go -o TARGET_PROXY
./cadvisor -port=8090 & /
./proxy &
run_master:
$(GO_BUILD) ./components/apiserver/apiserver.go -o TARGET_APISERVER
$(GO_BUILD) ./components/controller/controller.go -o TARGET_CONTROLLER
$(GO_BUILD) ./components/scheduler/scheduler.go -o -o TARGET_SCHEDULER
$(GO_BUILD) ./components/activer/activer.go -o TARGET_ACTIVER
$(GO_BUILD) ./components/kubectl/kubectl.go -o TARGET_KUBECTL
./master & \
./controller & \
./scheduler & \
./activer &