Skip to content

Avoid pyroscope.ebpf to run without targets #3952

@luweglarz

Description

@luweglarz

Background

I am deploying Alloy as a DaemonSet with the pyroscope.ebpf component with discovery.kubernetes targets matching a specific label, like

discovery.kubernetes "k8s_ebpf_pods" {
      role = "pod"
      selectors {
        role  = "pod"
        label = "pyroscope.io/ebpf=true"
      }
}

When this label is not set on any pods of the node where Alloy is deployed, the targets are empty but we still have the pyroscope.ebpf component running and using resources for nothing.

Proposal

A way to enable pyroscope.ebpf component only if it has available targets, I would be happy to look into it if you think this would be an interesting features to be handled on Alloy side

Metadata

Metadata

Assignees

Labels

area/pyroscopeIssues/PRs primarly affecting `pyroscope.` componentsc/pyroscope.ebpfproposalA proposal for new functionality.

Type

No type

Projects

Status

Incoming

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions