@@ -53,6 +53,7 @@ OPERATOR_SDK_VERSION ?= v1.40.0
5353IMG ?= kubevirt-migration-controller:latest
5454
5555DOCKER_REPO ?= localhost
56+ DEPLOYMENT_TARGET ?= default
5657
5758# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
5859ifeq (,$(shell go env GOBIN) )
@@ -199,7 +200,7 @@ docker-buildx: ## Build and push docker image for the manager for cross-platform
199200build-installer : manifests generate kustomize # # Generate a consolidated YAML with CRDs and deployment.
200201 mkdir -p dist
201202 cd config/manager && $(KUSTOMIZE ) edit set image controller=${IMG}
202- $(KUSTOMIZE ) build config/default > dist/install.yaml
203+ $(KUSTOMIZE ) build config/$( DEPLOYMENT_TARGET ) > dist/install.yaml
203204
204205# #@ Deployment
205206
@@ -219,11 +220,11 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
219220deploy : manifests kustomize # # Deploy controller to the K8s cluster specified in ~/.kube/config.
220221 @echo " Deploying controller to the K8s cluster specified in ~/.kube/config. MANIFEST_IMG: ${MANIFEST_IMG} "
221222 cd config/manager && $(KUSTOMIZE ) edit set image controller=${MANIFEST_IMG}
222- $(KUSTOMIZE ) build config/default | $(KUBECTL ) apply -f -
223+ $(KUSTOMIZE ) build config/$( DEPLOYMENT_TARGET ) | $(KUBECTL ) apply -f -
223224
224225.PHONY : undeploy
225226undeploy : kustomize # # Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
226- $(KUSTOMIZE ) build config/default | $(KUBECTL ) delete --ignore-not-found=$(ignore-not-found ) -f -
227+ $(KUSTOMIZE ) build config/$( DEPLOYMENT_TARGET ) | $(KUBECTL ) delete --ignore-not-found=$(ignore-not-found ) -f -
227228
228229# #@ Dependencies
229230
0 commit comments