Skip to content

Add support for Pod Disruption Budget#287

Merged
mittal-ishaan merged 1 commit intoopencost:mainfrom
josephteddick:main
Jul 24, 2025
Merged

Add support for Pod Disruption Budget#287
mittal-ishaan merged 1 commit intoopencost:mainfrom
josephteddick:main

Conversation

@josephteddick
Copy link
Contributor

This PR intends to allow users to make OpenCost highly available by configuring a Pod Disruption Budget (affinity and replicas already present).

Fix for issue: #286

Copy link
Member

@mittal-ishaan mittal-ishaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @josephteddick

@ameijer
Copy link
Member

ameijer commented Jul 24, 2025

@josephteddick , does this mean when you run multiple replicas, you have multiple prom scrape targets, one for each OC? PR LGTM, just trying to understand

@josephteddick
Copy link
Contributor Author

josephteddick commented Jul 24, 2025

@josephteddick , does this mean when you run multiple replicas, you have multiple prom scrape targets, one for each OC? PR LGTM, just trying to understand

Nope, each replica has the same setup in that they are pointing to the service name for Prometheus. It's then up to internal routing for which pods (replica) it will go to and fetch the metrics (assuming Prometheus is also HA). You also don't have to worry about duplication because each replica will have it's own PVs.

High Availability here is mostly for the OpenCost API in that we can always hit it to get allocation metrics. Hope that helps.

@mittal-ishaan mittal-ishaan merged commit 12171e2 into opencost:main Jul 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants