3030# tools. (i.e. podman)
3131CONTAINER_TOOL ?= podman
3232
33+ # Deployment method: operator (default) or helm
34+ METHOD ?= operator
35+
3336# Setting SHELL to bash allows bash commands to be executed by recipes.
3437# Options are set to exit when a recipe line exits non-zero or a piped command fails.
3538SHELL = /usr/bin/env bash -o pipefail
@@ -171,15 +174,23 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
171174 $(KUSTOMIZE ) build config/crd | $(KUBECTL ) delete --ignore-not-found=$(ignore-not-found ) -f -
172175
173176.PHONY : deploy
174- deploy : docker-build cluster grpcurl
177+ deploy : docker-build cluster grpcurl # # Deploy controller using METHOD (operator or helm)
178+ ifeq ($(METHOD ) ,operator)
179+ $(MAKE) build-operator
180+ ./hack/deploy_with_operator.sh
181+ else ifeq ($(METHOD),helm)
175182 ./hack/deploy_with_helm.sh
183+ else
184+ $(error Unknown METHOD=$(METHOD). Use 'operator' or 'helm')
185+ endif
176186
187+ # Backward compatibility alias
177188.PHONY : deploy-with-operator
178- deploy-with-operator : docker-build build-operator cluster grpcurl
179- ./hack/deploy_with_operator.sh
189+ deploy-with-operator :
190+ $( MAKE ) deploy METHOD=operator
180191
181192.PHONY : deploy-operator
182- deploy-operator : docker-build build-operator cluster grpcurl
193+ deploy-operator : docker-build build-operator cluster grpcurl # # Deploy only the operator (without Jumpstarter CR)
183194 NETWORKING_MODE=ingress DEPLOY_JUMPSTARTER=false ./hack/deploy_with_operator.sh
184195
185196.PHONY : test-operator-e2e
@@ -191,7 +202,7 @@ operator-logs:
191202
192203.PHONY : deploy-with-operator-parallel
193204deploy-with-operator-parallel :
194- make deploy-with- operator -j5 --output-sync=target
205+ make deploy METHOD= operator -j5 --output-sync=target
195206
196207.PHONY : deploy-exporters
197208deploy-exporters :
0 commit comments