-
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
Invalid CRD with when no string default value is used #6654
Comments
Additional context:The issue is applicable for both the Line 244 in 4beec62
Line 274 in 4beec62
For CRD v1 this is only applicable to the kubernetes-client/crd-generator/api/src/main/java/io/fabric8/crd/generator/AbstractJsonSchema.java Lines 451 to 453 in 1e952e0
The issue is now visible because the Quarkus Operator SDK switched to use CRD v2 in quarkiverse/quarkus-operator-sdk#927 🙌🙌🙌 @metacosm has added a fix in Quarkus Operator SDK to be able to use CRD v1: quarkiverse/quarkus-operator-sdk#1007 quarkiverse/quarkus-operator-sdk#1009 A release with the fix will be available in: https://github.com/quarkiverse/quarkus-operator-sdk/releases/tag/6.9.1 |
I have also backported the change to 6.8.5, which should also be released today. |
Describe the bug
With the generator v2 the default are not working as expected. If you define for example
the generated crd will put the default value as a string causing the crd to not be valid.
Fabric8 Kubernetes Client version
6.13.4
Steps to reproduce
Maybe adding a test in
kubernetes-client/crd-generator/api-v2/src/test/java/io/fabric8/crdv2/generator/v1/JsonSchemaTest.java
Line 70 in ef59440
Expected behavior
The correct default value should be used.
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.25.3@latest
Environment
Linux
Fabric8 Kubernetes Client Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: