Skip to content
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] InjectPodAnnotations #14

Open
3 tasks
elithrar opened this issue Aug 1, 2019 · 2 comments
Open
3 tasks

[feature] InjectPodAnnotations #14

elithrar opened this issue Aug 1, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@elithrar
Copy link
Owner

elithrar commented Aug 1, 2019

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).

@elithrar elithrar added the enhancement New feature or request label Aug 1, 2019
@elithrar elithrar added this to the v1 🚧 milestone Aug 1, 2019
@elithrar elithrar self-assigned this Aug 1, 2019
@elithrar elithrar pinned this issue Aug 3, 2019
@elithrar elithrar unpinned this issue Aug 3, 2019
@thibaultserti
Copy link

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

@thibaultserti
Copy link

In fact I managed to make something convenient. I'll try to post an example in the following days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants