vladiceanu commented on issue #251: URL: https://github.com/apache/solr-operator/issues/251#issuecomment-815561013
> After reading more, I think my assumption above might be incorrect... Actually, you're right about the field `replicas`. The CR object has the field `replicas`, and if we keep it as it is, then every time you do `kubectl apply` of the manifest that contains the CR, it will set `replicas` value for the CR back to the static value from the manifest. This is similar to `spec.replicas` from Deployment workload and HPA: you either use `spec.replicas` or `HPA`, not both. To solve this, we could do the following: - as you mentioned, have an additional field in the spec, called `autoscale`, make it optional and by default `false`; - make the `replicas` field optional for the user input. Either `autoscale: true` or `replicas: <value>` to be required; - assign the HPA creation to the user, not the Operator; I was able to make HPA working with the CR by adding just a few changes to the operator and CRD, however, with the `replicas` and `autoscale` fields changes we might have to add a couple more changes. I will try to make the aforementioned changes - `replicas` field optional and introduce an additional field `autoscale` and test it in my local environment. -- 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]
