apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: scheduledvolumesnapshots.k8s.ryanorth.io
spec:
  group: k8s.ryanorth.io
  versions:
    - name: v1beta1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                snapshotClassName:
                  description: The name of the VolumeSnapshotClass to be used for generating the snapshot.
                  type: string
                persistentVolumeClaimName:
                  description: The name of the persistent volume claim snapshots should be taken against.
                  type: string
                snapshotFrequency:
                  description: >
                    How often a snapshot should be created against the persistent volume. Value can be provided
                    as a string (e.g. 30m, 5h, 4d, 1w, etc.) or an integer (interpretted in hours).
                  x-kubernetes-int-or-string: true
                snapshotRetention:
                  description: >
                    How long a snapshot should be retained. Value can be provided as a string (e.g. 30m, 5h, 4d, 1w, etc.)
                    or an integer (interpretted in hours). Negative values indicate indefinite retention.
                  x-kubernetes-int-or-string: true
                snapshotLabels:
                  description: Labels to include on the VolumeSnapshot objects.
                  type: object
                  additionalProperties:
                    type: string
              required:
                - snapshotClassName
                - persistentVolumeClaimName
                - snapshotFrequency
                - snapshotRetention
  scope: Namespaced
  names:
    plural: scheduledvolumesnapshots
    singular: scheduledvolumesnapshot
    kind: ScheduledVolumeSnapshot
    listKind: ScheduledVolumeSnapshotList
    shortNames:
      - svs
