-
Notifications
You must be signed in to change notification settings - Fork 331
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
Feature: Generic admission webhook #2644
Comments
This issue is stale because it has been open for 90 days with no |
Related: #2656 I think having access the the |
This issue is stale because it has been open for 90 days with no |
/remove-lifecycle stale |
This issue is stale because it has been open for 90 days with no |
/remove-lifecycle stale Another use case for this is to capture UserInfo for the identity that submitted the AdmissionRequest, as described in tektoncd/pipeline#7068 |
@lbernick UserInfo should be available via apis.GetUserInfo! 😎 |
This issue is stale because it has been open for 90 days with no |
/area API
/kind feature
We use the defaulting and validating admission webhook helpers downstream in Tekton and they are super useful. It would be nice to have a function for a generic admission webhook that takes care of certificates and reconciliation, but exposes the function
func (ac *reconciler) Admit(ctx context.Context, request *admissionv1.AdmissionRequest) (resp *admissionv1.AdmissionResponse)
.I'm trying to patch a CRD on creation, and have currently implemented this as a callback passed to
defaulting.NewAdmissionController
, but I realized the CRD namespace is not necessarily available in the unstructured object created fromAdmissionRequest.Object
andAdmissionRequest.OldObject
, so I'm hoping to get this info from AdmissionRequest.Namespace.I also want to avoid calling
SetDefaults
.If this feature is of interest I can give implementing it a try.
The text was updated successfully, but these errors were encountered: