Skip to content

Commit

Permalink
Split nodeSelectors configs between worker and coordinator.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemekak authored and sopel39 committed Mar 13, 2023
1 parent 7065c1a commit f4769b7
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 20 deletions.
2 changes: 1 addition & 1 deletion charts/trino/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.9.0
version: 0.10.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
12 changes: 8 additions & 4 deletions charts/trino/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ The following table lists the configurable parameters of the Trino chart and the
| `server.config.https.keystore.path` | | `""` |
| `server.config.authenticationType` | | `""` |
| `server.config.query.maxMemory` | | `"4GB"` |
| `server.config.query.maxMemoryPerNode` | | `"1GB"` |
| `server.exchangeManager.name` | | `"filesystem"` |
| `server.exchangeManager.baseDir` | | `"/tmp/trino-local-file-system-exchange-manager"` |
| `server.workerExtraConfig` | | `""` |
Expand All @@ -48,9 +47,6 @@ The following table lists the configurable parameters of the Trino chart and the
| `securityContext.runAsGroup` | | `1000` |
| `service.type` | | `"ClusterIP"` |
| `service.port` | | `8080` |
| `nodeSelector` | | `{}` |
| `tolerations` | | `[]` |
| `affinity` | | `{}` |
| `auth` | | `{}` |
| `serviceAccount.create` | | `false` |
| `serviceAccount.name` | | `""` |
Expand All @@ -60,18 +56,26 @@ The following table lists the configurable parameters of the Trino chart and the
| `coordinator.jvm.gcMethod.type` | | `"UseG1GC"` |
| `coordinator.jvm.gcMethod.g1.heapRegionSize` | | `"32M"` |
| `coordinator.config.memory.heapHeadroomPerNode` | | `""` |
| `coordinator.config.query.maxMemoryPerNode` | | `"1GB"` |
| `coordinator.additionalJVMConfig` | | `{}` |
| `coordinator.resources` | | `{}` |
| `coordinator.livenessProbe` | | `{}` |
| `coordinator.readinessProbe` | | `{}` |
| `coordinator.nodeSelector` | | `{}` |
| `coordinator.tolerations` | | `[]` |
| `coordinator.affinity` | | `{}` |
| `worker.jvm.maxHeapSize` | | `"8G"` |
| `worker.jvm.gcMethod.type` | | `"UseG1GC"` |
| `worker.jvm.gcMethod.g1.heapRegionSize` | | `"32M"` |
| `worker.config.memory.heapHeadroomPerNode` | | `""` |
| `worker.config.query.maxMemoryPerNode` | | `"1GB"` |
| `worker.additionalJVMConfig` | | `{}` |
| `worker.resources` | | `{}` |
| `worker.livenessProbe` | | `{}` |
| `worker.readinessProbe` | | `{}` |
| `worker.nodeSelector` | | `{}` |
| `worker.tolerations` | | `[]` |
| `worker.affinity` | | `{}` |
| `kafka.mountPath` | | `"/etc/trino/schemas"` |
| `kafka.tableDescriptions` | | `{}` |

Expand Down
2 changes: 1 addition & 1 deletion charts/trino/templates/configmap-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ data:
{{- end }}
http-server.http.port={{ .Values.service.port }}
query.max-memory={{ .Values.server.config.query.maxMemory }}
query.max-memory-per-node={{ .Values.server.config.query.maxMemoryPerNode }}
query.max-memory-per-node={{ .Values.coordinator.config.query.maxMemoryPerNode }}
{{- if .Values.coordinator.config.memory.heapHeadroomPerNode }}
memory.heap-headroom-per-node={{ .Values.coordinator.config.memory.heapHeadroomPerNode }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/trino/templates/configmap-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ data:
coordinator=false
http-server.http.port={{ .Values.service.port }}
query.max-memory={{ .Values.server.config.query.maxMemory }}
query.max-memory-per-node={{ .Values.server.config.query.maxMemoryPerNode }}
query.max-memory-per-node={{ .Values.worker.config.query.maxMemoryPerNode }}
{{- if .Values.worker.config.memory.heapHeadroomPerNode }}
memory.heap-headroom-per-node={{ .Values.worker.config.memory.heapHeadroomPerNode }}
{{- end }}
Expand Down
6 changes: 3 additions & 3 deletions charts/trino/templates/deployment-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ spec:
successThreshold: {{ .Values.coordinator.readinessProbe.successThreshold | default 1 }}
resources:
{{- toYaml .Values.coordinator.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
{{- with .Values.coordinator.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.coordinator.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- with .Values.coordinator.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
6 changes: 3 additions & 3 deletions charts/trino/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ spec:
successThreshold: {{ .Values.worker.readinessProbe.successThreshold | default 1 }}
resources:
{{- toYaml .Values.worker.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
{{- with .Values.worker.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.worker.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- with .Values.worker.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
23 changes: 16 additions & 7 deletions charts/trino/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ server:
authenticationType: ""
query:
maxMemory: "4GB"
maxMemoryPerNode: "1GB"
exchangeManager:
name: "filesystem"
baseDir: "/tmp/trino-local-file-system-exchange-manager"
Expand Down Expand Up @@ -130,12 +129,6 @@ service:
type: ClusterIP
port: 8080

nodeSelector: {}

tolerations: []

affinity: {}

auth: {}
# Set username and password
# https://trino.io/docs/current/security/password-file.html#file-format
Expand Down Expand Up @@ -163,6 +156,8 @@ coordinator:
config:
memory:
heapHeadroomPerNode: ""
query:
maxMemoryPerNode: "1GB"

additionalJVMConfig: {}

Expand Down Expand Up @@ -191,6 +186,12 @@ coordinator:
# failureThreshold: 6
# successThreshold: 1

nodeSelector: {}

tolerations: []

affinity: {}

worker:
jvm:
maxHeapSize: "8G"
Expand All @@ -202,6 +203,8 @@ worker:
config:
memory:
heapHeadroomPerNode: ""
query:
maxMemoryPerNode: "1GB"

additionalJVMConfig: {}

Expand Down Expand Up @@ -230,6 +233,12 @@ worker:
# failureThreshold: 6
# successThreshold: 1

nodeSelector: {}

tolerations: []

affinity: {}

kafka:
mountPath: "/etc/trino/schemas"
tableDescriptions: {}
Expand Down

0 comments on commit f4769b7

Please sign in to comment.