From 6f35a5742313a8406bcc197e0696c504d18793ff Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 17 Jul 2019 12:46:31 -0400 Subject: Fix play kube command Before, play kube wasn't properly setting the command. Fix this Also, begin a dedicated test suite for play kube to catch regressions like this in the future Signed-off-by: Peter Hunt --- pkg/adapter/pods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/adapter/pods.go') diff --git a/pkg/adapter/pods.go b/pkg/adapter/pods.go index b45b02d09..2ca4f228f 100644 --- a/pkg/adapter/pods.go +++ b/pkg/adapter/pods.go @@ -676,7 +676,7 @@ func kubeContainerToCreateConfig(ctx context.Context, containerYAML v1.Container if imageData != nil && imageData.Config != nil { containerConfig.Command = append(containerConfig.Command, imageData.Config.Entrypoint...) } - if len(containerConfig.Command) != 0 { + if len(containerYAML.Command) != 0 { containerConfig.Command = append(containerConfig.Command, containerYAML.Command...) } else if imageData != nil && imageData.Config != nil { containerConfig.Command = append(containerConfig.Command, imageData.Config.Cmd...) -- cgit v1.2.3-54-g00ecf