From 9d0642d8de1a8c4ab98b678927511aa161777674 Mon Sep 17 00:00:00 2001 From: Stanislav Karkavin Date: Mon, 11 Feb 2019 19:02:02 +0300 Subject: [PATCH] Add Labels to SwarmNode --- context.go | 1 + generator.go | 1 + 2 files changed, 2 insertions(+) diff --git a/context.go b/context.go index 80a6bd7d..4c53e487 100644 --- a/context.go +++ b/context.go @@ -135,6 +135,7 @@ type SwarmNode struct { ID string Name string Address Address + Labels map[string]string } type Mount struct { diff --git a/generator.go b/generator.go index bf68be66..8f7afd59 100644 --- a/generator.go +++ b/generator.go @@ -434,6 +434,7 @@ func (g *generator) getContainers() ([]*RuntimeContainer, error) { runtimeContainer.Node.Address = Address{ IP: container.Node.IP, } + runtimeContainer.Node.Labels = container.Node.Labels } for _, v := range container.Mounts {