GithubHelp home page GithubHelp logo

Comments (5)

ritazh avatar ritazh commented on May 27, 2024

Thanks for reporting this @jthin. Please take a look at https://open-policy-agent.github.io/gatekeeper/website/docs/failing-closed if you plan to configure the FailurePolicy as Fail. There are few considerations, especially https://open-policy-agent.github.io/gatekeeper/website/docs/failing-closed#admission-deadlock which sounds like your scenario. This can normally be mitigated by deleting the ValidatingWebhookConfiguration, per the emergency procedure.

from gatekeeper.

jthin avatar jthin commented on May 27, 2024

Hello @ritazh,

Thank you for your response.

Based on my understanding, this is an expected behavior.
However, for many reasons, we need to stop several AKS clusters, particularly in dev/test environment. Is deleting the ValidatingWebhookConfiguration the sole solution, considering that we must reapply it afterward?

from gatekeeper.

ritazh avatar ritazh commented on May 27, 2024

@jthin deleting the ValidatingWebhookConfiguration is for emergency to get the cluster back to a healthy state. Disabling the webhook is to ensure cluster operations are not blocked by the webhook when the webhook is down.

To ensure the webhook does not affect your cluster long term when FailurePolicy=Fail, from api server logs, can you tell which resources have been blocked by the webhook when the cluster is restarted?

Few things you may need to update in your ValidatingWebhookConfiguration to reduce the number of resources that must go thru this webhook:

  1. Under rules, is the scope set to * or Namespaced?
  2. If it's namespaced, are system namesapaces excluded via matchExpressions? e.g. kube-system, istio-system
  3. Under resources, are cluster-scoped resources excluded, like nodes? What about ConfigMap as it is used as the locking resource for some Kubernetes leader elections.

There are probably more resources that need to be excluded in ValidatingWebhookConfiguration to ensure cluster operations are not blocked by a failed webhook.

from gatekeeper.

maxsmythe avatar maxsmythe commented on May 27, 2024

in newer clusters, MatchConditions may also help with scoping:

https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-matchconditions

from gatekeeper.

stale avatar stale commented on May 27, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

from gatekeeper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.