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

Make backoff MaxInterval and MaxElapsedTime configurable #33

Merged
merged 2 commits into from
Dec 4, 2016

Conversation

mikkeloscar
Copy link
Contributor

This makes the max interval and max elapsed time configurabel for the
exponential backoff used when getting a role based on source IP.

The defaults are still the same e.g. 1 minute for MaxInterval and 15
minutes for the MaxElapsedTime.

Fix #28

This makes the max interval and max elapsed time configurabel for the
exponential backoff used when getting a role based on source IP.

The defaults are still the same e.g. 1 minute for MaxInterval and 15
minutes for the MaxElapsedTime.

Fix jtblin#28
@@ -49,6 +50,8 @@ func addFlags(s *cmd.Server, fs *pflag.FlagSet) {
fs.BoolVar(&s.AddIPTablesRule, "iptables", false, "Add iptables rule (also requires --host-ip)")
fs.StringVar(&s.HostInterface, "host-interface", "docker0", "Host interface for proxying AWS metadata")
fs.StringVar(&s.HostIP, "host-ip", s.HostIP, "IP address of host")
fs.DurationVar(&s.BackoffMaxInterval, "backoff-max-interval", backoff.DefaultMaxInterval, "Max interval for backoff when querying for role.")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd rather change the defaults to some saner values. We probably don't want to retry for more than a few seconds actually, what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that makes sense. Updated to more sane defaults. Let me know what you think.

@jtblin jtblin merged commit 2734a63 into jtblin:master Dec 4, 2016
@jtblin
Copy link
Owner

jtblin commented Dec 4, 2016

Thanks!

@mikkeloscar mikkeloscar deleted the conf-backoff branch December 4, 2016 22:49
@mikkeloscar
Copy link
Contributor Author

Thanks, any chance you plan to cut a release with the latest changes? :)

@jtblin
Copy link
Owner

jtblin commented Dec 4, 2016

Yep gonna do this today real soon :)

@mikkeloscar
Copy link
Contributor Author

Awesome!

@jtblin
Copy link
Owner

jtblin commented Dec 5, 2016

mikkeloscar added a commit to zalando-incubator/kubernetes-on-aws that referenced this pull request Dec 5, 2016
Sets smaller timeout when getting role from Pod IP.

jtblin/kube2iam#33
negz pushed a commit to negz/kube2iam that referenced this pull request Feb 26, 2017
This makes the max interval and max elapsed time configurabe for the
exponential backoff used when getting a role based on source IP.

The defaults are still the same e.g. 1 minute for MaxInterval and 15
minutes for the MaxElapsedTime.

Fix jtblin#28

* Use sane max interval & max elapsed time defaults
negz pushed a commit to negz/kube2iam that referenced this pull request Feb 26, 2017
This makes the max interval and max elapsed time configurabe for the
exponential backoff used when getting a role based on source IP.

The defaults are still the same e.g. 1 minute for MaxInterval and 15
minutes for the MaxElapsedTime.

Fix jtblin#28

* Use sane max interval & max elapsed time defaults
negz pushed a commit to negz/kube2iam that referenced this pull request Feb 26, 2017
This makes the max interval and max elapsed time configurabe for the
exponential backoff used when getting a role based on source IP.

The defaults are still the same e.g. 1 minute for MaxInterval and 15
minutes for the MaxElapsedTime.

Fix jtblin#28

* Use sane max interval & max elapsed time defaults
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants