Skip to content
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

CRDGenerator allows setting multiple custom resource versions as stored but should not #5845

Closed
baloo42 opened this issue Mar 30, 2024 · 0 comments · Fixed by #5846
Closed
Assignees
Milestone

Comments

@baloo42
Copy link
Contributor

baloo42 commented Mar 30, 2024

Describe the bug

The CRDGenerator does not detect that multiple schema versions are marked as stored if two or more versions are provided. This is not allowed for a CRD.

The CRDGenerator already includes a check to detect this, but it is not working because the check is executed too early in the decorator chain.

Fabric8 Kubernetes Client version

6.11.0

Steps to reproduce

Run this test:

void shouldProperlyGenerateMultipleVersionsOfCRDs() {

Expected behavior

The test should fail but does not because both versions of the "Multiple" example are marked as stored:
https://github.com/fabric8io/kubernetes-client/tree/0c80a66d10bf7096864246ce453413e0da4edbd2/crd-generator/api/src/test/java/io/fabric8/crd/example/multiple

Runtime

other (please specify in additional context)

Kubernetes API Server version

other (please specify in additional context)

Environment

other (please specify in additional context)

Fabric8 Kubernetes Client Logs

No response

Additional context

No response

@baloo42 baloo42 changed the title CRDGenerator allows setting multiple custom resource versions as stored CRDGenerator allows setting multiple custom resource versions as stored but should not Mar 30, 2024
@manusa manusa added this to the 6.12.0 milestone Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants