-
Notifications
You must be signed in to change notification settings - Fork 192
Expand file tree
/
Copy pathMakefile
More file actions
105 lines (84 loc) · 3.23 KB
/
Makefile
File metadata and controls
105 lines (84 loc) · 3.23 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
.PHONY: all
all: fix-go-generate build lint-go lint-api test-unit toc-verify
.PHONY: fix-go-generate
fix-go-generate:
dev/tools/fix-go-generate
.PHONY: build
build:
go build -o bin/manager cmd/agent-sandbox-controller/main.go
KIND_CLUSTER=agent-sandbox
.PHONY: deploy-kind
# `EXTENSIONS=true make deploy-kind` to deploy with Extensions enabled.
# `CONTROLLER_ARGS="--enable-pprof-debug --zap-log-level=debug" make deploy-kind` to deploy with custom controller flags.
# `CONTROLLER_ONLY=true make deploy-kind` to build and push only the controller image.
deploy-kind:
./dev/tools/create-kind-cluster --recreate ${KIND_CLUSTER} --kubeconfig bin/KUBECONFIG
./dev/tools/push-images --image-prefix=kind.local/ --kind-cluster-name=${KIND_CLUSTER} $(if $(filter true,$(CONTROLLER_ONLY)),--controller-only)
./dev/tools/deploy-to-kube --image-prefix=kind.local/ $(if $(filter true,$(EXTENSIONS)),--extensions) $(if $(CONTROLLER_ARGS),--controller-args="$(CONTROLLER_ARGS)")
.PHONY: deploy-cloud-provider-kind
deploy-cloud-provider-kind:
./dev/tools/deploy-cloud-provider
.PHONY: delete-kind
delete-kind:
kind delete cluster --name ${KIND_CLUSTER}
.PHONY: kill-cloud-provider-kind
kill-cloud-provider-kind:
killall cloud-provider-kind
.PHONY: test-unit
test-unit:
./dev/tools/test-unit
.PHONY: test-e2e
test-e2e:
./dev/ci/presubmits/test-e2e
.PHONY: test-e2e-benchmarks
test-e2e-benchmarks:
./dev/ci/presubmits/test-e2e --suite benchmarks
.PHONY: lint-go
lint-go:
./dev/tools/lint-go
.PHONY: lint-api
lint-api:
./dev/tools/lint-api
# Location of your local k8s.io repo (can be overridden: make release-promote TAG=v0.1.0 K8S_IO_DIR=../other/k8s.io)
K8S_IO_DIR ?= ../../kubernetes/k8s.io
# Default remote (can be overriden: make release-publish REMOTE=upstream ...)
REMOTE_UPSTREAM ?= upstream
# Promote all staging images to registry.k8s.io
# Usage: make release-promote TAG=vX.Y.Z
.PHONY: release-promote
release-promote:
@if [ -z "$(TAG)" ]; then echo "TAG is required (e.g., make release-promote TAG=vX.Y.Z)"; exit 1; fi
./dev/tools/tag-promote-images --tag=${TAG} --k8s-io-dir=${K8S_IO_DIR}
# Publish a draft release to GitHub
# Usage: make release-publish TAG=vX.Y.Z
.PHONY: release-publish
release-publish:
@if [ -z "$(TAG)" ]; then echo "TAG is required (e.g., make release-publish TAG=vX.Y.Z)"; exit 1; fi
go mod tidy
go generate ./...
./dev/tools/release --tag=${TAG} --publish
# Generate release manifests only
# Usage: make release-manifests TAG=vX.Y.Z
.PHONY: release-manifests
release-manifests:
@if [ -z "$(TAG)" ]; then echo "TAG is required (e.g., make release-manifests TAG=vX.Y.Z)"; exit 1; fi
go mod tidy
go generate ./...
./dev/tools/release --tag=${TAG}
# Example usage:
# make release-python-sdk TAG=v0.1.1rc1 (to release only on TestPyPI, blocked from PyPI in workflow)
# make release-python-sdk TAG=v0.1.1.post1 (for patch release on TestPyPI and PyPI)
.PHONY: release-python-sdk
release-python-sdk:
@if [ -z "$(TAG)" ]; then echo "TAG is required (e.g., make release-python-sdk TAG=vX.Y.Z.postN)"; exit 1; fi
./dev/tools/release-python --tag=${TAG} --remote=${REMOTE_UPSTREAM}
.PHONY: toc-update
toc-update:
./dev/tools/update-toc
.PHONY: toc-verify
toc-verify:
./dev/tools/verify-toc
.PHONY: clean
clean:
rm -rf dev/tools/tmp
rm -rf bin/manager