Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Allow webhooks to register custom validators/defaulter types #1676

Merged
merged 1 commit into from
Sep 29, 2021

Commits on Sep 29, 2021

  1. ✨ Allow webhooks to register custom validators/defaulter types

    This changeset allows our webhook builder to take in a handler any other
    struct other than a runtime.Object.
    
    Today having an object as the primary source of truth for both
    Defaulting and Validators makes API types carry a lot of information and
    business logic alongside their definitions.
    
    Moreover, lots of folks in the past have asked for ways to have an
    external type to handle these operations and use a controller runtime
    client for validations.
    
    This change brings a new way to register webhooks, which admission.For
    handler any type (struct) can be a defaulting or validating handler for
    a runtime Object.
    
    Signed-off-by: Vince Prignano <vincepri@vmware.com>
    vincepri committed Sep 29, 2021
    Configuration menu
    Copy the full SHA
    e133413 View commit details
    Browse the repository at this point in the history