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

Is there a way to post process the generated CRD? #1025

Open
matteriben opened this issue Jan 17, 2025 · 4 comments
Open

Is there a way to post process the generated CRD? #1025

matteriben opened this issue Jan 17, 2025 · 4 comments
Assignees

Comments

@matteriben
Copy link

I'd like the generated CRD to include logical constraints using [ "oneOf", "allOf", "anyOf", "not" ]. Currently I don't believe this is something the generator can provide. If there is a way to post process the generated CRD before its applied that could offer a pathway to include these constraints.

Related:
fabric8io/kubernetes-client#6801

@matteriben
Copy link
Author

I believe I found my answer and it seems this can be done by through an extension at build time.

@metacosm
Copy link
Member

@matteriben sorry, this somehow slipped by me… Would you mind describing your solution? Maybe there's something we could add in QOSDK to make this and future similar use cases easier to deal with?

@matteriben
Copy link
Author

@metacosm
What I was looking for was a way to extend the existing CRD generator build-step perhaps by implementing some post-processor interface or something like that.

The pathway I found in the meantime is to extend the build system (maven or in my case gradle) with a post-processing stage.

@metacosm
Copy link
Member

metacosm commented Jan 23, 2025

@matteriben would it help if QOSDK provided a way to add a CRD post-processor that would be inserted before the CRD is serialized to disk? Most likely in the form of a CDI bean implementing a given interface.

@metacosm metacosm reopened this Jan 23, 2025
@metacosm metacosm self-assigned this Jan 23, 2025
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

No branches or pull requests

2 participants