os-images-server: simplify how we restrict which images are downloaded on bootstrap
Related issue: #2014 (closed)!
This MR is a followup to !3693 (merged)
This MR is a code simplification/cleanup.
Today we have code which is specific to bootstrap, which ensures that in the bootstrap cluster we only download the images that are needed to create the management cluster, and not the OS images that would be present in the config because they are wanted for workload clusters.
Thanks to the refactoring done for #2014 (closed) we can heavily simplify this code. Indeed the only thing needed in the bootstrap values is to override the OS image selectors passed to the os-image-server unit, to select only the image selectors of the current (ie. the mgmt cluster to create), and not include the os_image_server_additional_selectors OS images selectors which add images for workload clusters (introduced by !3693 (merged)).
This MR does this change, and removes the previous code.
_internal.os_image_server_selectors and using it in the os-image-server unit, we need to compute it directly under the os-image-server unit, because this computation needs .cluster.k8s_version to have been interpreted first, which we can ensure with {{- tuple . "cluster" | include "interpret" -}} from the os-image-server unit values, but which would not be possible from _internal.os_image_server_selectors because cluster can't be interpreted until _internal is fully interpreted.
This MR depends on sylva-projects/sylva-elements/helm-charts/os-image-server!128 (merged) which is needed to have OS image selection work properly for os-image-server (explanation in the MR).
CI configuration
Below you can choose test deployment variants to run in this MR's CI.
Click to open to CI configuration
Legend:
| Icon | Meaning | Available values |
|---|---|---|
| Infra Provider |
capd, capo, capm3
|
|
| Bootstrap Provider |
kubeadm (alias kadm), rke2
|
|
| Node OS |
ubuntu, suse
|
|
| Deployment Options |
light-deploy, dev-sources, ha, misc
|
|
| Pipeline Scenarios | Available scenario list and description |
-
🎬 preview☁️ capd🚀 kadm🐧 ubuntu -
🎬 preview☁️ capo🚀 rke2🐧 suse -
🎬 preview☁️ capm3🚀 rke2🐧 ubuntu -
☁️ capd🚀 kadm🛠️ light-deploy🐧 ubuntu -
☁️ capd🚀 rke2🛠️ light-deploy🐧 suse -
☁️ capo🚀 rke2🐧 suse -
☁️ capo🚀 kadm🐧 ubuntu -
☁️ capo🚀 rke2🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capo🚀 kadm🎬 wkld-k8s-upgrade🐧 ubuntu -
☁️ capo🚀 rke2🎬 rolling-update-no-wkld🛠️ ha,misc🐧 suse -
☁️ capo🚀 rke2🎬 sylva-upgrade-from-1.3.x🛠️ ha,misc🐧 ubuntu -
☁️ capm3🚀 rke2🐧 suse -
☁️ capm3🚀 kadm🐧 ubuntu -
☁️ capm3🚀 kadm🎬 rolling-update-no-wkld🛠️ ha,misc🐧 ubuntu -
☁️ capm3🚀 rke2🎬 wkld-k8s-upgrade🛠️ ha🐧 suse -
☁️ capm3🚀 kadm🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capm3🚀 rke2🎬 sylva-upgrade-from-1.3.x🛠️ misc,ha🐧 suse -
☁️ capm3🚀 kadm🎬 rolling-update🛠️ ha🐧 suse
Global config for deployment pipelines
-
autorun pipelines -
allow failure on pipelines
Notes:
- Enabling
autorunwill make deployment pipelines to be run automatically without human interaction - Disabling
allow failurewill make deployment pipelines mandatory for pipeline success. - if both
autorunandallow failureare disabled, deployment pipelines will need manual triggering but will be blocking the pipeline
Be aware: after configuration change, pipeline is not triggered automatically.
Please run it manually (by clicking the run pipeline button in Pipelines tab) or push new code.