-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 822 Bytes
/
Makefile
File metadata and controls
40 lines (30 loc) · 822 Bytes
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
IMG ?= fluxgate-operator:latest
CONTROLLER_GEN ?= controller-gen
.PHONY: build test docker-build generate manifests install run fmt vet
## Build the operator binary
build: fmt vet
go build -o bin/operator ./cmd/operator
## Run all tests
test: fmt vet
go test ./...
## Build container image with podman
docker-build:
podman build -t $(IMG) -f Containerfile .
## Generate DeepCopy and CRD manifests
generate:
$(CONTROLLER_GEN) object paths="./api/..."
## Generate CRD YAML manifests
manifests:
$(CONTROLLER_GEN) crd paths="./api/..." output:crd:artifacts:config=config/crd
## Install CRDs into the cluster
install: manifests
kubectl apply -f config/crd/
## Run the operator locally against the current kubeconfig
run:
go run ./cmd/operator
## Format code
fmt:
go fmt ./...
## Run go vet
vet:
go vet ./...