From a8226235cae1cbe659f18dd9f9aa9ae97bd720e1 Mon Sep 17 00:00:00 2001 From: yangw Date: Mon, 4 Sep 2023 20:51:51 +0800 Subject: [PATCH] Support redissentinel can skip reconcile loop (#605) Signed-off-by: drivebyer --- controllers/redissentinel_controller.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/controllers/redissentinel_controller.go b/controllers/redissentinel_controller.go index 8ba489d0f..b4b0b02bf 100644 --- a/controllers/redissentinel_controller.go +++ b/controllers/redissentinel_controller.go @@ -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")