cloudstate
cloudstate copied to clipboard
Support Kubernetes HPA
The operator should support configuring Kubernetes HPA as an option.
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.