@@ -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,20 @@ 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 ) # 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 generate-catalogd $(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 | bash -s
244+
245+ .PHONY : generate-catalogd
246+ generate-catalogd : # # Generate the catalogd manifests
247+ $(MAKE ) -C catalogd generate
244248
245249.PHONY : kind-cluster
246250kind-cluster : $(KIND ) # EXHELP Standup a kind cluster.
@@ -297,9 +301,26 @@ go-build-linux: $(BINARIES)
297301run : docker-build kind-cluster kind-load kind-deploy # HELP Build the operator-controller then deploy it into a new kind cluster.
298302
299303.PHONY : docker-build
300- docker-build : build-linux # EXHELP Build docker image for operator-controller with GOOS=linux and local GOARCH.
304+ docker-build : build-linux build-catalogd # EXHELP Build docker image for operator-controller with GOOS=linux and local GOARCH.
301305 $(CONTAINER_RUNTIME ) build -t $(IMG ) -f Dockerfile ./bin/linux
302306
307+
308+ ifeq ($(origin IMAGE_CATALOG_REPO ) , undefined)
309+ IMAGE_REPO := quay.io/operator-framework/catalogd
310+ endif
311+ export IMAGE_REPO
312+
313+ ifeq ($(origin IMAGE_CATALOG_TAG ) , undefined)
314+ IMAGE_TAG := devel
315+ endif
316+ export IMAGE_TAG
317+
318+ IMAGE_CATALOG := $(IMAGE_CATALOG_REPO ) :$(IMAGE_TAG )
319+
320+ .PHONY : build-catalogd
321+ build-catalogd : # # Build the catalogd project with specified IMAGE_TAG and IMAGE_REPO
322+ IMAGE=$(IMAGE_CATALOG ) $(MAKE ) -C catalogd build-container
323+
303324# SECTION Release
304325ifeq ($(origin ENABLE_RELEASE_PIPELINE ) , undefined)
305326ENABLE_RELEASE_PIPELINE := false
@@ -316,10 +337,12 @@ release: $(GORELEASER) #EXHELP Runs goreleaser for the operator-controller. By d
316337 $(GORELEASER ) $(GORELEASER_ARGS )
317338
318339.PHONY : quickstart
319- quickstart : export MANIFEST := https://github.com/operator-framework/operator-controller/releases/download/ $( VERSION ) /operator-controller.yaml
340+ quickstart : export MANIFEST := . /operator-controller.yaml
320341quickstart : $(KUSTOMIZE ) manifests # EXHELP Generate the installation release manifests and scripts.
321342 $(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
343+ cd catalogd && $(KUSTOMIZE ) build config/overlays/cert-manager > catalogd.yaml
344+ envsubst ' $$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh > install.sh
345+
323346
324347# #@ Docs
325348
0 commit comments