Skip to content

Commit

Permalink
use config
Browse files Browse the repository at this point in the history
  • Loading branch information
taniyourstruly committed Aug 29, 2024
1 parent b6f0911 commit 56e4402
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions controllers/opentelemetrycollector_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,10 @@ type Params struct {

func (r *OpenTelemetryCollectorReconciler) Validate(otelcol v1beta1.OpenTelemetryCollector) admission.Warnings {
var warnings admission.Warnings

cfg := config.New(
config.WithCollectorImage("default-collector"),
config.WithTargetAllocatorImage("default-ta-allocator"),
)

params := manifests.Params{
Log: logr.Discard(),
Config: cfg,
Config: r.config,
OtelCol: otelcol,
}
_, err := collector.Build(params)
Expand Down

0 comments on commit 56e4402

Please sign in to comment.