[checker] Checker bin, JSON config file, new Check interface#121
[checker] Checker bin, JSON config file, new Check interface#121kawmarco wants to merge 6 commits intosystemboot:masterfrom
Conversation
|
hey @kawmarco , thanks for the contribution! Could you please re-submit with DCO (just amend the commit with |
0cea717 to
cd6541a
Compare
Codecov Report
@@ Coverage Diff @@
## master #121 +/- ##
==========================================
- Coverage 50.17% 46.99% -3.19%
==========================================
Files 14 21 +7
Lines 562 798 +236
==========================================
+ Hits 282 375 +93
- Misses 252 391 +139
- Partials 28 32 +4
Continue to review full report at Codecov.
|
3d2ca90 to
34d9ed4
Compare
insomniacslk
left a comment
There was a problem hiding this comment.
I've done only a partial review, publishing it to unblock you.
Also note - several files have changed permissions with this commit, they have now an executable bit set where they should not
Signed-off-by: Marco Kawajiri <[email protected]>
Signed-off-by: Marco Kawajiri <[email protected]>
Signed-off-by: Marco Kawajiri <[email protected]>
Signed-off-by: Marco Kawajiri <[email protected]>
Signed-off-by: Marco Kawajiri <[email protected]>
Signed-off-by: Marco Kawajiri <[email protected]>
Signed-off-by: Marco Kawajiri <[email protected]>
Signed-off-by: Marco Kawajiri <[email protected]>
|
Discussed offline, we will reopen this one against uroot after the move is done |
checker/main.go) which accepts a JSON configuration file as input (--config-file), containing a list ofChecksCheckstructs to be more friendly to JSON configuration and JSON report output, thinking of the following workflowCheckFun(CheckArgs)functions, which contain the actual logic of the check, and "register" their functions usingregisterCheckFunoninit()(so that they are registered in a global map and we can then find the check functions by name at runtime)Checkstruct defines howCheckFunsshould be called, includingCheckArgs, possible remediations and metadata. The config file is achecklist(a list ofCheck)Check.Run()returns a JSON-friendlyCheckResult, containing the result of theCheckand the result of the configured remediationsTODO:
pkg/checker/checker.go