-
Notifications
You must be signed in to change notification settings - Fork 167
/
configmap-worker.yaml
103 lines (97 loc) · 3.63 KB
/
configmap-worker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{{- if gt (int .Values.server.workers) 0 }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "trino.worker" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "trino.labels" . | nindent 4 }}
app.kubernetes.io/component: worker
data:
node.properties: |
node.environment={{ .Values.server.node.environment }}
node.data-dir={{ .Values.server.node.dataDir }}
plugin.dir={{ .Values.server.node.pluginDir }}
{{- range $configValue := .Values.additionalNodeProperties }}
{{ $configValue }}
{{- end }}
jvm.config: |
-server
-agentpath:/usr/lib/trino/bin/libjvmkill.so
-Xmx{{ .Values.worker.jvm.maxHeapSize }}
-XX:+{{ .Values.worker.jvm.gcMethod.type }}
-XX:G1HeapRegionSize={{ .Values.worker.jvm.gcMethod.g1.heapRegionSize }}
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:ReservedCodeCacheSize=512M
-XX:PerMethodRecompilationCutoff=10000
-XX:PerBytecodeRecompilationCutoff=10000
-Djdk.attach.allowAttachSelf=true
-Djdk.nio.maxCachedBufferSize=2000000
# Allow loading dynamic agent used by JOL
-XX:+EnableDynamicAgentLoading
{{/* only check the version number if the image is not overriden in any way */}}
{{- with .Values.image -}}
{{- if and (eq .repository "trinodb/trino") (not .useRepositoryAsSoleImageReference) (not .registry) (not .digest) (gt (default $.Chart.AppVersion .tag | int ) 447 ) }}
# https://bugs.openjdk.org/browse/JDK-8329528
-XX:+UnlockDiagnosticVMOptions
-XX:G1NumCollectionsKeepPinned=10000000
{{- end }}{{/* if */}}
{{- end }}{{/* with */}}
{{- range $configValue := .Values.worker.additionalJVMConfig }}
{{ $configValue }}
{{- end }}
config.properties: |
coordinator=false
http-server.http.port={{ .Values.service.port }}
query.max-memory={{ .Values.server.config.query.maxMemory }}
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 }}
discovery.uri=http://{{ template "trino.fullname" . }}:{{ .Values.service.port }}
{{- range $configValue := .Values.additionalConfigProperties }}
{{ $configValue }}
{{- end }}
{{- if .Values.server.workerExtraConfig }}
{{- .Values.server.workerExtraConfig | nindent 4 }}
{{- end }}
{{- if .Values.server.exchangeManager }}
exchange-manager.properties: |
exchange-manager.name={{ .Values.server.exchangeManager.name }}
exchange.base-directories={{ .Values.server.exchangeManager.baseDir }}
{{- range $configValue := .Values.additionalExchangeManagerProperties }}
{{ $configValue }}
{{- end }}
{{- end }}
log.properties: |
io.trino={{ .Values.server.log.trino.level }}
{{- range $configValue := .Values.additionalLogProperties }}
{{ $configValue }}
{{- end }}
{{ if .Values.eventListenerProperties }}
event-listener.properties: |
{{- range $configValue := .Values.eventListenerProperties }}
{{ $configValue }}
{{- end }}
{{ end }}
{{- range $fileName, $fileContent := .Values.worker.additionalConfigFiles }}
{{ $fileName }}: |
{{- $fileContent | nindent 4 }}
{{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "trino.fullname" . }}-schemas-volume-worker
namespace: {{ .Release.Namespace }}
labels:
{{- include "trino.labels" . | nindent 4 }}
app.kubernetes.io/component: worker
data:
{{- range $key, $val := .Values.kafka.tableDescriptions }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}