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

schemars 0.8.11 causes broken CRDs #294

Open
fhennig opened this issue Oct 25, 2022 · 2 comments
Open

schemars 0.8.11 causes broken CRDs #294

fhennig opened this issue Oct 25, 2022 · 2 comments

Comments

@fhennig
Copy link
Member

fhennig commented Oct 25, 2022

This change: GREsau/schemars#152 introduced in schemars 0.8.11 causes doc strings to be integrated into the CRD, but it generates enums in a way that kubernetes doesn't like:

properties:
  accessStyle:
    description: "Which access style to use. ..."
    nullable: true
    oneOf:
      - description: "Use path-style access ..."
        enum:
          - Path
        type: string
      - description: "Use as virtual hosted-style access ..."
        enum:
          - VirtualHosted
        type: string

Before it was generated like so

properties:
  accessStyle:
    description: "Which access style to use. ...."
    enum:
      - Path
      - VirtualHosted
    nullable: true
    type: string

I'm not sure if schemars is actually at fault here, or if it is a different, higher-up component

@sbernauer
Copy link
Member

Might be related to kube-rs/kube#1047 and kube-rs/kube#1051
Haven't looked into it, just wanted to drop it here

@fhennig
Copy link
Member Author

fhennig commented Oct 25, 2022

Yes, the reported bug is the same. Thanks for finding that!

Teos fix was already merged and will be part of kube-rs 0.76.0, so we can upgrade to schemars 0.8.11 then.

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