From 521120afe6c955d46b8f82a4599d3a29fa6f17a4 Mon Sep 17 00:00:00 2001 From: cccs-mmrouet <62021113+cccs-mmrouet@users.noreply.github.com> Date: Mon, 22 Apr 2024 10:31:53 -0400 Subject: [PATCH] Feature/add extra volumes and extra volume mounts to workers (#201) * Added extraVolumes and extraVolumeMounts configuration * helm-docs * version 9.2.0 * description of changes in chart annotations * fixed identation for example --------- Co-authored-by: cccs-nik <68961854+cccs-nik@users.noreply.github.com> --- valeriano-manassero/trino/Chart.yaml | 4 ++-- valeriano-manassero/trino/README.md | 4 +++- .../trino/templates/deployment-worker.yaml | 8 ++++++++ valeriano-manassero/trino/values.yaml | 10 ++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/valeriano-manassero/trino/Chart.yaml b/valeriano-manassero/trino/Chart.yaml index a91da07..88e9bdc 100644 --- a/valeriano-manassero/trino/Chart.yaml +++ b/valeriano-manassero/trino/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "433" description: High performance, distributed SQL query engine for big data name: trino -version: 9.1.1 +version: 9.2.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 @@ -27,4 +27,4 @@ keywords: annotations: artifacthub.io/changes: | - kind: changed - description: Fix worker initContainer condition so it is done on worker and not on coordinator. + description: Add the capability to configure extra volumes and extra volume mounts. diff --git a/valeriano-manassero/trino/README.md b/valeriano-manassero/trino/README.md index 3d5ca55..0c54285 100644 --- a/valeriano-manassero/trino/README.md +++ b/valeriano-manassero/trino/README.md @@ -1,6 +1,6 @@ # trino -![Version: 9.1.1](https://img.shields.io/badge/Version-9.1.1-informational?style=flat-square) ![AppVersion: 433](https://img.shields.io/badge/AppVersion-433-informational?style=flat-square) +![Version: 9.2.0](https://img.shields.io/badge/Version-9.2.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 @@ -72,6 +72,8 @@ Kubernetes: `>= 1.24.0-0 < 1.29.0-0` | config.worker.env | list | `[]` | | | config.worker.envFrom | list | `[]` | | | config.worker.extraConfig | string | `""` | | +| config.worker.extraVolumeMounts | object | `{}` | | +| config.worker.extraVolumes | object | `{}` | | | config.worker.initContainers | list | `[]` | | | config.worker.jvm.gcMethod.g1.heapRegionSize | string | `"32M"` | | | config.worker.jvm.gcMethod.type | string | `"UseG1GC"` | | diff --git a/valeriano-manassero/trino/templates/deployment-worker.yaml b/valeriano-manassero/trino/templates/deployment-worker.yaml index e7094d2..8f63e8b 100644 --- a/valeriano-manassero/trino/templates/deployment-worker.yaml +++ b/valeriano-manassero/trino/templates/deployment-worker.yaml @@ -74,6 +74,10 @@ spec: configMap: name: {{ .configMapName }} {{- end }} + {{- range $volumeName, $volume := .Values.config.worker.extraVolumes }} + - name: {{ $volumeName }} + {{- tpl (toYaml $volume) $ | nindent 10 -}} + {{- end }} {{- if or .Values.jmxExporter.worker.enabled .Values.config.worker.initContainers }} initContainers: {{- if .Values.jmxExporter.worker.enabled }} @@ -152,6 +156,10 @@ spec: subPath: {{ .subPath }} {{- end }} {{- end }} + {{- range $mountName, $mount := .Values.config.worker.extraVolumeMounts }} + - name: {{ $mountName }} + {{- tpl (toYaml $mount) $ | nindent 14 -}} + {{- end }} {{- if .Values.jmxExporter.worker.enabled }} ports: - name: jmx-exporter diff --git a/valeriano-manassero/trino/values.yaml b/valeriano-manassero/trino/values.yaml index b970df1..fd8894b 100644 --- a/valeriano-manassero/trino/values.yaml +++ b/valeriano-manassero/trino/values.yaml @@ -128,6 +128,16 @@ config: # preStop: # exec: # command: ["sh", "-c", "curl -v -X PUT -d '\"SHUTTING_DOWN\"' -H \"Content-type: application/json\" -H \"X-Trino-User: admin\" http://localhost:8080/v1/info/state"] + extraVolumeMounts: {} + # sample config for temp storage volume mount + # localtemp: + # mountpath: /tmp/localtemp + # readOnly: false + extraVolumes: {} + # sample config for temp storage volume + # localtemp: + # hostPath: + # path: /mnt eventListenerProperties: {}