Take observed generation of deps into account

To prevent operations from being performed while they are "Ready",
but the latest generation of the depenceny has not been reconciled
yet.
This commit is contained in:
Hidde Beydals 2020-07-23 16:21:25 +02:00
parent 39fdfdfe66
commit 03e18ee14f
1 changed files with 1 additions and 1 deletions

View File

@ -363,7 +363,7 @@ func (r *HelmReleaseReconciler) checkDependencies(hr v2.HelmRelease) error {
return fmt.Errorf("unable to get '%s' dependency: %w", depName, err)
}
if len(depHr.Status.Conditions) == 0 {
if len(depHr.Status.Conditions) == 0 || depHr.Generation != depHr.Status.ObservedGeneration {
return fmt.Errorf("dependency '%s' is not ready", depName)
}