-
Notifications
You must be signed in to change notification settings - Fork 7
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
--output
or-o
to 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>.log
or 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
--kubeconfig
flag, rather than duplicating them. I’ve had to manually remove these files multiple times and add a.gitignore
rule 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>