Skip to content

Commit

Permalink
Add possibility to expose extra ports
Browse files Browse the repository at this point in the history
  • Loading branch information
radek-kondziolka authored and losipiuk committed Apr 11, 2023
1 parent 38370cb commit dd8aa52
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/trino/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ The following table lists the configurable parameters of the Trino chart and the
| `coordinator.config.memory.heapHeadroomPerNode` | | `""` |
| `coordinator.config.query.maxMemoryPerNode` | | `"1GB"` |
| `coordinator.additionalJVMConfig` | | `{}` |
| `coordinator.additionalExposedPorts` | | `{}` |
| `coordinator.resources` | | `{}` |
| `coordinator.livenessProbe` | | `{}` |
| `coordinator.readinessProbe` | | `{}` |
Expand All @@ -71,6 +72,7 @@ The following table lists the configurable parameters of the Trino chart and the
| `worker.config.memory.heapHeadroomPerNode` | | `""` |
| `worker.config.query.maxMemoryPerNode` | | `"1GB"` |
| `worker.additionalJVMConfig` | | `{}` |
| `worker.additionalExposedPorts` | | `{}` |
| `worker.resources` | | `{}` |
| `worker.livenessProbe` | | `{}` |
| `worker.readinessProbe` | | `{}` |
Expand Down
5 changes: 5 additions & 0 deletions charts/trino/templates/deployment-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ spec:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
{{- range $key, $value := .Values.coordinator.additionalExposedPorts }}
- name: {{ $value.name }}
containerPort: {{ $value.port }}
protocol: {{ $value.protocol }}
{{- end }}
livenessProbe:
httpGet:
path: /v1/info
Expand Down
5 changes: 5 additions & 0 deletions charts/trino/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ spec:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
{{- range $key, $value := .Values.worker.additionalExposedPorts }}
- name: {{ $value.name }}
containerPort: {{ $value.port }}
protocol: {{ $value.protocol }}
{{- end }}
livenessProbe:
httpGet:
path: /v1/info
Expand Down
6 changes: 6 additions & 0 deletions charts/trino/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ spec:
targetPort: http
protocol: TCP
name: http
{{- range $key, $value := .Values.coordinator.additionalExposedPorts }}
- port: {{ $value.servicePort }}
name: {{ $value.name }}
targetPort: {{ $value.port }}
protocol: {{ $value.protocol }}
{{- end }}
selector:
app: {{ template "trino.name" . }}
release: {{ .Release.Name }}
Expand Down
4 changes: 4 additions & 0 deletions charts/trino/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ coordinator:

additionalJVMConfig: {}

additionalExposedPorts: {}

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down Expand Up @@ -210,6 +212,8 @@ worker:

additionalJVMConfig: {}

additionalExposedPorts: {}

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down

0 comments on commit dd8aa52

Please sign in to comment.