{
  "repo": "tidbcloud/aws-shared-provider",
  "binary": "vpa-agent",
  "binary_path": "cmd/vpa-agent/main.go",
  "dependencies": {
    "HTTP GET /report": {
      "infrastructure": {},
      "services": []
    },
    "HTTP POST /scale": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /status": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /healthz": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /readyz": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /metrics": {
      "infrastructure": {},
      "services": []
    },
    "Runtime MemoryAllocator.ManageMemory": {
      "infrastructure": {},
      "services": [
        {
          "name": "kubernetes-api",
          "target_interface": "GET /api/v1/nodes/{name}",
          "operation_type": "http_get",
          "conditions": ["Always"],
          "operations": [
            {
              "operation": "Get Node info",
              "trigger": "Watch node memory capacity",
              "conditions": ["Always"],
              "implementation": "nodeInformer.Lister().Get(nodeName)"
            }
          ]
        },
        {
          "name": "kubernetes-api",
          "target_interface": "GET /api/v1/pods",
          "operation_type": "http_get",
          "conditions": ["Always"],
          "operations": [
            {
              "operation": "List Pods",
              "trigger": "Get pods for memory calculation",
              "conditions": ["Always"],
              "implementation": "clientset.CoreV1().Pods()"
            }
          ]
        },
        {
          "name": "kubernetes-api",
          "target_interface": "DELETE /api/v1/namespaces/{ns}/pods/{name}",
          "operation_type": "http_delete",
          "conditions": ["Memory over limit && enableKillPod == true"],
          "operations": [
            {
              "operation": "Evict Pod",
              "trigger": "Kill pod when memory over limit",
              "conditions": ["Memory exceeds threshold", "enableKillPod enabled"],
              "implementation": "clientset.CoreV1().Pods(ns).Delete(ctx, podName, metav1.DeleteOptions{})"
            }
          ]
        }
      ]
    },
    "Runtime MemoryAllocator.MonitorRebalanceSignal": {
      "infrastructure": {},
      "services": [
        {
          "name": "kubernetes-api",
          "target_interface": "GET /api/v1/nodes/{name}",
          "operation_type": "http_get",
          "conditions": ["enableMonitorRebalanceSignal == true"],
          "operations": [
            {
              "operation": "Watch Node signals",
              "trigger": "Monitor rebalance signal annotations",
              "conditions": ["enableMonitorRebalanceSignal enabled"],
              "implementation": "nodeInformer.Lister().Get(nodeName)"
            }
          ]
        }
      ]
    }
  }
}
