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
First stab at distinct health check ports #751
base: staging
Are you sure you want to change the base?
Conversation
@beastawakens thanks for the pr. We will look into it |
if s.Health.Port.Port == 0 && s.Port.Port > 0 { | ||
m.Services[i].Health.Port.Port = s.Port.Port | ||
if s.Port.Scheme != "" { | ||
m.Services[i].Health.Port.Scheme = s.Port.Scheme | ||
} else { | ||
m.Services[i].Health.Port.Scheme = "http" | ||
} | ||
} | ||
|
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 will happen if health port is defined but health scheme is not defined?
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.
As the code shows, if you don't define the scheme, it will default to http.
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.
I am asking when health port is defined case. i can see in the code if health port defined the it will not execute the scheme condition in here
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.
Oh, I see, sorry I misunderstood 😆 Yeah, I may have missed that... let me update!
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.
@nightfury1204 added default now, thank you!
What is the feature/fix?
Allows to define a health check and liveness port separate from the main service port. This is useful in situations where the service is listening on one port which you want to expose via a load balancer, so you define that port under the
ports
list, but this would mean the health/liveness check would not run as it relies on the port being defined underport
.It would also allow for a service that exposes multiple ports but you would wish to keep the health/liveness port not exposed beyond the rack, so you define that separately.
Does it has a breaking change?
I don't believe so. The manifest is setup to default the port to the service port if it is not defined already.
How to use/test it?
Specify a port under the the health/liveness sections of your convox.yml
Checklist