@@ -23,6 +23,7 @@ TEST_E2E_TIMEOUT ?= 60m
2323RUN_TESTS ?= ''
2424
2525RESOURCE_CTRL ?= true
26+ WEBHOOK_ENABLED ?= true
2627# BUILTIN_CLOUD_PROVIDERS is used for binary build -- what providers are built in the binaries.
2728ifeq ($(RELEASE_BUILD ) ,true)
2829 BUILTIN_CLOUD_PROVIDERS ?= alibabacloud aws azure gcp ibmcloud ibmcloud_powervs
@@ -126,39 +127,34 @@ image-with-arch: .git-commit ## Build the per arch image
126127# #@ Deployment
127128
128129.PHONY : deploy
129- deploy : # # Deploy cloud-api-adaptor using the operator, according to install/overlays/ $(CLOUD_PROVIDER)/kustomization .yaml file.
130+ deploy : # # Deploy cloud-api-adaptor using Helm charts. Assumes provider secrets file exists at install/charts/peerpods/providers/ $(CLOUD_PROVIDER)-secrets .yaml
130131ifneq ($(CLOUD_PROVIDER ) ,)
131- kubectl apply -k "$(COCO_OPERATOR_REPO)/config/$(COCO_OPERATOR_CONFIG)?ref=$(COCO_OPERATOR_REF)"
132- kubectl apply -k "$(COCO_OPERATOR_REPO)/config/samples/ccruntime/peer-pods?ref=$(COCO_OPERATOR_REF)"
133- kubectl apply -k install/overlays/$(CLOUD_PROVIDER)
134- else
135- $(error CLOUD_PROVIDER is not set)
132+ $(eval HELM_VALUES_FILES := install/charts/peerpods/providers/$(CLOUD_PROVIDER).yaml)
133+ ifeq ($(filter $(CLOUD_PROVIDER ) ,docker libvirt) ,)
134+ $(eval HELM_VALUES_FILES := $(HELM_VALUES_FILES) install/charts/peerpods/providers/$(CLOUD_PROVIDER)-secrets.yaml)
136135endif
137- ifeq ($(RESOURCE_CTRL ) ,true)
138- $(MAKE) -C ../peerpod-ctrl deploy
139- @if kubectl get svc -n cert-manager cert-manager-webhook > /dev/null 2>&1; then \
140- echo "Installing webhook" ;\
141- $(MAKE) -C ../webhook deploy ;\
142- else \
136+
137+ ifeq ($(WEBHOOK_ENABLED ) ,true)
138+ @if ! kubectl get svc -n cert-manager cert-manager-webhook > /dev/null 2>&1; then \
143139 echo "Installing cert-manager" ;\
144140 $(MAKE) -C ../webhook deploy-cert-manager ;\
145- echo "Installing webhook" ;\
146- $(MAKE) -C ../webhook deploy ;\
147141 fi
148142endif
149-
150- .PHONY : delete
151- delete : # # Delete cloud-api-adaptor using the operator, according to install/overlays/$(CLOUD_PROVIDER)/kustomization.yaml file.
152- ifeq ($(RESOURCE_CTRL ) ,true)
153- $(MAKE) -C ../peerpod-ctrl undeploy
154- $(MAKE) -C ../webhook undeploy
155- endif
156- ifneq ($(CLOUD_PROVIDER ) ,)
157- kubectl delete -k install/overlays/$(CLOUD_PROVIDER)
143+ helm install peerpods install/charts/peerpods \
144+ $(foreach file,$(HELM_VALUES_FILES),-f $(file)) \
145+ --set webhook.enabled=$(WEBHOOK_ENABLED) \
146+ --set resourceCtrl.enabled=$(RESOURCE_CTRL) \
147+ --dependency-update \
148+ -n confidential-containers-system \
149+ --create-namespace
158150else
159151 $(error CLOUD_PROVIDER is not set)
160152endif
161153
154+ .PHONY : delete
155+ delete : # # Delete cloud-api-adaptor using Helm charts.
156+ helm uninstall peerpods -n confidential-containers-system
157+
162158# ## PODVM IMAGE BUILDING ###
163159
164160REGISTRY ?= quay.io/confidential-containers
0 commit comments