seldon-core icon indicating copy to clipboard operation
seldon-core copied to clipboard

OSS-124: Allow annotations to HPAs created from CRD

Open mwm5945 opened this issue 5 years ago • 4 comments

Annotations allow for advanced scaling using external metrics from the Kube Metrics Adapter (KMA). For example, querying Prometheus to calculate a metric to scale on (i.e. Requests per second per pod). However, the KMA needs access to the Annotations of the HPA to add these metrics to the k8s metrics server for the HPA to use.

annotations should be added to the Seldon HPA spec here: https://github.com/SeldonIO/seldon-core/blob/13762c055f1e9e146d7c1111fc5d5aefcbf56f42/operator/apis/machinelearning.seldon.io/v1/seldondeployment_types.go#L294

Then the operator can simply copy these values into the k8s HPA spec here: https://github.com/SeldonIO/seldon-core/blob/13762c055f1e9e146d7c1111fc5d5aefcbf56f42/operator/controllers/seldondeployment_controller.go#L133

mwm5945 avatar Sep 09 '20 18:09 mwm5945

Ok this sounds useful and a small addition. Will add to next release roadmap.

ukclivecox avatar Sep 25 '20 17:09 ukclivecox

Would would like to allow users to define HPAs in V2 API we are investigating.

ukclivecox avatar Jan 09 '22 14:01 ukclivecox

@cliveseldon just and fyi, we don’t really need this anymore as we’ve moved to KEDA :)

mwm5945 avatar Jan 11 '22 01:01 mwm5945

OK great. @mwm5945 Useful to know.

ukclivecox avatar Jan 11 '22 08:01 ukclivecox