apiVersion: "apiextensions.k8s.io/v1"
kind: "CustomResourceDefinition"
metadata:
  name: "snapshotrules.k8ssnapshots.io"
spec:
  group: "k8ssnapshots.io"
  scope: "Namespaced"
  names:
    plural: snapshotrules
    singular: snapshotrule
    kind: SnapshotRule
  versions:
    - name: "v1alpha1"
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          required:
            - spec
          properties:
            spec:
              type: object
              required:
                - selector
              properties:
                snapshotClassName:
                  type: string
                selector:
                  type: object
                  properties:
                    matchLabels:
                      additionalProperties:
                        type: string
                      type: object
