{
  "repo": "tidbcloud/infra-api",
  "binary": "debug",
  "binary_path": "cmd/debug/main.go",
  "dependencies": {
    "Runtime DebugLifecycle.LoadFlags": {
      "infrastructure": {
        "runtime_flags": [
          {
            "operation": "PARSE FLAGS",
            "target": "gardener-config, base-config, infra-api-config, projectName, addr",
            "conditions": [
              "Always at process start"
            ],
            "implementation": "cmd/debug/main.go:24-31, 204-212"
          }
        ]
      },
      "services": []
    },
    "Runtime DebugLifecycle.BuildBaseClusterClients": {
      "infrastructure": {
        "filesystem": [
          {
            "operation": "READ FILE",
            "target": "base cluster kubeconfig",
            "conditions": [
              "-base-config is provided"
            ],
            "implementation": "cmd/debug/main.go:34-51, 119-123"
          }
        ],
        "kubernetes_api": [
          {
            "operation": "CREATE CLIENTS",
            "target": "controller-runtime client and client-go clientset for the base cluster",
            "conditions": [
              "clientcmd.BuildConfigFromFlags succeeds"
            ],
            "implementation": "cmd/debug/main.go:34-51"
          }
        ]
      },
      "services": []
    },
    "Runtime DebugLifecycle.BuildGardenerClusterClients": {
      "infrastructure": {
        "filesystem": [
          {
            "operation": "READ FILE",
            "target": "gardener cluster kubeconfig",
            "conditions": [
              "-gardener-config is provided"
            ],
            "implementation": "cmd/debug/main.go:34-51, 124-128"
          }
        ],
        "kubernetes_api": [
          {
            "operation": "CREATE CLIENTS",
            "target": "controller-runtime client and client-go clientset for the gardener cluster",
            "conditions": [
              "clientcmd.BuildConfigFromFlags succeeds"
            ],
            "implementation": "cmd/debug/main.go:34-51"
          }
        ]
      },
      "services": []
    },
    "Runtime DebugLifecycle.DiscoverSharedClusterContext": {
      "infrastructure": {
        "filesystem": [
          {
            "operation": "READ FILE",
            "target": "default kubeconfig loading rules such as ~/.kube/config",
            "conditions": [
              "Always during startup"
            ],
            "implementation": "cmd/debug/main.go:222-260, 135-138"
          }
        ],
        "kubernetes_api": [
          {
            "operation": "CREATE CLIENTS",
            "target": "optional shared-provider clientset using the first context matching .*f01.*",
            "conditions": [
              "A kubeconfig context matching .*f01.* exists"
            ],
            "implementation": "cmd/debug/main.go:222-260"
          }
        ]
      },
      "services": []
    },
    "Runtime DebugLifecycle.RegisterRoutes": {
      "infrastructure": {},
      "services": []
    },
    "Runtime DebugLifecycle.StartHTTPServer": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /logs/infra-api/infra-provider": {
      "infrastructure": {
        "kubernetes_api": [
          {
            "operation": "LIST PODS",
            "target": "pods in namespace infra with label app=infra-provider",
            "conditions": [
              "Always"
            ],
            "implementation": "cmd/debug/main.go:54-68, 140-153"
          },
          {
            "operation": "STREAM POD LOGS",
            "target": "log stream for each matched pod",
            "conditions": [
              "For each listed pod"
            ],
            "implementation": "cmd/debug/main.go:81-112"
          }
        ]
      },
      "services": []
    },
    "HTTP GET /logs/dbaas/worker": {
      "infrastructure": {
        "kubernetes_api": [
          {
            "operation": "LIST PODS",
            "target": "pods in namespace projectName with label app=worker",
            "conditions": [
              "Always"
            ],
            "implementation": "cmd/debug/main.go:54-68, 154-158"
          },
          {
            "operation": "STREAM POD LOGS",
            "target": "log stream for each matched pod",
            "conditions": [
              "For each listed pod"
            ],
            "implementation": "cmd/debug/main.go:81-112"
          }
        ]
      },
      "services": []
    },
    "HTTP GET /logs/dbaas/central-server": {
      "infrastructure": {
        "kubernetes_api": [
          {
            "operation": "LIST PODS",
            "target": "pods in namespace projectName with label app=central-server",
            "conditions": [
              "Always"
            ],
            "implementation": "cmd/debug/main.go:54-68, 159-163"
          },
          {
            "operation": "STREAM POD LOGS",
            "target": "log stream for each matched pod",
            "conditions": [
              "For each listed pod"
            ],
            "implementation": "cmd/debug/main.go:81-112"
          }
        ]
      },
      "services": []
    },
    "HTTP GET /logs/dbaas/shared-provider": {
      "infrastructure": {
        "kubernetes_api": [
          {
            "operation": "LIST PODS",
            "target": "pods in namespace tidb-admin with label app=aws-shared-provider-manager",
            "conditions": [
              "A shared kubeconfig context matching .*f01.* was discovered during startup"
            ],
            "implementation": "cmd/debug/main.go:54-68, 165-170"
          },
          {
            "operation": "STREAM POD LOGS",
            "target": "log stream for each matched shared-provider pod",
            "conditions": [
              "sharedCS != nil",
              "For each listed pod"
            ],
            "implementation": "cmd/debug/main.go:81-112"
          }
        ]
      },
      "services": []
    }
  },
  "notes": [
    "The gardener client is built during startup but is not used directly by the registered HTTP handlers; the request-path dependencies come from the base cluster clientset and the optional shared-provider clientset.",
    "The index page is not a reliable source of truth for route registration because it prints the shared-provider link even when that handler was never registered.",
    "Each log handler aggregates logs concurrently across all matched pods before writing a combined response."
  ]
}
