chaostoolkit / chaostoolkit-kubernetes

Kubernetes driver extension of the Chaos Toolkit probes and actions API

Home Page:https://chaostoolkit.org/drivers/kubernetes/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exec_in_pods function can not handle pipe operator

GDavid97 opened this issue · comments

Describe the bug
I wanted to run the following action in a chaos toolkit test.
"provider": { "type": "python", "module": "chaosk8s.pod.actions", "func": "exec_in_pods", "arguments": { "cmd": "echo 'Hello world' | md5sum", "ns":"chaos", "name_pattern":"frontend*" }

Which is a simple example of the pipe operator, it should create the md5sum version of the 'Hello World' string.

However, I got the following result:
'Hello world | md5sum'

Which means it can not process the | operator, but it's considered to be a string.

Expected behavior
I want the ecex_in_pod function to be able to handle pipe - | - operator when using it in the command.