yannh / kubeconform

A FAST Kubernetes manifests validator, with support for Custom Resources!
Apache License 2.0
2.15k stars 121 forks source link

Could not find schema for VolumeSnapshot #183

Closed carolili closed 1 year ago

carolili commented 1 year ago

Hello and thanks for creating a great tool for validating :)

I was trying to validate a very simple Kubernetes VolumeSnapshot resource with v.1.25.8 manifests (-kubernetes-version 1.25.8) and it fails with could not find schema for VolumeSnapshot. Indeed, I can't seem to find any VolumeSnapshot schemas in the kubernetes-json-schema repo. Was it not yet added or is there a reason it's not there? Perhaps I'm missing something?

Example resource:

apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
  name: my-snapshot
  namespace: testing
spec:
  source:
    persistentVolumeClaimName: pvc-test
eyarz commented 1 year ago

VolumeSnapshot is not a native K8s object, so it is not part of the kubernetes-json-schema repo. It's a CR, so it needs to be validated differently.

carolili commented 1 year ago

Ah, I see, thank you very much! I will close this as resolved then.