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: azuresqlfailovergroups.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: AzureSqlFailoverGroup
    listKind: AzureSqlFailoverGroupList
    plural: azuresqlfailovergroups
    shortNames:
    - asqlfog
    singular: azuresqlfailovergroup
  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: AzureSqlFailoverGroup is the Schema for the azuresqlfailovergroups
          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: AzureSqlFailoverGroupSpec defines the desired state of AzureSqlFailoverGroup
            properties:
              databaselist:
                items:
                  type: string
                type: array
              failovergraceperiod:
                format: int32
                type: integer
              failoverpolicy:
                description: ReadWriteEndpointFailoverPolicy - wraps https://godoc.org/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v3.0/sql#ReadWriteEndpointFailoverPolicy
                type: string
              keyVaultToStoreSecrets:
                type: string
              location:
                description: 'Important: Run "make" to regenerate code after modifying
                  this file'
                type: string
              resourcegroup:
                minLength: 1
                pattern: ^[-\w\._\(\)]+$
                type: string
              secondaryserver:
                type: string
              secondaryserverresourcegroup:
                type: string
              server:
                type: string
            required:
            - databaselist
            - failovergraceperiod
            - failoverpolicy
            - location
            - resourcegroup
            - secondaryserver
            - secondaryserverresourcegroup
            - 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: v1beta1
    schema:
      openAPIV3Schema:
        description: AzureSqlFailoverGroup is the Schema for the azuresqlfailovergroups
          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: AzureSqlFailoverGroupSpec defines the desired state of AzureSqlFailoverGroup
            properties:
              databaseList:
                items:
                  type: string
                type: array
              failoverGracePeriod:
                description: 'TODO: This field should be a ptr as it must not be specified
                  if the failover policy is Manual, TODO: but is required when the
                  policy is Automatic'
                format: int32
                type: integer
              failoverPolicy:
                description: ReadWriteEndpointFailoverPolicy - wraps https://godoc.org/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/v3.0/sql#ReadWriteEndpointFailoverPolicy
                enum:
                - Automatic
                - Manual
                type: string
              keyVaultToStoreSecrets:
                type: string
              location:
                description: 'Important: Run "make" to regenerate code after modifying
                  this file'
                minLength: 1
                type: string
              resourceGroup:
                minLength: 1
                pattern: ^[-\w\._\(\)]+$
                type: string
              secondaryServer:
                type: string
              secondaryServerResourceGroup:
                type: string
              server:
                minLength: 1
                type: string
            required:
            - databaseList
            - failoverGracePeriod
            - failoverPolicy
            - location
            - resourceGroup
            - secondaryServer
            - secondaryServerResourceGroup
            - 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: []
