Skip to content

Commit

Permalink
Merge pull request #2915 from rewantsoni/consumer-predicate
Browse files Browse the repository at this point in the history
controllers: watch for consumer annotation in mirroring controller
  • Loading branch information
openshift-merge-bot[bot] authored Dec 2, 2024
2 parents d8623c9 + a933f61 commit 99c5ee5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions controllers/mirroring/mirroring_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package mirroring
import (
"context"
"fmt"
controllers "github.com/red-hat-storage/ocs-operator/v4/controllers/storageconsumer"
"golang.org/x/exp/maps"
"k8s.io/utils/ptr"
"slices"
Expand All @@ -25,6 +24,7 @@ import (
ocsv1 "github.com/red-hat-storage/ocs-operator/api/v4/v1"
ocsv1alpha1 "github.com/red-hat-storage/ocs-operator/api/v4/v1alpha1"
providerClient "github.com/red-hat-storage/ocs-operator/services/provider/api/v4/client"
controllers "github.com/red-hat-storage/ocs-operator/v4/controllers/storageconsumer"
"github.com/red-hat-storage/ocs-operator/v4/controllers/util"

"github.com/go-logr/logr"
Expand Down Expand Up @@ -119,7 +119,12 @@ func (r *MirroringReconciler) SetupWithManager(mgr ctrl.Manager) error {
Watches(
&ocsv1alpha1.StorageConsumer{},
enqueueConfigMapRequest,
generationChangePredicate,
builder.WithPredicates(
predicate.Or(
predicate.AnnotationChangedPredicate{},
predicate.GenerationChangedPredicate{},
),
),
).
Watches(
&rookCephv1.CephBlockPool{},
Expand Down

0 comments on commit 99c5ee5

Please sign in to comment.