kubernetes-sigs / metrics-server

Scalable and efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.
https://kubernetes.io/docs/tasks/debug-application-cluster/resource-metrics-pipeline/
Apache License 2.0
5.64k stars 1.85k forks source link

Watch method not installed for node and pod metrics #87

Open vladimirvivien opened 6 years ago

vladimirvivien commented 6 years ago

Right now it's not possible to watch resources NodeMetrics and PodMetrics. Is that by design or are there plans for implementations?

DirectXMan12 commented 6 years ago

There are not currently plans for an implementation, but it might be possible. What's the desired use case?

vladimirvivien commented 6 years ago

Having a watch method installed would allow the creation of k8s controller code that can watch and react to changes in metric values instead of doing a List method call at a given interval.

markusthoemmes commented 5 years ago

I second that requirement. I recently opened a thread on the mailing list to discuss a proposal I put out there: https://groups.google.com/forum/#!topic/kubernetes-sig-instrumentation/nJvDyIwDgu8

Direct link to the proposal: https://docs.google.com/document/d/1jARPGYAwievgzFTN7YYZ7a8Jaz2NUGq-fXTeeBHk5X0/edit#heading=h.a65hi87gwd07

x13n commented 5 years ago

FWIW, I started a KEP for this: https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/20190425-metrics-watch-api.md

vladimirvivien commented 5 years ago

@x13n is there work to get this implemented ?

x13n commented 5 years ago

Not yet, the KEP still needs more design work and I've been busy with other stuff recently. I think the main issue now is how to make metrics work with resourceVersion parameter in the API (since metrics don't have it). This should mimic other k8s resources to ensure existing libraries will continue to work. If you want to speed things up, you can contribute to the KEP.

fejta-bot commented 4 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

x13n commented 4 years ago

/remove-lifecycle stale

fejta-bot commented 4 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

serathius commented 4 years ago

@x13n could you provide an update?

x13n commented 4 years ago

I think watch support in metrics API is required to graduate them to v1, so it has to be done sooner or later anyway. I had to focus on other work though and am not actively working on this.

serathius commented 4 years ago

/lifecycle frozen

goenning commented 1 year ago

KEP link above is broken, I found this one: https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/1013-metrics-watch-api/README.md

mtt0 commented 5 months ago

Any updates?