11# Image URL to use all building/pushing image targets
22IMG ?= controller:latest
3+ BUNDLE_IMG ?= bundle:latest
34# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
45ENVTEST_K8S_VERSION = 1.29.0
56TRIVY_VERSION = 0.49.1
@@ -207,6 +208,11 @@ build-installer: manifests generate kustomize ## Generate a consolidated YAML wi
207208 $(MAKE ) custom-deploy IMG=${IMG}
208209 $(KUSTOMIZE ) build $(CUSTOMDEPLOY ) > dist/install.yaml
209210
211+ .PHONY : build-bundle-image
212+ build-bundle-image : kustomize operator-sdk
213+ bash hack/bundle.sh
214+ $(CONTAINER_TOOL ) build -f bundle.Dockerfile -t ${BUNDLE_IMG} .
215+
210216# #@ Deployment
211217
212218ifndef ignore-not-found
@@ -299,6 +305,7 @@ GOLANGCI_KAL = $(LOCALBIN)/golangci-kube-api-linter
299305MOCKGEN = $(LOCALBIN ) /mockgen
300306KUTTL = $(LOCALBIN ) /kubectl-kuttl
301307GOVULNCHECK = $(LOCALBIN ) /govulncheck
308+ OPERATOR_SDK = $(LOCALBIN ) /operator-sdk
302309
303310# # Tool Versions
304311KUSTOMIZE_VERSION ?= v5.6.0
@@ -309,6 +316,7 @@ KAL_VERSION ?= v0.0.0-20250531094218-f86bf7bd4b19
309316MOCKGEN_VERSION ?= v0.5.0
310317KUTTL_VERSION ?= v0.22.0
311318GOVULNCHECK_VERSION ?= v1.1.4
319+ OPERATOR_SDK_VERSION ?= v1.41.1
312320
313321.PHONY : kustomize
314322kustomize : $(KUSTOMIZE ) # # Download kustomize locally if necessary.
@@ -363,6 +371,11 @@ govulncheck: $(GOVULNCHECK) ## Download govulncheck locally if necessary.
363371$(GOVULNCHECK ) : $(LOCALBIN )
364372 $(call go-install-tool,$(GOVULNCHECK ) ,golang.org/x/vuln/cmd/govulncheck,$(GOVULNCHECK_VERSION ) )
365373
374+ .PHONY : operator-sdk
375+ operator-sdk : $(OPERATOR_SDK ) # # Download operator-sdk locally if necessary.
376+ $(OPERATOR_SDK ) : $(LOCALBIN )
377+ $(call go-install-tool,$(OPERATOR_SDK ) ,github.com/operator-framework/operator-sdk/cmd/operator-sdk,$(OPERATOR_SDK_VERSION ) )
378+
366379# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
367380# $1 - target path with name of binary
368381# $2 - package url which can be installed
0 commit comments