-
Notifications
You must be signed in to change notification settings - Fork 423
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
Generated Metadata breaks crd in 1.15 #279
Comments
@DirectXMan12 am I missing something here? I dont see any docs about the above requirements in https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definition-versioning btw, but code is there. |
I verified that this works with 1.14.2 but not 1.15.{0,1}, tested with minikube and |
|
And you are correct, structural schema is required to make use of webhook conversion |
we should be no longer specifying validation for objectmeta in the latest versions of controller-tools, in part due to this issue. |
can you retry with beta.5? |
@DirectXMan12 I'm seeing this too with beta.5. Still digging into it but wanted to report it here. |
Or rather, |
If I manually set |
Aha, we need #281 |
Just found this as well when using kubebuilder on 1.15.3 |
I found that Manually removing the |
@sttts is that intentional? |
yes, use of new features like |
Is there a flag or a way to disable use of |
@muvaf that's probably a separate issue (just that client-side validation doesn't understand), but yeah, we should fix that too. In the short term, you can run with |
@DirectXMan12 yeah, this seems to be the case. I tested with GKE 1.13.11 and kubectl 1.17 and it worked. Thanks! Here is the separate issue #392 |
@muvaf @DirectXMan12 --validate=false I tried before with no success. https://kubernetes.io/docs/setup/release/version-skew-policy/ |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Ran into this in kube 1.16 docker-desktop. Generated project using Kubebuilder 2.3.
|
@frodopwns the related issues should be solved. Can you confirm that you have the latest version of controller-tools installed? |
@frodopwns @DirectXMan12
|
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
I have the same problem as @redradrat with Kubebuilder 2.3.1 and controller-gen v0.3.0 too (This was a project that was upgraded from Kubebuilder 2.2 and so changed the Makefile to update controller-gen from v0.2.4 to v0.3.0). The CustomResourceDefinition "xx.yy.zz" is invalid: spec.conversion.strategy: Invalid value: "Webhook": must be None if spec.preserveUnknownFields is true |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: 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. |
Details are described in kubernetes/kubernetes#80493. Initially I thought that this might be a k8s issue but it looks now like an incompatibility issue for controller-tools.
The problem is that the default
preserveUnknownFields: true
in combination withand
create this error
The CustomResourceDefinition "cronjobs.batch.tutorial.kubebuilder.io" is invalid: spec.conversion.strategy: Invalid value: "Webhook": must be None if spec.preserveUnknownFields is true
If you set
preserveUnknownFields: false
to make conversion work then immediately you get:The text was updated successfully, but these errors were encountered: