Skip to content

Commit

Permalink
Add support for additional user defined ConfigMaps
Browse files Browse the repository at this point in the history
  • Loading branch information
huw0 committed May 25, 2024
1 parent 2d372b5 commit 2f35981
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 0 deletions.
27 changes: 27 additions & 0 deletions charts/trino/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,15 @@ Fast distributed SQL query engine for big data analytics that helps you explore
* `serviceAccount.annotations` - object, default: `{}`

Annotations to add to the service account
* `configMounts` - list, default: `[]`

Allows mounting additional Trino configuration files from Kubernetes config maps on all nodes.
Example:
```yaml
- name: sample-config-mount
configMap: sample-config-map
path: /config-map/sample.json
```
* `secretMounts` - list, default: `[]`

Allows mounting additional Trino configuration files from Kubernetes secrets on all nodes.
Expand Down Expand Up @@ -363,6 +372,15 @@ Fast distributed SQL query engine for big data analytics that helps you explore
readOnly: true
* `coordinator.annotations` - object, default: `{}`
* `coordinator.labels` - object, default: `{}`
* `coordinator.configMounts` - list, default: `[]`

Allows mounting additional Trino configuration files from Kubernetes config maps on the coordinator node.
Example:
```yaml
- name: sample-config-mount
configMap: sample-config-mount
path: /config-mount/sample.json
```
* `coordinator.secretMounts` - list, default: `[]`

Allows mounting additional Trino configuration files from Kubernetes secrets on the coordinator node.
Expand Down Expand Up @@ -444,6 +462,15 @@ Fast distributed SQL query engine for big data analytics that helps you explore
```
* `worker.annotations` - object, default: `{}`
* `worker.labels` - object, default: `{}`
* `worker.configMounts` - list, default: `[]`

Allows mounting additional Trino configuration files from Kubernetes config maps on all worker nodes.
Example:
```yaml
- name: sample-config-mount
configMap: sample-config-mount
path: /config-mount/sample.json
```
* `worker.secretMounts` - list, default: `[]`

Allows mounting additional Trino configuration files from Kubernetes secrets on all worker nodes.
Expand Down
18 changes: 18 additions & 0 deletions charts/trino/templates/deployment-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ spec:
path: group.db
{{- end }}
{{- end }}
{{- range .Values.configMounts }}
- name: {{ .name }}
configMap:
name: {{ .configMap }}
{{- end }}
{{- range .Values.coordinator.configMounts }}
- name: {{ .name }}
configMap:
name: {{ .configMap }}
{{- end }}
{{- range .Values.secretMounts }}
- name: {{ .name }}
secret:
Expand Down Expand Up @@ -130,6 +140,14 @@ spec:
- mountPath: {{ .Values.server.config.path }}/resource-groups
name: resource-groups-volume
{{- end }}
{{- range .Values.configMounts }}
- name: {{ .name }}
mountPath: {{ .path }}
{{- end }}
{{- range .Values.coordinator.configMounts }}
- name: {{ .name }}
mountPath: {{ .path }}
{{- end }}
{{- range .Values.secretMounts }}
- name: {{ .name }}
mountPath: {{ .path }}
Expand Down
18 changes: 18 additions & 0 deletions charts/trino/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ spec:
- name: schemas-volume
configMap:
name: schemas-volume-worker
{{- range .Values.configMounts }}
- name: {{ .name }}
configMap:
name: {{ .configMap }}
{{- end }}
{{- range .Values.worker.configMounts }}
- name: {{ .name }}
configMap:
name: {{ .configMap }}
{{- end }}
{{- range .Values.secretMounts }}
- name: {{ .name }}
secret:
Expand Down Expand Up @@ -96,6 +106,14 @@ spec:
name: catalog-volume
- mountPath: {{ .Values.kafka.mountPath }}
name: schemas-volume
{{- range .Values.configMounts }}
- name: {{ .name }}
mountPath: {{ .path }}
{{- end }}
{{- range .Values.worker.configMounts }}
- name: {{ .name }}
mountPath: {{ .path }}
{{- end }}
{{- range .Values.secretMounts }}
- name: {{ .name }}
mountPath: {{ .path }}
Expand Down
33 changes: 33 additions & 0 deletions charts/trino/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,17 @@ serviceAccount:
# -- Annotations to add to the service account
annotations: {}

configMounts: []
# configMounts -- Allows mounting additional Trino configuration files from
# Kubernetes config maps on all nodes.
# @raw
# Example:
# ```yaml
# - name: sample-config-mount
# configMap: sample-config-map
# path: /config-map/sample.json
# ```

secretMounts: []
# secretMounts -- Allows mounting additional Trino configuration files from
# Kubernetes secrets on all nodes.
Expand Down Expand Up @@ -424,6 +435,17 @@ coordinator:

labels: {}

configMounts: []
# coordinator.configMounts -- Allows mounting additional Trino configuration
# files from Kubernetes config maps on the coordinator node.
# @raw
# Example:
# ```yaml
# - name: sample-config-mount
# configMap: sample-config-mount
# path: /config-mount/sample.json
# ```

secretMounts: []
# coordinator.secretMounts -- Allows mounting additional Trino configuration
# files from Kubernetes secrets on the coordinator node.
Expand Down Expand Up @@ -543,6 +565,17 @@ worker:

labels: {}

configMounts: []
# worker.configMounts -- Allows mounting additional Trino configuration
# files from Kubernetes config maps on all worker nodes.
# @raw
# Example:
# ```yaml
# - name: sample-config-mount
# configMap: sample-config-mount
# path: /config-mount/sample.json
# ```

secretMounts: []
# worker.secretMounts -- Allows mounting additional Trino configuration
# files from Kubernetes secrets on all worker nodes.
Expand Down

0 comments on commit 2f35981

Please sign in to comment.