-
Notifications
You must be signed in to change notification settings - Fork 19
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
Block reinstall if crds are still pending to be deleted #784
Block reinstall if crds are still pending to be deleted #784
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤞🏻
85949e0
to
ed4ad39
Compare
Signed-off-by: David Cassany <dcassany@suse.com>
ed4ad39
to
9465ba7
Compare
{{- if $inventoryCRD -}} | ||
{{- if $inventoryCRD.metadata.deletionTimestamp -}} | ||
{{- required "CRDs from previous installations are pending to be removed (deletionTimestamp is set). Fully deleting them before (re-)installing is required" "" -}} | ||
{{- $crds := list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nice!
6d72d34
to
e31b17d
Compare
Signed-off-by: David Cassany <dcassany@suse.com>
e31b17d
to
d375589
Compare
For full reference other approaches were considered at a time by having some pre-delete hook to run a cleanup logic #536 This could be an option to try to automate cleanup of an uninstalling operation, feels a bit hacky and error prone, I would not consider it for now, referencing it here in case we need it. In such case the current PR would still be needed as a sanity check. |
* Block reinstall if crds are still pending to be deleted Signed-off-by: David Cassany <dcassany@suse.com>
* Add managedosversion finalizer (#775) * Implement ManagedOSVersion controller and finalizer Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com> * Remove unused ManagedOSVersion Status Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com> * Block reinstall if crds are still pending to be deleted (#784) Signed-off-by: David Cassany <dcassany@suse.com> --------- Signed-off-by: Andrea Mazzotti <andrea.mazzotti@suse.com> Signed-off-by: David Cassany <dcassany@suse.com>
With #775 reinstalling elemental-operator with helm results in a broken installation. This change is to prevent reinstalling CRDs if there are still instances pending to be deleted.
This will prevent from having silently broken installations. This is the same issue as in #515