cmd/swarm/swarm-smoke: add support for internal endpoints

This commit is contained in:
Anton Evangelatov 2019-01-22 10:28:51 +01:00
parent 94b3b0586a
commit 6dd6fa17d8
2 changed files with 6 additions and 0 deletions

View file

@ -49,6 +49,10 @@ func generateEndpoints(scheme string, cluster string, app string, from int, to i
for port := from; port < to; port++ {
endpoints = append(endpoints, fmt.Sprintf("%s://%v.swarm-gateways.net", scheme, port))
}
} else if cluster == "private-internal" {
for port := from; port < to; port++ {
endpoints = append(endpoints, fmt.Sprintf("%s://swarm-private-internal-%v:8500", scheme, port))
}
} else {
for port := from; port < to; port++ {
endpoints = append(endpoints, fmt.Sprintf("%s://%s-%v-%s.stg.swarm-gateways.net", scheme, app, port, cluster))

View file

@ -35,6 +35,8 @@ var endpoint string
func generateEndpoint(scheme string, cluster string, app string, from int) {
if cluster == "prod" {
endpoint = fmt.Sprintf("%s://%v.swarm-gateways.net", scheme, from)
} else if cluster == "private-internal" {
endpoint = fmt.Sprintf("%s://swarm-private-internal-%v:8500", scheme, from)
} else {
endpoint = fmt.Sprintf("%s://%s-%v-%s.stg.swarm-gateways.net", scheme, app, from, cluster)
}