admission-control
admission-control copied to clipboard
[feature] InjectPodAnnotations
Provide a way to inject annotations into a Pod on admission:
- [ ] Accept a
map[string]func(*corev1.Pod) string
argument so that the user can build names based on the Pod attributes (ObjectMeta, PodSpec, etc) - [ ] Use https://github.com/evanphx/json-patch for testing: take a Pod, serialize, apply the patch, and deserialize again to verify the injected annotations were applied.
- [ ] Add a sample
MutatingWebhookConfiguration
to demonstrate usage.
Alternatively we could just provide a metav1.ObjectMeta
to the user/caller, which might be sufficient for any dynamic annotation generation & more stable (w.r.t. API changes).
Hello there!
I looked at your repository and it's really well managed ! I am looking for a way to make a MutatingWebhook
but I cannot manage to make it work.
Will you add an example in a near future ?
Thanks for advance
In fact I managed to make something convenient. I'll try to post an example in the following days.