Armada: add configurations for helm sql storage backend

Configmap is the default helmv2 storage backend to store
release information but its 1MB resource limit prevents
scaling up stx openstack workers, so we want to use sql
as helm storage backend.

Update armada chart to support sql storage backend
configuration for helm/tiller.

Upstream review: https://review.opendev.org/#/c/759899/

Partial-Bug: 1887677
Change-Id: Ifcb7f28e99413be5a0dbfddf684ca064866860f5
Signed-off-by: Angie Wang <angie.wang@windriver.com>
This commit is contained in:
Angie Wang 2020-09-28 11:24:12 -04:00
parent dba4d21b5f
commit 39f6f92cc8
2 changed files with 43 additions and 0 deletions

View File

@ -16,6 +16,7 @@ URL: https://airship-armada.readthedocs.io/
Source0: %{name}-%{git_sha}.tar.gz Source0: %{name}-%{git_sha}.tar.gz
Patch1: 0001-Add-Helm-v2-client-initialization-using-tiller-postS.patch Patch1: 0001-Add-Helm-v2-client-initialization-using-tiller-postS.patch
Patch2: 0002-Add-configurations-for-Helm-SQL-storage-backend.patch
BuildArch: noarch BuildArch: noarch
@ -29,6 +30,7 @@ BuildRequires: chartmuseum
%prep %prep
%setup -n armada %setup -n armada
%patch1 -p1 %patch1 -p1
%patch2 -p1
%build %build

View File

@ -0,0 +1,41 @@
From fa1ab71ca74d7b77cac6228ae6ab8d8d310e997e Mon Sep 17 00:00:00 2001
From: Angie Wang <angie.wang@windriver.com>
Date: Mon, 28 Sep 2020 11:19:46 -0400
Subject: [PATCH 1/1] Add configurations for Helm SQL storage backend
---
charts/armada/templates/deployment-api.yaml | 4 ++++
charts/armada/values.yaml | 2 ++
2 files changed, 6 insertions(+)
diff --git a/charts/armada/templates/deployment-api.yaml b/charts/armada/templates/deployment-api.yaml
index ccbdb4d..eca4543 100644
--- a/charts/armada/templates/deployment-api.yaml
+++ b/charts/armada/templates/deployment-api.yaml
@@ -167,6 +167,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 fb3e5c2..5a61c96 100644
--- a/charts/armada/values.yaml
+++ b/charts/armada/values.yaml
@@ -211,6 +211,8 @@ conf:
verbosity: 5
trace: false
storage: null
+ 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
--
1.8.3.1