@@ -52,6 +52,13 @@ KIND_NODE_VERSION ?= $(KUBE_MINOR).0
52
52
KIND_CLUSTER_NAME ?= kind-olmv0
53
53
KIND_CLUSTER_IMAGE := kindest/node:v$(KIND_NODE_VERSION )
54
54
55
+ # Take operator registry tag from operator registry version in go.mod
56
+ export OPERATOR_REGISTRY_TAG ?= $(shell go list -m github.com/operator-framework/operator-registry | cut -d" " -f2)
57
+
58
+ # Pin deployment to those images export
59
+ export OPERATOR_REGISTRY_IMAGE ?= quay.io/operator-framework/opm :$(OPERATOR_REGISTRY_TAG )
60
+ export CONFIGMAP_SERVER_IMAGE ?= quay.io/operator-framework/configmap-operator-registry :$(OPERATOR_REGISTRY_TAG )
61
+
55
62
# Phony prerequisite for targets that rely on the go build cache to determine staleness.
56
63
.PHONY : build test clean vendor \
57
64
coverage coverage-html e2e \
@@ -130,9 +137,9 @@ E2E_TIMEOUT ?= 90m
130
137
E2E_TEST_NS ?= operators
131
138
E2E_INSTALL_NS ?= operator-lifecycle-manager
132
139
E2E_CATALOG_NS ?= $(E2E_INSTALL_NS )
133
- GINKGO_OPTS =? -v -randomize-suites -race -trace --show-node-events
140
+ GINKGO_OPTS ?= -v -randomize-suites -race -trace --show-node-events
134
141
e2e :
135
- $(GINKGO ) -timeout $(E2E_TIMEOUT ) $(GINKGO_OPTS ) ./test/e2e -- -namespace=E2E_TEST_NS -olmNamespace=$(E2E_INSTALL_NS ) -catalogNamespace=$(E2E_CATALOG_NS ) $(E2E_OPTS )
142
+ $(GINKGO ) -timeout $(E2E_TIMEOUT ) $(GINKGO_OPTS ) ./test/e2e -- -namespace=$( E2E_TEST_NS ) -olmNamespace=$(E2E_INSTALL_NS ) -catalogNamespace=$(E2E_CATALOG_NS ) $(E2E_OPTS )
136
143
137
144
.PHONY : e2e-local
138
145
e2e-local : e2e-build kind-create deploy e2e
@@ -150,21 +157,22 @@ kind-create: kind-clean
150
157
OLM_IMAGE := quay.io/operator-framework/olm:local
151
158
deploy :
152
159
$(KIND ) load docker-image $(OLM_IMAGE ) --name $(KIND_CLUSTER_NAME ) ; \
153
- $(HELM ) install olm deploy/chart \
160
+ $(HELM ) upgrade -- install olm deploy/chart \
154
161
--set debug=true \
155
162
--set olm.image.ref=$(OLM_IMAGE ) \
156
163
--set olm.image.pullPolicy=IfNotPresent \
157
164
--set catalog.image.ref=$(OLM_IMAGE ) \
158
165
--set catalog.image.pullPolicy=IfNotPresent \
166
+ --set catalog.commandArgs=--configmapServerImage=$(CONFIGMAP_SERVER_IMAGE ) \
167
+ --set catalog.opmImageArgs=--opmImage=$(OPERATOR_REGISTRY_IMAGE ) \
159
168
--set package.image.ref=$(OLM_IMAGE ) \
160
169
--set package.image.pullPolicy=IfNotPresent \
161
170
$(HELM_INSTALL_OPTS ) \
162
171
--wait;
163
172
164
173
.PHONY : e2e-build
165
174
e2e-build : BUILD_TAGS="json1 e2e experimental_metrics"
166
- e2e-build : export GOOS=linux
167
- e2e-build : export GOARCH=amd64
175
+ e2e-build : GOOS=linux
168
176
e2e-build : build_cmd=build
169
177
e2e-build : e2e.Dockerfile bin/wait bin/cpb $(CMDS )
170
178
docker build -t quay.io/operator-framework/olm:local -f $< bin
0 commit comments