In order for the typed clients to share the same view of the world as the dynamic client, they all must share the same (wrapped) object tracker. Create typed clients using the dynamic client's object tracker and transform between typed and unstructured objects.
Use the auto-generated runtime schemes in the fake discovery client. The client is usually auto-detecting the list types from the scheme. By not passing a new, empty scheme, but the default scheme, there's no longer the need to manually manage the item to list type map. Support API resource discovery by taking all the GVKs out of the scheme and convert those to some API resource lists to be added to the discovery client. The conversion is just a best guess, but will suffice for testing needs.
Type of change
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update
How Has This Been Tested?
[x] Manual test
[ ] Auto test added
Checklist:
[x] My code follows the style guidelines of this project
Description
In order for the typed clients to share the same view of the world as the dynamic client, they all must share the same (wrapped) object tracker. Create typed clients using the dynamic client's object tracker and transform between typed and unstructured objects.
Use the auto-generated runtime schemes in the fake discovery client. The client is usually auto-detecting the list types from the scheme. By not passing a new, empty scheme, but the default scheme, there's no longer the need to manually manage the item to list type map. Support API resource discovery by taking all the GVKs out of the scheme and convert those to some API resource lists to be added to the discovery client. The conversion is just a best guess, but will suffice for testing needs.
Type of change
How Has This Been Tested?
Checklist: