Skip to main content

Matchbox

This base deployment provides our opinionated matchbox setup.

Configuration

Images

NamePurpose
matchbox-runThe upstream runtime container
matchbox-config-initThe inventory image containing ignition, group and profile files. They are expected to be in folders under /opt/matchbox/
matchbox-base-red-initThis 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-initSimilar 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/matchbox and execute a script on each file
  • FILE_NAME is extracted as the value between two . as the path begins with a .
  • FILE_EXT is extracted via cut, as it can output the "rest" in case there is no second . (as for k3s)
  • ASSEMBLED builds the target path and injects the canary color
  • files are copied to target without any possible traling dot