apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: users.mysql.group
spec:
  scope: Namespaced
  group: mysql.group
  names:
    kind: User
    plural: users
    singular: user
    shortNames:
      - user
  versions:
  - name: v1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            type: object
            properties:
              instance:
                type: string
              mysqlPassword:
                type: string
              userName:
                type: string
    additionalPrinterColumns:
    - name: Server
      type: string
      description: The server where user exists
      jsonPath: .spec.instance
    - name: UserName
      type: string
      description: User name
      jsonPath: .spec.userName
    - name: Age
      type: date
      jsonPath: .metadata.creationTimestamp
