Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): delete deployment before other resources #5679

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading