kyverno / chainsaw

Declarative K8s e2e testing
https://kyverno.github.io/chainsaw/
Apache License 2.0
269 stars 40 forks source link

[Bug] Lint doesn't work with chainsaw.kyverno.io/v1alpha2 #1884

Closed camaeel closed 1 week ago

camaeel commented 2 weeks ago

chainsaw version Version

v0.2.8

Description

chainsaw lint is not able to lint v1alpha2 Configuration document

Steps to reproduce

  1. Create a config:

    # yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/configuration-chainsaw-v1alpha2.json
    apiVersion: chainsaw.kyverno.io/v1alpha2
    kind: Configuration
    metadata:
      name: example
    spec:
    
      cleanup:
        skipDelete: false
  2. Run: chainsaw lint configuration -f config.yaml
  3. Output is:
    Processing input...
    The schema is not valid. See errors:
    - apiVersion: apiVersion must be one of the following: "chainsaw.kyverno.io/v1alpha1"
    - spec: Additional property cleanup is not allowed
    Error: document is not valid

Expected behavior

Linter should correctly validate Configuration from apiVersion: chainsaw.kyverno.io/v1alpha2

Screenshots

No response

Logs

Processing input...
The schema is not valid. See errors:
- apiVersion: apiVersion must be one of the following: "chainsaw.kyverno.io/v1alpha1"
- spec: Additional property cleanup is not allowed
Error: document is not valid

Slack discussion

No response

Troubleshooting

eddycharly commented 2 weeks ago

Thanks for reporting, i will look into it asap.