operator icon indicating copy to clipboard operation
operator copied to clipboard

can i convert scrape config to VMPodScrape cr?

Open hkmdxlftjf opened this issue 1 year ago • 1 comments

Hello, I would like to write code to convert existing configurations to VMPodScrape/VMNodeScrape. Is there any way to achieve this? Are there any codes that I can refer to? Thanks!

hkmdxlftjf avatar Apr 17 '24 06:04 hkmdxlftjf

Hello! Yes, vm-operator automatically convert existing Prometheus ServiceMonitor, PodMonitor, PrometheusRule, Probe and ScrapeConfig objects into corresponding VictoriaMetrics Operator objects by default. Check this doc for details. Code can be found in https://github.com/VictoriaMetrics/operator/blob/master/controllers/converter/apis.go.

Haleygo avatar Apr 19 '24 07:04 Haleygo

Closing as stale. Feel free to re-open.

f41gh7 avatar Aug 15 '24 17:08 f41gh7