Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(trivy): Read config from starboard-trivy-config ConfigMap #616

Merged
merged 1 commit into from
Jun 15, 2021

Conversation

danielpacak
Copy link
Contributor

@danielpacak danielpacak commented Jun 4, 2021

We started off with all config settings read from the starboard
ConfigMap and the starboard Secret. However, this does not scale
well with a number of plugins and configuration options.

This commit allows Triy plugin to read its settings from
the starboard-trivy-config ConfigMap and the starboard-trivy-config
Secret.

Signed-off-by: Daniel Pacak [email protected]

@codecov
Copy link

codecov bot commented Jun 4, 2021

Codecov Report

Merging #616 (2b246f1) into main (0f11ca6) will decrease coverage by 0.22%.
The diff coverage is 81.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #616      +/-   ##
==========================================
- Coverage   68.79%   68.56%   -0.23%     
==========================================
  Files          58       58              
  Lines        4387     4435      +48     
==========================================
+ Hits         3018     3041      +23     
- Misses       1030     1044      +14     
- Partials      339      350      +11     
Impacted Files Coverage Δ
pkg/cmd/scan_configauditreports.go 60.86% <ø> (+1.68%) ⬆️
pkg/plugin/aqua/plugin.go 0.00% <0.00%> (ø)
pkg/starboard/config.go 70.07% <ø> (-0.65%) ⬇️
pkg/starboard/plugin.go 51.85% <ø> (ø)
pkg/operator/operator.go 62.77% <33.33%> (-0.66%) ⬇️
pkg/cmd/installer.go 50.00% <58.33%> (+0.95%) ⬆️
pkg/cmd/cleanup.go 60.00% <60.00%> (-2.50%) ⬇️
pkg/cmd/init.go 79.48% <60.00%> (-3.37%) ⬇️
pkg/plugin/trivy/plugin.go 85.11% <93.02%> (-0.55%) ⬇️
pkg/cmd/root.go 100.00% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f11ca6...2b246f1. Read the comment docs.

@danielpacak danielpacak force-pushed the refactor_trivy_config branch from 4e3cf4e to 02312f2 Compare June 4, 2021 15:31
@danielpacak danielpacak requested a review from itaysk June 4, 2021 15:32
@itaysk
Copy link

itaysk commented Jun 9, 2021

I skimmed through it. looks good, but I wasn't sure if you needed to also update the config defaults for the init command use-case?

@danielpacak danielpacak force-pushed the refactor_trivy_config branch from 02312f2 to 7091850 Compare June 10, 2021 15:55
@danielpacak
Copy link
Contributor Author

danielpacak commented Jun 10, 2021

I skimmed through it. looks good, but I wasn't sure if you needed to also update the config defaults for the init command use-case?

That's a good point. I've updated the PR to ensure default plugins config when init command is run. Previously I deferred it to scan commands. It was easier in terms of code, but not very intuitive. Now all ConfigMaps are created in the init command.

We started off with all config settings read from the starboard
ConfigMap and the starboard Secret. However, this does not scale
well with a number of plugins and configuration options.

This commit allows Triy plugin to read its settings from
the starboard-trivy-config ConfigMap and the starboard-trivy-config
Secret.

Signed-off-by: Daniel Pacak <[email protected]>
@danielpacak danielpacak force-pushed the refactor_trivy_config branch from 7091850 to 2b246f1 Compare June 14, 2021 06:14
@danielpacak danielpacak merged commit 8397fd2 into main Jun 15, 2021
@danielpacak danielpacak deleted the refactor_trivy_config branch June 15, 2021 12:17
@danielpacak danielpacak added this to the Release v0.11.0 milestone Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants