✨ Add index support to providers#16
Conversation
|
I think this makes sense, it's a relatively trivial function to implement on a provider that juggles clusters (as seen in the capi example provider), if we figure out we are missing something we can re-adjust. |
8accffa to
b6e1fb2
Compare
mjudeikis
left a comment
There was a problem hiding this comment.
Just wondering, if somebody want to add dynamic indexes to only certain clusters?
In example:
- I reconcile 100 clusters.
- Only 20 clusters has Karpetner/Crossplane installed. Now my controller needs dynamically add indexes for these clusters for certain objects.
This would not be supported, right?
It depends on the provider. A cluster-api provider with real But you have a point. Wondering whether we need something more flexible. I am also now calling the host cluster |
I have changed that. |
|
@mjudeikis I feel like such a custom logic is probably better suited to be put into the provider? It heavily depends on how you discover clusters, how you classify them through some means. I could imagine there to be some pre-engage and also engage-filter mechanism. Wdyt? |
d54a102 to
3abea72
Compare
|
I was thinking about uniform-cases here, where each cluster is separate.
For me, this was the biggest issue. How do we know these indexers will work on other clusters? Should these be per cluster? need to read implementation more to understand how things are wired in |
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
9b79885 to
622e3d1
Compare
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
622e3d1 to
127907d
Compare
A first attempt on Index support. Is this what we want?
See in particular:
GetFieldIndex()in the manager interface.IndexField()in the provider interface.Motivation:
Indexes must be created before cache start. They are usually uniform for multicluster controllers. Only the provider really knows how to set them up (some providers have dedicated clusters, others have one central cluster object and scoped down cluster shims on-top).
TODOs: