apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: mariadbs.mariadb.persistentsys
spec:
  group: mariadb.persistentsys
  names:
    kind: MariaDB
    listKind: MariaDBList
    plural: mariadbs
    singular: mariadb
  scope: Namespaced
  versions:
  - name: v1alpha1
    served: true
    storage: true
    subresources: {}
    schema:
      openAPIV3Schema:
        description: MariaDB is the Schema for the mariadbs 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: MariaDBSpec defines the desired state of MariaDB
            properties:
              dataStoragePath:
                description: Database storage Path
                type: string
              dataStorageSize:
                description: Database storage Size (Ex. 1Gi, 100Mi)
                type: string
              database:
                description: New Database name
                type: string
              image:
                description: Image name with version
                type: string
              password:
                description: Database additional user password (base64 encoded)
                type: string
              port:
                description: Port number exposed for Database service
                format: int32
                type: integer
              rootpwd:
                description: Root user password
                type: string
              size:
                description: Size is the size of the deployment
                format: int32
                type: integer
              username:
                description: Database additional user details (base64 encoded)
                type: string
            required:
            - dataStoragePath
            - dataStorageSize
            - database
            - image
            - password
            - port
            - rootpwd
            - size
            - username
            type: object
          status:
            description: MariaDBStatus defines the observed state of MariaDB
            properties:
              nodes:
                description: Nodes are the names of the pods
                items:
                  type: string
                type: array
            type: object
        type: object
