@@ -13,8 +13,10 @@ VERSION ?= 3.1.1
1313# The operator version to use to run certification tests against
1414CERTIFICATION_VERSION ?= $(VERSION )
1515
16- # A SPACE delimited list of previous Operator versions that are used to run the compatibility tests.
17- COMPATIBLE_VERSIONS = 3.0.0
16+ # The previous Operator version used to run the compatibility tests.
17+ COMPATIBLE_VERSION = 3.0.2
18+ # The selector to use to find Operator Pods of the COMPATIBLE_VERSION (do not put in double quotes!!)
19+ COMPATIBLE_SELECTOR = component=coherence-operator
1820
1921# Capture the Git commit to add to the build information
2022GITCOMMIT ?= $(shell git rev-list -1 HEAD)
@@ -466,14 +468,17 @@ compatibility-test: export TEST_SSL_SECRET := $(TEST_SSL_SECRET)
466468compatibility-test : export TEST_IMAGE_PULL_POLICY := $(IMAGE_PULL_POLICY )
467469compatibility-test : export TEST_STORAGE_CLASS := $(TEST_STORAGE_CLASS )
468470compatibility-test : export VERSION := $(VERSION )
469- compatibility-test : export COMPATIBLE_VERSIONS := $(COMPATIBLE_VERSIONS )
471+ compatibility-test : export COMPATIBLE_VERSION := $(COMPATIBLE_VERSION )
472+ compatibility-test : export COMPATIBLE_SELECTOR := $(COMPATIBLE_SELECTOR )
470473compatibility-test : export OPERATOR_IMAGE := $(OPERATOR_IMAGE )
471474compatibility-test : export COHERENCE_IMAGE := $(COHERENCE_IMAGE )
472475compatibility-test : export UTILS_IMAGE := $(UTILS_IMAGE )
473476compatibility-test : export GO_TEST_FLAGS_E2E := $(strip $(GO_TEST_FLAGS_E2E ) )
474- compatibility-test : $(BUILD_TARGETS ) /build-operator clean-namespace reset-namespace create-ssl-secrets gotestsum
477+ compatibility-test : $(BUILD_TARGETS ) /build-operator undeploy clean-namespace reset-namespace gotestsum
478+ helm repo add coherence https://oracle.github.io/coherence-operator/charts
479+ helm repo update
475480 $(GOTESTSUM ) --format standard-verbose --junitfile $(TEST_LOGS_DIR ) /operator-e2e-compatibility-test.xml \
476- -- $(GO_TEST_FLAGS_E2E ) ./test/compatibility/...
481+ -- $(GO_TEST_FLAGS_E2E ) ./test/e2e/ compatibility/...
477482
478483
479484# ----------------------------------------------------------------------------------------------------------------------
@@ -623,8 +628,11 @@ endef
623628.PHONY : undeploy
624629undeploy : $(BUILD_PROPS ) $(BUILD_TARGETS ) /manifests $(GOBIN ) /kustomize
625630 $(call prepare_deploy,$(OPERATOR_IMAGE ) ,$(OPERATOR_NAMESPACE ) )
626- $(GOBIN ) /kustomize build $(BUILD_DEPLOY ) /default | kubectl delete -f -
631+ $(GOBIN ) /kustomize build $(BUILD_DEPLOY ) /default | kubectl delete -f - || true
627632 kubectl -n $(OPERATOR_NAMESPACE ) delete secret coherence-webhook-server-cert || true
633+ kubectl delete mutatingwebhookconfiguration coherence-operator-mutating-webhook-configuration || true
634+ kubectl delete validatingwebhookconfiguration coherence-operator-validating-webhook-configuration || true
635+
628636
629637# ----------------------------------------------------------------------------------------------------------------------
630638# Tail the deployed operator logs.
@@ -648,15 +656,15 @@ $(BUILD_MANIFESTS_PKG):
648656 cp -R config/rbac/ $(BUILD_MANIFESTS ) /rbac
649657 tar -C $(BUILD_OUTPUT ) -czf $(BUILD_MANIFESTS_PKG ) manifests/
650658
651- $(BUILD_TARGETS ) /manifests : $(BUILD_PROPS ) config/crd/bases/coherence.oracle.com_coherences .yaml config/crd-v1beta1/bases/coherence.oracle.com_coherences .yaml docs/about/04_coherence_spec.adoc
659+ $(BUILD_TARGETS ) /manifests : $(BUILD_PROPS ) config/crd/bases/coherence.oracle.com_coherence .yaml config/crd-v1beta1/bases/coherence.oracle.com_coherence .yaml docs/about/04_coherence_spec.adoc
652660 touch $(BUILD_TARGETS ) /manifests
653661
654- config/crd/bases/coherence.oracle.com_coherences .yaml : $(API_GO_FILES ) $(GOBIN ) /controller-gen
662+ config/crd/bases/coherence.oracle.com_coherence .yaml : $(API_GO_FILES ) $(GOBIN ) /controller-gen
655663 $(GOBIN ) /controller-gen " crd:trivialVersions=true,crdVersions={v1}" \
656664 rbac:roleName=manager-role paths=" {./api/...,./controllers/...}" \
657665 output:crd:artifacts:config=config/crd/bases
658666
659- config/crd-v1beta1/bases/coherence.oracle.com_coherences .yaml : $(API_GO_FILES ) $(GOBIN ) /controller-gen
667+ config/crd-v1beta1/bases/coherence.oracle.com_coherence .yaml : $(API_GO_FILES ) $(GOBIN ) /controller-gen
660668 @echo " Generating CRD v1beta1"
661669 $(GOBIN ) /controller-gen " crd:trivialVersions=true,crdVersions={v1beta1}" \
662670 rbac:roleName=manager-role paths=" {./api/...,./controllers/...}" \
@@ -1028,7 +1036,9 @@ run-clean: reset-namespace run
10281036run-debug : export COHERENCE_IMAGE := $(COHERENCE_IMAGE )
10291037run-debug : export UTILS_IMAGE := $(UTILS_IMAGE )
10301038run-debug :
1031- dlv debug --headless --listen=:2345 --api-version=2 --accept-multiclient
1039+ dlv debug --headless --listen=:2345 --api-version=2 --accept-multiclient \
1040+ -- --skip-service-suspend=true --coherence-dev-mode=true \
1041+ --cert-type=self-signed --webhook-service=host.docker.internal
10321042
10331043# ----------------------------------------------------------------------------------------------------------------------
10341044# Run the Operator locally in debug mode after deleting and recreating
0 commit comments