seldon-core
seldon-core copied to clipboard
OSS-124: Allow annotations to HPAs created from CRD
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
Ok this sounds useful and a small addition. Will add to next release roadmap.
Would would like to allow users to define HPAs in V2 API we are investigating.
@cliveseldon just and fyi, we don’t really need this anymore as we’ve moved to KEDA :)
OK great. @mwm5945 Useful to know.