azure-service-operator icon indicating copy to clipboard operation
azure-service-operator copied to clipboard

Improve GVK selection logic for VirtualNetwork, RouteTable, and LoadBalancer extensions

Open super-harsh opened this issue 2 years ago • 6 comments

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

super-harsh avatar May 23 '23 02:05 super-harsh

We should still do this - what we have here is a bit fragile, but we do have tests that will catch if it breaks

matthchr avatar Oct 30 '23 22:10 matthchr

This is still fragile, but we do have tests

matthchr avatar Feb 12 '24 23:02 matthchr

No change from above

matthchr avatar Mar 04 '24 23:03 matthchr

No change from above

matthchr avatar Aug 26 '24 23:08 matthchr

Still interested in finding a better approach.

theunrepentantgeek avatar Feb 10 '25 21:02 theunrepentantgeek

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).

matthchr avatar Jun 16 '25 22:06 matthchr