@@ -23,7 +23,6 @@ IMG := $(IMAGE_REPO):$(IMAGE_TAG)
2323
2424# Define dependency versions (use go.mod if we also use Go code from dependency)
2525export CERT_MGR_VERSION := v1.15.3
26- export CATALOGD_VERSION := $(shell go list -mod=mod -m -f "{{.Version}}" github.com/operator-framework/catalogd)
2726export WAIT_TIMEOUT := 60s
2827
2928# Install default ClusterCatalogs
@@ -232,15 +231,19 @@ test-upgrade-e2e: kind-cluster run-latest-release image-registry pre-upgrade-set
232231e2e-coverage :
233232 COVERAGE_OUTPUT=./coverage/e2e.out ./hack/test/e2e-coverage.sh
234233
235- .PHONY : kind-load
236- kind-load : $(KIND ) # EXHELP Loads the currently constructed image onto the cluster.
234+ kind-load : $(KIND ) build-catalogd # EXHELP Loads the currently constructed images into the KIND cluster.
237235 $(CONTAINER_RUNTIME ) save $(IMG ) | $(KIND ) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME )
236+ $(CONTAINER_RUNTIME ) save quay.io/operator-framework/catalogd:devel | $(KIND ) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME )
238237
239238.PHONY : kind-deploy
240- kind-deploy : export MANIFEST=" ./operator-controller.yaml"
241- kind-deploy : manifests $(KUSTOMIZE ) # EXHELP Install controller and dependencies onto the kind cluster.
239+ kind-deploy : export MANIFEST := ./operator-controller.yaml
240+ kind-deploy : manifests $(KUSTOMIZE ) # EXHELP Install controller and dependencies, including catalogd, onto the kind cluster.
242241 $(KUSTOMIZE ) build $(KUSTOMIZE_BUILD_DIR ) > operator-controller.yaml
243- envsubst ' $$CATALOGD_VERSION,$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh | bash -s
242+ cd catalogd && $(KUSTOMIZE ) build config/overlays/cert-manager > catalogd.yaml
243+ envsubst ' $$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh > install.sh
244+ bash install.sh \
245+ --catalogd-manifest=./catalogd/catalogd.yaml \
246+ --default-catalogs-manifest=./catalogd/config/base/default/clustercatalogs/default-catalogs.yaml
244247
245248.PHONY : kind-cluster
246249kind-cluster : $(KIND ) # EXHELP Standup a kind cluster.
@@ -297,9 +300,26 @@ go-build-linux: $(BINARIES)
297300run : docker-build kind-cluster kind-load kind-deploy # HELP Build the operator-controller then deploy it into a new kind cluster.
298301
299302.PHONY : docker-build
300- docker-build : build-linux # EXHELP Build docker image for operator-controller with GOOS=linux and local GOARCH.
303+ docker-build : build-linux build-catalogd # EXHELP Build docker image for operator-controller with GOOS=linux and local GOARCH.
301304 $(CONTAINER_RUNTIME ) build -t $(IMG ) -f Dockerfile ./bin/linux
302305
306+
307+ ifeq ($(origin IMAGE_CATALOG_REPO ) , undefined)
308+ IMAGE_REPO := quay.io/operator-framework/catalogd
309+ endif
310+ export IMAGE_REPO
311+
312+ ifeq ($(origin IMAGE_CATALOG_TAG ) , undefined)
313+ IMAGE_TAG := devel
314+ endif
315+ export IMAGE_TAG
316+
317+ IMAGE_CATALOG := $(IMAGE_CATALOG_REPO ) :$(IMAGE_TAG )
318+
319+ .PHONY : build-catalogd
320+ build-catalogd : # # Build the catalogd project with specified IMAGE_TAG and IMAGE_REPO
321+ IMAGE=$(IMAGE_CATALOG ) $(MAKE ) -C catalogd build-container
322+
303323# SECTION Release
304324ifeq ($(origin ENABLE_RELEASE_PIPELINE ) , undefined)
305325ENABLE_RELEASE_PIPELINE := false
@@ -316,10 +336,12 @@ release: $(GORELEASER) #EXHELP Runs goreleaser for the operator-controller. By d
316336 $(GORELEASER ) $(GORELEASER_ARGS )
317337
318338.PHONY : quickstart
319- quickstart : export MANIFEST := https://github.com/operator-framework/operator-controller/releases/download/ $( VERSION ) /operator-controller.yaml
339+ quickstart : export MANIFEST := . /operator-controller.yaml
320340quickstart : $(KUSTOMIZE ) manifests # EXHELP Generate the installation release manifests and scripts.
321341 $(KUSTOMIZE ) build $(KUSTOMIZE_BUILD_DIR ) | sed " s/:devel/:$( VERSION) /g" > operator-controller.yaml
322- envsubst ' $$CATALOGD_VERSION,$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh > install.sh
342+ cd catalogd && $(KUSTOMIZE ) build config/overlays/cert-manager > catalogd.yaml
343+ envsubst ' $$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh > install.sh
344+
323345
324346# #@ Docs
325347
0 commit comments