Skip to content

Commit

Permalink
Restore ability to provide fault tolerance config without b64 encoded…
Browse files Browse the repository at this point in the history
… secret (#195)

* configAsSecret for fault tolerance

* chart and readme update

* condition for volumes as well
  • Loading branch information
cccs-nik authored Dec 22, 2023
1 parent 2dea47b commit 6382a14
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 7 deletions.
4 changes: 2 additions & 2 deletions valeriano-manassero/trino/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "433"
description: High performance, distributed SQL query engine for big data
name: trino
version: 9.0.0
version: 9.1.0
kubeVersion: ">= 1.24.0-0 < 1.29.0-0"
home: https://trino.io
icon: https://trino.io/assets/images/trino-logo/trino-ko_tiny-alt.svg
Expand All @@ -27,4 +27,4 @@ keywords:
annotations:
artifacthub.io/changes: |
- kind: changed
description: modify JVM configurations to work with 433 version
description: restore ability to provide fault tolerance config without b64 encoded secret
3 changes: 2 additions & 1 deletion valeriano-manassero/trino/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# trino

![Version: 9.0.0](https://img.shields.io/badge/Version-9.0.0-informational?style=flat-square) ![AppVersion: 433](https://img.shields.io/badge/AppVersion-433-informational?style=flat-square)
![Version: 9.1.0](https://img.shields.io/badge/Version-9.1.0-informational?style=flat-square) ![AppVersion: 433](https://img.shields.io/badge/AppVersion-433-informational?style=flat-square)

High performance, distributed SQL query engine for big data

Expand Down Expand Up @@ -89,6 +89,7 @@ Kubernetes: `>= 1.24.0-0 < 1.29.0-0`
| connectors | object | `{}` | |
| containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]}}` | SecurityContext configuration for containers |
| eventListenerProperties | object | `{}` | |
| faultTolerance.configAsSecret | bool | `true` | |
| faultTolerance.enabled | bool | `false` | |
| fullnameOverride | string | `"trino"` | |
| groupProvider | object | `{}` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ data:
{{ .Values.groupProvider.customProperties | indent 4 }}
{{- end }}{{- end }}

{{- if .Values.faultTolerance.enabled }}{{- if not .Values.faultTolerance.configAsSecret }}
exchange-manager.properties: |
exchange-manager.name=filesystem
{{ .Values.faultTolerance.properties | indent 4 }}
{{- end }}{{- end }}

{{ if .Values.eventListenerProperties }}
event-listener.properties: |
{{- range $configValue := .Values.eventListenerProperties }}
Expand Down
6 changes: 6 additions & 0 deletions valeriano-manassero/trino/templates/configmap-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ data:
log.properties: |
io.trino={{ .Values.config.general.log.trino.level }}
{{- if .Values.faultTolerance.enabled }}{{- if not .Values.faultTolerance.configAsSecret }}
exchange-manager.properties: |
exchange-manager.name=filesystem
{{ .Values.faultTolerance.properties | indent 4 }}
{{- end }}{{- end }}

{{ if .Values.eventListenerProperties }}
event-listener.properties: |
{{- range $configValue := .Values.eventListenerProperties }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
- configMap:
name: {{ template "trino.coordinator" . }}

{{- if .Values.faultTolerance.enabled }}
{{- if and .Values.faultTolerance.enabled .Values.faultTolerance.configAsSecret }}
- secret:
name: {{ .Values.faultToleranceSecret | default "trino-fault-tolerance" }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion valeriano-manassero/trino/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
- configMap:
name: {{ template "trino.worker" . }}

{{- if .Values.faultTolerance.enabled }}
{{- if and .Values.faultTolerance.enabled .Values.faultTolerance.configAsSecret }}
- secret:
name: {{ .Values.faultToleranceSecret | default "trino-fault-tolerance" }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions valeriano-manassero/trino/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ data:
password.db: {{ .Values.auth.passwordAuth | b64enc }}
{{- end }}{{- end }}{{- end }}
---
{{- if .Values.faultTolerance.enabled }}{{- if not .Values.faultToleranceSecret }}
{{- if and .Values.faultTolerance.enabled .Values.faultTolerance.configAsSecret (not .Values.faultToleranceSecret)}}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -33,4 +33,4 @@ metadata:
data:
exchange-manager.properties: |
{{ .Values.faultTolerance.properties | b64enc }}
{{- end }}{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions valeriano-manassero/trino/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ groupProvider: {}

faultTolerance:
enabled: false
configAsSecret: true
# properties: |-
# exchange-manager.name=filesystem
# exchange.base-directories=s3://<bucket-name>
Expand Down

0 comments on commit 6382a14

Please sign in to comment.