-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (28 loc) · 913 Bytes
/
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
PWD := ${CURDIR}
NAME=edgenetwork-operator/controller
REGISTRY=ghcr.io/edgefarm
TAG?= latest
generate:
go generate ./...
setup:
kubectl apply -k https://github.com/metacontroller/metacontroller/manifests/production
crd: generate
kubectl apply -f ./manifests/crds/
controller:
kubectl apply -f ./manifests/controller.yaml
install: crd controller
test:
go test -v ./...
example:
kubectl apply -f ./examples/network.yaml
build:
CGO_ENABLED=0 GOOS=$(OS) GOARCH="$(GOARCH)" go build -o main -gcflags "all=-N -l" -ldflags '-extldflags "-static"' cmd/controller/main.go
image:
docker build -t $(REGISTRY)/$(NAME):$(TAG) -f ./Dockerfile .
push: image
docker push $(REGISTRY)/$(NAME):$(TAG)
clean:
kubectl delete -f ./examples/network.yaml
kubectl delete -f ./manifests/controller.yaml
kubectl -n metacontroller delete pod/metacontroller-0
.PHONY: generate setup install example image push clean