---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.5
  name: tidbgroups.clusterserver.ng.tidbcloud.com
spec:
  group: clusterserver.ng.tidbcloud.com
  names:
    kind: TiDBGroup
    listKind: TiDBGroupList
    plural: tidbgroups
    shortNames:
    - tg
    singular: tidbgroup
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.keySpace
      name: KEYSPACE
      type: string
    - jsonPath: .spec.SharedPoolId
      name: SharedPool
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: AGE
      type: date
    name: v1
    schema:
      openAPIV3Schema:
        description: TiDBGroup is the Schema for the clusters 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: ClusterSpec defines the desired state of Group
            properties:
              SharedPoolId:
                description: the tidb sharedPool id which this group belongs to
                type: string
              capacity:
                description: Capacity defines creation mode and optional explicit
                  topology.
                properties:
                  mode:
                    type: string
                required:
                - mode
                type: object
              dataplaneName:
                description: |-
                  dataplane name
                  used get tidb group status from dataplane
                type: string
              keySpace:
                description: the keyspace of the tidb
                type: string
              requestUnit:
                description: the ru limit of the tidb Group
                properties:
                  max:
                    format: int32
                    type: integer
                  min:
                    format: int32
                    type: integer
                required:
                - max
                - min
                type: object
              sqlEndpoints:
                description: SqlEndpoints specifies the mysql endpoints of the Group,
                  only used for TiDB component
                nullable: true
                properties:
                  dns:
                    description: DNS defines dns settings about sharedPool
                    properties:
                      domain:
                        description: Domain is the dns domain of the tidb group
                        type: string
                      identity:
                        description: |-
                          Identity defines dns identity of sharedPool
                          Normally there are these dns record will be genereated
                          1. Public: tidb.$identity.$domain
                          2. Private: private-tidb.$identity.$domain
                          3. PrivateLink: privatelink-tidb.$identity.$domain
                          Default is a random(11) string
                          This field is readonly and can't be changed if it is set
                          See https://docs.google.com/document/d/15h84VUsgWSJoH21bVRN4qVXUHrt9Dh_4vGNYy-L5juY
                          for more help
                        type: string
                    required:
                    - domain
                    type: object
                  private:
                    description: Private specifies the intranet facing endpoint of
                      the Group
                    properties:
                      enabled:
                        type: boolean
                    required:
                    - enabled
                    type: object
                  public:
                    description: Public specifies the internet facing endpoint of
                      the Group
                    properties:
                      enabled:
                        type: boolean
                    required:
                    - enabled
                    type: object
                required:
                - public
                type: object
            required:
            - SharedPoolId
            - dataplaneName
            - keySpace
            - requestUnit
            type: object
          status:
            type: object
        type: object
    served: true
    storage: true
    subresources: {}
