@@ -371,6 +371,27 @@ result, the migration cannot happen.
371
371
Exclude the namespace where your webhook is running with a
372
372
[ ` namespaceSelector ` ] ( /docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-namespaceselector ) .
373
373
374
+ ### Avoid dependency loops {#avoid-dependency-loops}
375
+
376
+ Dependency loops can occur in scenarios like the following:
377
+
378
+ * Two webhooks check each other's Pods. If both webhooks become unavailable
379
+ at the same time, neither webhook can start.
380
+ * Your webhook intercepts cluster add-on components, such as networking plugins
381
+ or storage plugins, that your webhook depends on. If both the webhook and the
382
+ dependent add-on become unavailable, neither component can function.
383
+
384
+ To avoid these dependency loops, try the following:
385
+
386
+ * Use
387
+ [ ValidatingAdmissionPolicies] ( /docs/reference/access-authn-authz/validating-admission-policy/ )
388
+ to avoid introducing dependencies.
389
+ * Prevent webhooks from validating or mutating other webhooks. Consider
390
+ [ excluding specific namespaces] ( /docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-namespaceselector )
391
+ from triggering your webhook.
392
+ * Prevent your webhooks from acting on dependent add-ons by using an
393
+ [ ` objectSelector ` ] ( /docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-objectselector ) .
394
+
374
395
### Fail open and validate the final state {#fail-open-validate-final-state}
375
396
376
397
Mutating admission webhooks support the ` failurePolicy ` configuration field.
0 commit comments