{
  "repo": "tidbcloud/infra-provider",
  "binary": "regional-server",
  "binary_path": "regional-server",
  "dependencies": {
    "MetricsService.metrics": {
      "infrastructure": {},
      "services": []
    },
    "ProbeService.healthz": {
      "infrastructure": {},
      "services": []
    },
    "ProbeService.readyz": {
      "infrastructure": {},
      "services": []
    },
    "DedicatedRegionalAPI.ServiceInfo": {
      "infrastructure": {},
      "services": []
    },
    "DedicatedRegionalAPI.Ping": {
      "infrastructure": {},
      "services": []
    },
    "DedicatedRegionalAPI.VPC": {
      "infrastructure": {
        "kubernetes": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "CRUD cloudv1 VPC and related CRs",
              "trigger": "Manage dedicated VPC resources",
              "implementation": "vpchandler.NewVPCHandler(cli, config)"
            }
          ]
        },
        "cloud-provider": {
          "conditions": [
            "Provider-specific controller paths"
          ],
          "operations": [
            {
              "operation": "AWS/GCP/Azure network provisioning",
              "trigger": "Create or mutate network resources",
              "implementation": "regional controllers and services use aws.NewClientSet, gcp.NewClientSet, Azure clients"
            }
          ]
        }
      },
      "services": []
    },
    "DedicatedRegionalAPI.Cluster": {
      "infrastructure": {
        "kubernetes": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "CRUD cloudv1 Cluster and related CRs",
              "trigger": "Create or delete dedicated clusters",
              "implementation": "clusterhandler.NewClusterHandler(cli, config, tmplconfig)"
            }
          ]
        }
      },
      "services": [
        {
          "name": "cluster-service",
          "target_interface": "/api/dedicated/v1/clusters/*",
          "operation_type": "http_reverse_proxy",
          "conditions": [
            "Mounted cluster service proxy and hijack routes"
          ],
          "operations": [
            {
              "operation": "HTTP reverse proxy",
              "trigger": "Forward cluster read/write APIs to the cluster service backend",
              "implementation": "router.MountClusterServiceProxyHandler(rp) and router.MountClusterServiceHijackProxyHandler(chp)"
            }
          ]
        }
      ]
    },
    "DedicatedRegionalAPI.PrivateLinkService": {
      "infrastructure": {
        "kubernetes": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "CRUD cloudv1 PrivateLinkService and migration CRs",
              "trigger": "Manage private link resources",
              "implementation": "plshandler.NewPrivateLinkServiceHandler(cli, config)"
            }
          ]
        }
      },
      "services": []
    },
    "DedicatedRegionalAPI.Account": {
      "infrastructure": {
        "kubernetes": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Read account-related CRs",
              "trigger": "Pre-assign or read account bindings",
              "implementation": "accounthandler.NewAccountHandler(cli, config)"
            }
          ]
        }
      },
      "services": []
    },
    "DedicatedRegionalAPI.Internet": {
      "infrastructure": {
        "kubernetes": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "CRUD Internet CRs",
              "trigger": "Create, fetch, and delete internet resources",
              "implementation": "internethandler.NewInternetHandler(cli, config)"
            }
          ]
        }
      },
      "services": []
    },
    "DedicatedRegionalAPI.Migration": {
      "infrastructure": {
        "kubernetes": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Import/check/reconcile dedicated and crossplane resources",
              "trigger": "Migration workflows",
              "implementation": "MountDedicatedRegionalMigrationHandler and MountCrossplane*MigrationHandler"
            }
          ]
        }
      },
      "services": [
        {
          "name": "observability/agent-control-server",
          "target_repo": "tidbcloud/observability",
          "target_interface": "/migration/o11yregional/*",
          "operation_type": "http_hijack_proxy",
          "conditions": [
            "O11y migration mounted"
          ],
          "operations": [
            {
              "operation": "HTTP proxy with request rewrite",
              "trigger": "Import o11y agent metadata or pause reconcile",
              "implementation": "MountO11yAgentAWSMigrationHandler / MountO11yAgentGCPMigrationHandler"
            }
          ]
        }
      ]
    },
    "DedicatedRegionalAPI.K8sUpgrade": {
      "infrastructure": {
        "kubernetes": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "CRUD UpgradeOperation CRs",
              "trigger": "Inspect or mutate K8s upgrade operations",
              "implementation": "k8supgrade.NewHandler(upgradeSvc)"
            }
          ]
        }
      },
      "services": []
    },
    "DedicatedRegionalAPI.APPBox": {
      "infrastructure": {
        "kubernetes": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "CRUD APPBox CRs",
              "trigger": "Manage APPBox resources",
              "implementation": "appboxrouter.NewAPPBoxHandler(appboxSvc)"
            }
          ]
        }
      },
      "services": []
    },
    "DedicatedRegionalAPI.SwaggerAndPprof": {
      "infrastructure": {},
      "services": []
    },
    "RegionalControllers.ReconcileRegionalResources": {
      "infrastructure": {
        "kubernetes": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Controller-runtime watches and reconciles",
              "trigger": "Manage VPC, VPC peering, private link, internet, appbox, o11y routes, and upgrade resources",
              "implementation": "SetupWithManager calls in regional-server/main.go"
            }
          ]
        },
        "cloud-provider": {
          "conditions": [
            "Provider-specific"
          ],
          "operations": [
            {
              "operation": "AWS/GCP/Azure SDK calls",
              "trigger": "Provision and inspect cloud resources",
              "implementation": "aws.NewClientSet, gcp.NewClientSet, Azure credential/client setup"
            }
          ]
        }
      },
      "services": []
    }
  },
  "notes": [
    "The binary runs both an HTTP API server and multiple controller-runtime reconcilers.",
    "Swagger and pprof are exposed on the Gin API server, while healthz/readyz and metrics come from the controller manager.",
    "Cluster-facing APIs are partially served through reverse proxy or hijack proxy wrappers."
  ]
}
