From b0980f7a87ce31384e0eab9b95551a6b51446f5e Mon Sep 17 00:00:00 2001 From: Angie Wang Date: Tue, 27 Oct 2020 11:30:10 -0400 Subject: [PATCH] Add configurations for helm/tiller sql storage backend This adds two parameters to the armada and tiller charts to allow to configure sql storage backend [0]. [0]: https://v2.helm.sh/docs/install/#sql-storage-backend Change-Id: Iba621c4ebcb0e34d514358ac5970697e2215166c Signed-off-by: Angie Wang --- charts/armada/templates/deployment-api.yaml | 4 ++++ charts/armada/values.yaml | 3 +++ charts/tiller/templates/deployment-tiller.yaml | 4 ++++ charts/tiller/values.yaml | 3 +++ 4 files changed, 14 insertions(+) diff --git a/charts/armada/templates/deployment-api.yaml b/charts/armada/templates/deployment-api.yaml index 772c5732..562e3d04 100644 --- a/charts/armada/templates/deployment-api.yaml +++ b/charts/armada/templates/deployment-api.yaml @@ -170,6 +170,10 @@ spec: - /tiller {{- if .Values.conf.tiller.storage }} - --storage={{ .Values.conf.tiller.storage }} +{{- if and (eq .Values.conf.tiller.storage "sql") (.Values.conf.tiller.sql_dialect) (.Values.conf.tiller.sql_connection) }} + - --sql-dialect={{ .Values.conf.tiller.sql_dialect }} + - --sql-connection-string={{ .Values.conf.tiller.sql_connection }} +{{- end }} {{- end }} - -listen - ":{{ .Values.conf.tiller.port }}" diff --git a/charts/armada/values.yaml b/charts/armada/values.yaml index fd4b4759..3a4427e4 100644 --- a/charts/armada/values.yaml +++ b/charts/armada/values.yaml @@ -211,6 +211,9 @@ conf: verbosity: 5 trace: false storage: null + # Only postgres is supported so far + sql_dialect: postgres + sql_connection: null namespace: kube-system # Limit the maximum number of revisions saved per release. 0 for no limit. history_max: 0 diff --git a/charts/tiller/templates/deployment-tiller.yaml b/charts/tiller/templates/deployment-tiller.yaml index d5c9cb3d..1f04a13a 100644 --- a/charts/tiller/templates/deployment-tiller.yaml +++ b/charts/tiller/templates/deployment-tiller.yaml @@ -98,6 +98,10 @@ spec: - /tiller {{- if .Values.conf.tiller.storage }} - --storage={{ .Values.conf.tiller.storage }} +{{- if and (eq .Values.conf.tiller.storage "sql") (.Values.conf.tiller.sql_dialect) (.Values.conf.tiller.sql_connection) }} + - --sql-dialect={{ .Values.conf.tiller.sql_dialect }} + - --sql-connection-string={{ .Values.conf.tiller.sql_connection }} +{{- end }} {{- end }} - -listen - ":{{ .Values.conf.tiller.port }}" diff --git a/charts/tiller/values.yaml b/charts/tiller/values.yaml index 7ec76ef9..495e3c1d 100644 --- a/charts/tiller/values.yaml +++ b/charts/tiller/values.yaml @@ -45,6 +45,9 @@ conf: tiller: verbosity: 5 storage: null + # Only postgres is supported so far + sql_dialect: postgres + sql_connection: null trace: false # Note: Defaulting to the (default) kubernetes grace period, as anything # greater than that will have no effect.