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
# Image URL to use all building/pushing image targets
3
15
IMG ?= controller:latest
@@ -14,8 +26,11 @@ endif
14
26
all: manager
15
27
16
28
# Run tests
29
+
ENVTEST_ASSETS_DIR = $(shell pwd)/testbin
17
30
test: generate fmt vet manifests
18
-
go test ./... -coverprofile cover.out
31
+
mkdir -p $(ENVTEST_ASSETS_DIR)
32
+
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.6.3/hack/setup-envtest.sh
33
+
source$(ENVTEST_ASSETS_DIR)/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile cover.out
19
34
20
35
# Build manager binary
21
36
manager: generate fmt vet
@@ -93,3 +108,16 @@ KUSTOMIZE=$(GOBIN)/kustomize
93
108
else
94
109
KUSTOMIZE=$(shell which kustomize)
95
110
endif
111
+
112
+
# Generate bundle manifests and metadata, then validate generated files.
113
+
.PHONY: bundle
114
+
bundle: manifests
115
+
operator-sdk generate kustomize manifests -q
116
+
cd config/manager &&$(KUSTOMIZE) edit set image controller=$(IMG)
0 commit comments