crane icon indicating copy to clipboard operation
crane copied to clipboard

Supporting Crane's metric adapter as remote adapter of Prometheus Adapter

Open yuxuanzhu0214 opened this issue 3 years ago • 1 comments

Crane v0.6.0 supports Prometheus Adapter as remote adapter and Crane's metric adapter as the main adapter. Is there a way to do the opposite by making Crane's metric adapter as the remote adapter and Prometheus Adapter as the main adapter in the apiservice? The reason of asking this question is some apps are already using the custom metric adapter for HPA but installing Crane will replace the original metric adapter.

yuxuanzhu0214 avatar Aug 01 '22 20:08 yuxuanzhu0214

We can't make Prometheus Adapter to proxy the metric requests without change its code, that's why we develop the RemoteAdapter feature.

If you already have develop Prometheus Adapter as your main adapter, then you can use crane's metric-adapter to be main adapter and proxy the request to Prometheus Adapter by RemoteAdapter feature. In this structure, crane's metric-adapter will provide both crane's metric and all the prometheus metrics.

The overall Architecture is like below: image

qmhu avatar Aug 02 '22 03:08 qmhu