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

Uninstall is leaving items behind #2168

Closed
orpiske opened this issue Mar 24, 2021 · 4 comments · Fixed by #2226
Closed

Uninstall is leaving items behind #2168

orpiske opened this issue Mar 24, 2021 · 4 comments · Fixed by #2226
Labels
area/cli Kamel CLI kind/bug Something isn't working

Comments

@orpiske
Copy link
Contributor

orpiske commented Mar 24, 2021

After a lot of help from @astefanutti debugging the issues #2160 and #2161 we identified the cause as being related to the code leaving behind items after uninstall.

Those issues were caused because an outdated CRD was left behind on the cluster even though I have been using both kamel uninstall --all --global and kubectl delete namespace $(NAMESPACE) to cleanup the environment.

In order to properly cleanup the cluster I also had to run:

kubectl delete crd builds.camel.apache.org
kubectl delete crd builds.camel.apache.org
kubectl delete crd kamelets.camel.apache.org
kubectl delete crd kameletbindings.camel.apache.org
kubectl delete clusterrole camel-k:edit

I think it would be good to either:

  1. Document the need to remove those items after uninstall or
  2. Remove them after uninstall
  3. Overwrite them during install if they are present

I believe overwriting them may be a better solution since these items may exist on cluster than have ran older versions of Camel K.

@orpiske
Copy link
Contributor Author

orpiske commented Apr 23, 2021

@astefanutti I am not sure if we should have closed this one. I was looking at my cluster and the uninstall is still leaving things behind:

	kubectl delete crd integrationkits.camel.apache.org
	kubectl delete crd integrationplatforms.camel.apache.org
	kubectl delete crd integrations.camel.apache.org
	kubectl delete crd camelcatalogs.camel.apache.org

@astefanutti
Copy link
Member

@orpiske it may be that you have to add the --olm=false option, e.g. kamel uninstall --all --global --olm=false, otherwise it defaults to using OLM, which does not delete CRDs when uninstalling an operator.

@orpiske
Copy link
Contributor Author

orpiske commented Apr 26, 2021

@astefanutti thanks! I will give it a try later this week :)

@orpiske
Copy link
Contributor Author

orpiske commented Apr 28, 2021

@orpiske it may be that you have to add the --olm=false option, e.g. kamel uninstall --all --global --olm=false, otherwise it defaults to using OLM, which does not delete CRDs when uninstalling an operator.

Just wanted to provide a feedback that it did remove the items I mentioned after I used what you suggested. Thanks @astefanutti!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Kamel CLI kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants