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

[crd-generator] Generated CRD YAML is not always the same when using @PrinterColumn #3040

Closed
clement-buchart opened this issue Apr 26, 2021 · 1 comment · Fixed by #3071
Closed
Assignees
Labels
component/crd-generator Related to the CRD generator
Milestone

Comments

@clement-buchart
Copy link

Hello,

I've been migrating some internal operator from the go-based CRD generation to the Java based one. Thanks for this lib.

A minor inconvenience I noticed is that, when using additional printer column via the @PrinterColumn annotation, the generated YAML may change at each build because the order of the additionalPrinterColumns in the YAML is not consistent.

This cause the digest of the docker image to change each build, which cause our CD to deploy the operator.

My current workaround is something like

yq -j e customresources.yml | jq '.spec.versions[].additionalPrinterColumns|=sort_by(.name)' | yq -P e -

to make the order predictable.

Cheers

@metacosm metacosm self-assigned this Apr 30, 2021
@metacosm metacosm added the component/crd-generator Related to the CRD generator label Apr 30, 2021
@manusa manusa added this to the 5.4.0 milestone May 4, 2021
@clement-buchart
Copy link
Author

Great, thank you very much 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/crd-generator Related to the CRD generator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants