Giter Club home page Giter Club logo

Comments (7)

brycecr avatar brycecr commented on May 29, 2024

Hi momalik11,

Thanks for the message!

A few things that might help understand this issue:

  • What are you doing when you encounter this error? Are you applying the Constraint and ConstraintTemplate in the same kubectl apply operation or separately?
  • What is the status of the gatekeeper pods in your cluster? I.e. what is the result of kubectl get pods -n gatekeeper system ?
  • What is the result of kubectl get ConstraintTemplate k8spspallowprivilegeescalationcontainer -oyaml?

from gatekeeper-library.

exploremani avatar exploremani commented on May 29, 2024

Hi - I am having the same issue. But yes I am trying to apply both the constraint and template in a same kubectl apply. I am using kustomize to apply
kustomize build ./templates/psp --reorder none | kubectl apply -f -
Is there a known issue with applying in the same kubectl apply?

from gatekeeper-library.

maxsmythe avatar maxsmythe commented on May 29, 2024

There shouldn't be an issue installing multiple templates at the same time.

Can you copy/paste the output of the command so we can see what error you're getting?

from gatekeeper-library.

shomron avatar shomron commented on May 29, 2024

Trying to read between the lines - there is a slight delay between the time you apply a ConstraintTemplate and the time its corresponding Constraint CRD is registered. Even if the order is correct in your kustomize command, there is a good chance it would fail applying the constraint within that time window.

from gatekeeper-library.

exploremani avatar exploremani commented on May 29, 2024

Thanks @shomron. I had the exact issue. When I applied them through my ansible, the constraint keeps failing as the CRD thru template is not registered. This is very unusual as I have worked on other CRD's and never faced such issue. Initially kustomize ordering was an issue. But I used --reorder none to allow the template go first before the constraint. But still no luck. The only way I worked out was applied the template set first and gave a pause of one second and applied the constraint. Found this a little strange though

from gatekeeper-library.

maxsmythe avatar maxsmythe commented on May 29, 2024

Sorry, I missed that you were mixing constraints and templates.

My guess is that because constraint templates are not themselves CRDs, but are instead a precursor object for CRDs, there is a longer delay before the CRDs are available. This is because instead of just needing the CRD controller to do its thing, the Constraint Template controller must perform its reconciliation, and then the CRD controller must also do so.

from gatekeeper-library.

stale avatar stale commented on May 29, 2024

This issue/PR 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-library.

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.