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 17:15:33 +02:00
parent 99482c8db8
commit 4231b9b6c8
1 changed files with 1 additions and 1 deletions

View File

@ -713,7 +713,7 @@ func (r *KustomizationReconciler) checkDependencies(kustomization kustomizev1.Ku
return fmt.Errorf("unable to get '%s' dependency: %w", depName, err)
}
if len(k.Status.Conditions) == 0 {
if len(k.Status.Conditions) == 0 || k.Generation != k.Status.ObservedGeneration {
return fmt.Errorf("dependency '%s' is not ready", depName)
}