Skip to content

Commit

Permalink
refactor: break plugin pod spec builder (#1594)
Browse files Browse the repository at this point in the history
* refactor: break plugin pod spec builder

Signed-off-by: chenk <[email protected]>

* refactor: break plugin pod spec builder

Signed-off-by: chenk <[email protected]>

* refactor: break plugin pod spec builder

Signed-off-by: chenk <[email protected]>

---------

Signed-off-by: chenk <[email protected]>
  • Loading branch information
chen-keinan authored Oct 28, 2023
1 parent 1f70670 commit 71b68df
Show file tree
Hide file tree
Showing 9 changed files with 2,325 additions and 2,179 deletions.
3 changes: 2 additions & 1 deletion pkg/operator/envtest/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ var _ = BeforeSuite(func() {
},
})
Expect(err).ToNot(HaveOccurred())

err = plugin.Init(pluginContext)
Expect(err).ToNot(HaveOccurred())
err = (&controller.WorkloadController{
Logger: ctrl.Log.WithName("reconciler").WithName("vulnerabilityreport"),
Config: config,
Expand Down
9 changes: 0 additions & 9 deletions pkg/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,6 @@ func Start(ctx context.Context, buildInfo trivyoperator.BuildInfo, operatorConfi
return err
}

err = plugin.Init(pluginContext)
if err != nil {
return fmt.Errorf("initializing %s plugin: %w", pluginContext.GetName(), err)
}

if err = (&vcontroller.WorkloadController{
Logger: ctrl.Log.WithName("reconciler").WithName("vulnerabilityreport"),
Config: operatorConfig,
Expand Down Expand Up @@ -268,10 +263,6 @@ func Start(ctx context.Context, buildInfo trivyoperator.BuildInfo, operatorConfi
if err != nil {
return fmt.Errorf("initializing %s plugin: %w", pluginContext.GetName(), err)
}
err = plugin.Init(pluginContext)
if err != nil {
return fmt.Errorf("initializing %s plugin: %w", pluginContext.GetName(), err)
}
var gitVersion string
if version, err := clientSet.ServerVersion(); err == nil {
gitVersion = strings.TrimPrefix(version.GitVersion, "v")
Expand Down
Loading

0 comments on commit 71b68df

Please sign in to comment.