From 7b799d0d76f11d0c9d6a55ae5829e9403b5e9cb3 Mon Sep 17 00:00:00 2001 From: Italo Santos Date: Thu, 25 Feb 2021 16:23:07 -0300 Subject: [PATCH] fix: add event arg and validate pgrep (#45) --- cli/cmd/kubernetes/job/python.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cli/cmd/kubernetes/job/python.go b/cli/cmd/kubernetes/job/python.go index 75a702c..02b512c 100644 --- a/cli/cmd/kubernetes/job/python.go +++ b/cli/cmd/kubernetes/job/python.go @@ -24,7 +24,11 @@ func (p *pythonCreator) create(targetPod *apiv1.Pod, cfg *data.FlameConfig) (str cfg.TargetConfig.ContainerId, cfg.TargetConfig.Duration.String(), string(cfg.TargetConfig.Language), - cfg.TargetConfig.Pgrep, + string(cfg.TargetConfig.Event), + } + + if cfg.TargetConfig.Pgrep != "" { + args = append(args, cfg.TargetConfig.Pgrep) } if cfg.TargetConfig.Image != "" {