This is an automated email from the ASF dual-hosted git repository.

tokers 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 33ceff0  chore: change default resync period to 6 hours (#161)
33ceff0 is described below

commit 33ceff08b011b70297c787bafd56e974071c6216
Author: kv <[email protected]>
AuthorDate: Fri Jan 8 21:37:26 2021 +0800

    chore: change default resync period to 6 hours (#161)
---
 conf/config-default.json                        | 2 +-
 conf/config-default.yaml                        | 4 ++--
 pkg/config/config.go                            | 5 +++--
 samples/deploy/configmap/apisix-ingress-cm.yaml | 4 ++--
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/conf/config-default.json b/conf/config-default.json
index 44f53cb..c7f5051 100644
--- a/conf/config-default.json
+++ b/conf/config-default.json
@@ -5,7 +5,7 @@
   "enable_profiling": true,
   "kubernetes": {
     "kubeconfig": "",
-    "resync_interval": "60s"
+    "resync_interval": "6h"
   },
   "apisix": {
     "base_url": "http://127.0.0.1:9080/apisix/admin";
diff --git a/conf/config-default.yaml b/conf/config-default.yaml
index 7ff9978..4ae211d 100644
--- a/conf/config-default.yaml
+++ b/conf/config-default.yaml
@@ -35,8 +35,8 @@ enable_profiling: true # enable profileing via web interfaces
 kubernetes:
   kubeconfig: ""         # the Kubernetes configuration file path, default is
                          # "", so the in-cluster configuration will be used.
-  resync_interval: "60s" # how long should apisix-ingress-controller
-                         # re-synchronizes with Kubernetes, default is 60s,
+  resync_interval: "6h" # how long should apisix-ingress-controller
+                         # re-synchronizes with Kubernetes, default is 6h,
                          # and the minimal resync interval is 30s.
 
 # APISIX related configurations.
diff --git a/pkg/config/config.go b/pkg/config/config.go
index ac26a30..75d00a4 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -21,8 +21,9 @@ import (
        "strings"
        "time"
 
-       "github.com/api7/ingress-controller/pkg/types"
        "gopkg.in/yaml.v2"
+
+       "github.com/api7/ingress-controller/pkg/types"
 )
 
 const (
@@ -63,7 +64,7 @@ func NewDefaultConfig() *Config {
                EnableProfiling: true,
                Kubernetes: KubernetesConfig{
                        Kubeconfig:     "", // Use in-cluster configurations.
-                       ResyncInterval: types.TimeDuration{time.Minute},
+                       ResyncInterval: types.TimeDuration{6 * time.Hour},
                },
        }
 }
diff --git a/samples/deploy/configmap/apisix-ingress-cm.yaml 
b/samples/deploy/configmap/apisix-ingress-cm.yaml
index 5781d6f..66338da 100644
--- a/samples/deploy/configmap/apisix-ingress-cm.yaml
+++ b/samples/deploy/configmap/apisix-ingress-cm.yaml
@@ -40,8 +40,8 @@ data:
    kubernetes:
      kubeconfig: ""         # the Kubernetes configuration file path, default 
is
                             # "", so the in-cluster configuration will be used.
-     resync_interval: "60s" # how long should apisix-ingress-controller
-                            # re-synchronizes with Kubernetes, default is 60s,
+     resync_interval: "6h" # how long should apisix-ingress-controller
+                            # re-synchronizes with Kubernetes, default is 6h,
                             # and the minimal resync interval is 30s.
 
    # APISIX related configurations.

Reply via email to