From 83247a631dda3d3501923458c53f37fb151ecbaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tanguy=20=E2=A7=93=20Herrmann?= Date: Fri, 7 Jul 2017 20:05:08 +0200 Subject: [PATCH] Support aliases for default pipeline network: pipeline_default --- pipeline/frontend/yaml/compiler/convert.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pipeline/frontend/yaml/compiler/convert.go b/pipeline/frontend/yaml/compiler/convert.go index 527efe3..85e1ad2 100644 --- a/pipeline/frontend/yaml/compiler/convert.go +++ b/pipeline/frontend/yaml/compiler/convert.go @@ -23,10 +23,18 @@ func (c *Compiler) createProcess(name string, container *yaml.Container) *backen // network = container.Network ) + aliases := []string{container.Name} + for _, n := range container.Networks.Networks { + // currently limited to the default network + if fmt.Sprintf("%s_default", c.prefix) == n.Name { + aliases = append(aliases, n.Aliases...) + } + } + networks := []backend.Conn{ backend.Conn{ Name: fmt.Sprintf("%s_default", c.prefix), - Aliases: []string{container.Name}, + Aliases: aliases, }, } for _, network := range c.networks {