-
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
Further refine type resolving for 6.0 #3993
Comments
@rohanKanojia @manusa @metacosm I'm not entirely aware of the original motivation for allowing this type of resolving, is there a reason why we can't now just require a full specification? At worst you'll get an error as the item would be passed back as a generic. |
Whatever the outcome here will address a bug I left in https://github.com/fabric8io/kubernetes-client/blob/master/kubernetes-model-generator/kubernetes-model-core/src/main/java/io/fabric8/kubernetes/internal/KubernetesDeserializer.java#L286 - that will only allow things to resolve to the latest version. |
i don't agree with this comment. during typing phase majority of errors are implemented and produced against focus actions of choice . causing error nodes and defects |
during the test of indication of knowledge spectations indirect use of modification of system error from malware attacks from hackers. |
@fig666 these comments seem unrelated to this issue |
@manusa @rohanKanojia @metacosm @iocanel as part of this change it would be nice to eliminate the package list down in the KubernetesDeserializer. Instead of keying by kind, we'll use the full key and always expect exact matches. There are a couple of approaches:
What are your thoughts on:
|
also moving to jandex for class discovery
Relates to #2316 - as we will no longer allow it. @manusa @rohanKanojia @metacosm also related to this if we want to allow for cross version compatibility (when the object model doesn't change) then we need to update the Version annotation to accept an array of versions. The KubernetesDeserializer will know to register the type across all of those versions. |
Double checking kubectl requires a full specification of apiVersion. oc behaves differently. It will accept just version, but only for openshift specific resources. This works: kind: Template This doesn't: kind: CronJob It's also not backed by an api server call - this is by convention. If you via a crd add a conflicting kind, if you specify just v1 - it will resolve to the openshift resource. It appears that oc maintains a list of openshift kinds. Such that it will try finding kind.openshift.io/version when only version is specified. |
Is your task related to a problem? Please describe
The KubernetesDeserializer logic relies upon a package list to determine resolving order. It seems like we should not allow this loose resolving of built-in types. The current logic will resolve all of the following to the same class:
kind: Route
kind: Route
apiVersion: v1
kind: Route
apiVersion: route.openshift.io/v1
Describe the solution you'd like
Only support fully specified versions:
kind: Route
apiVersion: route.openshift.io/v1
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: