-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (34 loc) · 1.17 KB
/
Makefile
File metadata and controls
44 lines (34 loc) · 1.17 KB
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
CONTROLLER_GEN ?= controller-gen
IMG ?= extensions:latest
.PHONY: generate
generate: ## Regenerate deepcopy methods.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
.PHONY: manifests
manifests: ## Generate CRD and RBAC manifests from kubebuilder markers.
$(CONTROLLER_GEN) crd rbac:roleName=manager-role paths="./..." \
output:crd:artifacts:config=config/crd \
output:rbac:artifacts:config=config/rbac
.PHONY: build
build: generate ## Build the manager binary.
go build -o bin/manager ./cmd/...
.PHONY: test
test: generate ## Run unit tests.
go test ./... -v -count=1
.PHONY: vet
vet: ## Run go vet.
go vet ./...
.PHONY: vendor
vendor: ## Tidy and vendor dependencies.
go mod tidy && go mod vendor
.PHONY: docker-build
docker-build: ## Build the controller image.
docker build -t $(IMG) .
.PHONY: install
install: manifests ## Install CRDs into the current cluster.
kubectl apply -f config/crd
.PHONY: uninstall
uninstall: ## Remove CRDs from the current cluster.
kubectl delete -f config/crd --ignore-not-found
.PHONY: catalog
catalog: ## Apply all catalog PlatformExtension manifests to the current cluster.
kubectl apply -f config/catalog/