-
Notifications
You must be signed in to change notification settings - Fork 8
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 usage of a specific endpoint port #11
Conversation
Can you add a message on the commit to explain the intent of the change. It's not clear why we need to override the port and why we need a specific port for authentication. |
When pulling cluster from Consul, the port exposed is not necessarily the one that must be used in order to authenticate on the cluster. This feature allows to set a different endpoint pot to authenticate on the ElasticSearch cluster. By default, the endpoint port is the one exposed in Consul. Signed-off-by: f.bouzghaia <f.bouzghaia@criteo.com>
cmd/serve.go
Outdated
@@ -19,6 +19,7 @@ type ServeCmd struct { | |||
CleaningPeriod time.Duration `default:"600s" help:"prometheus metrics cleaning interval (for vanished nodes)"` | |||
ElasticsearchConsulTag string `default:"maintenance-elasticsearch" help:"elasticsearch consul tag"` | |||
ElasticsearchEndpointSuffix string `default:".service.{dc}.foo.bar" help:"Suffix to add after the consul service name to create a valid domain name"` | |||
ElasticsearchEndpointPort int `default:"-1" help:"Elasticsearch port used for cluster authentication"` |
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.
Default should be 0 to be consistent with how Golang handle defaults (int defaults to 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.
Done
cmd/serve.go
Outdated
@@ -19,6 +19,7 @@ type ServeCmd struct { | |||
CleaningPeriod time.Duration `default:"600s" help:"prometheus metrics cleaning interval (for vanished nodes)"` | |||
ElasticsearchConsulTag string `default:"maintenance-elasticsearch" help:"elasticsearch consul tag"` | |||
ElasticsearchEndpointSuffix string `default:".service.{dc}.foo.bar" help:"Suffix to add after the consul service name to create a valid domain name"` | |||
ElasticsearchEndpointPort int `default:"-1" help:"Elasticsearch port used for cluster authentication"` |
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.
You specify cluster authentication
but the port will be used for all cluster levels calls (snapshot, durability, ...)
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.
Done
Default value for int is 0 for GoLang Signed-off-by: f.bouzghaia <f.bouzghaia@criteo.com>
Signed-off-by: f.bouzghaia <f.bouzghaia@criteo.com>
When pulling cluster from Consul, the port exposed is not
necessarily the one that must be used in order to authenticate
on the cluster. This feature allows to set a different endpoint
pot to authenticate on the ElasticSearch cluster.
By default, the endpoint port is the one exposed in Consul.