Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add read/write timeout options for Typha connection. #1538

Merged
merged 1 commit into from
Aug 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions config/config_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ type Config struct {
EtcdCaFile string `config:"file(must-exist);;local"`
EtcdEndpoints []string `config:"endpoint-list;;local"`

TyphaAddr string `config:"authority;;"`
TyphaK8sServiceName string `config:"string;"`
TyphaK8sNamespace string `config:"string;kube-system;non-zero"`
TyphaAddr string `config:"authority;;"`
TyphaK8sServiceName string `config:"string;"`
TyphaK8sNamespace string `config:"string;kube-system;non-zero"`
TyphaReadTimeout time.Duration `config:"seconds;30"`
TyphaWriteTimeout time.Duration `config:"seconds;10"`

Ipv6Support bool `config:"bool;true"`
IgnoreLooseRPF bool `config:"bool;false"`
Expand Down
4 changes: 4 additions & 0 deletions felix.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@ configRetry:
fmt.Sprintf("Revision: %s; Build date: %s",
buildinfo.GitRevision, buildinfo.BuildDate),
syncerToValidator,
&syncclient.Options{
ReadTimeout: configParams.TyphaReadTimeout,
WriteTimeout: configParams.TyphaWriteTimeout,
},
)
} else {
// Use the syncer locally.
Expand Down
8 changes: 4 additions & 4 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import:
- package: k8s.io/client-go
version: 4a3ab2f5be5177366f8206fd79ce55ca80e417fa
- package: github.com/projectcalico/typha
version: ec14f2716227ed72aff32691071f4b450367930a
version: f8f62de1fd1b263b089a3453d1932dd2d8e08cdb
subpackages:
- pkg/syncclient
- package: github.com/emicklei/go-restful
Expand Down