Seems that vm-operator while trying to convert it to VMScrapeConfig it tries to do some weird stuff with "resourceVersion" entity... I guess it shouldn't try to convert it. Not sure if it tries same stuff with uuid.
Anyway it fails:
{"level":"error","ts":"2024-04-27T09:02:06Z","logger":"controller","msg":"cannot get existing vmScrapeConfig","kind":"vmScrapeConfig","name":"smartctl-exporter-nas","ns":"o11y","error":"resourceVersion should not be set on objects to be created","stacktrace":"github.com/VictoriaMetrics/operator/controllers.(*ConverterController).UpdateScrapeConfig\n\tgithub.com/VictoriaMetrics/operator/controllers/vmprometheusconverter_controller.go:651\nk8s.io/client-go/tools/cache.ResourceEventHandlerFuncs.OnUpdate\n\tk8s.io/client-go@v12.0.0+incompatible/tools/cache/controller.go:250\nk8s.io/client-go/tools/cache.(*processorListener).run.func1\n\tk8s.io/client-go@v12.0.0+incompatible/tools/cache/shared_informer.go:971\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\tk8s.io/apimachinery@v0.29.2/pkg/util/wait/backoff.go:226\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\tk8s.io/apimachinery@v0.29.2/pkg/util/wait/backoff.go:227\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tk8s.io/apimachinery@v0.29.2/pkg/util/wait/backoff.go:204\nk8s.io/apimachinery/pkg/util/wait.Until\n\tk8s.io/apimachinery@v0.29.2/pkg/util/wait/backoff.go:161\nk8s.io/client-go/tools/cache.(*processorListener).run\n\tk8s.io/client-go@v12.0.0+incompatible/tools/cache/shared_informer.go:967\nk8s.io/apimachinery/pkg/util/wait.(*Group).Start.func1\n\tk8s.io/apimachinery@v0.29.2/pkg/util/wait/wait.go:72"}
Hey,
I've created the following Prometheus scrape config:
Which after all flux and k8s magic ended up to be:
Seems that vm-operator while trying to convert it to VMScrapeConfig it tries to do some weird stuff with "resourceVersion" entity... I guess it shouldn't try to convert it. Not sure if it tries same stuff with uuid. Anyway it fails: