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

Validate crossplane beta render inputs #4852

Closed
Tracked by #4648
haarchri opened this issue Oct 19, 2023 · 1 comment · Fixed by #4887
Closed
Tracked by #4648

Validate crossplane beta render inputs #4852

haarchri opened this issue Oct 19, 2023 · 1 comment · Fixed by #4887
Labels
crossplane-cli enhancement New feature or request
Milestone

Comments

@haarchri
Copy link
Contributor

haarchri commented Oct 19, 2023

What problem are you facing?

Currently, the following order works as expected:

crank beta render xr.yaml composition.yaml functions.yaml

However, this order doesn't work:

crank beta render composition.yaml xr.yaml functions.yaml

The error message received in the latter case is:

error: crossplane: error: invalid Composition "dev-cluster-a": spec.resources: Required value: an array of resources is required in Resources mode (the default if no mode is specified)

How could Crossplane help solve your problem?

We need to implement input validation for the "crank beta render" command or add specifics for the file

crank beta render -xr xr.yaml -composition composition.yaml -function functions.yaml
@haarchri haarchri added the enhancement New feature or request label Oct 19, 2023
@negz negz changed the title crossplane-cli validating the type of input Validate crossplane beta render inputs Oct 19, 2023
@negz
Copy link
Member

negz commented Oct 19, 2023

Technically it is doing input validation. That's where the error is coming from. The problem is the validation isn't considering the apiVersion and kind, so it's telling you why your XR is an invalid Composition instead of telling you that your XR is not a Composition. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crossplane-cli enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants