You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fmt: ## Run go fmt against code (it formats source code).
50
+
.PHONY: fmt
51
+
fmt: ## Run go fmt against code.
42
52
go fmt ./...
43
53
44
-
vet: ## Run go vet against code (it check the constructs in the code).
54
+
.PHONY: vet
55
+
vet: ## Run go vet against code.
45
56
go vet ./...
46
57
47
-
test: build ## Run tests.
58
+
.PHONY: test
59
+
test: build envtest ## Run tests.
48
60
go test$(shell pwd)/test -run $(shell pwd)/test/suite_test.go -v -test.timeout 10000s
49
-
50
-
#ENVTEST_ASSETS_DIR=$(shell pwd)/testbin
51
-
#test: manifests generate fmt vet ## Run tests.
52
-
# mkdir -p ${ENVTEST_ASSETS_DIR}
53
-
# test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.7.2/hack/setup-envtest.sh
54
-
# source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile cover.out
61
+
#KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test $(shell pwd)/test -run $(shell pwd)/test/suite_test.go -v -coverprofile cover.out -test.timeout 10000s
62
+
#KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test test/suite_test.go -coverprofile cover.out -v -test.timeout 10000s
55
63
56
64
##@ Build
57
65
66
+
.PHONY: build
58
67
build: manifests generate fmt vet ## Build manager binary.
59
68
go generate
60
69
go build -o bin/manager main.go
61
70
62
-
run: install build ## Connect to a local Kubernetes cluster, install the operator and run controller
71
+
.PHONY: run
72
+
run: install ## Run a controller from your host.
63
73
go run ./main.go
64
74
65
75
#docker-build: test ## Build docker image with the manager.
76
+
.PHONY: docker-build-push
66
77
docker-build-push: build ## Build docker image with the manager.
uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
0 commit comments