|
48 | 48 |
|
49 | 49 | # Set the Operator SDK version to use. By default, what is installed on the system is used. |
50 | 50 | # This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit. |
51 | | -OPERATOR_SDK_VERSION ?= v1.31.0 |
| 51 | +OPERATOR_SDK_VERSION ?= v1.41.1 |
52 | 52 |
|
53 | 53 | # Image URL to use all building/pushing image targets |
54 | 54 | DEFAULT_IMG ?= quay.io/openstack-k8s-operators/watcher-operator:latest |
@@ -146,22 +146,22 @@ PROC_CMD = --procs ${PROCS} |
146 | 146 | .PHONY: test |
147 | 147 | test: manifests generate fmt vet envtest ginkgo ## Run tests. |
148 | 148 | OPERATOR_TEMPLATES="$(PWD)/templates" \ |
149 | | - KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) --trace --cover --coverpkg=../../pkg/watcher,../../controllers,../../api/v1beta1 --coverprofile cover.out --covermode=atomic ${PROC_CMD} $(GINKGO_ARGS) ./tests/... |
| 149 | + KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" $(GINKGO) --trace --cover --coverpkg=../../internal/watcher,../../internal/controller,../../api/v1beta1 --coverprofile cover.out --covermode=atomic ${PROC_CMD} $(GINKGO_ARGS) ./test/... |
150 | 150 |
|
151 | 151 |
|
152 | 152 | ##@ Build |
153 | 153 |
|
154 | 154 | .PHONY: build |
155 | 155 | build: generate fmt vet ## Build manager binary. |
156 | | - go build -o bin/manager main.go |
| 156 | + go build -o bin/manager cmd/main.go |
157 | 157 |
|
158 | 158 | .PHONY: run |
159 | 159 | run: export METRICS_PORT?=24604 |
160 | 160 | run: export HEALTH_PORT?=24605 |
161 | 161 | run: export PPROF_PORT?=8082 |
162 | 162 | run: export ENABLE_WEBHOOKS?=false |
163 | 163 | run: manifests generate fmt vet ## Run a controller from your host. |
164 | | - go run ./main.go -metrics-bind-address ":$(METRICS_PORT)" -health-probe-bind-address ":$(HEALTH_PORT)" -pprof-bind-address ":$(PPROF_PORT)" |
| 164 | + go run ./cmd/main.go -metrics-bind-address ":$(METRICS_PORT)" -health-probe-bind-address ":$(HEALTH_PORT)" -pprof-bind-address ":$(PPROF_PORT)" |
165 | 165 |
|
166 | 166 |
|
167 | 167 | # Extra vars which will be passed to the Docker-build |
@@ -212,7 +212,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest |
212 | 212 | GINKGO ?= $(LOCALBIN)/ginkgo |
213 | 213 |
|
214 | 214 | ## Tool Versions |
215 | | -KUSTOMIZE_VERSION ?= v3.8.7 |
| 215 | +KUSTOMIZE_VERSION ?= v5.6.0 |
216 | 216 | CONTROLLER_TOOLS_VERSION ?= v0.18.0 |
217 | 217 | SETUP_ENVTEST_VERSION ?= release-0.22 |
218 | 218 |
|
@@ -391,6 +391,10 @@ watcher: export WATCHER_DECISION_ENGINE_IMAGE=${WATCHER_DECISION_ENGINE_CI_IMAGE |
391 | 391 | watcher: export WATCHER_APPLIER_IMAGE=${WATCHER_APPLIER_CI_IMAGE} |
392 | 392 | watcher: export CATALOG_IMG=${CATALOG_IMAGE} |
393 | 393 | watcher: ## Install watcher operator via olm |
| 394 | + # explicitly to delete any running watcher-operator deployments from openstack-operator here as |
| 395 | + # label selectors can change and installing a service catalog/index like this alongside |
| 396 | + # openstack-operator (what CI appears to do?) is not recommended |
| 397 | + oc delete deployment watcher-operator-controller-manager -n openstack-operators --ignore-not-found=true |
394 | 398 | bash ci/olm.sh |
395 | 399 | oc apply -f ci/olm.yaml |
396 | 400 | timeout 300s bash -c "while ! (oc get csv -n openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators -o jsonpath='{.items[*].status.phase}' | grep Succeeded); do sleep 10; done" |
@@ -424,7 +428,7 @@ watcher_cleanup: ## Cleaning watcher operator via olm |
424 | 428 |
|
425 | 429 | KUTTL_SUITE ?= default |
426 | 430 | KUTTL_NAMESPACE ?= watcher-kuttl-$(KUTTL_SUITE) |
427 | | -KUTTL_SUITE_DIR ?= tests/kuttl/test-suites/$(KUTTL_SUITE) |
| 431 | +KUTTL_SUITE_DIR ?= test/kuttl/test-suites/$(KUTTL_SUITE) |
428 | 432 |
|
429 | 433 | .PHONY: stop_watcher_integrated |
430 | 434 | stop_watcher_integrated: |
|
0 commit comments