apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    cert-manager.io/inject-ca-from: azureoperator-system/azureoperator-serving-cert
    controller-gen.kubebuilder.io/version: v0.4.0
  name: mysqlusers.azure.microsoft.com
spec:
  conversion:
    strategy: Webhook
    webhook:
      clientConfig:
        service:
          name: webhook-service
          namespace: system
          path: /convert
      conversionReviewVersions:
      - v1beta1
  group: azure.microsoft.com
  names:
    kind: MySQLUser
    listKind: MySQLUserList
    plural: mysqlusers
    singular: mysqluser
  preserveUnknownFields: false
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .status.provisioned
      name: Provisioned
      type: string
    - jsonPath: .status.message
      name: Message
      type: string
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: MySQLUser is the Schema for the mysqlusers API
        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: MySQLUserSpec defines the desired state of MySqlUser
            properties:
              adminSecret:
                description: optional
                type: string
              adminSecretKeyVault:
                type: string
              dbName:
                type: string
              keyVaultToStoreSecrets:
                type: string
              resourceGroup:
                minLength: 1
                pattern: ^[-\w\._\(\)]+$
                type: string
              roles:
                items:
                  type: string
                type: array
              server:
                description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
                  Important: Run "make" to regenerate code after modifying this file'
                type: string
              username:
                type: string
            required:
            - dbName
            - resourceGroup
            - roles
            - server
            type: object
          status:
            description: ASOStatus (AzureServiceOperatorsStatus) defines the observed
              state of resource actions
            properties:
              completed:
                format: date-time
                type: string
              containsUpdate:
                type: boolean
              failedProvisioning:
                type: boolean
              flattenedSecrets:
                type: boolean
              message:
                type: string
              output:
                type: string
              pollingUrl:
                type: string
              provisioned:
                type: boolean
              provisioning:
                type: boolean
              requested:
                format: date-time
                type: string
              resourceId:
                type: string
              specHash:
                type: string
              state:
                type: string
            type: object
        type: object
    served: true
    storage: false
    subresources:
      status: {}
  - additionalPrinterColumns:
    - jsonPath: .status.provisioned
      name: Provisioned
      type: string
    - jsonPath: .status.message
      name: Message
      type: string
    name: v1alpha2
    schema:
      openAPIV3Schema:
        description: MySQLUser is the Schema for the mysqlusers API
        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: MySQLUserSpec defines the desired state of MySqlUser
            properties:
              adminSecret:
                type: string
              adminSecretKeyVault:
                type: string
              databaseRoles:
                additionalProperties:
                  items:
                    type: string
                  type: array
                description: The database-level roles assigned to the user (keyed
                  by database name).
                type: object
              keyVaultToStoreSecrets:
                type: string
              resourceGroup:
                minLength: 1
                pattern: ^[-\w\._\(\)]+$
                type: string
              roles:
                description: The server-level roles assigned ot the user.
                items:
                  type: string
                type: array
              server:
                description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
                  Important: Run "make" to regenerate code after modifying this file'
                minLength: 1
                type: string
              username:
                type: string
            required:
            - resourceGroup
            - server
            type: object
          status:
            description: ASOStatus (AzureServiceOperatorsStatus) defines the observed
              state of resource actions
            properties:
              completed:
                format: date-time
                type: string
              containsUpdate:
                type: boolean
              failedProvisioning:
                type: boolean
              flattenedSecrets:
                type: boolean
              message:
                type: string
              output:
                type: string
              pollingUrl:
                type: string
              provisioned:
                type: boolean
              provisioning:
                type: boolean
              requested:
                format: date-time
                type: string
              resourceId:
                type: string
              specHash:
                type: string
              state:
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
