Matchbox
This base deployment provides our opinionated matchbox setup.
Configuration
Images
| Name | Purpose |
|---|---|
matchbox-run | The upstream runtime container |
matchbox-config-init | The inventory image containing ignition, group and profile files. They are expected to be in folders under /opt/matchbox/ |
matchbox-base-red-init | This base-init container contains the install and live images to boot, as well as a k3s binary under /opt/matchbox/assets. The files are copied to the asset directory while appending the canary color between filename and extension |
matchbox-base-green-init | Similar to red |
Example
This base is expected to be consumed in a kustomization.yaml where the following 4 images are set (example):
- name: matchbox-run
newName: quay.io/poseidon/matchbox
newTag: v0.8.3-29-ge6b10e1
- name: matchbox-config-init
newName: registry.gitlab.com/cotb-customers/example/inventory
newTag: 1.0.1
- name: matchbox-base-red-init
newName: registry.gitlab.com/cotb-customers/example/upstream/metal-base
newTag: 33.20210104.3.0_stable_v1.20.4-k3s1_x86_64
- name: matchbox-base-green-init
newName: registry.gitlab.com/cotb-customers/example/upstream/metal-base
newTag: 36.20221014.3.1_stable_v1.24.17-k3s1_x86_64
Concept
The init container matchbox-config executes a script for smart renaming. It runs the following process:
- find all files in
/opt/matchboxand execute a script on each file FILE_NAMEis extracted as the value between two.as the path begins with a.FILE_EXTis extracted via cut, as it can output the "rest" in case there is no second.(as for k3s)ASSEMBLEDbuilds the target path and injects the canary color- files are copied to target without any possible traling dot