{
  "repo": "tidbcloud/infra-provider",
  "binary": "infra-provider",
  "binary_path": "infra-api/cmd/infra-provider/main.go",
  "dependencies": {
    "MetricsService.metrics": {
      "infrastructure": {},
      "services": []
    },
    "MetricsService.pprof": {
      "infrastructure": {},
      "services": []
    },
    "ProbeService.healthz": {
      "infrastructure": {},
      "services": []
    },
    "ProbeService.readyz": {
      "infrastructure": {},
      "services": []
    },
    "WebhookService.RegisterWebhooks": {
      "infrastructure": {
        "kubernetes": {
          "conditions": [
            "ENABLE_WEBHOOKS != false"
          ],
          "operations": [
            {
              "operation": "Admission webhook registration",
              "trigger": "Validate and mutate cloudv1 resources",
              "implementation": "cloudv1.RegisterWebhooks(mgr)"
            }
          ]
        }
      },
      "services": []
    },
    "InfraAPIControllers.ReconcileInfrastructure": {
      "infrastructure": {
        "kubernetes": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Controller-runtime watch/reconcile",
              "trigger": "Manage cluster, network, backup, restore, import, and TiCDC resources",
              "implementation": "SetupWithManager calls for cluster, NetworkReconciler, networkpeer, imports, backup, restore, ticdc"
            }
          ]
        },
        "gardener": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Gardener environment management",
              "trigger": "Manage shoot-backed infrastructure and hibernation controllers",
              "implementation": "gardener.NewGardEnvironment(...) and hibernation.NewHibernationController(...)"
            }
          ]
        },
        "cloud-provider": {
          "conditions": [
            "Provider-specific"
          ],
          "operations": [
            {
              "operation": "AWS and GCP SDK operations",
              "trigger": "Reconcile infra resources and cloud provider state",
              "implementation": "aws.NewClient, providergcp.NewDefaultGCPAPI, otelaws.AppendMiddlewares"
            }
          ]
        }
      },
      "services": [
        {
          "name": "config-service",
          "target_repo": "tidbcloud/config-service",
          "target_interface": "Config SDK",
          "operation_type": "http_client",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "HTTP config fetch",
              "trigger": "Load cluster, backup, restore, and import configuration",
              "implementation": "configsdk.New(ctrlConfig.ConfigServiceUrl)"
            }
          ]
        },
        {
          "name": "observability",
          "target_repo": "tidbcloud/observability",
          "target_interface": "ObservabilityInfraConfig API",
          "operation_type": "http_client",
          "conditions": [
            "enableO11yAgent"
          ],
          "operations": [
            {
              "operation": "HTTP observability infra management",
              "trigger": "Provision or reconcile o11y agent infrastructure",
              "implementation": "o11y.InitApi(...) and o11yApi usage in cluster/network controllers"
            }
          ]
        }
      ]
    }
  },
  "notes": [
    "This binary is a controller-manager plus webhook server, not a user-facing REST API server.",
    "The metrics endpoint may also expose pprof handlers via controller-runtime metrics extra handlers."
  ]
}
