From 4ac81d7508afdcb0c07f34ca4497cbb01b9b3989 Mon Sep 17 00:00:00 2001 From: xigang Date: Wed, 24 Jul 2019 09:40:29 +0800 Subject: [PATCH 1/2] Update the CleanupAndExit field for the Options and the OnServiceSynced for the ServiceHandler comment --- cmd/kube-proxy/app/server.go | 2 +- pkg/proxy/config/config.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/kube-proxy/app/server.go b/cmd/kube-proxy/app/server.go index 095a0c288dc..8c364a0311b 100644 --- a/cmd/kube-proxy/app/server.go +++ b/cmd/kube-proxy/app/server.go @@ -100,7 +100,7 @@ type Options struct { ConfigFile string // WriteConfigTo is the path where the default configuration will be written. WriteConfigTo string - // CleanupAndExit, when true, makes the proxy server clean up iptables rules, then exit. + // CleanupAndExit, when true, makes the proxy server clean up iptables and ipvs rules, then exit. CleanupAndExit bool // CleanupIPVS, when true, makes the proxy server clean up ipvs rules before running. CleanupIPVS bool diff --git a/pkg/proxy/config/config.go b/pkg/proxy/config/config.go index a2da9d4ef4c..6d16a376a3d 100644 --- a/pkg/proxy/config/config.go +++ b/pkg/proxy/config/config.go @@ -40,7 +40,7 @@ type ServiceHandler interface { // OnServiceDelete is called whenever deletion of an existing service // object is observed. OnServiceDelete(service *v1.Service) - // OnServiceSynced is called once all the initial even handlers were + // OnServiceSynced is called once all the initial event handlers were // called and the state is fully propagated to local cache. OnServiceSynced() } From 76aceca22fc1cf06a3085e9c157a67f47ebd6224 Mon Sep 17 00:00:00 2001 From: xigang Date: Wed, 24 Jul 2019 09:42:13 +0800 Subject: [PATCH 2/2] bugfix: panic log params in the construct method when maxInterval is less than minInterval --- pkg/util/async/bounded_frequency_runner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/async/bounded_frequency_runner.go b/pkg/util/async/bounded_frequency_runner.go index 20a06ad668a..5d74d53b13c 100644 --- a/pkg/util/async/bounded_frequency_runner.go +++ b/pkg/util/async/bounded_frequency_runner.go @@ -140,7 +140,7 @@ func NewBoundedFrequencyRunner(name string, fn func(), minInterval, maxInterval // Make an instance with dependencies injected. func construct(name string, fn func(), minInterval, maxInterval time.Duration, burstRuns int, timer timer) *BoundedFrequencyRunner { if maxInterval < minInterval { - panic(fmt.Sprintf("%s: maxInterval (%v) must be >= minInterval (%v)", name, minInterval, maxInterval)) + panic(fmt.Sprintf("%s: maxInterval (%v) must be >= minInterval (%v)", name, maxInterval, minInterval)) } if timer == nil { panic(fmt.Sprintf("%s: timer must be non-nil", name))