-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (51 loc) · 1.4 KB
/
Makefile
File metadata and controls
63 lines (51 loc) · 1.4 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
IMAGE_NAME?=tainter
IMAGE_VERSION?=latest
IMAGE_TAG?="$(IMAGE_NAME):$(IMAGE_VERSION)"
END_TO_END_TEST_KUBERNETES_VERSION?=v1.29.7
.PHONY: run
run:
cargo run -- --config-file "./settings/tainter.toml"
.PHONY: test
test:
cargo test
.PHONY: setup
setup:
IMAGE_TAG=tainter:end-to-end make image
minikube start --nodes 3 --profile tainter-end-to-end --kubernetes-version=$(END_TO_END_TEST_KUBERNETES_VERSION)
# See https://minikube.sigs.k8s.io/docs/handbook/pushing/#7-loading-directly-to-in-cluster-container-runtime.
minikube image load tainter:end-to-end --profile tainter-end-to-end
kubectl kustomize ./tests | kubectl apply -f -
kubectl proxy --port=8011 &
.PHONY: teardown
teardown:
minikube delete --profile tainter-end-to-end
killall kubectl proxy
.PHONY: test-end-to-end
test-end-to-end:
cargo test -- --show-output --ignored
.PHONY: fmt
fmt:
cargo fmt
.PHONY: lint
lint:
cargo clippy
.PHONY: build
build:
cargo build
.PHONY: image
image:
@echo "Building image with tag $(IMAGE_TAG)"
docker build --tag $(IMAGE_TAG) .
.PHONY: run-image
run-image:
docker run --volume "./settings:/settings" $(IMAGE_TAG) --config-file="/settings/tainter.toml"
.PHONY: kubeconform
kubeconform:
kubeconform \
-schema-location default \
-schema-location 'kubeconform/schemas/{{ .ResourceKind }}.json' \
-strict \
-summary deploy
.PHONY: manifest
manifest:
kubectl kustomize ./deploy > tainter.yaml