# Introduction

Infra Provider repository contains a group of CRDs and controllers.

An Etcd cluster and kube-apiserver are deployed as normal pods in Global ControlPlane (Base cluster) to serve as CRD apiserver.

The controllers watch this apiserver to provision and manage cloud resources and the components deployed into dataplane.

```mermaid
graph BT;
    KubeAPIServer --> id0[(Etcd)];
    CrossplaneProviderAWS --watch--> KubeAPIServer;
    CrossplaneProviderGCP --watch--> KubeAPIServer;
    NetworkController --watch--> KubeAPIServer;
    ClusterController --watch--> KubeAPIServer;
    DPController --watch--> KubeAPIServer
    ChaosProvider --watch--> KubeAPIServer;
```

Crossplane Provider is a thin CRD wrapper to Cloud API. It allows us to use a declaritive API to provision AWS and GCP resources. It's maintained by the crossplane community. Though we have a forked version with some CRDs that are not available in the upstream version deployed alongside with the upstream version. Currently both AWS and GCP crossplane providers are deployed globally alongside with the etcd and kube-apiserver.

Network Controller manages the abstract `Network` CRD object. Generally speaking the `Network` CR represents a dataplane (VPC + K8s for dedicated tiers) that runs customer's TiDB Clusters and DP components.

Cluster Controller manages the lifecycle of `Cluster` CRD object which represents a TiDB Cluster.
