diff options
author | 2019-07-04 01:09:12 +0530 | |
---|---|---|
committer | 2019-07-03 20:39:12 +0100 | |
commit | f9fb9db1715e074c7549548e72f1d29d5ddc268f (patch) | |
tree | bd06b9063a81b1549716aab9a13173c630b81516 /plugin/kubernetes/controller.go | |
parent | 2bd77d0823309c282197256cf9b3d8274578811d (diff) | |
download | coredns-f9fb9db1715e074c7549548e72f1d29d5ddc268f.tar.gz coredns-f9fb9db1715e074c7549548e72f1d29d5ddc268f.tar.zst coredns-f9fb9db1715e074c7549548e72f1d29d5ddc268f.zip |
ISSUE-2911 (#2923)
- Remove resyncperiod from Kubernetes plugin
Diffstat (limited to 'plugin/kubernetes/controller.go')
-rw-r--r-- | plugin/kubernetes/controller.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugin/kubernetes/controller.go b/plugin/kubernetes/controller.go index 634735584..f5a3e7ffd 100644 --- a/plugin/kubernetes/controller.go +++ b/plugin/kubernetes/controller.go @@ -80,7 +80,6 @@ type dnsControl struct { type dnsControlOpts struct { initPodCache bool initEndpointsCache bool - resyncPeriod time.Duration ignoreEmptyService bool // Label handling. @@ -110,7 +109,6 @@ func newdnsController(kubeClient kubernetes.Interface, opts dnsControlOpts) *dns WatchFunc: serviceWatchFunc(dns.client, api.NamespaceAll, dns.selector), }, &api.Service{}, - opts.resyncPeriod, cache.ResourceEventHandlerFuncs{AddFunc: dns.Add, UpdateFunc: dns.Update, DeleteFunc: dns.Delete}, cache.Indexers{svcNameNamespaceIndex: svcNameNamespaceIndexFunc, svcIPIndex: svcIPIndexFunc}, object.ToService, @@ -123,7 +121,6 @@ func newdnsController(kubeClient kubernetes.Interface, opts dnsControlOpts) *dns WatchFunc: podWatchFunc(dns.client, api.NamespaceAll, dns.selector), }, &api.Pod{}, - opts.resyncPeriod, cache.ResourceEventHandlerFuncs{AddFunc: dns.Add, UpdateFunc: dns.Update, DeleteFunc: dns.Delete}, cache.Indexers{podIPIndex: podIPIndexFunc}, object.ToPod, @@ -137,7 +134,6 @@ func newdnsController(kubeClient kubernetes.Interface, opts dnsControlOpts) *dns WatchFunc: endpointsWatchFunc(dns.client, api.NamespaceAll, dns.selector), }, &api.Endpoints{}, - opts.resyncPeriod, cache.ResourceEventHandlerFuncs{AddFunc: dns.Add, UpdateFunc: dns.Update, DeleteFunc: dns.Delete}, cache.Indexers{epNameNamespaceIndex: epNameNamespaceIndexFunc, epIPIndex: epIPIndexFunc}, object.ToEndpoints) @@ -149,7 +145,7 @@ func newdnsController(kubeClient kubernetes.Interface, opts dnsControlOpts) *dns WatchFunc: namespaceWatchFunc(dns.client, dns.namespaceSelector), }, &api.Namespace{}, - opts.resyncPeriod, + defaultResyncPeriod, cache.ResourceEventHandlerFuncs{}) return &dns @@ -516,3 +512,5 @@ func (dns *dnsControl) updateModifed() { } var errObj = errors.New("obj was not of the correct type") + +const defaultResyncPeriod = 0 |