Skip to content

High-level validating webhooks ignore the apierrors status info #1046

@DirectXMan12

Description

@DirectXMan12

It's a bit confusing that if you return something like apierrors.NewInvalid from the high-level Validator interface, we ignore the error code in that StatusError and always use 403. It'll be a breaking change, but we should probably have some mechanism for using the error code that the user requests in the high-level interface. We'll also want to make sure that the apiserver continues to treat the error the same -- IIRC it does funky stuff to the structured message for certain codes.

/kind bug
/priority important-longterm

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions