Hey folks, what are our thoughts on sharing fields...
# development
c
Hey folks, what are our thoughts on sharing fields between plugins? I'm adding Trivy as a linter for Helm and the
kubernetes_version
is almost certainly the same between
kubeconform
and
trivy
. Does anyone have a practical or moral objection to me pulling that field into common Helm things and using it in both plugins?
w
I dont use Helm, but when you say “almost certainly”, how almost are we looking at?
My gut feel is to typically keep config isolated on a per-backend basis
c
I honestly cannot imagine a case when you'd want them to be different. I think setting these differently would be indescribably cursed, but that won't stop someone from trying it like https://xkcd.com/1172/
😆 2
w
Yeah, this might be a domain expert thing. If it’s genuinely a rare/broken event - then maybe starting off sharing them makes sense until someone complains?
h
Maybe this can all go in the same backend? I feel like we have way too many of them
w
Each of these requires its own standalone tool, doesnt it?
h
Yes, but backends can support multiple tools
c
Yeah both of these will be in the Helm backend. Trivy is multi-backend so common code will be in the tools folder
w
Is that what we're talking about @happy-kitchen-89482 I thought you meant those tools would all be part of a single backend?
h
I was wondering if the common helm things and trivy could all live in the existing helm backend. But if trivy is more general then I guess not.
For context I have no idea what trivy is...
c
Trivy is a scanner for secrets, infra misconfiguration (terraform and helm), and docker images. I've put the general trivy rules in tools, and the rules specific to each backend in a folder in that backend.