This resource is namespace scoped, refer to [Namespace](./namespace.md) for details.

Note: similar to [Network](./network.md), cluster deletion will wait for all dependents to be deleted first.

Example:

```bash
# delete cluster and all dependents
> kubectl delete cluster 123
> kubectl delete import import-123
```

Bad example:

```bash
# only delete the Cluster, the deletion will be pended
> kubectl delete cluster 123
```

You may use `OwnerReference` to instruct Infra API to delete the dependents automatically when deleting a Cluster.

Note: [Backup](./backup.md) outlives the cluster, thus they have independent lifecycle. This is a design problem since a Backup represents both a backup job and a backup asset, and backup assets must outlive the cluster.

Note: to ease usage, `Restore` will be automatically adopted by the target cluster and delete the target cluster will cascading delete the `Restore` job.

### Custom Resources

* [Cluster](#cluster)

### Sub Resources

* [AKSClusterSpec](#aksclusterspec)
* [AWSIdentity](#awsidentity)
* [AWSPrivateLinkService](#awsprivatelinkservice)
* [AWSPrivateLinkServiceConnection](#awsprivatelinkserviceconnection)
* [AWSPrivateLinkServiceStatus](#awsprivatelinkservicestatus)
* [AWSSharedBucketStatus](#awssharedbucketstatus)
* [AWSSubnet](#awssubnet)
* [AWSSubnetGroup](#awssubnetgroup)
* [Audit](#audit)
* [AzureAuditConfig](#azureauditconfig)
* [AzureCMEKSpec](#azurecmekspec)
* [AzureClusterStatus](#azureclusterstatus)
* [AzureNodeSubnet](#azurenodesubnet)
* [AzurePodSubnet](#azurepodsubnet)
* [Cloud](#cloud)
* [CloudAWS](#cloudaws)
* [CloudAck](#cloudack)
* [CloudAzure](#cloudazure)
* [CloudGCP](#cloudgcp)
* [ClusterCondition](#clustercondition)
* [ClusterList](#clusterlist)
* [ClusterSpec](#clusterspec)
* [ClusterStatus](#clusterstatus)
* [ClusterTopology](#clustertopology)
* [CommonK8sClusterStatus](#commonk8sclusterstatus)
* [ComponentStorageSpec](#componentstoragespec)
* [ComponentStorageVolume](#componentstoragevolume)
* [DBStatus](#dbstatus)
* [DNS](#dns)
* [EKSClusterSpec](#eksclusterspec)
* [ExtraGroupSpec](#extragroupspec)
* [ExtraGroupStatus](#extragroupstatus)
* [GCPIdentity](#gcpidentity)
* [GCPPrivateLinkService](#gcpprivatelinkservice)
* [GCPPrivateLinkServiceConnection](#gcpprivatelinkserviceconnection)
* [GCPPrivateLinkServiceStatus](#gcpprivatelinkservicestatus)
* [GCPSharedBucketStatus](#gcpsharedbucketstatus)
* [GKEClusterSpec](#gkeclusterspec)
* [GatewayStatus](#gatewaystatus)
* [Kubernetes](#kubernetes)
* [MachineSpec](#machinespec)
* [MetricsStatus](#metricsstatus)
* [NodeIdentity](#nodeidentity)
* [NodegroupSpec](#nodegroupspec)
* [ObjectStoreStatus](#objectstorestatus)
* [PD](#pd)
* [PDMember](#pdmember)
* [PDStatus](#pdstatus)
* [Path](#path)
* [PrecheckAuditStatus](#precheckauditstatus)
* [PrivateLinkService](#privatelinkservice)
* [PrivateLinkServiceStatus](#privatelinkservicestatus)
* [ProxyStatus](#proxystatus)
* [Reference](#reference)
* [ResourceSpec](#resourcespec)
* [Resources](#resources)
* [Security](#security)
* [Service](#service)
* [SharedBucket](#sharedbucket)
* [SharedBucketStatus](#sharedbucketstatus)
* [SqlEndpointStatus](#sqlendpointstatus)
* [SqlEndpoints](#sqlendpoints)
* [SqlEndpointsStatus](#sqlendpointsstatus)
* [StorageInfo](#storageinfo)
* [StorageVolumeStatus](#storagevolumestatus)
* [StoreMember](#storemember)
* [SuspendAction](#suspendaction)
* [TiDB](#tidb)
* [TiDBMember](#tidbmember)
* [TiDBSecurity](#tidbsecurity)
* [TiDBStatus](#tidbstatus)
* [TiFlash](#tiflash)
* [TiFlashStatus](#tiflashstatus)
* [TiKV](#tikv)
* [TiKVStatus](#tikvstatus)
* [TiProxy](#tiproxy)
* [TiProxyMember](#tiproxymember)
* [TiProxyStatus](#tiproxystatus)
* [VolumeStatus](#volumestatus)

#### AKSClusterSpec



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| componentPCAARN | ARN of the AWS PCA that is used to issue certificates between TiDB components. | *string | false |
| azureCMEK |  | *[AzureCMEKSpec](#azurecmekspec) | false |

[Back to Custom Resources](#custom-resources)

#### AWSIdentity



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| roleARN |  | string | false |
| externalID |  | string | false |

[Back to Custom Resources](#custom-resources)

#### AWSPrivateLinkService



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| acceptedEndpoints | AcceptedEndpoints represents the allowed VPC endpoint IDs. It has to full match with the connections list in status. | []string | true |

[Back to Custom Resources](#custom-resources)

#### AWSPrivateLinkServiceConnection



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| endpoint | Endpoint represents the VPC endpoint ID | string | true |
| phase | PrivateLinkServiceConnectionPhase represents the phase of the connection | PrivateLinkServiceConnectionPhase | true |
| message | Message contains the error message if in 'Failed' phase. | string | true |

[Back to Custom Resources](#custom-resources)

#### AWSPrivateLinkServiceStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| nlb | NLB is the network LoadBalance used by the AWS endpoint service | string | true |
| availabilityZones | AvailabilityZones denotes the availability zones of the VPC endpoint service | []string | true |
| serviceID | ServiceID is the ID of the the AWS endpoint service | string | true |
| serviceName | ServiceName is the name of the AWS ednpoint service | string | true |
| privateDNSName | PrivateDNSName is the private  DNS name of the AWS endpoint service, constructed from DNS identity | string | true |
| port | Port is the port to connect with privatelink service | *int32 | true |
| connections | Connections contains all the connections on the AWS endpoint service | []*[AWSPrivateLinkServiceConnection](#awsprivatelinkserviceconnection) | false |

[Back to Custom Resources](#custom-resources)

#### AWSSharedBucketStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| readonlyRoleARN |  | string | false |
| dbAuditLogWriterRoleARN |  | string | false |

[Back to Custom Resources](#custom-resources)

#### AWSSubnet



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| subnetID |  | string | true |
| zone |  | string | false |

[Back to Custom Resources](#custom-resources)

#### AWSSubnetGroup



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name |  | AWSSubnetGroupName | true |
| subnets |  | [][AWSSubnet](#awssubnet) | true |

[Back to Custom Resources](#custom-resources)

#### Audit



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| enable | When enable this, means tidb need to be able pushing audit log to the specific object storage. DO NOT means the plugin is enable. User can run \"admin plugins enable audit\" or \"admin plugins disable audit\". The plugins is enable default when we start tidb and load the plugin. | bool | false |
| bucketUrl |  | string | false |
| region |  | string | false |
| roleArn |  | string | false |
| azure |  | *[AzureAuditConfig](#azureauditconfig) | false |

[Back to Custom Resources](#custom-resources)

#### AzureAuditConfig



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| sasToken |  | string | true |

[Back to Custom Resources](#custom-resources)

#### AzureCMEKSpec

AzureCMEKSpec defines parameters are used for CMEK, refer to https://pingcap.feishu.cn/wiki/LtrvwoJU0ip7m9kk1k6cljnhnJe

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| applicationID | ApplicationID is the Application (client) ID of App registration For example: \"5d9498fa-0375-47cc-a762-cfb7fe702fe6\" | string | false |
| managedIdentityResourceID | ManagedIdentityResourceID is the resource ID of the managed identity which is already attached to the App registration above with Federated credential. For example: \"/subscriptions/99549169-6cee-4263-8491-924a3011ee31/resourcegroups/chenfei-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami-cmek-test\" | string | false |
| keyVaultName | keyURI is the URI of the Key vault key used for encryption, it looks like this \"https://{keyVaultName}.vault.azure.net/keys/{keyName}/{keyVersion}\". | string | false |
| keyName |  | string | false |
| keyVersion | KeyVersion is the keyversion of this keyvault key Note: this version is actually NOT used but required by the creation of Azure Disk encryption set. | string | false |

[Back to Custom Resources](#custom-resources)

#### AzureClusterStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| diskEncryptionSetResourceID |  | string | false |

[Back to Custom Resources](#custom-resources)

#### AzureNodeSubnet



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name |  | string | true |

[Back to Custom Resources](#custom-resources)

#### AzurePodSubnet



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name |  | string | true |

[Back to Custom Resources](#custom-resources)

#### Cloud

Cloud defines some cloud specific configs NOTE: If you are not sure whether a field is common for all clouds, just add it into this field first.

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| aws |  | *[CloudAWS](#cloudaws) | false |
| ack |  | *[CloudAck](#cloudack) | false |
| gcp |  | *[CloudGCP](#cloudgcp) | false |
| azure |  | *[CloudAzure](#cloudazure) | false |

[Back to Custom Resources](#custom-resources)

#### CloudAWS



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| eksSecurityGroup | Security group of eks control-plane | string | false |
| subnetGroups | all subnets defined for nodegroup or external service | AWSSubnetGroups | true |
| adminNodeRole | AdminNodeRole is the admin nodegroup's node role | string | false |

[Back to Custom Resources](#custom-resources)

#### CloudAck



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| adminNodeRole |  | string | false |
| subnets |  | []string | false |

[Back to Custom Resources](#custom-resources)

#### CloudAzure



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| nodeZones |  | []string | true |
| nodeSubnets |  | [][AzureNodeSubnet](#azurenodesubnet) | true |
| podSubnets |  | [][AzurePodSubnet](#azurepodsubnet) | true |
| resourceGroup |  | string | true |
| nodeResourceGroup |  | string | true |

[Back to Custom Resources](#custom-resources)

#### CloudGCP



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| nodeZones |  | []string | true |
| adminNodeSa |  | string | true |

[Back to Custom Resources](#custom-resources)

#### Cluster

Cluster is the Schema for the clusters API

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata |  | metav1.ObjectMeta | false |
| spec |  | [ClusterSpec](#clusterspec) | false |
| status |  | [ClusterStatus](#clusterstatus) | false |

[Back to Custom Resources](#custom-resources)

#### ClusterCondition

ClusterCondition contains details for the current condition of this cluster.

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| type | Type is the type of the condition. | ClusterConditionType | true |
| status | Status is the status of the condition. Can be True, False. | ConditionStatus | true |
| lastProbeTime | Last time we probed the condition. | metav1.Time | false |
| lastTransitionTime | Last time the condition transitioned from one status to another. | metav1.Time | false |
| reason | Unique, one-word, CamelCase reason for the condition's last transition. | string | false |
| message | Human-readable message indicating details about last transition. | string | false |

[Back to Custom Resources](#custom-resources)

#### ClusterList

ClusterList contains a list of Cluster

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata |  | metav1.ListMeta | false |
| items |  | [][Cluster](#cluster) | true |

[Back to Custom Resources](#custom-resources)

#### ClusterSpec

ClusterSpec defines the desired state of Cluster

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| kubernetes | Kubernetes means the kubernetes cluster for this tidb cluster | [Kubernetes](#kubernetes) | false |
| networkName | NetworkName references the Network where the Cluster is hosted, the Network must exist in the same namespace as Cluster | string | true |
| sqlEndpoints | SqlEndpoints specifies the mysql endpoints of the cluster | [SqlEndpoints](#sqlendpoints) | true |
| cluster | Cluster specifies the cluster topology | [ClusterTopology](#clustertopology) | true |
| extraGroups | ExtraGroups specifies the extra access group for the cluster, it contains the cluster topology and sql endpoints | [][ExtraGroupSpec](#extragroupspec) | false |
| recoveryMode | RecoveryMode specifies whether enable recovery mode for TiDB cluster to restore Optional: Defaults to false | bool | false |
| paused | Paused specifies whether to pause the reconciliation loop for Cluster CR | *bool | false |
| forProvider | ForProvider encodes the provider specific spec | *runtime.RawExtension | false |
| sharedBucket | SharedBucket specifies a shared bucket URL which can be used for DB audit log, BR, global sort, etc. | *[SharedBucket](#sharedbucket) | false |
| configRevisionRef | ConfigRevisionRef specifies the ConfigRevision related to current cluster. | *[Reference](#reference) | false |

[Back to Custom Resources](#custom-resources)

#### ClusterStatus

ClusterStatus defines the observed state of Cluster

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| phase | Phase is lifecycle phase of the Cluster | ClusterPhase | true |
| reason | Reason explains why the cluster is in current phase to human, reason is not supposed to be parsed by program, Phase should be used instead. | string | false |
| db | DB represents the status of the TiDB cluster | *[DBStatus](#dbstatus) | false |
| sqlEndpoints | SQLEndpoints represents the status of the SQL endpoints | [SqlEndpointsStatus](#sqlendpointsstatus) | false |
| extraEndpoints | ExtraEndpoints represents the status of the extraGroups endpoints (please remember sort the list) | [][ExtraGroupStatus](#extragroupstatus) | false |
| objectStore | ObjectStore represents the status of the object store for the TiDB cluster | *[ObjectStoreStatus](#objectstorestatus) | false |
| metrics | Metrics represents the status of the monitoring service for the TiDB cluster | *[MetricsStatus](#metricsstatus) | false |
| proxy | Proxy represents the status of the proxy service for the TiDB cluster. | *[ProxyStatus](#proxystatus) | false |
| gateway | Gateway represents the status of the gateway service for the TiDB cluster. | *[GatewayStatus](#gatewaystatus) | false |
| lastActiveTimestamp | LastActiveTimestamp is the last active time of the cluster in RFC3339 format. | *metav1.Time | false |
| lastDetectTimestamp | LastDetectTimestamp is the last time we try to detect the cluster and update LastActiveTimestamp. | *metav1.Time | false |
| conditions | Current service state of cluster. | [][ClusterCondition](#clustercondition) | false |
| fromProvider | (Deprecated) We should use structured field such as NodeIdentity FromProvider encodes the provider specific status of the Cluster, e.g. AWS IAM role of the cluster | runtime.RawExtension | false |
| nodeIdentity | NodeIdentity is the cloud IAM identity used by tidb cluster worker node | *[NodeIdentity](#nodeidentity) | false |
| sharedBucket | SharedBucket records infos about how this cluster accesses the given shared bucket | *[SharedBucketStatus](#sharedbucketstatus) | false |
| azure | Azure records infos about how this cluster uses Azure specific features | *[AzureClusterStatus](#azureclusterstatus) | false |

[Back to Custom Resources](#custom-resources)

#### ClusterTopology



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| tidb |  | [TiDB](#tidb) | true |
| pd |  | [PD](#pd) | true |
| tikv |  | [TiKV](#tikv) | true |
| tiflash |  | [TiFlash](#tiflash) | true |
| tiproxy |  | [TiProxy](#tiproxy) | true |
| suspendAction | SuspendAction defines the suspend actions for a cluster | *[SuspendAction](#suspendaction) | false |

[Back to Custom Resources](#custom-resources)

#### CommonK8sClusterStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| kubernetes |  | *KubernetesStatus | false |
| nodeProvisioned |  | *bool | false |
| nodeVersion |  | string | false |

[Back to Custom Resources](#custom-resources)

#### ComponentStorageSpec



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| storageSize |  | resource.Quantity | true |
| storageClassName |  | *string | false |

[Back to Custom Resources](#custom-resources)

#### ComponentStorageVolume

ComponentStorageVolume represents the additional storage volume for a component. This is similar to `ComponentStorageSpec` but with more detailed information.

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name | Name is the name of the volume, it should be unique in the component. | string | true |
| storageClassName | StorageClassName is the storage class name of the volume. It often includes IOPS and throughput information, then updating the storage class will update the IOPS and throughput. | string | true |
| storageSize | StorageSize is the size of the volume. | resource.Quantity | true |
| mountPath | MountPath is the path where the volume is mounted. This path should be matched the configuration of the component. | string | true |

[Back to Custom Resources](#custom-resources)

#### DBStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| secondaryStatus | SecondaryStatus represents if there is a partial failure of db cluster | DBSecondaryStatus | true |
| version | Version is the current version of db cluster | string | true |
| tikv | TiKV is the current TiKV status of db cluster | *[TiKVStatus](#tikvstatus) | false |
| tidb | TiDB is the current TiDB status of db cluster | *[TiDBStatus](#tidbstatus) | false |
| tiproxy | TiProxy is the current TiProxy status of db cluster | *[TiProxyStatus](#tiproxystatus) | false |
| pd | PD is the current PD status of db cluster | *[PDStatus](#pdstatus) | false |
| tiflash | TiFlash is the current TiFlash status of db cluster | *[TiFlashStatus](#tiflashstatus) | false |

[Back to Custom Resources](#custom-resources)

#### DNS



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| identity | Identity defines dns identity of tidb cluster 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 | string | false |
| disabled | Disabled specifies whether to disable the dns record for tidb cluster | bool | false |

[Back to Custom Resources](#custom-resources)

#### EKSClusterSpec



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| nodeGroupVersion |  | string | false |
| security |  | *[Security](#security) | false |
| backupStorage | Storage configuration for the backup. | [StorageInfo](#storageinfo) | false |
| restoreStorage | Storage configuration for the restore. | [StorageInfo](#storageinfo) | false |
| componentPCAARN | ARN of the AWS PCA that is used to issue certificates between TiDB components. | *string | false |

[Back to Custom Resources](#custom-resources)

#### ExtraGroupSpec



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name |  | string | false |
| tidb |  | [TiDB](#tidb) | false |
| tiproxy |  | [TiProxy](#tiproxy) | false |
| sqlEndpoints |  | [SqlEndpoints](#sqlendpoints) | false |

[Back to Custom Resources](#custom-resources)

#### ExtraGroupStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name |  | string | false |
| sqlEndpoints |  | [SqlEndpointsStatus](#sqlendpointsstatus) | false |
| tidb | TiDB is the current TiDB status of db cluster | *[TiDBStatus](#tidbstatus) | false |
| tiproxy | TiProxy is the current TiProxy status of db cluster | *[TiProxyStatus](#tiproxystatus) | false |
| phase | Phase is lifecycle phase of the Extra Group, it is the same as the cluster phase | ClusterPhase | false |
| version | Version is the current version of db cluster | string | false |
| secondaryStatus | SecondaryStatus represents if there is a partial failure of db cluster | DBSecondaryStatus | false |
| reason | Reason explains why the cluster is in current phase to human, reason is not supposed to be parsed by program, Phase should be used instead. | string | false |
| conditions | Current service state of cluster. | [][ClusterCondition](#clustercondition) | false |

[Back to Custom Resources](#custom-resources)

#### GCPIdentity



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| serviceAccount |  | string | false |

[Back to Custom Resources](#custom-resources)

#### GCPPrivateLinkService



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| acceptedEndpoints | AcceptedEndpoints represents the allowed endpoints | []GCPPrivateLinkEndpoint | true |

[Back to Custom Resources](#custom-resources)

#### GCPPrivateLinkServiceConnection



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| endpoint | Endpoint, which has the format: projects/{project}/regions/{region}/forwardingRules/{endpoint} | string | true |
| phase | PrivateLinkServiceConnectionPhase represents the phase of the connection | PrivateLinkServiceConnectionPhase | true |
| message | Message contains the error message if in 'Failed' phase. | string | true |

[Back to Custom Resources](#custom-resources)

#### GCPPrivateLinkServiceStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| nlb | NLB is the network LoadBalance used by the GCP endpoint service | string | true |
| subnet | Subnet is the subnet used by the GCP endpoint service to perform NAT | string | true |
| serviceAttachment | ServiceAttachment is the service name of the GCP ednpoint service | string | true |
| domainName | DomainName is the doamin name used to construct private DNS name It will be suffix of the consumer's private DNS name | string | true |
| connections | Connections contains all the connections on the GCP endpoint service which filtered with the `acceptedEndpoints` in spec | []*[GCPPrivateLinkServiceConnection](#gcpprivatelinkserviceconnection) | false |
| port | Port is the port to connect | *int32 | true |

[Back to Custom Resources](#custom-resources)

#### GCPSharedBucketStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| readonlySA |  | string | false |

[Back to Custom Resources](#custom-resources)

#### GKEClusterSpec



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| nodePoolVersion |  | string | false |
| security |  | *[Security](#security) | false |
| backupStorage | Storage configuration for the backup. | [StorageInfo](#storageinfo) | false |
| componentPCAARN | ARN of the AWS PCA that is used to issue certificates between TiDB components. | *string | false |

[Back to Custom Resources](#custom-resources)

#### GatewayStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| endpoint |  | string | true |

[Back to Custom Resources](#custom-resources)

#### Kubernetes



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name | name of eks/gke | string | true |
| endpoint | e.g. https://aaa.bbb.ccc | string | true |
| caData | client ca of kubernetes | []byte | false |
| kubeConfigSecretRef | kubeConfigSecretRef is the secret reference to the kubeconfig of the general dataplane k8s | *corev1.SecretReference | false |
| account | aws: account id gcp: project name | string | true |
| network | aws: vpc id gcp: network name | string | true |
| provider | provider of this kubernetes aws/gcp | string | true |
| version | Version of kubernetes | string | false |
| cloud | It defines some cloud specific fields | [Cloud](#cloud) | false |

[Back to Custom Resources](#custom-resources)

#### MachineSpec



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| machineType |  | string | false |
| machineArch |  | string | false |
| machineImage | MachineImage and MachineImageVersion are deprecated they are only for gardener provider and can be inferred from MachineArch | string | false |
| machineImageVersion |  | string | false |
| systemVolumeType |  | string | false |
| systemVolumeSize |  | string | false |

[Back to Custom Resources](#custom-resources)

#### MetricsStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| baseUrl |  | string | true |
| credentialConfig |  | string | true |

[Back to Custom Resources](#custom-resources)

#### NodeIdentity

We use node role for aws authentication and node service account for gcp authentication But we don't use azure node identity for authentication

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| aws |  | *[AWSIdentity](#awsidentity) | false |
| gcp |  | *[GCPIdentity](#gcpidentity) | false |

[Back to Custom Resources](#custom-resources)

#### NodegroupSpec



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name | DON'T use it to generate nodegroup name again See cluster-controller/controllers/cluster/task/context.go#GetNodeGroupName() | string | false |
| labels |  | map[string]string | false |
| componentType |  | ComponentType | false |
| annotations |  | map[string]string | false |
| machineSpec |  | *[MachineSpec](#machinespec) | false |
| taints |  | []corev1.Taint | false |
| maximum | Maximum is the maximum number of VMs to create. | int32 | false |
| minimum | Minimum is the minimum number of VMs to create. | int32 | false |
| zones | Zones is a list of availability zones that are used to evenly distribute this nodegroup. | []string | false |
| nodeRole | NodeRole is the aws role or gcp service account that the node group uses | *string | false |

[Back to Custom Resources](#custom-resources)

#### ObjectStoreStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| s3 |  | *[Path](#path) | false |
| gcs |  | *[Path](#path) | false |

[Back to Custom Resources](#custom-resources)

#### PD



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| replicas |  | int | true |
| instanceType | InstanceType is specified the profile of every PD node, the InstanceType must be declared in the Provider spec | string | true |
| storageClassName |  | string | false |
| storageSize |  | resource.Quantity | false |
| suspendAction | SuspendAction defines the suspend actions for the component and overrides the value in `ClusterTopology` | *[SuspendAction](#suspendaction) | false |

[Back to Custom Resources](#custom-resources)

#### PDMember



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name |  | string | true |
| labels |  | map[string]string | false |
| resources |  | [Resources](#resources) | true |
| status |  | MemberStatus | true |
| instanceType | InstanceType is the current instance type of the member, this may be empty for some providers | string | false |

[Back to Custom Resources](#custom-resources)

#### PDStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| status |  | ComponentStatus | true |
| members |  | [][PDMember](#pdmember) | false |
| volume |  | *[VolumeStatus](#volumestatus) | false |
| updatedReplicas | UpdatedReplicas is the `UpdatedReplicas` of the PD StatefulSet | int32 | true |
| instanceTypeScalePhase |  | InstanceTypeScalePhase | false |
| conditions |  | []metav1.Condition | false |

[Back to Custom Resources](#custom-resources)

#### Path



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| path |  | string | true |

[Back to Custom Resources](#custom-resources)

#### PrecheckAuditStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| pass | Pass the precheck or not. | bool | true |
| message | Human-readable message indicating details | string | false |

[Back to Custom Resources](#custom-resources)

#### PrivateLinkService



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| aws | PrivateLink service for AWS | *[AWSPrivateLinkService](#awsprivatelinkservice) | false |
| gcp | PrivateLink service for GCP | *[GCPPrivateLinkService](#gcpprivatelinkservice) | false |

[Back to Custom Resources](#custom-resources)

#### PrivateLinkServiceStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| phase |  | PrivateLinkServicePhase | true |
| message |  | string | false |
| aws |  | *[AWSPrivateLinkServiceStatus](#awsprivatelinkservicestatus) | false |
| gcp |  | *[GCPPrivateLinkServiceStatus](#gcpprivatelinkservicestatus) | false |
| creationTimestamp | CreationTimestamp is a timestamp representing the server time when this object was created. It is represented in RFC3339 form and is in UTC. | metav1.Time | false |

[Back to Custom Resources](#custom-resources)

#### ProxyStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| endpoint |  | string | true |
| credentialConfig |  | string | true |

[Back to Custom Resources](#custom-resources)

#### Reference

Reference to a cluster-scoped object.

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name |  | string | true |

[Back to Custom Resources](#custom-resources)

#### ResourceSpec



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| resources |  | corev1.ResourceRequirements | false |
| storageClass |  | string | false |

[Back to Custom Resources](#custom-resources)

#### Resources



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| cpu |  | resource.Quantity | true |
| memory |  | resource.Quantity | true |
| storage |  | *resource.Quantity | false |

[Back to Custom Resources](#custom-resources)

#### Security



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| masterKeyArn | KMS ARN of the master key used for TiKV at-rest encryption. | *string | false |

[Back to Custom Resources](#custom-resources)

#### Service



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| enabled |  | *bool | true |
| loadBalancerSourceRanges | LoadBalancerSourceRanges the IP whitelists of the service | []string | false |
| port | Port that will be exposed by this service. | *int32 | false |

[Back to Custom Resources](#custom-resources)

#### SharedBucket



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| bucketUrl | BucketURL is the URL of shared bucket. All data written by this cluster should be within this given prefix. The given bucket URL should be pointed at cluster level and endswith '/', in other words, the given prefix will be shared by clusters running in the same dataplane. For example: s3://test-bucket/{tenant_id}/{project_id}/{cluster_id}/, gcs://test-bucket/{tenant_id}/{project_id}/{cluster_id}/ | string | false |

[Back to Custom Resources](#custom-resources)

#### SharedBucketStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| aws |  | *[AWSSharedBucketStatus](#awssharedbucketstatus) | false |
| gcp |  | *[GCPSharedBucketStatus](#gcpsharedbucketstatus) | false |
| azure |  | *[AzureSharedBucketStatus](#azuresharedbucketstatus) | false |

[Back to Custom Resources](#custom-resources)

#### SqlEndpointStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| host |  | string | true |
| port |  | int | true |
| token |  | string | false |
| resourceID |  | string | false |

[Back to Custom Resources](#custom-resources)

#### SqlEndpoints



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| dns | DNS defines dns settings about tidb cluster | [DNS](#dns) | false |
| public | Public specifies the internet facing endpoint of the cluster | [Service](#service) | true |
| private | Private specifies the intranet facing endpoint of the cluster | *[Service](#service) | false |
| privateLinkIPAddressType | PrivateLinkIPAddressType is the requested TiDB Group PrivateLink address type. Regional Server owns the transition and treats an empty value as IPv4. | PrivateLinkIPAddressType | false |
| privateLinkNLBIPAddressType | PrivateLinkNLBIPAddressType is the target address type applied to the Group's private NLB. Cluster Controller only consumes this field and treats an empty value as IPv4. | PrivateLinkIPAddressType | false |
| privateLinkService | PrivateLinkService specifies the private intranet facing enpoint of the cluster supported by AWS PrivateLink or GCP Private Service Connect | *[PrivateLinkService](#privatelinkservice) | false |
| useTiProxyAsLBTarget | UseTiProxyAsLBTarget is the flag to use tiproxy as the load balancer target. It's useful when this group is with tiproxy enabled. | bool | true |

[Back to Custom Resources](#custom-resources)

#### SqlEndpointsStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| publicEndpoint |  | *[SqlEndpointStatus](#sqlendpointstatus) | true |
| privateEndpoint |  | *[SqlEndpointStatus](#sqlendpointstatus) | true |
| privateLinkService |  | *[PrivateLinkServiceStatus](#privatelinkservicestatus) | false |

[Back to Custom Resources](#custom-resources)

#### StorageInfo

Storage specifies a bucket of an object storage.

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| storageType |  | StorageType | false |
| region |  | string | false |
| bucket |  | string | false |

[Back to Custom Resources](#custom-resources)

#### StorageVolumeStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name | Name is the name of the volume, it should be unique in the component. | string | true |

[Back to Custom Resources](#custom-resources)

#### StoreMember



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name |  | string | true |
| labels |  | map[string]string | false |
| resources |  | [Resources](#resources) | true |
| status |  | MemberStatus | true |
| instanceType | InstanceType is the current instance type of the member, this may be empty for some providers | string | false |

[Back to Custom Resources](#custom-resources)

#### SuspendAction

SuspendAction defines the suspend actions for a cluster. For example, suspend the compute resources, or suspend the storages

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| suspendCompute |  | bool | false |

[Back to Custom Resources](#custom-resources)

#### TiDB



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| replicas | notes: replicas minimum change from 1 to 0 to support extraGroup | int | true |
| instanceType | InstanceType is specified the profile of every TiDB node, the InstanceType must be declared in the Provider spec | string | true |
| audit |  | *[Audit](#audit) | false |
| precheckAudit | Set only if you want to check the permission is granted to tidb cloud right. | *[Audit](#audit) | false |
| security | Set only if you want to overwrite the default TiDB security configurations. | *[TiDBSecurity](#tidbsecurity) | false |
| suspendAction | SuspendAction defines the suspend actions for the component and overrides the value in `ClusterTopology` | *[SuspendAction](#suspendaction) | false |

[Back to Custom Resources](#custom-resources)

#### TiDBMember



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name |  | string | true |
| labels |  | map[string]string | false |
| resources |  | [Resources](#resources) | true |
| status |  | MemberStatus | true |
| instanceType | InstanceType is the current instance type of the member, this may be empty for some providers | string | false |

[Back to Custom Resources](#custom-resources)

#### TiDBSecurity

TiDBSecurity stores the TiDB cluster's security configurations.

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| sslCASecret | SSLCASecret references a secret containing TiDB server's CA cert. | *corev1.SecretReference | false |
| authTokenJwksSecret | AuthTokenJwksSecret references a secret containing tidb_auth_token JWKS. | *corev1.SecretReference | false |

[Back to Custom Resources](#custom-resources)

#### TiDBStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| status |  | ComponentStatus | true |
| members |  | [][TiDBMember](#tidbmember) | false |
| precheckAudit |  | *[PrecheckAuditStatus](#precheckauditstatus) | false |
| auditReady | AuditReady is set to true, when tidb is ready to work as spec set in 'cluster.tidb.audit' result will be set in TiDBStatus. | bool | false |
| updatedReplicas | UpdatedReplicas is the `UpdatedReplicas` of the TiDB StatefulSet | int32 | true |
| instanceTypeScalePhase |  | InstanceTypeScalePhase | false |
| conditions |  | []metav1.Condition | false |
| tokenBasedAuthEnabled | TokenBasedAuthEnabled Whether the tokenBasedAuth is enabled | bool | true |

[Back to Custom Resources](#custom-resources)

#### TiFlash



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| replicas |  | int | true |
| instanceType | InstanceType is specified the profile of every TiFlash node, the InstanceType must be declared in the Provider spec | string | true |
| storageSize |  | resource.Quantity | false |
| storageClassName |  | string | false |
| useLocalStorage | UseLocalStorage specifies whethre the local disk should be used for storage | *bool | false |
| suspendAction | SuspendAction defines the suspend actions for the component and overrides the value in `ClusterTopology` | *[SuspendAction](#suspendaction) | false |

[Back to Custom Resources](#custom-resources)

#### TiFlashStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| status |  | ComponentStatus | true |
| members |  | [][StoreMember](#storemember) | false |
| volume |  | *[VolumeStatus](#volumestatus) | false |
| updatedReplicas | UpdatedReplicas is the `UpdatedReplicas` of the TiFlash StatefulSet | int32 | true |
| instanceTypeScalePhase |  | InstanceTypeScalePhase | false |
| conditions |  | []metav1.Condition | false |

[Back to Custom Resources](#custom-resources)

#### TiKV



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| replicas |  | int | true |
| instanceType | InstanceType is specified the profile of every TiKV node, the InstanceType must be declared in the Provider spec | string | true |
| storageSize |  | resource.Quantity | false |
| storageClassName |  | string | false |
| storageVolumes | StorageVolumes contains the additional storage volumes for TiKV. NOTE: do not support add/remove volumes after the cluster is created now. | [][ComponentStorageVolume](#componentstoragevolume) | false |
| dedicatedRaftEngineStorage | (Deprecated) DedicatedRaftEngineStorage specifies provide a dedicated storage for raft engine. | *[TiKVDedicatedRaftEngineStorage](#tikvdedicatedraftenginestorage) | false |
| useLocalStorage | UseLocalStorage specifies whether the local disk should be used for storage | *bool | false |
| suspendAction | SuspendAction defines the suspend actions for the component and overrides the value in `ClusterTopology` | *[SuspendAction](#suspendaction) | false |

[Back to Custom Resources](#custom-resources)

#### TiKVStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| status |  | ComponentStatus | true |
| members |  | [][StoreMember](#storemember) | false |
| volume | Volume contains the info of the data volume used by the TiKV | *[VolumeStatus](#volumestatus) | false |
| storageVolumes | StorageVolumes contains the additional storage volumes for TiKV. | [][StorageVolumeStatus](#storagevolumestatus) | false |
| updatedReplicas | UpdatedReplicas is the `UpdatedReplicas` of the TiKV StatefulSet | int32 | true |
| instanceTypeScalePhase |  | InstanceTypeScalePhase | false |
| conditions |  | []metav1.Condition | false |

[Back to Custom Resources](#custom-resources)

#### TiProxy



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| replicas |  | int | true |
| instanceType | InstanceType is specified the profile of every TiProxy node, the InstanceType must be declared in the Provider spec | string | true |
| suspendAction | SuspendAction defines the suspend actions for the component and overrides the value in `ClusterTopology` | *[SuspendAction](#suspendaction) | false |

[Back to Custom Resources](#custom-resources)

#### TiProxyMember



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| name |  | string | true |
| labels |  | map[string]string | false |
| resources |  | [Resources](#resources) | true |
| status |  | MemberStatus | true |
| instanceType | InstanceType is the current instance type of the member, this may be empty for some providers | string | false |

[Back to Custom Resources](#custom-resources)

#### TiProxyStatus



| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| status |  | ComponentStatus | true |
| members |  | [][TiProxyMember](#tiproxymember) | false |
| updatedReplicas | UpdatedReplicas is the `UpdatedReplicas` of the TiProxy StatefulSet | int32 | true |
| instanceTypeScalePhase |  | InstanceTypeScalePhase | false |
| conditions |  | []metav1.Condition | false |

[Back to Custom Resources](#custom-resources)

#### VolumeStatus

VolumeStatus is the actual status for a storage

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| boundCount | BoundCount is the count of bound volumes. | int | true |
| currentCount | CurrentCount is the count of volumes whose capacity is equal to `currentCapacity`. | int | true |
| modifiedCount | ModifiedCount is the count of modified volumes. | int | true |
| currentCapacity | CurrentCapacity is the current capacity of the volume. If any volume is resizing, it is the capacity before resizing. If all volumes are resized, it is the resized capacity and same as desired capacity. | resource.Quantity | true |
| modifiedCapacity | ModifiedCapacity is the modified capacity of the volume. | resource.Quantity | true |
| currentStorageClass | CurrentStorageClass is the current storage class of the volume. If any volume is modifying, it is the storage class before modification. If all volumes are modified, it is the modified storage class and same as desired storage class. | string | true |
| currentVolumeAttributesClass | CurrentVolumeAttributesClass is the current volume attributes class of the PVC. | string | true |
| modifiedStorageClass | ModifiedStorageClass is the modified storage calls of the volume. | string | true |
| modifiedVolumeAttributesClass | ModifiedVolumeAttributesClass is the modified volume attributes class of the PVC. | string | true |
| resizedCount | (Deprecated) ResizedCount is the count of volumes whose capacity is equal to `resizedCapacity`. | int | false |
| resizedCapacity | (Deprecated) ResizedCapacity is the desired capacity of the volume. | resource.Quantity | false |

[Back to Custom Resources](#custom-resources)
