Image naming

The Naming Of Docker Images in KubeCF.

When running a kubecf instance, all of the job containers in the pods for the instance groups use a docker image. This image provides that job and the associated packages.

The names of these docker images are structured like so:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Registry                     Role Tag

The tag is further structured as:

~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
Stemcell OS   Stemcell version                      Role version

The various components above come from a number of places in the Chart, chart values, deployment manifest, etc. When an element can be provided by multiple places, the first place (in the order given below) with a defined value (i.e. not nil) is used.

Element Origin
Role instance_groups.[].name
Registry releases.(role).url
Role version releases.(role).version
Stemcell OS releases.(role).stemcell.os
Stemcell version releases.(role).stemcell.version

Attention: The stemcell information put into the Chart / manifest has to match the stemcell baked into the docker image by the CI image builder at the time of building.

This information is easiest to extract from the tag for the used docker image.

Some, but not all, of this information can also be extracted from the labels of the used docker image. For image foo, invoke:

docker inspect -f '{{ index .Config.Labels "stemcell-version" }}' foo
docker inspect -f '{{ index .Config.Labels "stemcell-flavor" }}' foo

The flavor plus the part of the version up to the first dash character (-) provides the stemcell OS, and the remainder of the version provides a prefix for the stemcell version.

For example, the version and flavor strings


yield opensuse-42.3 and 36.g03b4653-30.80 for os and version prefix. Below, the tag structure again, with the labeling information added:

|        stemcell-version
~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
Stemcell OS   Stemcell version                      Role version
Last modified December 19, 2019: Integrating remaining existing docs (961159c)