apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: databases.db-operator.plumdog.co.uk
spec:
  group: db-operator.plumdog.co.uk
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          required:
            - spec
          properties:
            spec:
              type: object
              description: |-
                Database.
              required:
                - name
                - server
              properties:
                name:
                  type: string
                  description: |-
                    The name of the database.
                server:
                  type: object
                  required:
                    - name
                  properties:
                    namespace:
                      type: string
                    name:
                      type: string
            status:
              type: object
              description: |-
                Status
              properties:
                createdName:
                  type: string
                error:
                  type: object
                  properties:
                    message:
                      type: string
                    code:
                      type: string
      subresources:
        status: {}
  scope: Namespaced
  names:
    plural: databases
    singular: database
    kind: Database
    shortNames:
    - db
