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(cli): Remove CamelCatalogs CR on kamel uninstall #4162

Merged

Conversation

gansheer
Copy link
Contributor

Fixes #4160

Motivation

When using kamel uninstall command the CamelCatalogs CR are not removed from the cluster. When an operator with the same Runtime is installed, it is already considered as Ready so the builder image container is not builded again with the code from the operator.

Description

Remove all the CamelCatalogs in the namespace of the operator on kamel uninstall call and add a skip-camel-catalogs flag.

Release Note

Fix(cli): Remove CamelCatalogs CR on kamel uninstall

@@ -62,6 +63,7 @@ func newCmdUninstall(rootCmdOptions *RootCmdOptions) (*cobra.Command, *uninstall
cmd.Flags().Bool("skip-config-maps", false, "Do not uninstall the Camel K Config Maps in the current namespace")
cmd.Flags().Bool("skip-registry-secret", false, "Do not uninstall the Camel K Registry Secret in the current namespace")
cmd.Flags().Bool("skip-kamelets", false, "Do not uninstall the Kamelets in the current namespace")
cmd.Flags().Bool("skip-camel-catalogs", false, "Do not uninstall the Camel Catalogs in the current namespace")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for this. Really good idea, thanks!

@@ -26,7 +26,7 @@ const (
Version = "2.0.0-SNAPSHOT"

// DefaultRuntimeVersion --
DefaultRuntimeVersion = "1.18.0-SNAPSHOT"
DefaultRuntimeVersion = "3.20.1-SNAPSHOT"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was changed automatically, should I revert this change ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's okey to keep it.

@gansheer gansheer force-pushed the fix/4160_cli_uninstall_all_camelcatalog branch from 8b9b579 to 0005546 Compare March 24, 2023 13:48
@gansheer gansheer force-pushed the fix/4160_cli_uninstall_all_camelcatalog branch from 0005546 to a08fc76 Compare March 27, 2023 07:03
@squakez
Copy link
Contributor

squakez commented Mar 27, 2023

Please, let me know when this is ready to be merged.

@squakez
Copy link
Contributor

squakez commented Mar 27, 2023

Check failure unrelated. Merging.

@squakez squakez merged commit f5ddcdf into apache:main Mar 27, 2023
@gansheer
Copy link
Contributor Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kamel cli reset/uninstall --all does not clean the camelcatalog
3 participants