Giter Site home page Giter Site logo

Comments (8)

ellistarn avatar ellistarn commented on August 24, 2024

We haven't gone through the exercise of using builtin CRD validation. The defaults are provider specific. See: https://github.com/aws/karpenter/blob/main/pkg/apis/v1alpha5/provisioner.go#L45. I'd be curious to see if you could replace the validation webhooks.

from karpenter.

dudicoco avatar dudicoco commented on August 24, 2024

We haven't gone through the exercise of using builtin CRD validation.

@ellistarn can you please elaborate on that?
It is much easier to add some fields to the CRD schema than writing additional code to validate it.
For example the following code could be easily replaced with a required: ["evictionSoftGracePeriod"] block within the schema.

I believe the defaulting webhook could also be avoided by adding default fields within the CRD schema.

from karpenter.

ellistarn avatar ellistarn commented on August 24, 2024

Interesting ideas. Would you be interested in contributing this?

from karpenter.

dudicoco avatar dudicoco commented on August 24, 2024

@ellistarn sure.
Should I open a PR for the CRDs changes?

from karpenter.

ellistarn avatar ellistarn commented on August 24, 2024

Sure thing!

from karpenter.

github-actions avatar github-actions commented on August 24, 2024

Labeled for closure due to inactivity in 10 days.

from karpenter.

github-actions avatar github-actions commented on August 24, 2024

Labeled for closure due to inactivity in 10 days.

from karpenter.

jonathan-innis avatar jonathan-innis commented on August 24, 2024

Kubernetes supports CEL for CRD validation. We should investigate this along with the other validations that are supported natively by the Open API specs (like defaults, minimum, maximums, etc.)

from karpenter.

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.