@@ -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
@@ -228,15 +227,20 @@ test-upgrade-e2e: kind-cluster run-latest-release image-registry pre-upgrade-set
228227e2e-coverage :
229228 COVERAGE_OUTPUT=./coverage/e2e.out ./hack/test/e2e-coverage.sh
230229
231- .PHONY : kind-load
232- kind-load : $(KIND ) # EXHELP Loads the currently constructed image onto the cluster.
230+ kind-load : $(KIND ) # EXHELP Loads the currently constructed images into the KIND cluster.
233231 $(CONTAINER_RUNTIME ) save $(IMG ) | $(KIND ) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME )
232+ IMAGE_REPO=quay.io/operator-framework/catalogd KIND_CLUSTER_NAME=$(KIND_CLUSTER_NAME ) $(MAKE ) -C catalogd kind-load
234233
235234.PHONY : kind-deploy
236- kind-deploy : export MANIFEST="./operator-controller.yaml"
237- kind-deploy : manifests $(KUSTOMIZE ) # EXHELP Install controller and dependencies onto the kind cluster.
238- $(KUSTOMIZE ) build $(KUSTOMIZE_BUILD_DIR ) > operator-controller.yaml
239- envsubst ' $$CATALOGD_VERSION,$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh | bash -s
235+ kind-deploy : export MANIFEST := ./olmv1.yaml
236+ kind-deploy : manifests generate-catalogd $(KUSTOMIZE )
237+ ($( KUSTOMIZE) build $( KUSTOMIZE_BUILD_DIR) && echo " ---" && $( KUSTOMIZE) build catalogd/config/overlays/cert-manager | sed " s/cert-git-version/cert-$( VERSION) /g" ) > $(MANIFEST )
238+ envsubst ' $$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh | bash -s
239+
240+
241+ .PHONY : generate-catalogd
242+ generate-catalogd : # # Generate the catalogd manifests
243+ $(MAKE ) -C catalogd generate
240244
241245.PHONY : kind-cluster
242246kind-cluster : $(KIND ) # EXHELP Standup a kind cluster.
@@ -293,9 +297,13 @@ go-build-linux: $(BINARIES)
293297run : docker-build kind-cluster kind-load kind-deploy # HELP Build the operator-controller then deploy it into a new kind cluster.
294298
295299.PHONY : docker-build
296- docker-build : build-linux # EXHELP Build docker image for operator-controller with GOOS=linux and local GOARCH.
300+ docker-build : build-linux build-catalogd # EXHELP Build docker image for operator-controller with GOOS=linux and local GOARCH.
297301 $(CONTAINER_RUNTIME ) build -t $(IMG ) -f Dockerfile ./bin/linux
298302
303+ .PHONY : build-catalogd
304+ build-catalogd : # # Build the catalogd image
305+ IMAGE_REPO=quay.io/operator-framework/catalogd $(MAKE ) -C catalogd build-container
306+
299307# SECTION Release
300308ifeq ($(origin ENABLE_RELEASE_PIPELINE ) , undefined)
301309ENABLE_RELEASE_PIPELINE := false
@@ -312,10 +320,10 @@ release: $(GORELEASER) #EXHELP Runs goreleaser for the operator-controller. By d
312320 $(GORELEASER ) $(GORELEASER_ARGS )
313321
314322.PHONY : quickstart
315- quickstart : export MANIFEST := https://github.com/operator-framework/operator-controller/releases/download/ $( VERSION ) /operator-controller .yaml
316- quickstart : $(KUSTOMIZE ) manifests # EXHELP Generate the installation release manifests and scripts.
317- $(KUSTOMIZE ) build $(KUSTOMIZE_BUILD_DIR ) | sed " s/:devel/: $( VERSION) /g" > operator-controller.yaml
318- envsubst ' $$CATALOGD_VERSION,$$CERT_MGR_VERSION,$$ INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh > install.sh
323+ quickstart : export MANIFEST := ./olmv1 .yaml
324+ quickstart : $(KUSTOMIZE ) manifests build-catalogd # EXHELP Generate the unified installation release manifests and scripts.
325+ ( $( KUSTOMIZE) build $( KUSTOMIZE_BUILD_DIR) && echo " --- " && $( KUSTOMIZE ) build catalogd/config/overlays/cert-manager | sed " s/cert-git-version/cert- $( VERSION) /g" ) > $( MANIFEST )
326+ envsubst ' $$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh > install.sh
319327
320328# #@ Docs
321329
0 commit comments