-
Notifications
You must be signed in to change notification settings - Fork 617
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
Allow routes to a service in warning status #117
Conversation
@magiconair in #116 you commented:
However, the field was renamed to |
@erikvanoosten Just use |
|
@@ -10,7 +10,7 @@ import ( | |||
// passingServices filters out health checks for services which have | |||
// passing health checks and where the neither the service instance itself | |||
// nor the node is in maintenance mode. | |||
func passingServices(checks []*api.HealthCheck) []*api.HealthCheck { | |||
func passingServices(checks []*api.HealthCheck, acceptableStatus []string) []*api.HealthCheck { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@svdberg please rename here also
Could you please rename the field in the config struct to BTW, is there a way for me to amend this change like in gerrit so that I don't have to bother you with this? |
Also, no need to squash the commits beforehand. I can do that in github now |
@magiconair you can just checkout the branch and ask @svdberg for push rights on his repo. |
c8f3821
to
8912c6f
Compare
Consul allows services to be in several states. This change allows fabio to consider more states as OK for routing than just 'passing' by configuring the set of allowed states.
Consul allows services to be in several states. This change allows fabio to consider more states as OK for routing than just 'passing' by configuring the set of allowed states.
8912c6f
to
11a666f
Compare
Consul allows services to be in several states. This change allows fabio to consider more states as OK for routing than just 'passing' by configuring the set of allowed states.
Currently Fabio only creates routes to services in the passing state. We have a use case for also wanting to use services in warning status. In consul the warning status indicates that the service is still good to go, but requires attention to keep it that way.
In this PR the acceptable statuses can be configured in fabio.properties where the default is just "passing" for backward compatibility.
As a bonus a few minor typos were fixed.
Unlike my previous attempt ( #116 ) this PR has a single squashed commit.