---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.5
  name: dataplaneproviders.clusterserver.ng.tidbcloud.com
spec:
  group: clusterserver.ng.tidbcloud.com
  names:
    kind: DataPlaneProvider
    listKind: DataPlaneProviderList
    plural: dataplaneproviders
    shortNames:
    - dp
    singular: dataplaneprovider
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.kubernetes.name
      name: DATAPLANE
      type: string
    - jsonPath: .spec.kubernetes.provider
      name: PROVIDER
      type: string
    - jsonPath: .spec.kubernetes.region
      name: REGUION
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: AGE
      type: date
    name: v1
    schema:
      openAPIV3Schema:
        description: DataPlaneProvider is the Schema for the dataplane 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: Spec defines the desired state of DataPlane
            properties:
              kubernetes:
                description: Kubernetes means the kubernetes cluster for this sharedPool
                properties:
                  caData:
                    description: client ca of kubernetes
                    format: byte
                    type: string
                  cloud:
                    description: It defines some cloud specific fields
                    properties:
                      aws:
                        properties:
                          adminNodeRole:
                            description: AdminNodeRole is the admin nodegroup's node
                              role
                            type: string
                          assumeRoleName:
                            description: aws assume role name
                            type: string
                          awsExternalId:
                            description: aws external id
                            type: string
                          eksSecurityGroup:
                            description: Security group of eks control-plane
                            type: string
                          nodeGroupRoleName:
                            description: eks nodegroup node role
                            type: string
                          nodeGroupVersion:
                            description: eks nodegroup version
                            type: string
                          subnetGroups:
                            description: all subnets defined for nodegroup or external
                              service
                            items:
                              properties:
                                name:
                                  type: string
                                subnets:
                                  items:
                                    properties:
                                      subnetID:
                                        type: string
                                      zone:
                                        type: string
                                    required:
                                    - subnetID
                                    type: object
                                  type: array
                              required:
                              - name
                              - subnets
                              type: object
                            type: array
                        required:
                        - subnetGroups
                        type: object
                      azure:
                        description: azure
                        properties:
                          nodeResourceGroup:
                            type: string
                          nodeSubnets:
                            items:
                              properties:
                                name:
                                  type: string
                              required:
                              - name
                              type: object
                            type: array
                          nodeZones:
                            items:
                              type: string
                            type: array
                          podSubnets:
                            items:
                              properties:
                                name:
                                  type: string
                              required:
                              - name
                              type: object
                            type: array
                          resourceGroup:
                            type: string
                        required:
                        - nodeResourceGroup
                        - nodeSubnets
                        - nodeZones
                        - podSubnets
                        - resourceGroup
                        type: object
                      gcp:
                        description: gcp
                        properties:
                          adminNodeSa:
                            type: string
                          nodeZones:
                            items:
                              type: string
                            type: array
                        required:
                        - adminNodeSa
                        - nodeZones
                        type: object
                    type: object
                  endpoint:
                    description: e.g. https://aaa.bbb.ccc
                    type: string
                  identity:
                    description: |-
                      aws: account id
                      gcp: project name
                      azure: subscription id
                    type: string
                  kubeConfigSecretName:
                    description: kubeConfigSecret Name
                    type: string
                  name:
                    description: name of eks/gke/aks
                    type: string
                  network:
                    description: |-
                      aws: vpc id
                      gcp: network name
                      azure: vnet name
                    type: string
                  privatelinkEndpoint:
                    description: |-
                      additional PrivateLink endpoint to the API server.
                      This is used in BYOC.
                    type: string
                  provider:
                    description: |-
                      provider of this kubernetes
                      eks/gke/aks
                    type: string
                  region:
                    description: region of this kubernetes
                    type: string
                  version:
                    description: Version of kubernetes
                    type: string
                required:
                - endpoint
                - identity
                - name
                - network
                - provider
                - region
                type: object
              namespace:
                description: Namespace of the sharedPool
                type: string
            required:
            - namespace
            type: object
        type: object
    served: true
    storage: true
    subresources: {}
