-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fixes #108 | Bounds checking for port index #145
Conversation
c602dbe
to
8e44a71
Compare
@@ -348,6 +349,15 @@ func (c *Consul) marathonToConsulChecks(task *apps.Task, healthChecks []apps.Hea | |||
return checks | |||
} | |||
|
|||
func getHealthCheckPort(check apps.HealthCheck, task apps.Task) (int, error) { | |||
if check.Port != 0 { |
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.
What if check.Port
will be a negative integer?
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.
Nothing, we will try to register it int consul. If this fail we will log error.
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.
IMO you should reject invalid health check port definition.
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.
Answer questions.
8e44a71
to
3f3afc5
Compare
No description provided.