Closed
Description
Would Controller Runtime be interested in being able to support non-AdmissionReview based HTTP handlers in the Webhook
server package. I'm thinking of resources like authentication.k8s.io.TokenReview
imagepolicy.k8s.io.ImageReview
.
EG if I could use:
mgr.GetWebhookServer().Register("/tokenreview", &authentication.Webhook{Handler: &wh.TokenReview{}})
And it would then have something like:
import "k8s.io/api/authentication/v1"
// ...
type Request struct {
v1.TokenReview
}
and my Handler
func could be:
func (a *TokenReview) Handle(ctx context.Context, req authentication.Request) authentication.Response {
// ... implement authentication request
return authentication.Response{}
}
This would help to standardize the building of ImageReviews
and TokenReviews
for code bases like https://sigs.k8s.io/aws-iam-authenticator where it's currently just a normal go HTTP server implementation and where you need to add controllers (when we did) we just used client-go
directly and we could have used CR easier.
Metadata
Metadata
Assignees
Labels
No labels