apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: backups.mariadb.persistentsys
spec:
  group: mariadb.persistentsys
  names:
    kind: Backup
    listKind: BackupList
    plural: backups
    singular: backup
  scope: Namespaced
  versions:
  - name: v1alpha1
    served: true
    storage: true
    subresources: {}
    schema: 
      openAPIV3Schema:
        description: Backup is the Schema for the backups API
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: BackupSpec defines the desired state of Backup
            properties:
              backupPath:
                description: Backup Path
                type: string
              backupSize:
                description: Backup Size (Ex. 1Gi, 100Mi)
                type: string
              schedule:
                description: 'Schedule period for the CronJob. This spec allow you setup
                  the backup frequency Default: "0 0 * * *" # daily at 00:00'
                type: string
            required:
            - backupPath
            - backupSize
            type: object
          status:
            description: BackupStatus defines the observed state of Backup
            type: object
        type: object
