Open yeya24 opened 2 years ago
I have written a couple rudimentary Jsonnet functions that provide an experience similar to PodMonitor
/ServiceMonitor
from the prometheus-operator
(promcfg.go), but not sure if this is something you would want to deal with in the repo at this point (a parca operator would be better but definitly way too early for that)
@maxbrunet That would be very helpful for us!
Very cool. Yeah, I'm not sure if we want these objects directly in Parca itself. We never really discussed a Parca Operator so far, so it'd be interesting to get other opinions on this matter. :relaxed:
I have shared the utilities here for now: https://github.com/maxbrunet/parca-jsonnet-libs
Basically, s/(Pod|Service)Monitors/\1Profilers/
.
Here is the interesting usage bit: maxbrunet/parca-jsonnet-libs@743f821
/examples/parca.libsonnet#L10-L69
Their implementation:
main
/scrape-configs/podprofilers.libsonnetmain
/scrape-configs/serviceprofilers.libsonnetLet me know if there is any interest to do something from that.
Now in the jsonnet lib, the configmap is very basic and doesn't support adding additional scrape configs. For us who still rely on getting memory profiles via /pprof, it is not easy to configure it now.