fix: stale root dependency ks after push force

Problem

When a sylvaUnitsSource GitRepository is force-pushed, the operator creates a new GitRepository object and rotates all pre-upgrade Kustomizations (flux-systemexternal-secrets-operatorsylva-units-operator) to reference it.

However, the sylva-units Helm chart also creates root-dependency-N Kustomizations from the previous HelmRelease revision, still pointing to the old broken GitRepository. These are never pruned on source rotation.

Since sylva-units-operator has dependsOn: [root-dependency-N], Flux permanently blocks it — even though its own sourceRef was already updated. The operator deadlocks and apply.sh times out.

Fix

When a pre-upgrade Kustomization's sourceRef is updated, also walk its dependsOn list and patch any dependency Kustomization still referencing the old source.

Edited by Xavier FRANCOIS

Merge request reports

Loading