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-generation: field annotated with @PrinterColumn of type enum defined as object in the genrated CRD #3011

Closed
lburgazzoli opened this issue Apr 19, 2021 · 0 comments · Fixed by #3022
Assignees

Comments

@lburgazzoli
Copy link
Contributor

If a field of a CR is an enum and annotated with @PrinterColumn, the resulting CRD definition reports it as an object which is invalid.

additionalPrinterColumns:
  - JSONPath: .status.phase
    name: PHASE
    type: object

kubernetes-client: 5.3.0
reproducer: https://github.com/lburgazzoli/fabric8-kubernetes-client-crdgen

@metacosm metacosm self-assigned this Apr 19, 2021
metacosm added a commit to metacosm/kubernetes-client that referenced this issue Apr 20, 2021
metacosm added a commit to metacosm/kubernetes-client that referenced this issue Apr 20, 2021
metacosm added a commit to metacosm/kubernetes-client that referenced this issue Apr 20, 2021
metacosm added a commit to metacosm/kubernetes-client that referenced this issue Apr 21, 2021
manusa pushed a commit to metacosm/kubernetes-client that referenced this issue Apr 22, 2021
manusa pushed a commit to metacosm/kubernetes-client that referenced this issue Apr 22, 2021
manusa pushed a commit that referenced this issue Apr 26, 2021
* feat: make generator more configurable, with better reporting and tests

* fix: only output type def and crd if the test failed

* feat: only project definition / properties once

* fix: simplify status property detection

* fix: properly handle enum types for additional printer columns

Fixes #3011

* chore(tests): add tests for #3020

Fixing this issue will require a new sundrio release.

* chore(docs): update CHANGELOG

* chore(tests): update to sundrio 0.30.4

* chore(docs): update CHANGELOG

* fix: output format

* fix: TypeDef from TypeElement also needs to be "unshallowed"

* chore: clean-up
manusa pushed a commit to manusa/kubernetes-client that referenced this issue Apr 26, 2021
* feat: make generator more configurable, with better reporting and tests

* fix: only output type def and crd if the test failed

* feat: only project definition / properties once

* fix: simplify status property detection

* fix: properly handle enum types for additional printer columns

Fixes fabric8io#3011

* chore(tests): add tests for fabric8io#3020

Fixing this issue will require a new sundrio release.

* chore(docs): update CHANGELOG

* chore(tests): update to sundrio 0.30.4

* chore(docs): update CHANGELOG

* fix: output format

* fix: TypeDef from TypeElement also needs to be "unshallowed"

* chore: clean-up

(cherry picked from commit 91a0078)
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