bootstrap.sh can be stuck on sylva-units preview

Summary

If sylva-units-preview's sylvaUnitsRelease is not properly cleaned during bootstrap.sh (if the script is interrupted for example), sylvaUnitsRelease may reconcile in background.

If bootstrap.sh is executed again with another version of sylva, sylva-units-operator will attempt to pre-upgrade units of sylva-units-preview namespace, which will never happen as these units are suspended

2026-09-30T15:59:02Z    DEBUG   sylva-units-operator Kustomization is not up-to-date    {"controller": "sylvaunitsrelease", "controllerGroup": "unitsoperator.sylva", "controllerKind": "SylvaUnitsRelease", "SylvaUnitsRelease": {"name":"sylva-units","namespace":"sylva-units-preview"}, "namespace": "sylva-units-preview", "name": "sylva-units", "reconcileID": "146114ef-68c7-4555-b9fb-aee748628a72"}
2026-09-30T15:59:02Z    DEBUG   flux-system Kustomization is not up-to-date     {"controller": "sylvaunitsrelease", "controllerGroup": "unitsoperator.sylva", "controllerKind": "SylvaUnitsRelease", "SylvaUnitsRelease": {"name":"sylva-units","namespace":"sylva-units-preview"}, "namespace": "sylva-units-preview", "name": "sylva-units", "reconcileID": "146114ef-68c7-4555-b9fb-aee748628a72"}
2026-09-30T15:59:02Z    INFO    sylva-units-operator Kustomization is not up-to-date: 
flux-system Kustomization is not up-to-date:    {"controller": "sylvaunitsrelease", "controllerGroup": "unitsoperator.sylva", "controllerKind": "SylvaUnitsRelease", "SylvaUnitsRelease": {"name":"sylva-units","namespace":"sylva-units-preview"}, "namespace": "sylva-units-preview", "name": "sylva-units", "reconcileID": "146114ef-68c7-4555-b9fb-aee748628a72"}
2026-09-30T15:59:12Z    DEBUG   sylva-units-operator Kustomization is not up-to-date    {"controller": "sylvaunitsrelease", "controllerGroup": "unitsoperator.sylva", "controllerKind": "SylvaUnitsRelease", "SylvaUnitsRelease": {"name":"sylva-units","namespace":"sylva-units-preview"}, "namespace": "sylva-units-preview", "name": "sylva-units", "reconcileID": "26ac9d8f-1647-401e-a495-0239ffe3af3e"}
2026-09-30T15:59:12Z    DEBUG   flux-system Kustomization is not up-to-date     {"controller": "sylvaunitsrelease", "controllerGroup": "unitsoperator.sylva", "controllerKind": "SylvaUnitsRelease", "SylvaUnitsRelease": {"name":"sylva-units","namespace":"sylva-units-preview"}, "namespace": "sylva-units-preview", "name": "sylva-units", "reconcileID": "26ac9d8f-1647-401e-a495-0239ffe3af3e"}
2026-09-30T15:59:12Z    INFO    sylva-units-operator Kustomization is not up-to-date: 
flux-system Kustomization is not up-to-date:    {"controller": "sylvaunitsrelease", "controllerGroup": "unitsoperator.sylva", "controllerKind": "SylvaUnitsRelease", "SylvaUnitsRelease": {"name":"sylva-units","namespace":"sylva-units-preview"}, "namespace": "sylva-units-preview", "name": "sylva-units", "reconcileID": "26ac9d8f-1647-401e-a495-0239ffe3af3e"}
2026-09-30T15:59:22Z    DEBUG   sylva-units-operator Kustomization is not up-to-date    {"controller": "sylvaunitsrelease", "controllerGroup": "unitsoperator.sylva", "controllerKind": "SylvaUnitsRelease", "SylvaUnitsRelease": {"name":"sylva-units","namespace":"sylva-units-preview"}, "namespace": "sylva-units-preview", "name": "sylva-units", "reconcileID": "79b5d008-ba0c-489f-9546-3292ccc5806f"}
2026-09-30T15:59:22Z    DEBUG   flux-system Kustomization is not up-to-date     {"controller": "sylvaunitsrelease", "controllerGroup": "unitsoperator.sylva", "controllerKind": "SylvaUnitsRelease", "SylvaUnitsRelease": {"name":"sylva-units","namespace":"sylva-units-preview"}, "namespace": "sylva-units-preview", "name": "sylva-units", "reconcileID": "79b5d008-ba0c-489f-9546-3292ccc5806f"}
2026-09-30T15:59:22Z    INFO    sylva-units-operator Kustomization is not up-to-date: 
flux-system Kustomization is not up-to-date:    {"controller": "sylvaunitsrelease", "controllerGroup": "unitsoperator.sylva", "controllerKind": "SylvaUnitsRelease", "SylvaUnitsRelease": {"name":"sylva-units","namespace":"sylva-units-preview"}, "namespace": "sylva-units-preview", "name": "sylva-units", "reconcileID": "79b5d008-ba0c-489f-9546-3292ccc5806f"}

We should probably:

  • run cleanup_preview before validate_sylva_units to avoid any side effect of previous previews (immutable-values or other checks on existing state could interfere)

  • avoid defining pre-upgrade-units in other namespace than syvla-system

  • add a check to enforce the previous condition