-
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
kubernetes-client does not seem to be initializing the mapper correctly. #5306
Comments
Is this related to #5293 ? |
It very well could be. I'll leave that for @metacosm. |
I don't think it does. I think there's an issue with the ordering of how things are initialised or maybe lazy-loading is causing a problem. Running the webhook app without interacting with it showed that the mapper initialiser is not called, I would need to step debug to see what's going on but I don't have time to do that now. |
@metacosm should this be a quarkus issue? |
I think we can close this issue: as explained elsewhere, the webhook is a REST endpoint which means that the request first goes through Quarkus' REST stack before even getting to the Kubernetes specific things. In this particular instance, the deserialisation issue occurred in the REST stack because the Quarkus' There might still be issues with ordering but let's cross that bridge when/if we get there. |
Describe the bug
I have been working with @metacosm on some mapper issues. I have one now where it appears the kubernetes-client is not initializing the mapper correctly.
I have added as much information as I can and can help reproduce the problem if necessary. But the code is internal so that complicates things.
I am hoping @metacosm can fill in enough details if I have missed something.
Fabric8 Kubernetes Client version
6.7.2
Steps to reproduce
In my case, we have an enumeration like this:
And our mapper is configured like this:
This works fine most of the time. However, when I try to create a resource that needs validation by a webhook, that request is rejected (with no error on the webhook side) and this exception is raised:
This error occurs when I try to create an object using this YAML:
Note that
Status
is the enumeration I have included above, and its value isNew
, which should be changed toNEW
when deserialized. I confirmed this is the problem by changing the value of the input file toNEW
, and the creation of the object was successful.Expected behavior
The mapper should handle enums correctly when ACCEPT_CASE_INSENSITIVE_ENUMS is set.
Runtime
minikube
Kubernetes API Server version
1.25.3@latest
Environment
Linux
Fabric8 Kubernetes Client Logs
Additional context
N/A.
The text was updated successfully, but these errors were encountered: