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

Add ability to set env values for the gateway charts #281

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions charts/gateway/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
{{- toYaml .Values.command | nindent 12}}
env:
{{- toYaml .Values.env | nindent 12}}
envFrom:
{{- toYaml .Values.envFrom | nindent 12}}
ports:
Expand Down
9 changes: 9 additions & 0 deletions charts/gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ imagePullSecrets: []
# ```
envFrom: []

# env -- Additional environment variables to mount into the init container as environment variables.
# @raw
# Example:
# ```yaml
# - name: NAME
# value: "value"
# ```
env: []

config:
serverConfig:
node.environment: test
Expand Down
6 changes: 5 additions & 1 deletion tests/gateway/test-values-with-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config:
http-server.http.port: 8080
dataStore:
# The connection details for the backend database for Trino Gateway and Trino query history
jdbcUrl: jdbc:postgresql://gateway-backend-db-postgresql.postgres-gateway.svc.cluster.local:5432/gateway
jdbcUrl: jdbc:postgresql://${ENV:PG_HOST}:5432/gateway
user: "${ENV:PG_USER}"
password: "${ENV:PG_PASSWORD}"
driver: org.postgresql.Driver
Expand All @@ -28,6 +28,10 @@ envFrom:
- secretRef:
name: db-credentials

env:
- name: PG_HOST
value: gateway-backend-db-postgresql.postgres-gateway.svc.cluster.local

resources:
limits:
cpu: 500m
Expand Down