---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: databases.dbod.cern.ch
spec:
  group: dbod.cern.ch
  names:
    kind: Database
    listKind: DatabaseList
    plural: databases
    singular: database
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: Database is an API to request provisioning of a new database on a DBOD host, creating connection credentials in the same namespace
        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: Spec defines the desired state of Database
            type: object
            properties:
              databaseClass:
                description: 'Name of the required DB Quality of Service class (consult the `DatabaseClass` resources supported by the cluster)'
                type: string
              dbodInstanceName:
                description: '[exceptional] Request to create the new DB on a specific DBOD instance'
                type: string
              dbName:
                type: string
              dbUser:
                type: string
              extraLabels:
                description: 'Labels to be assigned to the secret that will be created the operator (useful with "label selector")'
                type: object
                x-kubernetes-preserve-unknown-fields: true
            required:
            - dbName
            - dbUser
            - extraLabels
          status:
            description: Status defines the observed state of Database
            type: object
            x-kubernetes-preserve-unknown-fields: true
            properties:
              assignedDBODInstance:
                type: string
        type: object
    served: true
    storage: true
    subresources:
      status: {}
