cloudstate icon indicating copy to clipboard operation
cloudstate copied to clipboard

Support Kubernetes HPA

Open jroper opened this issue 4 years ago • 1 comments

The operator should support configuring Kubernetes HPA as an option.

jroper avatar Sep 25 '19 04:09 jroper

At a k8s level, this is currently possible. One can create a configmap for configuring any service. This includes wrt HPA. For example, if you have a service myservice, then you could create a configmap with the name ss-cfg-myservice and it would be used to configure aspects of myservice

With respect to HPA, it can contain the structure sketched out below. (The values shown are the defaults.)

autoscaler:

  # Whether the autoscaler should be enabled or not
  # enabled: true

  # The minimum number of replicas to scale down to
  # minReplicas: 1

  # The maximum number of replicas to scale up to
  # maxReplicas: 10

  # The average CPU utilization threshold, at which point the autoscaler will
  # scale up or down, as a percentage of requested CPU
  # cpuUtilizationThreshold: 80

What remains is to create/modify this configmap from the UI/CLI.

marcoderama avatar Dec 09 '20 18:12 marcoderama