vladiceanu opened a new issue #251: URL: https://github.com/apache/solr-operator/issues/251
### Context As the [kubebuilder.io](https://book.kubebuilder.io/reference/generating-crd.html?highlight=scale#scale) documentation states, our Solr CRD has [subresource](https://github.com/apache/solr-operator/blob/v0.2.8/helm/solr-operator/crds/crds.yaml#L8294) `scale` which allows us to `kubectl scale SolrCloud <name> --replicas=<number>`. However, in order to make use of HPA, we need to have another argument, called `selectorpath`. If `selectorpath` is not present, the HPA (v2) fails with the following message: ``` Conditions: Type Status Reason Message ---- ------ ------ ------- AbleToScale True SucceededGetScale the HPA controller was able to get the target's current scale ScalingActive False InvalidSelector the HPA target's scale is missing a selector Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning SelectorRequired 14s (x7 over 104s) horizontal-pod-autoscaler selector is required Warning FailedComputeMetricsReplicas 14s (x7 over 104s) horizontal-pod-autoscaler selector is required ``` ### Why HPA? Users should be able to use the HPA in order to scale a CR. Which metrics to be used, how the cores will be assigned/removed from Solr, (....), are different questions and are out of the scope here. The flow would look like this: `custom metrics` ---> `HPA` --_(scale)_--> `solrCloud CR` Custom metrics could be any metrics that the user considers appropriate for the scale operation (including `solr_*` metrics exposed by prometheus exporter and prometheus-adapter for example). ### Proposal Let's add the argument `scale.selectorpath` in order to be able to use the HPA, as mentioned in the [kubebuilder documentation](https://book.kubebuilder.io/reference/generating-crd.html?highlight=scale#scale). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
