Skip to content

Commit

Permalink
Merge pull request #980 from fluxcd/fast-recovery
Browse files Browse the repository at this point in the history
fix: Retry when artifacts are available in storage
  • Loading branch information
stefanprodan authored Oct 5, 2023
2 parents 768968d + ef135a1 commit 1fb27b8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/controller/kustomization_indexers.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"context"
"fmt"

"github.com/fluxcd/pkg/runtime/conditions"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/handler"
Expand Down Expand Up @@ -56,9 +57,9 @@ func (r *KustomizationReconciler) requestsForRevisionChangeOf(indexKey string) h
}
var dd []dependency.Dependent
for _, d := range list.Items {
// If the revision of the artifact equals to the last attempted revision,
// we should not make a request for this Kustomization
if repo.GetArtifact().HasRevision(d.Status.LastAttemptedRevision) {
// If the Kustomization is ready and the revision of the artifact equals
// to the last attempted revision, we should not make a request for this Kustomization
if conditions.IsReady(&d) && repo.GetArtifact().HasRevision(d.Status.LastAttemptedRevision) {
continue
}
dd = append(dd, d.DeepCopy())
Expand Down

0 comments on commit 1fb27b8

Please sign in to comment.