Comments (3)
This is a problem that unfortunately affects metrics collection for any short-lived workload (I was working on the same issue for serverless recently). So, it's not just a descheduler issue and I don't think a deadline setting like you proposed is technically the right solution. I don't know if the Prometheus community has come to a broader solution for this type of problem.
Ultimately, short-lived workloads benefit from exporting their metrics to a listening server, rather than the Prometheus standard of waiting to be scraped by a server. This is how OpenTelemetry metrics work, and when a workload shuts down all metrics in memory are flushed to the collection endpoint.
So I think to really address this, we should consider updating our metrics implementation to use OpenTelemetry. We already use Otel for traces, so there is some benefit to using both. But the good news is we could do this without breaking existing Prometheus users either by:
- Use the Otel Prometheus bridge with our current prom instrumentation
- Switch our instrumentation entirely to Otel and use the Prometheus exporter to keep providing a prometheus endpoint
@yutkin Unfortunately this still doesn't fix your problem, because you're using a Prometheus server to scrape the endpoint. But if we implement Otel metrics, you could run an OpenTelemetry Collector with otlp receiver and Prometheus exporter, then point your Prometheus agent at that endpoint.
from descheduler.
Here is another option:
Prometheus has a push gateway for handling this, https://github.com/prometheus/pushgateway. I'm not super familiar with push gateway, but I believe the descheduler code would need to be updated to have an option to push metrics when running as a Job or CronJob.
from descheduler.
Related Issues (20)
- 1.29: Update CI in test-infra HOT 1
- Create v0.29.0 tag on master HOT 1
- Promote v0.29.0 docker image HOT 1
- Helm chart version update to v0.29.0 HOT 1
- Cut release-1.29 branch HOT 1
- Publish v0.29.0 GitHub release HOT 1
- Email sig mailing list HOT 1
- Should we upgrade go version to 1.21? HOT 1
- Fix code scanning alert - ssh: Prefix truncation attack on Binary Packet Protocol (BPP) HOT 1
- Kustomize template ref=v0.29.0 references to 0.28.1 HOT 1
- Deprecate CronJob deployment approach HOT 2
- Pods strategies don't work HOT 7
- IMDSv2
- Strategy RemovePodsViolatingNodeAffinity does not remove pod when affinity disappears HOT 1
- Single node clusters support HOT 3
- Not installing CRDs HOT 3
- Add option to apply RemovePodsViolatingNodeTaints only for explicitly included taints HOT 2
- Bump Kubernetes dependencies to v0.30.0 alpha HOT 2
- Implement `namespaceSelector` for Pod (anti)affinity when considering NodeFit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from descheduler.