parca icon indicating copy to clipboard operation
parca copied to clipboard

Jsonnet: make scrape_configs in configmap configurable

Open yeya24 opened this issue 2 years ago • 4 comments

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.

yeya24 avatar Oct 14 '21 04:10 yeya24

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 avatar Feb 15 '22 00:02 maxbrunet

@maxbrunet That would be very helpful for us!

yeya24 avatar Feb 15 '22 05:02 yeya24

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:

metalmatze avatar Feb 15 '22 18:02 metalmatze

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:

Let me know if there is any interest to do something from that.

maxbrunet avatar Feb 17 '22 01:02 maxbrunet