Closed alexmasi closed 1 year ago
Thanks Alex, can you explain what is the benefit of a dynamic clientset?
To give some more context on this change:
We (KNE) had been developing a clientset (https://github.com/openconfig/kne/blob/main/api/clientset/v1beta1/topology.go) for the Topology CRD, wasn't aware that this one existed (appears it was merged from changes by marcushines a while ago). I am looking to contribute those changes here and delete our unintended fork.
Since that divergence we have made changes to the clientset that have eased unit testing. The fake is much easier to use as it more closely mirrors the standard k8 clientset. So you can load runtime.Object's into the clientset. You can see some examples of testing with the fake dynamic client in the added test for the topology clientset
This change also removes the Type and Obj Meta fields from the subfields of the Topology struct as they are unused, they do not need to be treated as runtime objects during code gen