apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: permissions.mysql.group
spec:
  scope: Namespaced
  group: mysql.group
  names:
    kind: Permissions
    plural: permissions
    singular: permission
    shortNames:
      - pm
  versions:
  - name: v1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            type: object
            properties:
              userName:
                type: string
              instance:
                type: string
              permissions:
                type: array
                items:
                  type: string
    additionalPrinterColumns:
    - name: User
      type: string
      description: Username that has these permissions
      jsonPath: .spec.userName
    - name: Permissions
      type: string
      description: Permissions
      jsonPath: .spec.permissions

