grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.33k stars 182 forks source link

Add monitoring.coreos.com/v1 crds to alloy #173

Open itspooya opened 5 months ago

itspooya commented 5 months ago

Background

As I was checking the alloy and opportunity to move to alloy instead of grafana-agent, I found out that the crds for PodMonitor, ServiceMonitor, Probe, PodLogs are not present in alloy In the documents for Migrating grafana agent operator to alloy there is a part which states: "The Monitor types (PodMonitor, ServiceMonitor, Probe, and PodLogs) are all supported natively by Alloy." but without the crds, I think it is pointless

Proposal

I propose that we should add these crds and there should be a flag to enable to install them within values.yaml

hbjydev commented 5 months ago

Wouldn't it be better to install them separately? i.e. deploy them from the helm chart available for just the CRDs instead of bundling them? Stops them from getting out of date and breaking other tooling in your cluster at least

itspooya commented 5 months ago

It is a good idea, but I felt like that because agent-operator has these crds and alloy doesn't have them, maybe adding them was a good idea

sboulkour commented 4 months ago

Wouldn't it be better to install them separately? i.e. deploy them from the helm chart available for just the CRDs instead of bundling them? Stops them from getting out of date and breaking other tooling in your cluster at least

I would too use chart prometheus-operator-crds to deploy rather than use CRD shipped within Alloy chart. Decoupling CRD installation from the component chart that use those is a common best practice pushed by Helm team. See https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#some-caveats-and-explanations

Alloy documentation could be updated to point users to this CRD chart in installation steps. WDYT ?