Open coryodaniel opened 4 years ago
This still relevant ?
What do you mean by "relevant"? There is no code in Bonny to manage a reverse index on the parent resource. It is relevant if people need it, right?
But also, I don't see a simple solution to maintain such a reverse index. If a descendant is deleted, we'd need to update also the parent...
A field selector would be nice but as far as I know, the only fields on CRDs which can be querried by field selectors are name
and namespace
. So no support there...
Yes it is relevant if people need it. But did anyone need it? It's just my curiosity.
metadata.ownerReferences
isn't a field that can be queried w/ field selectors, so to get all the items created by a CRD it would required polling all kinds/all resources which sucks.The 'reverse index' or 'inventory' would include track all the resources created by this CRD. inspiration
This could be useful for looking up resources, not necessary for bonny itself, but it could be a nice helper for a controller that needed to find resources that it created.
This won't be needed for deletion once #49 is implemented, as garbage collection will be handled by k8s.