Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Implement a MutatingAdmissionWebhook to apply relocation mappings to pods #3

Open
glyn opened this issue Sep 23, 2019 · 3 comments
Open
Assignees

Comments

@glyn
Copy link
Contributor

glyn commented Sep 23, 2019

This was suggested in discussions with the kubernetes community as a way of applying a relocation mapping to image references used to create containers. The webhook would need to mutate pods to replace image references with their relocated counterparts.

The relocation mapping state of the webhook should be managed by a controller which would monitor resources describing partial relocation mappings.

@glyn glyn self-assigned this Sep 23, 2019
@glyn glyn transferred this issue from vmware-archive/image-relocation Oct 17, 2019
@glyn
Copy link
Contributor Author

glyn commented Oct 17, 2019

TODO (possibly in later issues):

@glyn
Copy link
Contributor Author

glyn commented Nov 20, 2019

Improvements from @roycaihw's excellent KubeCon presentation on admission webhooks:

  • avoid mutating pods in kube-system namespace

  • (for kubernetes v1.15+) configure reinvocationPolicy: IfNeeded to ensure mutations by other webhooks are processed (e.g. if a sidecar pod is injected, need to relocate the image)

  • (for kubernetes v1.15+) consider configuring matchPolicy: Equivalent to ensure all versions of a pod spec are processed.

@glyn
Copy link
Contributor Author

glyn commented Jan 20, 2020

See #20

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant