{
  "repo": "tidbcloud/tidb-operator-cse",
  "binary": "admission-webhook",
  "binary_path": "cmd/admission-webhook/main.go",
  "surface_kind": "webhook_service",
  "type": "webhook_service",
  "extensions": {
    "notes": [
      "The chart in this repo explicitly registers statefulsetvalidations, pingcapresourcevalidations, and pingcapresourcemutations. Namespace validation is implemented and passed to RunAdmissionServer even though this repo does not ship a matching webhook registration template for it.",
      "All webhook methods are invoked by the generic admission server over HTTPS rather than by a custom net/http router in this repo."
    ]
  },
  "services": [
    {
      "name": "AdmissionWebhookLifecycle",
      "package": "main",
      "methods": [
        {
          "name": "StartAdmissionServer",
          "name_key": "AdmissionWebhookLifecycle.StartAdmissionServer",
          "input": "registered admission hooks",
          "output": "HTTPS admission server",
          "type": "local"
        }
      ]
    },
    {
      "name": "NamespaceAdmissionWebhook",
      "package": "pkg/webhook/namespace",
      "methods": [
        {
          "name": "ValidateProtectedNamespaceDeletion",
          "name_key": "NamespaceAdmissionWebhook.ValidateProtectedNamespaceDeletion",
          "input": "AdmissionReview",
          "output": "AdmissionResponse",
          "path": "/apis/admission.tidb.pingcap.com/v1alpha1/namespacevalidations",
          "type": "webhook"
        }
      ]
    },
    {
      "name": "StatefulSetAdmissionWebhook",
      "package": "pkg/webhook/statefulset",
      "methods": [
        {
          "name": "ValidateStatefulSetPartition",
          "name_key": "StatefulSetAdmissionWebhook.ValidateStatefulSetPartition",
          "input": "AdmissionReview",
          "output": "AdmissionResponse",
          "path": "/apis/admission.tidb.pingcap.com/v1alpha1/statefulsetvalidations",
          "type": "webhook"
        }
      ]
    },
    {
      "name": "StrategyAdmissionWebhook",
      "package": "pkg/webhook/strategy",
      "methods": [
        {
          "name": "ValidatePingcapResource",
          "name_key": "StrategyAdmissionWebhook.ValidatePingcapResource",
          "input": "AdmissionReview",
          "output": "AdmissionResponse",
          "path": "/apis/admission.tidb.pingcap.com/v1alpha1/pingcapresourcevalidations",
          "type": "webhook"
        },
        {
          "name": "MutatePingcapResource",
          "name_key": "StrategyAdmissionWebhook.MutatePingcapResource",
          "input": "AdmissionReview",
          "output": "AdmissionResponse",
          "path": "/apis/admission.tidb.pingcap.com/v1alpha1/pingcapresourcemutations",
          "type": "webhook"
        }
      ]
    }
  ]
}
