-
Notifications
You must be signed in to change notification settings - Fork 2k
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
CoreV1Event JSON validation fails due to missing reportingController field #3668
Comments
This comment was marked as outdated.
This comment was marked as outdated.
What code is throwing this? It looks like you are trying to parse an the core event includes a You can find the full API specification here: |
That's strange, I'm creating a namespaced events watch using
It's obviously being parsed as |
How are you creating the Watch? Can you send your sample code? Watch is a generic type, are you accidentally making it |
You are right of course. Things were complicated by being in a different language than Java, and I missed that the type being issued to the |
Describe the bug
On docker-desktop with the given k8s version, event JSONs contain the field
reportingController
. This is not included inCoreV1Event.java
, and the validation fails with the error messageThe field
reportingController
in the JSON string is not defined in theCoreV1Event
properties.Raw JSON returned:
{\"kind\":\"Event\",\"apiVersion\":\"events.k8s.io/v1\",\"metadata\":{\"name\":\"pod\",\"namespace\":\"pods\",\"uid\":\"312e32e1-0c8e-416f-ad47-a6958432bd24\",\"resourceVersion\":\"8108227\",\"creationTimestamp\":\"2024-08-29T14:37:04Z\",\"managedFields\":[{\"manager\":\"kube-scheduler\",\"operation\":\"Update\",\"apiVersion\":\"events.k8s.io/v1\",\"time\":\"2024-08-29T14:37:04Z\",\"fieldsType\":\"FieldsV1\",\"fieldsV1\":{\"f:action\":{},\"f:eventTime\":{},\"f:note\":{},\"f:reason\":{},\"f:regarding\":{},\"f:reportingController\":{},\"f:reportingInstance\":{},\"f:type\":{}}}]},\"eventTime\":\"2024-08-29T14:37:04.418330Z\",\"reportingController\":\"default-scheduler\",\"reportingInstance\":\"default-scheduler-docker-desktop\",\"action\":\"Binding\",\"reason\":\"Scheduled\",\"regarding\":{\"kind\":\"Pod\",\"namespace\":\"pods\",\"name\":\"pod\",\"uid\":\"52682376-1685-4d80-b507-9e13d827a728\",\"apiVersion\":\"v1\",\"resourceVersion\":\"8108224\"},\"note\":\"Successfully assigned pods/pod1 to docker-desktop\",\"type\":\"Normal\",\"deprecatedSource\":{},\"deprecatedFirstTimestamp\":null,\"deprecatedLastTimestamp\":null}"}
Client Version
21.0.1
Kubernetes Version
1.29.1
Java Version
Java 21
Expected behavior
The field is present or ignored in validation.
Server (please complete the following information):
The text was updated successfully, but these errors were encountered: