You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to build a plugin that needs to run a simple task, which will always output everything in plain text format into the stdout and exit with either 0 or 1. Based on that, I believe it makes sense to make use of the result-format: raw format.
The problem is that no matter the exit code I use, sonobuoy interprets it as a success, just because it could stat the file with the outcomes, as stated here:
// RawProcessFile will return an Item object with the File value set to the path in question. If the
// file is unable to be stat'd then the status of the Item is StatusFailed (StatusPassed otherwise).
It would be nice to have this result to take the container exit code into consideration, as the report could be a success or failure, not depending on the file existing or not, but based on the exit code.
Describe the solution you'd like
I am trying to build a plugin that needs to run a simple task, which will always output everything in plain text format into the stdout and exit with either
0
or1
. Based on that, I believe it makes sense to make use of theresult-format: raw
format.The problem is that no matter the exit code I use, sonobuoy interprets it as a
success
, just because it couldstat
the file with the outcomes, as stated here:sonobuoy/pkg/client/results/raw.go
Lines 26 to 27 in 6f9e27f
It would be nice to have this result to take the container exit code into consideration, as the report could be a success or failure, not depending on the file existing or not, but based on the exit code.
Anything else you would like to add:
Here's an example plugin config:
Being executed with:
Environment:
/etc/os-release
): MacOSThe text was updated successfully, but these errors were encountered: