-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Hello!
I observed that after running the krknctl graph run command, log outputs for individual test scenarios are generated in the same directory, as shown below.
Some observations that could help improve krknctl for automation:
-
It would be helpful to have a flag like
--outputor-oto control the output path for log files. Currently, they are written to the same directory from which the krknctl command is executed. -
The current naming convention for these log files appears to follow the format
krknctl-<testname>-<random-id>.log, which can make it tricky with using pattern matching to read them. Since each testname in the graph JSON is already unique, it would be more convenient to use a simpler format such askrknctl-<testname>.logor just<testname>.log. -
I also noticed that the kubeconfig files for the cluster are copied again into the execution directory. It would be better to either clean up these files automatically or directly reference the original path provided with the
--kubeconfigflag, rather than duplicating them. I’ve had to manually remove these files multiple times and add a.gitignorerule to prevent them from being checked into version control.
A simple example that can be used to reproduce these findings:
{
"B": {
"image": "containers.krkn-chaos.dev/krkn-chaos/krkn-hub:dummy-scenario",
"name": "dummy-scenario",
"env": {
"END": "10",
"EXIT_STATUS": "0"
},
"depends_on": "A"
},
"A": {
"image": "containers.krkn-chaos.dev/krkn-chaos/krkn-hub:dummy-scenario",
"name": "dummy-scenario",
"env": {
"END": "10",
"EXIT_STATUS": "0"
}
}
}Command: krknctl graph run test.json --kubeconfig=<path-to-kubeconfig.yaml>
