-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move the rest of the extensions to the new api from #3845 #3876
Comments
I think we can also do away with the need for KubernetesResourceMappingProvider - that can be driven by either an annotation scan for Group/Version/Kind, or could be loaded through basically the same mechanism as what is registering handlers that is proposed by #3845. It all depends on the expectation of if the user can make use of KubernetesDesializer / Serialization independently of the client. |
@iocanel @rohanKanojia @manusa With these changes, I'd like to propose simplifying the mocking logic for extensions - to not require an additional module. This would look like: https://github.com/shawkins/kubernetes-client/compare/extension-api...shawkins:extension-mock?expand=1 I did not try to yet minimize the duplication between KubernetesMockExtension and KubernetesMockServerExtension (that could easily be done, or we could choose to throw away the legacy mock support). Instead of extension specific annotations and mock servers you'll just use: EnableKubernetesMock - if you don't specify the specific extensions to be supported, then any Client will automatically be provided. If you do provide the specific set of extensions this allows for you to control the behavior of tests for classes that may need tested separately as OpenShift and as base Kubernetes. This may need some further refinement to what isAdaptable and adapt mean. For one the openshift logic is making a call to isAdaptable in adapt - the other extensions do not. I've kept that in these changes, but moved that to the BaseClient.isAdaptable. It could be that we don't need that check at all - isAdaptable could mean "isSupported", and adapt could always simply change the client type. |
@iocanel @rohanKanojia @manusa other thoughts: ExtensionAdapter/ ExtensionAdapterSupport / APIGroupExtensionAdapter:
My general question is how much of this is useful to implement / retain? Possibilities include:
|
This also requires the use of ExtensionResourceAdapter so that an explicit constructor is no longer required
Moved the last two comments to their own issues, so that this issue can be resolved with #3917 |
This also requires the use of ExtensionResourceAdapter so that an explicit constructor is no longer required
Is your task related to a problem? Please describe
To keep the pr size for #3845 more manageable, this was captured as a follow on task.
Describe the solution you'd like
In addition to converting the other extensions we should also consider cleaning up ExtensionAdapterSupport, making a minimal development guide, and addressing any of the other leftover items from the initial issue/pr.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: