Skip to content

Commit

Permalink
fix(ci): delete deployment before other resources
Browse files Browse the repository at this point in the history
Closes #5671
  • Loading branch information
squakez committed Jul 1, 2024
1 parent 233b936 commit 2936689
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions docs/modules/ROOT/pages/installation/uninstalling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,15 @@ Another alternative is to delete the resources the operator is using in a contro

== Uninstall operator only (keeps CRDs and any running Integration)

In order to remove the operator and any configuration resource it uses you'll need to perform the following cleaning operation:
In order to remove the operator and any configuration resource it uses you'll need to perform the following cleaning operation. Here we're assuming you have installed an operator in the namespace camel-k:

```
$ kubectl delete deploy,configmap,secret,sa,rolebindings,clusterrolebindings,roles,clusterroles,integrationplatform -l app=camel-k
$ kubectl delete deploy -l app=camel-k -n camel-k
$ kubectl delete configmap,secret,sa,rolebindings,clusterrolebindings,roles,clusterroles,integrationplatform -l app=camel-k -n camel-k
```

Notice that you need to perform two operation to let the Kubernetes finalizers running in the Deployment object to complete before removing any required additional resource (ie, the ServiceAccount holding such privileges).

NOTE: CRDs and Integration will be maintained alive and running.

== Uninstall CRDs (and running Integration)
Expand Down
6 changes: 4 additions & 2 deletions script/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,11 @@ install-openshift-ns: install-operator install-clean-kustomize

uninstall:
ifdef NAMESPACE
kubectl delete deploy,configmap,secret,sa,rolebindings,clusterrolebindings,roles,clusterroles,integrationplatform -l app=camel-k -n $(NAMESPACE)
kubectl delete deploy -l app=camel-k -n $(NAMESPACE)
kubectl delete configmap,secret,sa,rolebindings,clusterrolebindings,roles,clusterroles,integrationplatform -l app=camel-k -n $(NAMESPACE)
else
kubectl delete deploy,configmap,secret,sa,rolebindings,clusterrolebindings,roles,clusterroles,integrationplatform -l app=camel-k
kubectl delete deploy -l app=camel-k
kubectl delete configmap,secret,sa,rolebindings,clusterrolebindings,roles,clusterroles,integrationplatform -l app=camel-k
endif

uninstall-crds:
Expand Down

0 comments on commit 2936689

Please sign in to comment.