Replies: 1 comment 1 reply
-
|
Hi @mancave , first, that could work, maybe here dont' clear the whole data just remove specific keys: data.clear(); // will trigger the rebuild of the config-map with only the data that are part of the owner refsalso as mentioned here: dependent resources are a bit limited in this regard, also it is relatively rare that multiple controllers manage the same resource (there are exceptions like Pods in Kubernetes). So you might have easier time to implement your use case using the low level API. I will create an issue to enhance the example, and will take a look soon at least to explore this problem better. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm using the latest version(5.2.2) of the operator framework and the sample "Dependent Resource Shared by Multiple Owners".
The share config-map will be maintained by the CRD's, but if you delete one of the owner crd-resource there are no events that signalling the reconcile and dependant resource that things need to be removed from the config-map.
@ This moment I added the Cleaner interface on the reconciler class and implemented the cleanup. The cleanup try's to find the config-map and clears all the data, removes the owner reference from the meta data and updates the config-map. This will trigger a new reconcile loop and the desired state is rebuild based on the owner references.
Is this the proper way to handle this situation ?
Thnxs
Beta Was this translation helpful? Give feedback.
All reactions