Skip to content

Commit 4bd625b

Browse files
authored
Merge pull request #436 from frobware/fix-undeploy-openshift
Makefile: wait for ConfigMap deletion before undeploy
2 parents d66c288 + 7e754eb commit 4bd625b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ deploy: manifests kustomize ## Deploy bpfman-operator to the K8s cluster specifi
434434
.PHONY: undeploy
435435
undeploy: ## Undeploy bpfman-operator from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
436436
kubectl delete --ignore-not-found=$(ignore-not-found) cm bpfman-config -n bpfman
437-
sleep 5 # Wait for the operator to cleanup the daemonset
437+
kubectl wait --for=delete configmap/bpfman-config -n bpfman --timeout=60s
438438
$(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
439439

440440
.PHONY: kind-reload-images
@@ -458,6 +458,8 @@ deploy-openshift: manifests kustomize ## Deploy bpfman-operator to the Openshift
458458

459459
.PHONY: undeploy-openshift
460460
undeploy-openshift: ## Undeploy bpfman-operator from the Openshift cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
461+
kubectl delete --ignore-not-found=$(ignore-not-found) cm bpfman-config -n bpfman
462+
kubectl wait --for=delete configmap/bpfman-config -n bpfman --timeout=60s
461463
$(KUSTOMIZE) build config/openshift | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
462464

463465
# Deploy the catalog.

0 commit comments

Comments
 (0)