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

kamel uninstall should also delete leases #3473

Closed
squakez opened this issue Jul 21, 2022 · 6 comments
Closed

kamel uninstall should also delete leases #3473

squakez opened this issue Jul 21, 2022 · 6 comments
Labels
good first issue Does not require full understanding of the codebase kind/bug Something isn't working

Comments

@squakez
Copy link
Contributor

squakez commented Jul 21, 2022

I've uninstalled everything but I can still see leases around that won't let me install again an operator due to installation not allowed because operator with id 'camel-k-missing-deps' already exists, use the --force option to skip this check

@squakez squakez added the kind/bug Something isn't working label Jul 21, 2022
@squakez
Copy link
Contributor Author

squakez commented Jul 21, 2022

fyi @christophd

@squakez squakez added the good first issue Does not require full understanding of the codebase label Aug 9, 2022
@essobedo
Copy link
Contributor

I could not reproduce but I faced an issue with the platform Kamelets that should be fixed by #3553

@essobedo
Copy link
Contributor

essobedo commented Aug 31, 2022

I confirm that leases (along with integrations, integration kits, builds, camel catalogs, Kamelet bindings...) are not deleted by the uninstall command however they don't prevent the install command to work as expected since the install command only checks whether an integration platform with the same name already exists in the namespace and the integration platform is properly removed by the uninstall command.

The lease exists in the namespace...

$ kubectl get lease -n foo                                                                                                          
NAME           HOLDER                                                                   AGE
camel-k-lock   camel-k-operator-848fd8785b-7knql_626532a4-c05f-4edb-8cd9-7f6294d6cc57   13m

but it doesn't prevent the install command to work as expected

kamel install -n foo                                                                                                  
OLM is not available in the cluster. Fallback to regular installation.
Warning: the operator won't be able to detect a local image registry via KEP-1755
Camel K installed in namespace foo 

Knowing that, shall we still remove the lease on uninstall?

NB: Once the new operator is installed in the namespace, a new lead is then elected such that the lease is automatically updated without the need to delete it first

@squakez
Copy link
Contributor Author

squakez commented Sep 2, 2022

What version have you used for testing this? The failure happens in version >= 1.10 (also nightly) only.

@essobedo
Copy link
Contributor

essobedo commented Sep 2, 2022

I tested it with 1.9.2, I can indeed reproduce it with 1.10, thx for the clarifications 🙏

@essobedo essobedo assigned essobedo and unassigned essobedo Sep 5, 2022
@squakez
Copy link
Contributor Author

squakez commented Dec 7, 2022

I've checked with @gansheer the expected behavior and we realized this is not a bug. Basically the lease is created by the operator Pod and it's correctly release when the Pod is terminating. It does not make sense to alter this behavior by the installation procedure.

@squakez squakez closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Does not require full understanding of the codebase kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants