azure-service-operator
azure-service-operator copied to clipboard
Improve GVK selection logic for VirtualNetwork, RouteTable, and LoadBalancer extensions
We have a few resource extensions, where we need to merge the child resource into the parent resource into the ARM payload. These resource relationships are:
- VirtualNetwork - VirtualNetworksSubnet
- LoadBalancer - LoadBalancersInboundNatRule
- RouteTable - RouteTablesRoute
Currently, how we get the GVK for a child resource off from the parent resource in these extensions is not an ideal way to fetch GVK for a resource as we may run into problems when there are multiple versions involved. More discussion on comment
We should still do this - what we have here is a bit fragile, but we do have tests that will catch if it breaks
This is still fragile, but we do have tests
No change from above
No change from above
Still interested in finding a better approach.
No change from above - the fact that this hasn't caused issues in a few years makes me think it's probably not that fragile (even though it is ugly).