---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.19.0
  name: keys.dedicated.regionalserver.tidbcloud.com
spec:
  group: dedicated.regionalserver.tidbcloud.com
  names:
    categories:
    - regionserver
    kind: Key
    listKind: KeyList
    plural: keys
    singular: key
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .status.phase
      name: PHASE
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: AGE
      type: date
    name: v1alpha1
    schema:
      openAPIV3Schema:
        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:
            properties:
              accountRef:
                description: |-
                  AccountReference is a reference to an Account CR.
                  It can be extended to use other types of references, like label selector.
                properties:
                  accountId:
                    description: aws account id, gcp project id or azure subscription
                      id
                    type: string
                  providerConfigName:
                    type: string
                  resourceGroupName:
                    description: ResourceGroupName is used for azure to place all
                      dataplane resources in an existing RG.
                    type: string
                  role:
                    type: string
                required:
                - accountId
                - providerConfigName
                type: object
              provider:
                type: string
              region:
                type: string
              tags:
                additionalProperties:
                  type: string
                description: Tags are the tags to be attached to the Key.
                type: object
              trustedDataplanes:
                items:
                  type: string
                type: array
            required:
            - accountRef
            - provider
            - region
            type: object
          status:
            properties:
              id:
                type: string
              phase:
                type: string
            type: object
        required:
        - metadata
        - spec
        type: object
    served: true
    storage: true
    subresources:
      status: {}
