From a2edb5b64ecec9937cadde35929d1bc2cdbe0bc4 Mon Sep 17 00:00:00 2001 From: Djordje Lukic Date: Thu, 16 Jul 2020 10:01:49 +0200 Subject: [PATCH] Fix adding a tag to a container group --- azure/backend.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure/backend.go b/azure/backend.go index a605cb971..a1e541b32 100644 --- a/azure/backend.go +++ b/azure/backend.go @@ -196,16 +196,16 @@ func (cs *aciContainerService) Run(ctx context.Context, r containers.ContainerCo if err != nil { return err } - addTag(groupDefinition, singleContainerTag) + addTag(&groupDefinition, singleContainerTag) return createACIContainers(ctx, cs.ctx, groupDefinition) } -func addTag(groupDefinition containerinstance.ContainerGroup, tagName string) { +func addTag(groupDefinition *containerinstance.ContainerGroup, tagName string) { if groupDefinition.Tags == nil { groupDefinition.Tags = make(map[string]*string, 1) } - groupDefinition.Tags[tagName] = to.StringPtr("") + groupDefinition.Tags[tagName] = to.StringPtr(tagName) } func (cs *aciContainerService) Stop(ctx context.Context, containerName string, timeout *uint32) error { @@ -332,7 +332,7 @@ func (cs *aciComposeService) Up(ctx context.Context, opts cli.ProjectOptions) er } logrus.Debugf("Up on project with name %q\n", project.Name) groupDefinition, err := convert.ToContainerGroup(cs.ctx, *project) - addTag(groupDefinition, composeContainerTag) + addTag(&groupDefinition, composeContainerTag) if err != nil { return err