Add ContainerResource scaling to spire-server HPA (#746)
* Add ContainerResource scaling to spire-server HPA Signed-off-by: Jayme Howard <[email protected]> * Amend flag name to address feedback Signed-off-by: Jayme Howard <[email protected]> --------- Signed-off-by: Jayme Howard <[email protected]> Co-authored-by: kfox1111 <[email protected]>
This commit is contained in:
@@ -110,6 +110,7 @@ In order to run Tornjak with simple HTTP Connection only, make sure you don't cr
|
||||
| `autoscaling.enabled` | Flag to enable autoscaling | `false` |
|
||||
| `autoscaling.minReplicas` | Minimum replicas for autoscaling | `1` |
|
||||
| `autoscaling.maxReplicas` | Maximum replicas for autoscaling | `100` |
|
||||
| `autoscaling.scaleOnSPIREServerOnly` | Flag to only consider the main SPIRE container for autoscaling purposes | `false` |
|
||||
| `autoscaling.targetCPUUtilizationPercentage` | Target CPU utilization that triggers autoscaling | `80` |
|
||||
| `nodeSelector` | Select specific nodes to run on (currently only amd64 is supported by Tornjak) | `{}` |
|
||||
| `tolerations` | List of tolerations | `[]` |
|
||||
|
||||
@@ -23,17 +23,31 @@ spec:
|
||||
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- if .Values.autoscaling.scaleOnSPIREServerOnly }}
|
||||
- type: ContainerResource
|
||||
{{- else }}
|
||||
- type: Resource
|
||||
{{- end }}
|
||||
resource:
|
||||
name: memory
|
||||
{{- if .Values.autoscaling.scaleOnSPIREServerOnly }}
|
||||
container: {{ .Chart.Name }}
|
||||
{{- end }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- if .Values.autoscaling.scaleOnSPIREServerOnly }}
|
||||
- type: ContainerResource
|
||||
{{- else }}
|
||||
- type: Resource
|
||||
{{- end }}
|
||||
resource:
|
||||
name: cpu
|
||||
{{- if .Values.autoscaling.scaleOnSPIREServerOnly }}
|
||||
container: {{ .Chart.Name }}
|
||||
{{- end }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
||||
|
||||
@@ -103,12 +103,14 @@ resources: {}
|
||||
## @param autoscaling.enabled Flag to enable autoscaling
|
||||
## @param autoscaling.minReplicas Minimum replicas for autoscaling
|
||||
## @param autoscaling.maxReplicas Maximum replicas for autoscaling
|
||||
## @param autoscaling.scaleOnSPIREServerOnly Flag to only consider the main SPIRE container for autoscaling purposes
|
||||
## @param autoscaling.targetCPUUtilizationPercentage Target CPU utilization that triggers autoscaling
|
||||
##
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
maxReplicas: 100
|
||||
scaleOnSPIREServerOnly: false
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
|
||||
|
||||
Reference in New Issue
Block a user