{"repo":"BedrockStreaming/prescaling-exporter","free":true,"listed":false,"github":"https://github.com/BedrockStreaming/prescaling-exporter","clone":"git clone https://github.com/BedrockStreaming/prescaling-exporter.git","description":"Prometheus Exporter to scale plateform","language":"Go","stars":32,"topics":["kubernetes","metrics","prometheus"],"license":"MIT","category":"analytics","readme_excerpt":"Prescaling-exporter This project is a Prometheus exporter written in Golang, its goal is to provide a metric that scales applications to a requested capacity on a daily time slot or on an event declared in the embedded api. The exporter exposes a metric calculated according to the annotations defined on the HPA. The project also exposes an API that allows to register an event with a capacity multiplier. Requirements - Prometheus Stack or Victoria Metrics Stack - Prometheus Adapater Info: It is quite possible to use this solution with another observability stack than Prometheus. For example, Datadog or Newrelic, but we do not provide a configuration example. Install Kubernetes Deployement - Clone repo - Run this command with Helm3 You can use skaffold if you want. Configure an Horizontal Pod Autoscaler To be able to pre-scale an application every day before a traffic spike, you must add the following annotations on the HPA: Annotations values --- --- annotations.scaling.exporter.time.start \"hh:mm:ss\" annotations.scaling.exporter.time.end \"hh:mm:ss\" annotations.scaling.exporter.replica.min \"integer\" It's important to set the target.value to 10. The metric's value provided by the exporter in order to scale is 11. The scale up of pods will be gradual. Currently, the increment is carried out 10% by 10%. Configure prometheus adapter Here is a configuration example using the prometheus adapter to supply the metric to the Kubernetes cluster: Configure parameters You can modify the ap","default_branch":null,"files":null,"tree":[],"storefront":"/r/BedrockStreaming","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/BedrockStreaming/prescaling-exporter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}