---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.19.0
  name: dataplanes.dedicated.regionalserver.tidbcloud.com
spec:
  group: dedicated.regionalserver.tidbcloud.com
  names:
    categories:
    - regionserver
    kind: DataPlane
    listKind: DataPlaneList
    plural: dataplanes
    singular: dataplane
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.accountRef.accountId
      name: ACCOUNTID
      type: string
    - jsonPath: .status.phase
      name: PHASE
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: AGE
      type: date
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: DataPlane is the Schema for the dataplanes 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:
            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
              availabilityZones:
                items:
                  type: string
                type: array
              cloudTags:
                additionalProperties:
                  type: string
                type: object
              nodeZones:
                items:
                  type: string
                type: array
              ownershipMode:
                enum:
                - SinglePoolOwnership
                - MultiPoolOwnership
                type: string
              pca:
                properties:
                  caIdentifier:
                    type: string
                type: object
              serviceCidr:
                type: string
              vpcCidr:
                type: string
            type: object
            x-kubernetes-validations:
            - message: ownershipMode is immutable
              rule: has(self.ownershipMode) == has(oldSelf.ownershipMode) && (!has(self.ownershipMode)
                || self.ownershipMode == oldSelf.ownershipMode)
          status:
            properties:
              appBox:
                properties:
                  name:
                    type: string
                  namespace:
                    type: string
                required:
                - name
                - namespace
                type: object
              internet:
                properties:
                  name:
                    type: string
                  namespace:
                    type: string
                required:
                - name
                - namespace
                type: object
              phase:
                type: string
              reason:
                type: string
              vpc:
                properties:
                  name:
                    type: string
                  namespace:
                    type: string
                required:
                - name
                - namespace
                type: object
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
