5151OPERATOR_SDK_VERSION ?= v1.38.0
5252# Image URL to use all building/pushing image targets
5353IMG ?= $(IMAGE_TAG_BASE ) :$(VERSION )
54+ FS_IMG ?= docker.io/feastdev/feature-server:$(VERSION )
5455# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
5556ENVTEST_K8S_VERSION = 1.30.0
5657
@@ -172,7 +173,7 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
172173 rm Dockerfile.cross
173174
174175.PHONY : build-installer
175- build-installer : manifests generate kustomize # # Generate a consolidated YAML with CRDs and deployment.
176+ build-installer : manifests generate related-image-fs kustomize # # Generate a consolidated YAML with CRDs and deployment.
176177 mkdir -p dist
177178 cd config/manager && $(KUSTOMIZE ) edit set image controller=${IMG}
178179 $(KUSTOMIZE ) build config/default > dist/install.yaml
@@ -192,7 +193,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
192193 $(KUSTOMIZE ) build config/crd | $(KUBECTL ) delete --ignore-not-found=$(ignore-not-found ) -f -
193194
194195.PHONY : deploy
195- deploy : manifests kustomize # # Deploy controller to the K8s cluster specified in ~/.kube/config.
196+ deploy : manifests kustomize related-image-fs # # Deploy controller to the K8s cluster specified in ~/.kube/config.
196197 cd config/manager && $(KUSTOMIZE ) edit set image controller=${IMG}
197198 $(KUSTOMIZE ) build config/default | $(KUBECTL ) apply -f -
198199
@@ -213,12 +214,14 @@ KUSTOMIZE ?= $(LOCALBIN)/kustomize
213214CONTROLLER_GEN ?= $(LOCALBIN ) /controller-gen
214215ENVTEST ?= $(LOCALBIN ) /setup-envtest
215216GOLANGCI_LINT = $(LOCALBIN ) /golangci-lint
217+ ENVSUBST = $(LOCALBIN ) /envsubst
216218
217219# # Tool Versions
218220KUSTOMIZE_VERSION ?= v5.4.2
219221CONTROLLER_TOOLS_VERSION ?= v0.15.0
220222ENVTEST_VERSION ?= release-0.18
221223GOLANGCI_LINT_VERSION ?= v1.59.1
224+ ENVSUBST_VERSION ?= v1.4.2
222225
223226.PHONY : kustomize
224227kustomize : $(KUSTOMIZE ) # # Download kustomize locally if necessary.
@@ -240,6 +243,11 @@ golangci-lint: $(GOLANGCI_LINT) ## Download golangci-lint locally if necessary.
240243$(GOLANGCI_LINT ) : $(LOCALBIN )
241244 $(call go-install-tool,$(GOLANGCI_LINT ) ,github.com/golangci/golangci-lint/cmd/golangci-lint,$(GOLANGCI_LINT_VERSION ) )
242245
246+ .PHONY : envsubst
247+ envsubst : $(ENVSUBST ) # # Download envsubst locally if necessary.
248+ $(ENVSUBST ) : $(LOCALBIN )
249+ $(call go-install-tool,$(ENVSUBST ) ,github.com/a8m/envsubst/cmd/envsubst,$(ENVSUBST_VERSION ) )
250+
243251# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
244252# $1 - target path with name of binary (ideally with version)
245253# $2 - package url which can be installed
@@ -275,7 +283,7 @@ endif
275283endif
276284
277285.PHONY : bundle
278- bundle : manifests kustomize operator-sdk # # Generate bundle manifests and metadata, then validate generated files.
286+ bundle : manifests kustomize related-image-fs operator-sdk # # Generate bundle manifests and metadata, then validate generated files.
279287 $(OPERATOR_SDK ) generate kustomize manifests -q
280288 cd config/manager && $(KUSTOMIZE ) edit set image controller=$(IMG )
281289 $(KUSTOMIZE ) build config/manifests | $(OPERATOR_SDK ) generate bundle $(BUNDLE_GEN_FLAGS )
@@ -329,3 +337,7 @@ catalog-build: opm ## Build a catalog image.
329337.PHONY : catalog-push
330338catalog-push : # # Push a catalog image.
331339 $(MAKE ) docker-push IMG=$(CATALOG_IMG )
340+
341+ .PHONY : related-image-fs
342+ related-image-fs : envsubst
343+ FS_IMG=$(FS_IMG ) $(ENVSUBST ) < config/default/related_image_fs_patch.tmpl > config/default/related_image_fs_patch.yaml
0 commit comments