Skip to content
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
5 changes: 5 additions & 0 deletions charts/trino/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ The following table lists the configurable parameters of the Trino chart and the
| `kafka.mountPath` | | `"/etc/trino/schemas"` |
| `kafka.tableDescriptions` | | `{}` |
| `commonLabels` | Labels that get applied to every resource's metadata | `{}` |
| `ingress.enabled` | | `false` |
| `ingress.className` | | `""` |
| `ingress.annotations` | | `{}` |
| `ingress.hosts` | | `[]` |
| `ingress.tls` | | `[]` |



Expand Down
41 changes: 41 additions & 0 deletions charts/trino/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "trino.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "trino.coordinator" . }}
labels:
{{- include "trino.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
Comment on lines +7 to +11
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe another PR, but we probably want these common things to be in the template helper file.

{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.className }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .Values.ingress.tls.secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
Comment on lines +36 to +38
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last thought is that perhaps we should enable users to override these values (e.g. if they have a sidecar metrics app or something) and make the Trino name/port number the defaults. I'll defer this decision to @hashhar but otherwise, I approve.

{{- end }}
{{- end }}
{{- end }}
14 changes: 13 additions & 1 deletion charts/trino/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,5 +295,17 @@ kafka:
# ]
# }
# }

commonLabels: {} # Labels that get applied to every resource's metadata
ingress:
enabled: false
className: ""
annotations: {}
hosts: []
# - host: trino.example.com
# paths:
# - path: /
# pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local