forked from plexsystems/sandbox-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (25 loc) · 824 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
KUBERNETES_VERSION=v1.14.10
CLUSTER_NAME=operator-testing-$(KUBERNETES_VERSION)
OPERATOR_IMAGE=sandbox-operator:dev
.PHONY: image
image:
docker build . -t $(OPERATOR_IMAGE)
.PHONY: cluster
cluster:
kind create cluster --name $(CLUSTER_NAME) --image kindest/node:$(KUBERNETES_VERSION)
kubectl wait --for=condition=Ready --timeout=60s node --all
.PHONY: deploy
deploy: image
kind load docker-image $(OPERATOR_IMAGE) --name $(CLUSTER_NAME)
kubectl delete pod --all
kustomize build example | kubectl apply -f -
kubectl wait --for=condition=Ready --timeout=60s pods --all
.PHONY: test-unit
test-unit:
go test ./controller -v -count=1
.PHONY: test-integration
test-integration: cluster deploy
go test ./controller -v --tags=integration -count=1
.PHONY: destroy
destroy:
kind delete cluster --name $(CLUSTER_NAME)