diff --git a/internal/controller/telemetry/collector_controller.go b/internal/controller/telemetry/collector_controller.go index 88a1520..8e09ffe 100644 --- a/internal/controller/telemetry/collector_controller.go +++ b/internal/controller/telemetry/collector_controller.go @@ -200,7 +200,6 @@ func (r *CollectorReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( return ctrl.Result{}, err } - // NOTE: Might also be a good place to add a validation webhook to validate the config input if err := otelConfigInput.ValidateConfig(); isNoResourcesError(err) != nil { collector.Status.State = v1alpha1.StateFailed logger.Error(errors.WithStack(err), "invalid otel config input") @@ -567,3 +566,11 @@ func isNoResourcesError(err error) error { return err } + +func isNoResourcesError(err error) error { + if err == otelcolconfgen.ErrNoResources { + return nil + } + + return err +}