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

Add managedosversion finalizer #775

Merged
merged 7 commits into from
Jun 25, 2024

Conversation

anmazzotti
Copy link
Contributor

This PR is a pre-requisite to #759

A new controller has been added to manage the ManagedOSVersion finalizer.
This will prevent deletion of ManagedOSVersion that are still referenced by any ManagedOSImage.

To my knowledge there is no other direct reference to a ManagedOSVersion. The UI uses a cached list of versions when creating a new SeedImage, but this is presentation layer only, there's no reference to a ManagedOSVersion from a SeedImage.

@anmazzotti anmazzotti self-assigned this Jun 21, 2024
@github-actions github-actions bot added the area/tests test related changes label Jun 21, 2024
@anmazzotti anmazzotti force-pushed the add_managedosversion_finalizer branch from fc5d8c5 to c2f5826 Compare June 21, 2024 11:55
@@ -21,7 +21,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var (
const (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very random change. Not related to this PR.

@anmazzotti anmazzotti marked this pull request as ready for review June 21, 2024 13:43
@anmazzotti anmazzotti requested a review from a team as a code owner June 21, 2024 13:43
@anmazzotti anmazzotti force-pushed the add_managedosversion_finalizer branch from 49fe0be to a1315c9 Compare June 24, 2024 07:30
@anmazzotti
Copy link
Contributor Author

Also accidentally found how it looks like when the finalizer is preventing the deletion.
So even without UI changes, this is looking good.

scheduled_for_deletion

@anmazzotti anmazzotti force-pushed the add_managedosversion_finalizer branch from b8bf5ff to d856ef2 Compare June 25, 2024 10:26
Copy link
Member

@fgiudici fgiudici left a comment

Choose a reason for hiding this comment

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

Nice PR! just found a wrong resource mentioned in an error message

api/v1beta1/common_consts.go Outdated Show resolved Hide resolved
api/v1beta1/managedosversion_types.go Show resolved Hide resolved
cmd/operator/operator/root.go Outdated Show resolved Hide resolved
controllers/managedosversion_controller.go Outdated Show resolved Hide resolved
controllers/managedosversion_controller.go Show resolved Hide resolved
anmazzotti and others added 3 commits June 25, 2024 15:50
Co-authored-by: Francesco Giudici <[email protected]>
Signed-off-by: Andrea Mazzotti <[email protected]>
Co-authored-by: Francesco Giudici <[email protected]>
Signed-off-by: Andrea Mazzotti <[email protected]>
Co-authored-by: Francesco Giudici <[email protected]>
Signed-off-by: Andrea Mazzotti <[email protected]>
@anmazzotti anmazzotti merged commit b18ff86 into rancher:main Jun 25, 2024
22 checks passed
anmazzotti added a commit to anmazzotti/elemental-operator that referenced this pull request Jun 26, 2024
* Implement ManagedOSVersion controller and finalizer

Signed-off-by: Andrea Mazzotti <[email protected]>

* Remove unused ManagedOSVersion Status

Signed-off-by: Andrea Mazzotti <[email protected]>
---------

Signed-off-by: Andrea Mazzotti <[email protected]>
Co-authored-by: Francesco Giudici <[email protected]>
anmazzotti added a commit that referenced this pull request Jun 27, 2024
* Add managedosversion finalizer (#775)

* Implement ManagedOSVersion controller and finalizer

Signed-off-by: Andrea Mazzotti <[email protected]>

* Remove unused ManagedOSVersion Status

Signed-off-by: Andrea Mazzotti <[email protected]>

* Block reinstall if crds are still pending to be deleted (#784)

Signed-off-by: David Cassany <[email protected]>

---------

Signed-off-by: Andrea Mazzotti <[email protected]>
Signed-off-by: David Cassany <[email protected]>
davidcassany added a commit to rancher/elemental that referenced this pull request Jun 27, 2024
davidcassany added a commit to rancher/elemental that referenced this pull request Jun 27, 2024
davidcassany added a commit to rancher/elemental that referenced this pull request Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tests test related changes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants