Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make startup command configurable #505

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,23 @@ helm install tg --values values-override.yaml helm/trino-gateway
Secrets for `authenticationSecret` and `backendState` can be provisioned
similarly. Alternatively, you can directly define the `config.backEndState`
node in `values-override.yaml` and leave `backendStateSecret` undefined.
However, a [Secret](https://kubernetes.
io/docs/concepts/configuration/secret/)
is recommended to protect the database credentials required for this
However, a [Secret](https://kubernetes.io/docs/concepts/configuration/secret/)
is recommended to protect the database credentials required for this
configuration.

By default, the Trino Gateway process is started with the following command:

```shell
java -XX:MinRAMPercentage=80.0 -XX:MaxRAMPercentage=80.0 -jar /usr/lib/trino/gateway-ha-jar-with-dependencies.jar /etc/gateway/config.yaml
```

You can customize details with the `command` node. It accepts a list, that must
begin with an executable such as `java` or `bash` that is available on the PATH.
The following list elements are provided as arguments to the executable. It is
not typically necessary to modify this node. You can use it to change of JVM
startup parameters to control memory settings and other aspects, or to use other
configuration file names.

#### Additional options

To implement routing rules, create a ConfigMap from your routing rules yaml
Expand Down
7 changes: 1 addition & 6 deletions helm/trino-gateway/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- "java"
- "-XX:MinRAMPercentage=80.0"
- "-XX:MaxRAMPercentage=80.0"
- "-jar"
- "/usr/lib/trino/gateway-ha-jar-with-dependencies.jar"
- "/etc/gateway/config.yaml"
{{- toYaml .Values.command | nindent 12}}
ports:
- name: request
containerPort: {{ index .Values "config" "serverConfig" "http-server.http.port" }}
Expand Down
9 changes: 9 additions & 0 deletions helm/trino-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ config:
managedApps:
- io.trino.gateway.ha.clustermonitor.ActiveClusterMonitor

# Startup command for Trino Gateway process. Add additional Java options and other modifications as desired.
command:
- "java"
- "-XX:MinRAMPercentage=80.0"
- "-XX:MaxRAMPercentage=80.0"
- "-jar"
- "/usr/lib/trino/gateway-ha-jar-with-dependencies.jar"
- "/etc/gateway/config.yaml"

service:
type: ClusterIP
port: 8080
Expand Down