-
Notifications
You must be signed in to change notification settings - Fork 220
Trigger primary Custom Resource delete from managed Dependent Resource #1896
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
Comments
Hi @rguillens , there are multiple things here:
So how I would solve this:
Note that some teams store the state in the status (like a flag that it was created), however this has a caveat, if it is in status it might not be present in next reconciliation (cache out of sync) is some rare cases. Therefore they also manage an in memory cache about the status that always has the latest version. Pls study how it is implemented in external state DR, you can easily manage this state correctly with a config map. |
created issue that will make allow this to cover using the managed workflows: #1898 |
Thanks, @csviri for your recommendations Actually, I do store some state related to some of the DRs and I'm sure when to delete the CR if something happens with a "critical" DR. This state is also reflected in the status at some point, but the state management don't rely on the CR status. Using something like a ConfigMap is way much better option to store this state in my scenario, as stated in: I was also looking into the |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
As far I can see the explicit invocation will cover this. Feel free to reopen if not. |
Uh oh!
There was an error while loading. Please reload this page.
Feature request
I have built a Kubernetes Operator based in Java Operator SDK v4.3.1 that handles a primary custom resource and several managed dependent resources.
One of the dependent resources is a
Pod
running a "critical" process.If somehow (user/application/crash) this dependent resource is deleted externally, the primary custom resource should be marked for deletion.
What did you do?
This is an implementation example to describe the scenario:
What did you expect to see?
CriticalPodDependentResource.delete()
operation called on dependent resource external deletion.What did you see instead? Under which circumstances?
After deleting the critical dependent resource externally, the primary custom resource reconcile operation is triggered, and it was kind of expected...
The text was updated successfully, but these errors were encountered: