This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
Ensure CLI references compatible images #3371
Labels
area/cli
Related to OSM CLI
area/upgrade
Upgrade related
build and release
Build and release related
Milestone
Problem
Currently, the
main
branch references the latest tagged version for the default images used by the OSM chart (and thereforeosm install
):osm/charts/osm/values.yaml
Line 14 in 3fde0f1
This causes version skew when the
main
branch is updated but the default image tag stays the same. This becomes an issue when following documentation corresponding to themain
branch which refers to new features since the last release and instructions useosm install
without overriding the images to images newer than the latest release that implement those features.Goal
The goal is to come up with a solution such that
make build-osm && bin/osm install
"just works" in all cases.To do this,
make build-osm
would have to become dependent on building and pushing the images used by the control plane, then the CLI would refer to those images by default. The image tag must be unique to maintain a 1:1 mapping of CLI to images.Solution
Here's one possible implementation I can think of:
list
docker-push-{init,init-osm-controller,osm-controller,osm-injector}
as dependencies ofbuild-osm
in the Makefile:osm/Makefile
Line 108 in b14458f
CTR_TAG
is set to some deterministic value. The current Git SHA might be close enough, though ideally it would differentiate between dirty and clean worktrees.CTR_REGISTRY
can be set tocreate new package-scoped variables (likely in cmd/cli/install.go) for the tag and registry location of the built images and pass the values to them in the Makefile using the same method as we do for version info:
osm/Makefile
Line 21 in 3fde0f1
In the install command, if
OpenServiceMesh.image.registry
orOpenServiceMesh.image.tag
are not overridden via--set
, override them with the values of the package-scoped variables defined above. This could be done in this function:osm/cmd/cli/install.go
Line 154 in 3fde0f1
This would still allow users to override the images the standard way per-
osm install
invocation.Other things I haven't fully thought through yet
helm
instead ofosm
/cc @shashankram
The text was updated successfully, but these errors were encountered: