Skip to content

Commit

Permalink
Trino autoscaler (#84)
Browse files Browse the repository at this point in the history
* autoscaler implementation

* bump up version

* use enabled switch

* update readme
  • Loading branch information
valeriano-manassero authored Oct 19, 2021
1 parent a307182 commit 9bcd9e1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion valeriano-manassero/trino/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "363"
description: High performance, distributed SQL query engine for big data
name: trino
version: 1.5.0
version: 1.6.0
home: https://trino.io
icon: https://trino.io/assets/images/trino-logo/trino-ko_tiny-alt.svg
sources:
Expand Down
5 changes: 4 additions & 1 deletion valeriano-manassero/trino/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# trino

![Version: 1.5.0](https://img.shields.io/badge/Version-1.5.0-informational?style=flat-square) ![AppVersion: 363](https://img.shields.io/badge/AppVersion-363-informational?style=flat-square)
![Version: 1.6.0](https://img.shields.io/badge/Version-1.6.0-informational?style=flat-square) ![AppVersion: 363](https://img.shields.io/badge/AppVersion-363-informational?style=flat-square)

High performance, distributed SQL query engine for big data

Expand Down Expand Up @@ -39,6 +39,9 @@ High performance, distributed SQL query engine for big data
| resources | object | `{}` | |
| schemas | object | `{}` | |
| secretMounts | list | `[]` | |
| server.autoscaler.enabled | bool | `false` | |
| server.autoscaler.maxReplicas | int | `5` | |
| server.autoscaler.targetCPUUtilizationPercentage | int | `50` | |
| server.config.http.port | int | `8080` | |
| server.config.httpsServer.enabled | bool | `false` | |
| server.config.httpsServer.keystore.key | string | `""` | |
Expand Down
14 changes: 14 additions & 0 deletions valeriano-manassero/trino/templates/autoscaler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.server.autoscaler.maxReplicas }}
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "trino.worker" . }}
spec:
maxReplicas: {{ .Values.server.autoscaler.maxReplicas }}
minReplicas: {{ .Values.server.workers }}
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "trino.worker" . }}
targetCPUUtilizationPercentage: {{ .Values.server.autoscaler.targetCPUUtilizationPercentage }}
{{- end }}
4 changes: 4 additions & 0 deletions valeriano-manassero/trino/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ server:
type: "UseG1GC"
g1:
heapRegionSize: "32M"
autoscaler:
enabled: false
maxReplicas: 5
targetCPUUtilizationPercentage: 50

initContainers: {}
# coordinator:
Expand Down

0 comments on commit 9bcd9e1

Please sign in to comment.