fix pure OCI deployment for rancher-roles-management units
Closes #4274 (closed)
This MR fixes "pure OCI" deployment for rancher-roles-management units (and generally for Helm-based units that are defined only in management.values.yaml or workload-cluster.values.yaml):
tools/oci/push-helm-charts-artifacts.pybuilds no artifact for them- the
use-oci-artifacts.values.yamllayer will now include units that are defined only inmanagement.values.yamlorworkload-cluster.values.yaml
Without this fix, those units cannot be deployed in an OCI-only deployment (not present in the use-oci-artifacts.values.yaml layer, so the GitRepository would be used, which will fail in an OCI-only deployment).
This MR has 4 commits (
- one which is a light simplification/cleanup of
recursive_dict_combineinyamlMerge.py, to allow calling it without it's last argument - one that modifies
tools/oci/build-sylva-units-artifact.pyto achieve the key purpose of this MR (usingrecursive_dict_combinein fromyamlMerge.pyto combinevalues.yaml,management.values.yamlandworkload-cluster.values.yaml) - a last one which adds dummy units in
values.yamlfor the two units that are defined only inmanagement.values.yamlorworkload-cluster.values.yaml; this is necessary, or else:tools/oci/push-helm-charts-artifacts.pywould not build an artifact for them- for this, I also had to move a few field from
management.values.yamlandworkload-cluster.values.yamlinvalues.yaml
- for this, I also had to move a few field from
- when
use-oci-artifacts.values.yamlis used in management context, it would include an incomplete definition for therancher-cluster-role-bindingswhich is defined only inworkload-cluster.values.yaml - when
use-oci-artifacts.values.yamlis used in workload context, it would include an incomplete definition for therancher-role-managementwhich is defined only inmanagement.values.yaml
It's important to realize that the way the values.yaml layers are intricated with OCI artifact building tools is too complex; this will be fixable in the context of the refactoring of how we handle OCI for Helm, hopefully to land in %1.8.0
Testing
Tested by running ONLY_PRODUCE_USE_OCI_ARTIFACTS_VALUES=1 tools/oci/build-sylva-units-artifact.py before and after this MR.
Diff:
--- use-oci-artifacts-final.values.yaml.before 2026-06-24 11:09:14.124408914 +0200
+++ use-oci-artifacts-final.values.yaml.after 2026-06-24 11:09:23.837786501 +0200
@@ -325,10 +325,24 @@
helm_repo_url: '{{ .Values.sylva_core_oci_registry }}'
rancher-backup-restore-operator-crd:
helm_repo_url: '{{ .Values.sylva_core_oci_registry }}'
+ rancher-cluster-role-bindings:
+ helm_repo_url: '{{ .Values.sylva_core_oci_registry }}'
+ helmrelease_spec:
+ chart:
+ spec:
+ version: 1.1.4
+ repo: null
rancher-compliance:
helm_repo_url: '{{ .Values.sylva_core_oci_registry }}'
rancher-compliance-crd:
helm_repo_url: '{{ .Values.sylva_core_oci_registry }}'
+ rancher-roles-management:
+ helm_repo_url: '{{ .Values.sylva_core_oci_registry }}'
+ helmrelease_spec:
+ chart:
+ spec:
+ version: 1.1.4
+ repo: null
rancher-settings:
helm_repo_url: '{{ .Values.sylva_core_oci_registry }}'
helmrelease_spec: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, okd, ck8s |
|
| Node OS | ubuntu, suse, na, leapmicro |
|
| Deployment Options | Deployment option list and description | |
| Pipeline Scenarios | Available scenario list and description | |
| Enabled units | Any available units name, by default apply to management and workload cluster. Can be prefixed by mgmt: or wkld: to be applied only to a specific cluster type |
|
| Disabled units | Any available units name, by default apply to management and workload cluster. Can be prefixed by mgmt: or wkld: to be applied only to a specific cluster type |
|
| Target platform | Can be used to select specific deployment environment Available platform list and description | |
| Pipeline control | autorun, manual or blocking. Can be used to override global config and start a deployment pipeline the required way |
-
🎬 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🚀 rke2🐧 leapmicro -
☁️ capo🚀 kadm🛠️ dev-sources🐧 ubuntu -
☁️ capo🚀 kadm🐧 ubuntu🟢 neuvector,mgmt:harbor -
☁️ capo🚀 rke2🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capo🚀 kadm🎬 wkld-k8s-upgrade🐧 ubuntu -
☁️ capo🚀 rke2🎬 rolling-update-no-wkld🛠️ ha🐧 suse -
☁️ capo🚀 rke2🎬 sylva-upgrade🛠️ ha🐧 ubuntu -
☁️ capo🚀 rke2🎬 sylva-upgrade-from-1.6.x🛠️ ha,misc🐧 ubuntu -
☁️ capo🚀 rke2🛠️ ha,misc🐧 ubuntu -
☁️ capo🚀 rke2🛠️ misc🐧 ubuntu🟢 mgmt:harbor🔴 neuvector -
☁️ capo🚀 rke2🛠️ ha,misc,openbao🐧 suse -
☁️ capo🚀 rke2🐧 suse🎬 upgrade-from-prev-tag -
☁️ capm3🚀 rke2🐧 suse -
☁️ capm3🚀 kadm🐧 ubuntu -
☁️ capm3🚀 ck8s🐧 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🎬 upgrade-from-prev-release-branch🛠️ ha🐧 suse -
☁️ capm3🚀 rke2🛠️ misc,ha🐧 suse -
☁️ capm3🚀 rke2🎬 sylva-upgrade🛠️ ha,misc🐧 suse -
☁️ capm3🚀 kadm🎬 rolling-update🛠️ ha🐧 suse -
☁️ capm3🚀 ck8s🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capm3🚀 rke2|okd🎬 no-update🐧 ubuntu|na -
☁️ capm3🚀 rke2🐧 suse🎬 upgrade-from-release-1.5 -
☁️ capm3🚀 rke2🐧 suse🎬 upgrade-to-main
Global config for deployment pipelines
- autorun pipelines
- allow failure on pipelines
- record sylvactl events
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.