Skip to content

Commit

Permalink
Support redissentinel can skip reconcile loop (#605)
Browse files Browse the repository at this point in the history
Signed-off-by: drivebyer <[email protected]>
  • Loading branch information
drivebyer authored Sep 4, 2023
1 parent 256afb8 commit a822623
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions controllers/redissentinel_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ func (r *RedisSentinelReconciler) Reconcile(ctx context.Context, req ctrl.Reques
}
return ctrl.Result{}, err
}

if _, found := instance.ObjectMeta.GetAnnotations()["redissentinel.opstreelabs.in/skip-reconcile"]; found {
reqLogger.Info("Found annotations redissentinel.opstreelabs.in/skip-reconcile, so skipping reconcile")
return ctrl.Result{RequeueAfter: time.Second * 10}, nil
}

// Get total Sentinel Replicas
// sentinelReplicas := instance.Spec.GetSentinelCounts("sentinel")

Expand Down

0 comments on commit a822623

Please sign in to comment.