apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: serverconfigs.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: |-
                Server.
              required:
                - dbType
                - host
                - port
                - rootUsername
                - rootPassword
              properties:
                dbType:
                  type: string
                  enum:
                    - postgres
                host:
                  type: string
                  description: |-
                    Server hostname
                port:
                  type: integer
                  description: |-
                    Server port
                rootUsername:
                  type: object
                  description: |-
                    Root username
                  properties:
                    value:
                      type: string
                      description: |-
                        Explicit value
                rootPassword:
                  type: object
                  description: |-
                    Root password
                  properties:
                    value:
                      type: string
                      description: |-
                        Explicit value
  scope: Namespaced
  names:
    plural: serverconfigs
    singular: serverconfig
    kind: ServerConfig
    shortNames:
    - svrcfg
