-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (35 loc) · 1.15 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
gocmd = go
all: clean test build
build: build-node-undertaker
build-node-undertaker:
$(gocmd) build -o bin/node-undertaker github.com/dbschenker/node-undertaker/cmd/node-undertaker
test: mock
$(gocmd) test ./...
clean:
rm -r bin/ || true
docker:
docker buildx build -t node-undertaker:local .
lint:
golangci-lint run ./... -v
mock: mockgen
$(gocmd) generate ./...
clean_mocks:
find . -name '*_mocks.go' -delete
vuln:
govulncheck ./...
vet:
$(gocmd) vet ./...
kind:
kind create cluster --config example/kind/config.yaml
kind_load:
kind load docker-image node-undertaker:local
kind_helm:
helm upgrade --install -n node-undertaker node-undertaker charts/node-undertaker --create-namespace -f example/kind/values.yaml
local:
source ./.env && bin/node-undertaker --namespace kube-node-lease --log-level=debug --cloud-provider=kwok --cloud-termination-delay=180 --cloud-prepare-termination-delay=200 --drain-delay=190 --node-initial-threshold 45
kwok:
kwokctl create cluster --node-lease-duration-seconds 0
kubectl config use-context kwok-kwok
kwokctl get kubeconfig > ~/.kube/kwok.kubeconfig
mockgen:
go install go.uber.org/mock/mockgen@latest