Skip to content

Commit 71423c0

Browse files
huw0nineinchnick
authored andcommitted
Enable templating of environment name
1 parent 0dcf72e commit 71423c0

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

charts/trino/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ Fast distributed SQL query engine for big data analytics that helps you explore
4848
- name: registry-credentials
4949
```
5050
* `server.workers` - int, default: `2`
51-
* `server.node.environment` - string, default: `"production"`
51+
* `server.node.environment` - string, default: `"production"`
52+
53+
Supports templating with `tpl`.
5254
* `server.node.dataDir` - string, default: `"/data/trino"`
5355
* `server.node.pluginDir` - string, default: `"/usr/lib/trino/plugin"`
5456
* `server.log.trino.level` - string, default: `"INFO"`

charts/trino/templates/configmap-coordinator.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
app.kubernetes.io/component: coordinator
1010
data:
1111
node.properties: |
12-
node.environment={{ .Values.server.node.environment }}
12+
node.environment={{ tpl .Values.server.node.environment . }}
1313
node.data-dir={{ .Values.server.node.dataDir }}
1414
plugin.dir={{ .Values.server.node.pluginDir }}
1515
{{- range $configValue := .Values.additionalNodeProperties }}

charts/trino/templates/configmap-worker.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ metadata:
1010
app.kubernetes.io/component: worker
1111
data:
1212
node.properties: |
13-
node.environment={{ .Values.server.node.environment }}
13+
node.environment={{ tpl .Values.server.node.environment . }}
1414
node.data-dir={{ .Values.server.node.dataDir }}
1515
plugin.dir={{ .Values.server.node.pluginDir }}
1616
{{- range $configValue := .Values.additionalNodeProperties }}

charts/trino/values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ imagePullSecrets: []
4040
server:
4141
workers: 2
4242
node:
43+
# server.node.environment -- Supports templating with `tpl`.
4344
environment: production
4445
dataDir: /data/trino
4546
pluginDir: /usr/lib/trino/plugin

tests/trino/test-values.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
# This is a YAML-formatted file.
33
# Declare variables to be passed into your templates.
44

5+
global:
6+
env: "dev"
7+
region: "region_test"
8+
59
server:
10+
node:
11+
environment: "{{ .Values.global.env }}_{{ .Values.global.region }}"
612
workers: 0
713
config:
814
https:

0 commit comments

Comments
 (0)