This is an automated email from the ASF dual-hosted git repository.
ronething pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git
The following commit(s) were added to refs/heads/master by this push:
new 1156414f fix: remove duplicate sync func (#2476)
1156414f is described below
commit 1156414fc1b8de6b29009059ecd58749454548ee
Author: Ashing Zheng <[email protected]>
AuthorDate: Thu Jul 17 10:31:37 2025 +0800
fix: remove duplicate sync func (#2476)
Signed-off-by: ashing <[email protected]>
---
internal/manager/run.go | 31 -------------------------------
1 file changed, 31 deletions(-)
diff --git a/internal/manager/run.go b/internal/manager/run.go
index 54ee31c8..b48746c1 100644
--- a/internal/manager/run.go
+++ b/internal/manager/run.go
@@ -21,7 +21,6 @@ import (
"context"
"crypto/tls"
"os"
- "time"
"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/runtime"
@@ -172,36 +171,6 @@ func Run(ctx context.Context, logger logr.Logger) error {
return err
}
- go func() {
- setupLog.Info("starting provider sync")
- initalSyncDelay :=
config.ControllerConfig.ProviderConfig.InitSyncDelay.Duration
- time.AfterFunc(initalSyncDelay, func() {
- setupLog.Info("trying to initialize provider")
- if err := provider.Sync(ctx); err != nil {
- setupLog.Error(err, "unable to sync resources
to provider")
- return
- }
- })
-
- syncPeriod :=
config.ControllerConfig.ProviderConfig.SyncPeriod.Duration
- if syncPeriod < 1 {
- return
- }
- ticker := time.NewTicker(syncPeriod)
- defer ticker.Stop()
- for {
- select {
- case <-ticker.C:
- if err := provider.Sync(ctx); err != nil {
- setupLog.Error(err, "unable to sync
resources to provider")
- return
- }
- case <-ctx.Done():
- return
- }
- }
- }()
-
setupLog.Info("check ReferenceGrants is enabled")
_, err = mgr.GetRESTMapper().KindsFor(schema.GroupVersionResource{
Group: v1beta1.GroupVersion.Group,