apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: redis-databases.wyrihaximus.net
spec:
  group: wyrihaximus.net
  scope: Namespaced
  names:
    plural: redis-databases
    singular: redis-database
    kind: RedisDatabase
    categories: [ redis ]
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              required: [secret, service]
              properties:
                secret:
                  type: object
                  required: [name]
                  properties:
                    name:
                      type: string
                      nullable: false
                      description: The name of the secret to create with the connection details
                service:
                  type: object
                  required: [read, write]
                  properties:
                    read:
                      type: string
                      nullable: false
                      description: Read access service
                    write:
                      type: string
                      nullable: false
                      description: Write access service
