@@ -97,7 +97,7 @@ KUBEBUILDER_ASSETS ?= $(ENVTEST_ASSETS_DIR)/k8s/$(ENVTEST_K8S_VERSION)-$(TARGET_
9797# Ginkgo configuration
9898GINKGO_NODES ?= 12
9999GINKGO_EDITOR_INTEGRATION ?= true
100- GINKGO_OPTS = -vv --randomize-all --output-interceptor-mode=none --trace --timeout 90m --flake-attempts=1 --race --nodes=$(GINKGO_NODES ) --cover --coverpkg=github.com/mongodb/mongodb-atlas-kubernetes/v2/pkg/ ...
100+ GINKGO_OPTS = -vv --randomize-all --output-interceptor-mode=none --trace --timeout 90m --flake-attempts=1 --race --nodes=$(GINKGO_NODES ) --cover --coverpkg=github.com/mongodb/mongodb-atlas-kubernetes/v2/...
101101GINKGO_FILTER_LABEL ?=
102102ifneq ($(GINKGO_FILTER_LABEL ) ,)
103103GINKGO_FILTER_LABEL_OPT := --label-filter="$(GINKGO_FILTER_LABEL ) "
@@ -209,7 +209,7 @@ bin/$(TARGET_OS)/$(TARGET_ARCH):
209209
210210bin/$(TARGET_OS ) /$(TARGET_ARCH ) /manager : $(GO_SOURCES ) bin/$(TARGET_OS ) /$(TARGET_ARCH )
211211 @echo " Building operator with version $( VERSION) ; $( TARGET_OS) - $( TARGET_ARCH) "
212- CGO_ENABLED=0 GOOS=$(TARGET_OS ) GOARCH=$(TARGET_ARCH ) go build -o $@ -ldflags=" -X github.com/mongodb/mongodb-atlas-kubernetes/v2/pkg /version.Version=$( VERSION) " cmd/main.go
212+ CGO_ENABLED=0 GOOS=$(TARGET_OS ) GOARCH=$(TARGET_ARCH ) go build -o $@ -ldflags=" -X github.com/mongodb/mongodb-atlas-kubernetes/v2/internal /version.Version=$( VERSION) " cmd/main.go
213213 @touch $@
214214
215215bin/manager : bin/$(TARGET_OS ) /$(TARGET_ARCH ) /manager
@@ -234,7 +234,7 @@ deploy: generate manifests run-kind ## Deploy controller in the configured Kuber
234234# Produce CRDs that work back to Kubernetes 1.16 (so 'apiVersion: apiextensions.k8s.io/v1')
235235manifests : CRD_OPTIONS ?= "crd:crdVersions=v1,ignoreUnexportedFields=true"
236236manifests : fmt # # Generate manifests e.g. CRD, RBAC etc.
237- controller-gen $(CRD_OPTIONS ) rbac:roleName=manager-role webhook paths=" ./internal/..." output:crd:artifacts:config=config/crd/bases
237+ controller-gen $(CRD_OPTIONS ) rbac:roleName=manager-role webhook paths=" ./api/... " paths= " ./ internal/controller /..." output:crd:artifacts:config=config/crd/bases
238238 @./scripts/split_roles_yaml.sh
239239
240240
@@ -252,7 +252,7 @@ fmt: $(TIMESTAMPS_DIR)/fmt ## Run go fmt against code
252252
253253fix-lint :
254254 find . -name " *.go" -not -path " ./vendor/*" -exec gofmt -w " {}" \;
255- goimports -local github.com/mongodb/mongodb-atlas-kubernetes/v2 -w ./internal ./pkg ./test
255+ goimports -local github.com/mongodb/mongodb-atlas-kubernetes/v2 -w ./internal ./api ./test
256256 golangci-lint run --fix
257257
258258$(TIMESTAMPS_DIR ) /vet : $(GO_SOURCES )
@@ -264,7 +264,7 @@ vet: $(TIMESTAMPS_DIR)/vet ## Run go vet against code
264264
265265.PHONY : generate
266266generate : ${GO_SOURCES} # # Generate code
267- controller-gen object:headerFile=" hack/boilerplate.go.txt" paths=" ./internal/..."
267+ controller-gen object:headerFile=" hack/boilerplate.go.txt" paths=" ./api/... " paths= " ./ internal/controller /..."
268268 $(MAKE ) fmt
269269
270270.PHONY : check-missing-files
@@ -288,7 +288,7 @@ validate-manifests: generate manifests
288288.PHONY : bundle
289289bundle : manifests # # Generate bundle manifests and metadata, then validate generated files.
290290 @echo " Building bundle $( VERSION) "
291- operator-sdk generate $(KUSTOMIZE ) manifests -q --apis-dir=pkg/ api
291+ operator-sdk generate $(KUSTOMIZE ) manifests -q --apis-dir=api
292292 cd config/manager && $(KUSTOMIZE ) edit set image controller=$(IMG )
293293 $(KUSTOMIZE ) build --load-restrictor LoadRestrictionsNone config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION ) $(BUNDLE_METADATA_OPTS )
294294 operator-sdk bundle validate ./bundle
0 commit comments