{
  "repo": "tidbcloud/tidb-operator-cse",
  "binary": "controller-manager",
  "binary_path": "cmd/controller-manager/main.go",
  "dependencies": {
    "ControllerManagerLifecycle.BuildDependencies": {
      "infrastructure": {
        "kubernetes_api": [
          {
            "operation": "LIST/WATCH",
            "target": "core, apps, batch, networking, storage resources plus PingCAP CRDs",
            "conditions": [
              "Always"
            ],
            "implementation": "pkg/controller/dependences.go:395"
          }
        ],
        "aws": [
          {
            "operation": "LoadDefaultConfig",
            "target": "ambient AWS credentials/config",
            "conditions": [
              "Always"
            ],
            "implementation": "pkg/controller/dependences.go:349"
          }
        ]
      },
      "services": []
    },
    "ControllerManagerLifecycle.UpgradeOperator": {
      "infrastructure": {
        "kubernetes_api": [
          {
            "operation": "GET/CREATE/UPDATE",
            "target": "operator-managed Kubernetes objects upgraded by upgrader.Interface",
            "conditions": [
              "Always before controllers start"
            ],
            "implementation": "cmd/controller-manager/main.go:139"
          }
        ]
      },
      "services": []
    },
    "ControllerManagerLifecycle.StartControllers": {
      "infrastructure": {
        "kubernetes_api": [
          {
            "operation": "LIST/WATCH/GET/CREATE/UPDATE/DELETE",
            "target": "TiDBCluster, DMCluster, Backup, Restore, BackupSchedule, TiDBInitializer, TiDBMonitor, TiDBNGMonitoring, TiDBDashboard and related core resources",
            "conditions": [
              "Always after leadership is acquired"
            ],
            "implementation": "cmd/controller-manager/main.go:151"
          }
        ]
      },
      "services": [
        {
          "name": "pd",
          "target_interface": "PDControl.GetPDClient",
          "operation_type": "http_client",
          "target_repo": "tikv/pd",
          "conditions": [
            "When TiDB/DM controllers reconcile PD-related members"
          ],
          "operations": [
            {
              "operation": "GetMembers / scheduler and store management requests",
              "trigger": "Reconcile PD membership, failover, scaling, and drain workflows",
              "conditions": [
                "PD-ready clusters only"
              ],
              "implementation": "pkg/controller/dependences.go:263"
            }
          ]
        },
        {
          "name": "tikv",
          "target_interface": "TiKVControl",
          "operation_type": "http_client",
          "target_repo": "pingcap/tikv",
          "conditions": [
            "When TiKV reconciliation or graceful reschedule logic needs TiKV runtime state"
          ],
          "operations": [
            {
              "operation": "GetLeaderCount and TiKV status requests",
              "trigger": "Pod controller and TiKV member managers",
              "conditions": [
                "TiKV-enabled clusters"
              ],
              "implementation": "pkg/controller/dependences.go:264"
            }
          ]
        },
        {
          "name": "tiflash",
          "target_interface": "TiFlashControl",
          "operation_type": "http_client",
          "target_repo": "pingcap/tiflash",
          "conditions": [
            "When TiFlash components exist"
          ],
          "operations": [
            {
              "operation": "TiFlash status requests",
              "trigger": "TiFlash reconciliation",
              "conditions": [
                "TiFlash-enabled clusters"
              ],
              "implementation": "pkg/controller/dependences.go:265"
            }
          ]
        },
        {
          "name": "tidb",
          "target_interface": "TiDBControl",
          "operation_type": "http_client",
          "target_repo": "pingcap/tidb",
          "conditions": [
            "When TiDB components exist"
          ],
          "operations": [
            {
              "operation": "TiDB status and SQL bootstrap helper requests",
              "trigger": "TiDB reconciliation and initializer/dashboard flows",
              "conditions": [
                "TiDB-enabled clusters"
              ],
              "implementation": "pkg/controller/dependences.go:272"
            }
          ]
        },
        {
          "name": "ticdc",
          "target_interface": "TiCDCControl",
          "operation_type": "http_client",
          "target_repo": "pingcap/tiflow",
          "conditions": [
            "When TiCDC components exist"
          ],
          "operations": [
            {
              "operation": "TiCDC status requests",
              "trigger": "TiCDC reconciliation",
              "conditions": [
                "TiCDC-enabled clusters"
              ],
              "implementation": "pkg/controller/dependences.go:270"
            }
          ]
        },
        {
          "name": "tiproxy",
          "target_interface": "TiProxyControl",
          "operation_type": "http_client",
          "target_repo": "pingcap/tiproxy",
          "conditions": [
            "When TiProxy components exist"
          ],
          "operations": [
            {
              "operation": "TiProxy status requests",
              "trigger": "TiProxy reconciliation",
              "conditions": [
                "TiProxy-enabled clusters"
              ],
              "implementation": "pkg/controller/dependences.go:271"
            }
          ]
        }
      ]
    },
    "ControllerManagerLifecycle.RunLeaderElection": {
      "infrastructure": {
        "kubernetes_api": [
          {
            "operation": "GET/CREATE/UPDATE Endpoints",
            "target": "leader election lock endpoint",
            "conditions": [
              "Always"
            ],
            "implementation": "cmd/controller-manager/main.go:200"
          },
          {
            "operation": "CREATE Event",
            "target": "leader election recorder sink",
            "conditions": [
              "Always"
            ],
            "implementation": "cmd/controller-manager/main.go:208"
          }
        ]
      },
      "services": []
    },
    "HTTPServer.Metrics": {
      "infrastructure": {},
      "services": []
    },
    "HTTPServer.PprofIndex": {
      "infrastructure": {},
      "services": []
    },
    "HTTPServer.PprofCmdline": {
      "infrastructure": {},
      "services": []
    },
    "HTTPServer.PprofProfile": {
      "infrastructure": {},
      "services": []
    },
    "HTTPServer.PprofSymbol": {
      "infrastructure": {},
      "services": []
    },
    "HTTPServer.PprofTrace": {
      "infrastructure": {},
      "services": []
    }
  },
  "notes": [
    "The controller-manager binary is primarily a control-plane worker, not an HTTP API service.",
    "Method-level dependencies are now attached to lifecycle steps instead of incorrectly being assigned to /metrics.",
    "The HTTP surface on :6060 only exposes metrics and pprof handlers."
  ]
}
