From aa3b3413953ccb581b59407e3f4524266dc4d064 Mon Sep 17 00:00:00 2001 From: "jakub.coufal" Date: Thu, 15 Mar 2018 15:06:31 +0100 Subject: [PATCH] Fixed config conditions, pass through Verbose flag to init containers --- config/cmd/initializer.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/config/cmd/initializer.go b/config/cmd/initializer.go index 3870d60..3da313b 100644 --- a/config/cmd/initializer.go +++ b/config/cmd/initializer.go @@ -225,15 +225,15 @@ func calculateDynamicConfig(c *config, a map[string]string, deployment *v1.Deplo var d = dynamicConfig{} var ok bool - if d.containerName, ok = a[c.AnnotationPrefix+"container-name"]; ok { + if d.containerName, ok = a[c.AnnotationPrefix+"container-name"]; !ok { d.containerName = c.DefaultContainerName } - if d.volumeName, ok = a[c.AnnotationPrefix+"volume-name"]; ok { + if d.volumeName, ok = a[c.AnnotationPrefix+"volume-name"]; !ok { d.volumeName = c.DefaultVolumeName } - if d.volumeMount, ok = a[c.AnnotationPrefix+"volume-mount"]; ok { + if d.volumeMount, ok = a[c.AnnotationPrefix+"volume-mount"]; !ok { d.volumeMount = c.DefaultVolumeMount } @@ -277,6 +277,10 @@ func calculateImageArgs(c *config, a map[string]string, deployment *v1.Deploymen application = deployment.Name } + if Verbose { + extra = append(extra, "-v") + } + return append([]string{"get", mode, "--source", source, "--application", application, "--profile", profile, "--label", label}, extra...), nil }