Giter Club home page Giter Club logo

Comments (5)

davewalter avatar davewalter commented on August 29, 2024

One alternative to explore: can we only handle creation and then make the label immutable?

The Default() method does not know whether a resource is being created or updated, and there is no way to raise an error, so we chose to always set the appGuid label to the value of the metadata.name field. There does not appear to be a way to make a set of labels immutable.

from korifi.

kieron-dev avatar kieron-dev commented on August 29, 2024

It seems likely that we'll need https://github.com/open-policy-agent/gatekeeper, or similar, to disallow changes to parts of some resources based on role.

If you find you need immutable labels, that should be simple enough to set up as an OPA rule.

from korifi.

angelachin avatar angelachin commented on August 29, 2024

Yes, labels are not immutable and are not expected to be.

Should the sample resource have the label now deleted since the mutating webhook now creates it?

Otherwise everything looks good to me.

from korifi.

akrishna90 avatar akrishna90 commented on August 29, 2024

@angelachin Thats a good catch. Have addressed it in this PR

from korifi.

angelachin avatar angelachin commented on August 29, 2024

Awesome, looks good to me. Seems like this issue can be closed out.

from korifi.

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.