-
Notifications
You must be signed in to change notification settings - Fork 10
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
Check if MR fields do not comply with provider CRDs schema #6
Comments
@Piotr1215 can you specify more what you are expecting? The linter already checks for patches that go to / from incorrect paths. However, it does validate fields that are hardcoded in resource's |
The What I was trying to ask for is validating the resrouces schema. Let's imagine that I have this resource in my composition (patches cut for brevity): resources:
- name: storagebucket
base:
apiVersion: storage.gcp.upbound.io/v1beta1
kind: Bucket
spec:
forProvider:
location: us-west1
storageClass: STANDARD
providerConfigRef:
name: default
patches:
... In this case, the Normally this check would fail on apply, but it could be beneficial to have it as a linting step in design time. |
Perhaps as a rule it could be possible to run something like kubeconform or kubeval with |
Another option, though I fear it'll bloat this repo quite a bit and cause more maintenance, would be to use cuelang and |
Thank you for putting this together, the tool is very useful, especially that it's a CLI and can be run in a pipeline.
Are there plans on the roadmap to validate
MRs
for nonexistent or incorrect fields? We are very conscious about paying compositions tax and often use plainMRs
for simpler, non-repeatable deployments. Having validation rules check if fields in a given MR are missing, added or incorrect would help catch errors much earlier.The text was updated successfully, but these errors were encountered: