Open glyn opened 5 years ago
TODO (possibly in later issues):
ClusterImageMap
for mappings that need to be applied to all namespaces - deferred to https://github.com/pivotal/kubernetes-image-mapper/issues/4Improvements from @roycaihw's excellent KubeCon presentation on admission webhooks:
[x] 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.
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.