runtime plugin extensibility #529
Replies: 1 comment 1 reply
-
👋 @xtreme-conor-nosal I do agree that such plugins ecosystem as you described would be very beneficial in long term. However, up until now we haven't seen many PRs with new plugins so adding another abstraction on top of Go interfaces might introduce unnecessary complexity. Especially that currently defined plugin interfaces (configauditreport.Plugin and vulnerabilityreport.Plugin) are just incubating and are subject to frequent changes. Moving plugins out to their own repositories implies that Starboard and a plugin have different life cycles, which adds up to the complexity and release management to keep them compatible. Regarding interprocess communications between [let's call it] Starboard core and plugin logic it has to be considered very carefully. The response from a plugin must be reliable and ideally do not block a reconciliation loop for too long. Otherwise Starboard operator will have hard time catching up with incoming work items. With a [local] Go method call we're less prone to such problems. Having said all that we'd love to continue the discussion and elaborate the definition of plugins as well as plugins ecosystem but in small steps. For example, before we change any code I'd like to see a high level diagram that shows how different components (Starboard operator pod, pods controlled by scan job, and plugin [pods?]) interact and how does that compare to the current (v0.10) deployment. Besides do you have any idea for new plugins or new types of plugins that you'd like to contribute near-term? If so we can prioritise such RFE differently. /cc @itaysk |
Beta Was this translation helpful? Give feedback.
-
Plugins are currently defined within the starboard repo. This adds overhead when creating plugins for new scanners as PRs must be accepted and new builds published before a new plugin can be used.
An alternative approach is to allow new plugins to be defined at deploy time from external codebases. This would allow new plugins to be used and updated without having to modify the starboard repo directly. Decoupling the plugin implementations from the core Starboard framework could help grow an ecosystem of third party plugins.
A possible reference for implementation is Hashicorp's go-plugin framework that allows a plugin to communicate with a host process over RPC by implementing a go interface (e.g.
vulnerabilityreport.Plugin
).An incremental path forward could be to add a new plugin to Starboard that can act as a bridge to future out-of-repo plugins (e.g. a hypothetical
pkg/plugins/rpc_vulnerabilityreport
and appropriate configuration added to the starboard configuration to enable it). This would allow extending functionality without requiring immediate changes to the existing in-repo plugins, but would allow for them to eventually be moved out to their own repos (e.g. starboard-plugin-trivy).Would the maintainers be interested in exploring this approach, or open to PR?
Beta Was this translation helpful? Give feedback.
All reactions