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

fix code generation for CRDs with recursive schema fields #253

Closed
ilackarms opened this issue Jun 21, 2021 · 0 comments · Fixed by #254
Closed

fix code generation for CRDs with recursive schema fields #253

ilackarms opened this issue Jun 21, 2021 · 0 comments · Fixed by #254
Assignees
Labels

Comments

@ilackarms
Copy link
Member

currently, SKv2 will crash with a stack overflow if a user tries to generate manifests for CRDs whose schemas contain recursive fields (fields that reference a parent type, allowing recursion).

this is an inherent limitation of kubernetes, which does not support references in the CRD's openapi validation schema: kubernetes/kubernetes#62872

recursive references cannot be expanded infinitely, although cue will attempt to do so when generating with our current implementation, which prevents crd manifest generation from being able to finish (ending with stack overflow crash).

the most obvious workaround for this problem would be to disable validation for the entire CRD; however this is problematic as a number of CRDs in gloo-mesh would be affected. the next best workaround would be to disable validation for the specific recursive fields within the openapi schema.

implementing this will require changes to cue as well as the skv2 code which leverages it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant