Here, an image "kind" (new term) represents the specific type of an image (e.g., the debug image) and is roughly analogous to an image build target.
In contrast, the image "flavour" (existing term) is a particular configuration-variant / instantiation of that type (i.e., a specific configuration of build-args).
Making "kind" configurable in the DeploymentsConfig would allow scap to deploy the new mediawiki-cli image to mw-cron, mw-script, etc.
Initial proposal:
Option 1 (validated enum)
Deprecate the current debug boolean in favor of a kind enum. kind would be one of:
- production (default, used by all standard mw-on-k8s deployments)
- debug (used by mw-debug)
- cli (used by mw-cron and mw-script, as well as dumps)
During DeploymentsConfig processing, scap validates that the kind is one of the supported types.
Option 2 (opaque key)
Deprecate the current debug boolean in favor of a kind config field.
- This corresponds directly to the name by which the image is referred in the build report provided by build-images.py - e.g., debug-image.
- In scap, this field is treated as an opaque key used when inspecting the build report, similar to mw_flavour today.
After image build complete, but before mutating the files in /etc/helmfile-defaults/mediawiki/release, scap validates that all requested combinations of kind and flavour are known.
Decision: Option 2
