Skip to content

[kube-prometheus-stack] Create PodDisruptionBudget for each prometheus shard #5107

Open
@swar8080

Description

@swar8080

Is your feature request related to a problem ?

When sharding prometheus in the high-availability set-up, at least one prometheus pod per shard should always be running to avoid missing scrapes. PodDisruptionBudgets are helpful here

However, the PodDisruptionBudget created by this chart has label selectors that match on every prometheus pod. So if you're running with two shards each with two replicas for example, then you can't guarantee that only one pod per shard is disrupted at a time

Describe the solution you'd like.

When sharding is enabled, create a PodDisruptionBudget for each shard. The existing operator.prometheus.io/shard label could be used for the label selector

Describe alternatives you've considered.

Creating custom PodDisruptionBudgets instead of relying on this helm chart is always an option but its convenient if this chart handles this instead

Additional context.

I can implement this change

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions