improve: extend SecondaryToPrimaryMapper so it also gets the old resource#3388
improve: extend SecondaryToPrimaryMapper so it also gets the old resource#3388csviri wants to merge 6 commits into
Conversation
|
see also discussio here: https://discord.com/channels/723455000604573736/723455000604573739/1508830486913482913 |
|
as discussed with @dvob , he will created a detailed issue for this. |
|
@csviri thank you for implementing this so quickly. I also created issue #3401 for reference which we can more or less close right away if this is merged. I updated my reproducer to use two different types ( However, when updating my reproducer, I ran into a different challenge. In my initial reproducer I used only one CRD ( One thing which also came to my mind is, that if you not specify |
|
Yes, not sure if we can do better than to document it,see: |
|
Yes, I think docs are fine. For a long time i didn't even knew about the default reverse index behavior. I did set the primaryToSecondaryMapper every time explicitly and I still do this because I think its easier to understand if things are a little more explicit. I don't know how other users rely on this. |
Yes, unfortunately this is not a that nice and round concept, but currently the only way to be able to use |
Please take a look on indexers, setting a custom indexer for that would solve the problem as far I can see. InformerEventSource has API to add indexer: then access the resource by index: |
|
I will add an Integration test to showcase your sample handling |
…urce This might needed in some corner cases where might help with optimizations to which resource to trigger. Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
9f0c947 to
35b6467
Compare
|
replaced by: #3425 |
|
@dvob I implemented an alternative version with an integration test to cover your use case, if everything goes well, this will be in next minor release. Please take a look, and let me know if it looks good to you. |
This might needed in some corner cases where might help with optimizations to which resource to trigger.
TODO adaptor
Signed-off-by: Attila Mészáros a_meszaros@apple.com