Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Configura el tiempo de espera del webhook
En esta página, se describe cómo configurar el tiempo de espera del webhook para Config Connector.
Puedes configurar estos webhooks en Config Connector versión 1.110 y versiones posteriores.
Configura el tiempo de espera para validar webhooks
Puedes configurar los siguientes webhooks de validación:
Por ejemplo, puedes configurar el tiempo de espera de los webhooks de validación
deny-immutable-field-updates.cnrm.cloud.google.com y
deny-unknown-fields.cnrm.cloud.google.com creando y aplicando el
siguiente archivo YAML de ejemplo. Estos webhooks forman parte de la configuración de la configuración del webhook de validación de validating-webhook.cnrm.cloud.google.com.
Crea un archivo llamado configure-validating-webhook-timeout.yaml y copia el siguiente archivo YAML en él:
Por ejemplo, puedes configurar el tiempo de espera del webhook de mutación
container-annotation-handler.cnrm.cloud.google.com creando y aplicando
el siguiente archivo YAML de ejemplo. El webhook forma parte de la configuración de la configuración del webhook
mutante de mutating-webhook.cnrm.cloud.google.com.
Crea un archivo llamado configure-mutating-webhook-timeout.yaml y copia el siguiente archivo YAML en él:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[[["\u003cp\u003eConfig Connector version 1.110 and later allows for the configuration of timeouts for both validating and mutating webhooks.\u003c/p\u003e\n"],["\u003cp\u003eValidating webhooks such as \u003ccode\u003edeny-immutable-field-updates.cnrm.cloud.google.com\u003c/code\u003e and \u003ccode\u003edeny-unknown-fields.cnrm.cloud.google.com\u003c/code\u003e can have their timeouts customized via a \u003ccode\u003eValidatingWebhookConfigurationCustomization\u003c/code\u003e YAML file.\u003c/p\u003e\n"],["\u003cp\u003eMutating webhooks like \u003ccode\u003econtainer-annotation-handler.cnrm.cloud.google.com\u003c/code\u003e can be configured using a \u003ccode\u003eMutatingWebhookConfigurationCustomization\u003c/code\u003e YAML file to adjust their timeout durations.\u003c/p\u003e\n"],["\u003cp\u003eApplying the webhook timeout customizations involves creating and applying the respective YAML files with \u003ccode\u003ekubectl apply\u003c/code\u003e, followed by verifying the successful configuration with specific \u003ccode\u003ekubectl\u003c/code\u003e commands.\u003c/p\u003e\n"],["\u003cp\u003eWhen specifying webhook names in the YAML configuration files, users should omit the \u003ccode\u003e.cnrm.cloud.google.com\u003c/code\u003e suffix from the webhook names.\u003c/p\u003e\n"]]],[],null,["# Configure webhook timeout\n=========================\n\n*** ** * ** ***\n\nThis page describes how to configure the webhook timeout for Config Connector.\nYou can configure these webhooks in Config Connector version 1.110 and later.\n\nConfigure timeout for validating webhooks\n-----------------------------------------\n\nYou can configure the following validating webhooks:\n\n- `deny-immutable-field-updates.cnrm.cloud.google.com`\n- `deny-unknown-fields.cnrm.cloud.google.com`\n- `iam-validation.cnrm.cloud.google.com`\n- `resource-validation.cnrm.cloud.google.com`\n- `abandon-on-uninstall.cnrm.cloud.google.com`\n\nFor example, you can configure the timeout of validating webhooks\n`deny-immutable-field-updates.cnrm.cloud.google.com` and\n`deny-unknown-fields.cnrm.cloud.google.com` by creating and applying the\nfollowing example YAML file. These webhooks are part of the configuration of the\n`validating-webhook.cnrm.cloud.google.com` [validating webhook\nconfiguration](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#webhook-configuration).\n\n1. Create a file named `configure-validating-webhook-timeout.yaml` and copy the\n following YAML into it:\n\n apiVersion: customize.core.cnrm.cloud.google.com/v1beta1\n kind: ValidatingWebhookConfigurationCustomization\n metadata:\n name: validating-webhook\n spec:\n webhooks:\n - name: deny-immutable-field-updates\n timeoutSeconds: 12\n - name: deny-unknown-fields\n timeoutSeconds: 15\n\n | **Note:** when specifying the name of webhook configuration and the names of webhooks in the YAML file, don't include the `.cnrm.cloud.google.com` suffix.\n2. Use [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply)\n to apply the webhook timeout customization to your cluster:\n\n ```\n kubectl apply -f configure-validating-webhook-timeout.yaml\n ```\n3. Verify the successful configuration by running the following command:\n\n ```\n kubectl get validatingwebhookconfigurationcustomizations validating-webhook -o jsonpath='{.status.healthy}{\"\\n\"}'\n ```\n\n It should display `status.healthy` field set to `true`.\n4. Verify that the new custom timeout has been applied to the target webhooks:\n\n ```\n kubectl get validatingwebhookconfigurations validating-webhook.cnrm.cloud.google.com -o jsonpath='{.webhooks[?(@.name==\"deny-immutable-field-updates.cnrm.cloud.google.com\")].timeoutSeconds}{\"\\n\"}'\n ``` \n\n ```\n kubectl get validatingwebhookconfigurations validating-webhook.cnrm.cloud.google.com -o jsonpath='{.webhooks[?(@.name==\"deny-unknown-fields.cnrm.cloud.google.com\")].timeoutSeconds}{\"\\n\"}'\n ```\n\n Applying the customization could take a few minutes.\n\nConfigure timeout for mutating webhooks\n---------------------------------------\n\nYou can configure the following mutating webhooks:\n\n- `container-annotation-handler.cnrm.cloud.google.com`\n- `generic-defaulter.cnrm.cloud.google.com`\n- `iam-defaulter.cnrm.cloud.google.com`\n- `management-conflict-annotation-defaulter.cnrm.cloud.google.com`\n\nFor example, you can configure the timeout of mutating webhook\n`container-annotation-handler.cnrm.cloud.google.com` by creating and applying\nthe following example YAML file. The webhook is part of the configuration of the\n`mutating-webhook.cnrm.cloud.google.com` [mutating webhook\nconfiguration](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#webhook-configuration).\n\n1. Create a file named `configure-mutating-webhook-timeout.yaml` and copy the\n following YAML into it:\n\n apiVersion: customize.core.cnrm.cloud.google.com/v1beta1\n kind: MutatingWebhookConfigurationCustomization\n metadata:\n name: mutating-webhook\n spec:\n webhooks:\n - name: container-annotation-handler\n timeoutSeconds: 20\n\n | **Note:** when specifying the name of webhook configuration and the names of webhooks in the YAML file, don't include the `.cnrm.cloud.google.com` suffix.\n2. Use [`kubectl apply`](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#apply)\n to apply the webhook timeout customization to your cluster:\n\n ```\n kubectl apply -f configure-mutating-webhook-timeout.yaml\n ```\n3. Verify the successful configuration by running the following command:\n\n ```\n kubectl get mutatingwebhookconfigurationcustomizations mutating-webhook -o jsonpath='{.status.healthy}{\"\\n\"}'\n ```\n\n It should display `status.healthy` field set to `true`.\n4. Verify that the new custom timeout has been applied to the target webhooks:\n\n ```\n kubectl get mutatingwebhookconfigurations mutating-webhook.cnrm.cloud.google.com -o jsonpath='{.webhooks[?(@.name==\"container-annotation-handler.cnrm.cloud.google.com\")].timeoutSeconds}{\"\\n\"}'\n ```\n\n Applying the customization could take a few minutes."]]