Skip to content

Commit

Permalink
Merge pull request #87 from xenit-eu/Add_HPA_for_acs
Browse files Browse the repository at this point in the history
Disable cpu autoscaling by default
  • Loading branch information
JoostDeCupere authored Aug 28, 2023
2 parents 58adf71 + 7522aa7 commit f25c942
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -494,13 +494,26 @@ For more information take a look at
* Default: 10
* Description: The max ammount of replicas will run when autoscaling

#### `acs.hpa.cpuUtilization`
#### `acs.hpa.cpu.enabled`

* Required: false
* Default: false
* Description: whether horizontal scaling should trigger on cpu load

#### `acs.hpa.cpu.utilization`

* Required: false
* Default: 70
* Description: The CPU cutover percentage

#### `acs.hpa.memoryUtilization`
#### `acs.hpa.memory.enabled`

* Required: false
* Default: true
* Description: whether horizontal scaling should trigger on memory load


#### `acs.hpa.memory.utilization`

* Required: false
* Default: 70
Expand Down
8 changes: 6 additions & 2 deletions xenit-alfresco/templates/acs/acs-hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ spec:
minReplicas: {{ .minReplicas }}
maxReplicas: {{ .maxReplicas }}
metrics:
{{- with .cpu.enabled }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .cpuUtilization }}
averageUtilization: {{ .cpu.utilization }}
{{- end }}
{{- with .memory.enabled }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .memoryUtilization }}
averageUtilization: {{ .memory.utilization }}
{{- end }}
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
Expand Down
8 changes: 6 additions & 2 deletions xenit-alfresco/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ acs:
enabled: false
minReplicas: 1
maxReplicas: 10
cpuUtilization: 70
memoryUtilization: 70
cpu:
enabled: false
utilization: 70
memory:
enabled: true
utilization: 70
dbUrl: 'jdbc:postgresql://postgresql-service:5432/alfresco'
dbDriver: 'org.postgresql.Driver'
sharePort: '443'
Expand Down

0 comments on commit f25c942

Please sign in to comment.