Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore invalid CRDs and pick up valid CRDs with TargetAllocator #2309

Closed
rashmichandrashekar opened this issue Nov 4, 2023 · 1 comment
Closed
Labels
bug Something isn't working needs triage

Comments

@rashmichandrashekar
Copy link
Contributor

rashmichandrashekar commented Nov 4, 2023

Component(s)

target allocator

What happened?

Description

When a podmonitor/svcmonitor CRD has an erraneous field for regex in the relabeling/metric relabeling fields, the crd creation succeeds since it can be a valid string but not a valid regex( ex- .*( ). This causes any subsequent valid CRDs being created from getting picked up.

Steps to Reproduce

Create a podmonitor/svc monitor CRD with invalid regex (ex - .*()

Expected Result

This only generates the config without actually validating the pod/service monitors selected. It should follow a similar approach to prometheus-operator's resource selector where all the monitors are looped through and validated and the invalid ones are rejected.

Actual Result

All CRDs fail to be applied when one crd is error prone

Kubernetes Version

1.25.11

Operator version

v0.85.0

Collector version

v0.85.0

Environment information

No response

Log output

{"level":"error","ts":"2023-11-04T20:33:52Z","logger":"setup","msg":"Unable to load configuration","error":"error parsing regexp: missing closing ): ^(?:.*()$","stacktrace":"main.main.func13\n\t/app/main.go:228\ngithub.com/oklog/run.(*Group).Run.func1\n\t/go/pkg/mod/github.com/oklog/run@v1.1.0/group.go:38"}

Additional context

No response

@jaronoff97
Copy link
Contributor

closed by #2328 thank you again @rashmichandrashekar !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

2 participants