Skip to content

Commit 43a44d3

Browse files
committed
Add session properties configuration
Signed-off-by: Harry <[email protected]>
1 parent c93ed8b commit 43a44d3

File tree

4 files changed

+67
-0
lines changed

4 files changed

+67
-0
lines changed

charts/trino/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ Fast distributed SQL query engine for big data analytics that helps you explore
349349
- exchange.s3.aws-access-key=your-access-key
350350
- exchange.s3.aws-secret-key=your-secret-key
351351
```
352+
* `sessionProperties` - string, default: `""`
352353
* `eventListenerProperties` - list, default: `[]`
353354

354355
[Event listener](https://trino.io/docs/current/develop/event-listener.html#event-listener) properties. To configure multiple event listeners, add them in `coordinator.additionalConfigFiles` and `worker.additionalConfigFiles`, and set the `event-listener.config-files` property in `additionalConfigProperties` to their locations.

charts/trino/templates/configmap-coordinator.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,15 @@ data:
117117
{{- end }}
118118
{{- end }}
119119

120+
{{- if .Values.sessionProperties }}
121+
session-property-config.properties: |
122+
session-property-config.configuration-manager=file
123+
session-property-manager.config-file={{ .Values.server.config.path }}/session-property-config.json
124+
125+
session-property-config.json: |
126+
{{- .Values.sessionProperties | nindent 4 }}
127+
{{- end }}
128+
120129
{{- if .Values.server.exchangeManager }}
121130
exchange-manager.properties: |
122131
exchange-manager.name={{ .Values.server.exchangeManager.name }}

charts/trino/values.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,37 @@ additionalExchangeManagerProperties: []
368368
# - exchange.s3.aws-secret-key=your-secret-key
369369
# ```
370370

371+
sessionProperties: ""
372+
# [Session property config file](https://trino.io/docs/current/admin/session-property-managers.html)
373+
# is mounted to {{ .Values.server.config.path }}/session-property-config.json
374+
# @raw
375+
# Example:
376+
# ```yaml
377+
# sessionProperties: |-
378+
# [
379+
# {
380+
# "group": "global.*",
381+
# "sessionProperties": {
382+
# "query_max_execution_time": "8h"
383+
# }
384+
# },
385+
# {
386+
# "group": "global.interactive.*",
387+
# "sessionProperties": {
388+
# "query_max_execution_time": "1h"
389+
# }
390+
# },
391+
# {
392+
# "group": "global.pipeline.*",
393+
# "clientTags": ["etl"],
394+
# "sessionProperties": {
395+
# "scale_writers": "true",
396+
# "hive.insert_existing_partitions_behavior": "overwrite"
397+
# }
398+
# }
399+
# ]
400+
# ```
401+
371402
eventListenerProperties: []
372403
# eventListenerProperties -- [Event
373404
# listener](https://trino.io/docs/current/develop/event-listener.html#event-listener)

tests/trino/test-values.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,16 @@ accessControl:
192192
"user": "alice",
193193
"owner": false
194194
}
195+
],
196+
"system_session_properties": [
197+
{
198+
"role": "admin",
199+
"allow": true
200+
},
201+
{
202+
"group": "group2",
203+
"allow": true
204+
}
195205
]
196206
}
197207
@@ -296,6 +306,22 @@ networkPolicy:
296306
operator: NotIn
297307
values: [network-policy]
298308

309+
sessionProperties: |-
310+
[
311+
{
312+
"group": "global.admin",
313+
"sessionProperties": {
314+
"query_max_execution_time": "8h"
315+
}
316+
},
317+
{
318+
"group": "global.readonly",
319+
"sessionProperties": {
320+
"query_max_execution_time": "1h"
321+
}
322+
}
323+
]
324+
299325
catalogs:
300326
tpch: |
301327
connector.name=tpch

0 commit comments

Comments
 (0)