From b4fbf73a212a6c8ae5bdf5c9641d89af210940a0 Mon Sep 17 00:00:00 2001 From: Ryan D Date: Thu, 23 Nov 2023 14:47:03 +1100 Subject: [PATCH] Added auth.passwordAuthSecret value for custom passworddb secret name --- charts/trino/templates/deployment-coordinator.yaml | 4 ++++ charts/trino/templates/secret.yaml | 4 ++++ charts/trino/values.yaml | 2 ++ 3 files changed, 10 insertions(+) diff --git a/charts/trino/templates/deployment-coordinator.yaml b/charts/trino/templates/deployment-coordinator.yaml index 0941f9c5..a6ab9811 100644 --- a/charts/trino/templates/deployment-coordinator.yaml +++ b/charts/trino/templates/deployment-coordinator.yaml @@ -61,7 +61,11 @@ spec: {{- if eq .Values.server.config.authenticationType "PASSWORD" }} - name: password-volume secret: + {{- if and .Values.auth .Values.auth.passwordAuthSecret }} + secretName: {{ .Values.auth.passwordAuthSecret }} + {{- else }} secretName: trino-password-authentication + {{- end }} items: - key: password.db path: password.db diff --git a/charts/trino/templates/secret.yaml b/charts/trino/templates/secret.yaml index 95064798..6f2dc70f 100644 --- a/charts/trino/templates/secret.yaml +++ b/charts/trino/templates/secret.yaml @@ -3,7 +3,11 @@ apiVersion: v1 kind: Secret metadata: + {{- if and .Values.auth .Values.auth.passwordAuthSecret }} + name: {{ .Values.auth.passwordAuthSecret }} + {{- else }} name: trino-password-authentication + {{- end }} labels: {{- include "trino.labels" . | nindent 4 }} data: diff --git a/charts/trino/values.yaml b/charts/trino/values.yaml index fb0a7f63..2947e134 100644 --- a/charts/trino/values.yaml +++ b/charts/trino/values.yaml @@ -153,6 +153,8 @@ auth: {} # Set username and password # https://trino.io/docs/current/security/password-file.html#file-format # passwordAuth: "username:encrypted-password-with-htpasswd" + # or set the name of a secret containing this file in the password.db key + # passwordAuthSecret: "trino-password-authentication" # Set users' groups # https://trino.io/docs/current/security/group-file.html#file-format # refreshPeriod: 5s