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
Expected date-time format #1754
Comments
We probably need to regenerate that docker image for building CRDs. The change that introduced this for the main repo is here: https://github.com/kubernetes-client/gen/pull/177/files I think we need an updated pom.xml in that Dockerfile. You could probably make that change manually yourself by building one more layer on top of the main generator Docker image. cc @yue9944882 |
@brendandburns yes, i will re-gen an image adopting OffsetDateTime
@gauravrkulkarni i think the error is caused by server-side rejection, can you elaborate how you're serializing the datetime object? which codec are you currently using? or you can also pasted us the failing request body so that we can help you. |
@yue9944882 checking to see if you have the re-gen the image with OffsetDateTime? If yes, can you please let me know where to find it? |
Yeah, I am hitting this too. It looks like PR 1418 was incomplete. |
i just bumped a new version of the crd model generator, plz let us know if it doesn't solve the issue.
|
Thanks @yue9944882, that solved it! |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I have defined a custom resource with a status field "lastTransitionTime". I have defined it in date-time format. Relevant portion from CRD:
I used instructions here to generate models. Looks like lastTransitionTime gets converted into joda DateTime.
I have an operator that updates this field. When the operator tries to update the custom resource after setting this field, I see an error
.lastTransitionTime in body must be of type date-time: \"
I looked at the client code, and looks like we are expected to use java OffsetDateTime. I tried to use OffsetDateTime, but it looks like the operator goes in constant reconciliation loop without any errors or exceptions (which doesn't happen if I don't update this field at all. I am able to update other fields in the status and they are not in date-time format).
Client Version: 12.0.0
Kubernetes Version: 1.19.11
Java Version:Java 8
Cloud: Azure (AKS)
Thanks in advance.
The text was updated successfully, but these errors were encountered: