Skip to content

exec_in_pods function can not handle pipe operator #143

@GDavid97

Description

@GDavid97

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions