Extend marathon port discovery to allow port names as identifier
This commit is contained in:
parent
7900d266b1
commit
ec0075e0d0
4 changed files with 95 additions and 11 deletions
|
@ -53,10 +53,11 @@ func constraint(value string) func(*marathon.Application) {
|
|||
}
|
||||
}
|
||||
|
||||
func portDefinition(port int) func(*marathon.Application) {
|
||||
func portDefinition(port int, name string) func(*marathon.Application) {
|
||||
return func(app *marathon.Application) {
|
||||
app.AddPortDefinition(marathon.PortDefinition{
|
||||
Port: &port,
|
||||
Name: name,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue