-
Notifications
You must be signed in to change notification settings - Fork 0
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 finalizer removal #31
Conversation
@@ -189,14 +189,13 @@ func (pas PrometheusAgentService) deleteConfigMap(ctx context.Context, cluster * | |||
} | |||
|
|||
// Delete the finalizer | |||
desired := current.DeepCopy() |
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.
How does removing the DeepCopy
fixes the finalizer removal /
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.
Deepcopy is useless if we are updating instead of patching
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.
In both case DeepCopy
should not be needed, since the object is local to the function.
But how does moving from patch to update fixes the issue then ?
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.
Yes DeepCopy is needed in case of a controller runtime patch because that's how the client.MergeFrom function works but still, I'm not sure why it fixes it, but I've seen it does
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.
I was advised by upstream to inverse the order of the delete and the patch, that's worth trying
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.
Testing here #32
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.
LGTM if tested
After some discussions, we decided to remove the finalizers from the resource that this operator manages itself without relying on any other operator. |
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.
LGTM
Tested on grizzly. @TheoBrigitte do you want to take a look? |
No more issues on grizzly |
What this PR does / why we need it
Towards https://github.com/giantswarm/giantswarm/issues/30887
This PR fixes the finalizer removal. This has been tested on grizzly
Checklist