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

Incorrect CRD spec generation #386

Open
holycheater opened this issue Apr 25, 2024 · 0 comments
Open

Incorrect CRD spec generation #386

holycheater opened this issue Apr 25, 2024 · 0 comments

Comments

@holycheater
Copy link

When spec is generated from object with no properties, it creates a closed struct inside a "definition" which doesn't allow to extend objects

Example CRD:
https://github.com/Altinity/clickhouse-operator/blob/master/deploy/operatorhub/0.23.5/clickhouseinstallations.clickhouse.altinity.com.crd.yaml#L1112-L1118

example result:

#ClickHouseInstallationSpec: {
  // ... skip ...
  spec: podTemplates?: [...{
    // ... skip ...
   metadata?: {}
}


obj: #ClickHouseInstallationSpec
obj: templates: podTemplates: [{
    metadata: labels: foo: "bar"
}]

Error:

obj.spec.templates.podTemplates.0.metadata.labels: field not allowed:
    ../cue.mod/gen/clickhouse.altinity.com/clickhouseinstallation/v1/types_gen.cue:45:9
    ../cue.mod/gen/clickhouse.altinity.com/clickhouseinstallation/v1/types_gen.cue:1210:19
    ../cue.mod/gen/clickhouse.altinity.com/clickhouseinstallation/v1/types_gen.cue:1223:15
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

1 participant