Skip to content

[trino][catalogs] allow user catalogs own setup #325

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

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
83d9fad
New squashed commit
luismacosta Feb 12, 2025
ff97f8d
squash
luismacosta Feb 12, 2025
07839bb
Merge branch 'main' into secrets-trino
luismacosta Feb 12, 2025
e34e56e
Delete charts/trino/cenko.yaml
luismacosta Feb 12, 2025
6e79f81
Update README.md
luismacosta Feb 12, 2025
3a0df08
Update README.md
luismacosta Feb 12, 2025
ead587d
Update README.md
luismacosta Feb 12, 2025
5e5b068
Update secret.yaml
luismacosta Feb 12, 2025
051fe3b
remove validation
luismacosta Feb 12, 2025
c5faf82
add tests
luismacosta Feb 13, 2025
1c665a5
add tests
luismacosta Feb 13, 2025
149ace3
add tests
luismacosta Feb 13, 2025
660ed49
Update values.yaml
luismacosta Feb 18, 2025
7dc7fee
Update README.md
luismacosta Mar 2, 2025
2ac0d31
Update values.yaml
luismacosta Mar 2, 2025
baa2a98
Update secret.yaml
luismacosta Mar 2, 2025
467783c
Update values.yaml
luismacosta Mar 2, 2025
b7e9189
Update test-catalogs-secrets-values.yaml
luismacosta Mar 2, 2025
00b2d04
Update test-catalogs-secrets-values.yaml
luismacosta Mar 2, 2025
feff8d7
Update deployment-worker.yaml
luismacosta Mar 12, 2025
ae07835
Update deployment-coordinator.yaml
luismacosta Mar 12, 2025
a3ba746
Update deployment-coordinator.yaml
luismacosta Mar 12, 2025
93daba7
Update deployment-worker.yaml
luismacosta Mar 12, 2025
9de99f9
Update deployment-coordinator.yaml
luismacosta Mar 12, 2025
e591ad9
Update deployment-worker.yaml
luismacosta Mar 12, 2025
a892ebd
Merge branch 'trinodb:main' into secrets-trino
luismacosta Mar 18, 2025
72f8214
Merge branch 'trinodb:main' into secrets-trino
luismacosta Apr 9, 2025
bb54aad
Delete tests/trino/test-catalogs-secrets-values.yaml
luismacosta Apr 9, 2025
4a7561f
Update values.yaml
luismacosta Apr 9, 2025
a31f168
Update charts/trino/values.yaml
luismacosta Apr 9, 2025
1a43135
Update charts/trino/README.md
luismacosta Apr 9, 2025
196ea67
Update charts/trino/templates/deployment-coordinator.yaml
luismacosta Apr 9, 2025
da4344a
Update charts/trino/templates/deployment-worker.yaml
luismacosta Apr 9, 2025
28bda70
Update charts/trino/templates/secret.yaml
luismacosta Apr 9, 2025
6218061
revert values.yaml
luismacosta Apr 10, 2025
e49de08
Update charts/trino/values.yaml
luismacosta Apr 10, 2025
9eec1f1
all
luismacosta Apr 10, 2025
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: 1 addition & 1 deletion charts/trino/templates/configmap-catalog.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or .Values.catalogs .Values.additionalCatalogs }}
{{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
6 changes: 3 additions & 3 deletions charts/trino/templates/deployment-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
{{- if and (eq .Values.accessControl.type "configmap") (not .Values.accessControl.refreshPeriod) }}
checksum/access-control-config: {{ include (print $.Template.BasePath "/configmap-access-control-coordinator.yaml") . | sha256sum }}
{{- end }}
{{- if or .Values.catalogs .Values.additionalCatalogs }}
{{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }}
checksum/catalog-config: {{ include (print $.Template.BasePath "/configmap-catalog.yaml") . | sha256sum }}
{{- end }}
checksum/coordinator-config: {{ include (print $.Template.BasePath "/configmap-coordinator.yaml") . | sha256sum }}
Expand Down Expand Up @@ -56,7 +56,7 @@ spec:
- name: config-volume
configMap:
name: {{ template "trino.coordinator" . }}
{{- if or .Values.catalogs .Values.additionalCatalogs }}
{{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }}
- name: catalog-volume
configMap:
name: {{ template "trino.catalog" . }}
Expand Down Expand Up @@ -140,7 +140,7 @@ spec:
volumeMounts:
- mountPath: {{ .Values.server.config.path }}
name: config-volume
{{- if or .Values.catalogs .Values.additionalCatalogs }}
{{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }}
- mountPath: {{ .Values.server.config.path }}/catalog
name: catalog-volume
{{- end }}
Expand Down
9 changes: 6 additions & 3 deletions charts/trino/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ spec:
template:
metadata:
annotations:
{{- if or .Values.catalogs .Values.additionalCatalogs }}
{{- if .Values.additionalSecrets }}
checksum/secret-config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- end }}
{{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }}
checksum/catalog-config: {{ include (print $.Template.BasePath "/configmap-catalog.yaml") . | sha256sum }}
{{- end }}
checksum/worker-config: {{ include (print $.Template.BasePath "/configmap-worker.yaml") . | sha256sum }}
Expand Down Expand Up @@ -59,7 +62,7 @@ spec:
- name: config-volume
configMap:
name: {{ template "trino.worker" . }}
{{- if or .Values.catalogs .Values.additionalCatalogs }}
{{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }}
- name: catalog-volume
configMap:
name: {{ template "trino.catalog" . }}
Expand Down Expand Up @@ -126,7 +129,7 @@ spec:
volumeMounts:
- mountPath: {{ .Values.server.config.path }}
name: config-volume
{{- if or .Values.catalogs .Values.additionalCatalogs }}
{{- if or .Values.additionalCatalogs (and (.Values.catalogs) (gt (len .Values.catalogs) 0)) }}
- mountPath: {{ .Values.server.config.path }}/catalog
name: catalog-volume
{{- end }}
Expand Down
14 changes: 14 additions & 0 deletions charts/trino/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,17 @@ data:
group.db: {{ .Values.auth.groups | b64enc }}
{{- end }}
{{- end }}
---
{{- if .Values.additionalSecrets }}
{{- range .Values.additionalSecrets }}
apiVersion: v1
kind: Secret
metadata:
name: "{{ .name }}"
data:
{{- range $key, $val := .value }}
{{ $key }}: {{ $val | b64enc | nindent 4 }}
{{- end }}
type: Opaque
{{- end }}
{{- end }}
17 changes: 10 additions & 7 deletions charts/trino/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,13 @@ eventListenerProperties: []
# - custom-property2=custom-value2
# ```

catalogs:
tpch: |
connector.name=tpch
tpch.splits-per-node=4
tpcds: |
connector.name=tpcds
tpcds.splits-per-node=4
catalogs: {}
# tpch: |
# connector.name=tpch
# tpch.splits-per-node=4
# tpcds: |
# connector.name=tpcds
# tpcds.splits-per-node=4
# catalogs -- Configure
# [catalogs](https://trino.io/docs/current/installation/deployment.html#catalog-properties).
# @raw
Expand Down Expand Up @@ -547,6 +547,9 @@ secretMounts: []
# secretName: sample-secret
# path: /secrets/sample.json
# subPath: sample.json
# - name: catalogs
# secretName: catalogs
# path: /etc/trino/catalog
# ```

coordinator:
Expand Down
Loading