ImageMap expresses the mapping from an image reference to a real, pushed image in an image registry that a container runtime can access.
Another way to think about the ImageMap is that ImageMapSpec is a mutable image reference (where the image might not exist yet), but ImageMapStatus is an immutable image reference (where, if an image is specified, it always exists).
ImageMap does not specify how the image is built or who is responsible for building this. But any API that builds images should produce an ImageMap.
For example, a builder that builds to a local image registry might create a map from: ‘my-apiserver:dev’ to ‘localhost:5000/my-apiserver:content-based-label’.
ImageMap doesn’t follow the usual Kubernetes-style API semantics (where the Status is the result of running the Spec). It’s closer to a ConfigMap. Though the Status does represent a real runtime result (an image in a registry).
ImageMapSpec defines the desired state of ImageMap
selector (string), required
A named image reference.
Deployment tools expect this image reference to match an image in the YAML being deployed, and will replace that image reference.
By default, this selector will match an image if the names match (tags on both the selector and the matched reference are ignored).
If specified, then tags on both the selector and the matched reference are used for matching. The selector will only match the reference if the tags match exactly.
If specified, then the selector will also match any strings in container env variables.
If specified, the injector will replace the ‘args’ field in the container when it replaces the image.
overrideArgs.args (string), required
A list of args strings.
If specified, the injector will replace the ‘command’ field in the container when it replaces the image.
overrideCommand.command (string), required
A list of command strings.
ImageMapStatus defines the observed state of ImageMap
Timestamp indicating when the image started building.
Intended to be used to determine which file changes were picked up by the image build. We can assume that any file changes before this timestamp were definitely included in the image, and any file changes after this timestamp may not be included in the image.
A fully-qualified image reference, including a name and an immutable tag, as seen from the cluster container runtime that we’re mapping this image to.
NB: Container images often need to be referenced from different networks, including:
1) The cluster container runtime 2) The local network 3) The cluster network
And each of these cases may have distinct URLs. We might deprecate this field and only use fields of the form
For more details on image references in different networks, see: https://github.com/kubernetes/enhancements/tree/master/keps/sig-cluster-lifecycle/generic/1755-communicating-a-local-registry#specification-for-localregistryhosting-v1
A fully-qualified image reference, including a name and an immutable tag, as seen from the cluster container runtime.
A fully-qualified image reference, including a name and an immutable tag, as seen from the local network.