kubernetes-sigs / kubernetes-sigs/controller-runtime
High-level validating webhooks ignore the apierrors status info
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3k
- Forks
- 1.3k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 14
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the high-level Validator interface handles returned apierrors.StatusError values and how the apiserver treats the resulting status codes and structured messages. Done means the interface can use the requested error code while preserving the apiserver's existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100