-
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
Builder methods expecting HasMetadata/KubernetesResource are not correct #4540
Milestone
Comments
The first part needs to be addressed in sundrio. For the second part I need to refresh my memory as I don't recall by heart how GenericKubernetesResource and RawExtension work. |
@iocanel do you want me to copy the first part over to sundrio? |
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Nov 28, 2022
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Nov 28, 2022
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Nov 28, 2022
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Nov 28, 2022
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Nov 28, 2022
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Nov 28, 2022
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Nov 28, 2022
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Nov 28, 2022
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Nov 28, 2022
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Nov 28, 2022
shawkins
added a commit
to shawkins/kubernetes-client
that referenced
this issue
Dec 2, 2022
manusa
pushed a commit
that referenced
this issue
Dec 5, 2022
manusa
pushed a commit
that referenced
this issue
Dec 5, 2022
manusa
pushed a commit
that referenced
this issue
Dec 5, 2022
manusa
pushed a commit
that referenced
this issue
Dec 5, 2022
manusa
pushed a commit
that referenced
this issue
Dec 5, 2022
manusa
pushed a commit
that referenced
this issue
Dec 5, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When the builder logic generates the handling for a method like IngressControllerSpec.unsupportedProperties it creates a method impl for withUnsupportedProperties that does an instanceOf check for the known buildable types. If you use something like GenericKubernetesResource, or RawExtension that is not an explicitly known type - it is silently ignored. At the very least an exception should be thrown.
For usability at a minimum we need to add GenericKubernetesResource and RawExtension as buildable everywhere - with either a method added or a pointer from the exception when an unknown type is used about converting to these types - either wrapping with RawExtension, or using Serialization.jsonMapper().convertValue(resource, GenericKubernetesResource.class).
cc @iocanel @manusa
The text was updated successfully, but these errors were encountered: