{
  "repo": "tidbcloud/core-svc",
  "binary": "graceful-shutdown-tidb-webhook",
  "binary_path": "portal/cmd/graceful-shutdown-tidb-webhook/main.go",
  "surface_kind": "webhook_service",
  "type": "webhook_service",
  "extensions": {},
  "services": [
    {
      "name": "WebhookLifecycle",
      "type": "lifecycle",
      "methods": [
        {
          "name": "ParseFlags",
          "name_key": "WebhookLifecycle.ParseFlags",
          "description": "Parse the optional kubeconfig path used to build the Kubernetes and TiDB Operator clients."
        },
        {
          "name": "BuildRestConfig",
          "name_key": "WebhookLifecycle.BuildRestConfig",
          "description": "Build the in-cluster or external kubeconfig rest.Config for the webhook process."
        },
        {
          "name": "CreateClients",
          "name_key": "WebhookLifecycle.CreateClients",
          "description": "Create the Kubernetes core clientset and the TiDB Operator clientset used by the admission handler."
        },
        {
          "name": "StartTLSServer",
          "name_key": "WebhookLifecycle.StartTLSServer",
          "description": "Register the /validate admission webhook and start the HTTPS server on :8443 using the mounted TLS secret."
        }
      ]
    },
    {
      "name": "GracefulShutdownWebhook",
      "type": "webhook",
      "methods": [
        {
          "name": "Validate",
          "name_key": "HTTP POST /validate",
          "method": "POST",
          "path": "/validate",
          "description": "Gate TiDB pod deletion until the health-checker sidecar is taken down and the wait timeout has elapsed."
        }
      ]
    }
  ]
}
