From 8e067f00bec02b3666b063cf2f0b8a96ce08f9f6 Mon Sep 17 00:00:00 2001 From: azhurbilo Date: Thu, 22 Apr 2021 20:22:45 +0300 Subject: [PATCH] add ability to disable some helm lighthouse resources Signed-off-by: azhurbilo --- .../backstage/templates/lighthouse-config.yaml | 4 +++- ... => postgresql-password-backend-secret.yaml} | 0 .../postgresql-password-lighthouse-secret.yaml | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) rename contrib/chart/backstage/templates/{postgresql-password-secret.yaml => postgresql-password-backend-secret.yaml} (100%) create mode 100644 contrib/chart/backstage/templates/postgresql-password-lighthouse-secret.yaml diff --git a/contrib/chart/backstage/templates/lighthouse-config.yaml b/contrib/chart/backstage/templates/lighthouse-config.yaml index fdf4bd8b06..7b8cad42dc 100644 --- a/contrib/chart/backstage/templates/lighthouse-config.yaml +++ b/contrib/chart/backstage/templates/lighthouse-config.yaml @@ -1,3 +1,4 @@ +{{- if .Values.lighthouse.enabled }} apiVersion: v1 kind: ConfigMap metadata: @@ -7,4 +8,5 @@ data: PGUSER: {{ include "lighthouse.postgresql.user" . | quote }} PGPORT: {{ include "lighthouse.postgresql.port" . | quote }} PGHOST: {{ include "lighthouse.postgresql.host" . | quote }} - PGPATH_TO_CA: {{ include "backstage.lighthouse.postgresCaFilename" . | quote }} \ No newline at end of file + PGPATH_TO_CA: {{ include "backstage.lighthouse.postgresCaFilename" . | quote }} +{{- end }} \ No newline at end of file diff --git a/contrib/chart/backstage/templates/postgresql-password-secret.yaml b/contrib/chart/backstage/templates/postgresql-password-backend-secret.yaml similarity index 100% rename from contrib/chart/backstage/templates/postgresql-password-secret.yaml rename to contrib/chart/backstage/templates/postgresql-password-backend-secret.yaml diff --git a/contrib/chart/backstage/templates/postgresql-password-lighthouse-secret.yaml b/contrib/chart/backstage/templates/postgresql-password-lighthouse-secret.yaml new file mode 100644 index 0000000000..e7374e70db --- /dev/null +++ b/contrib/chart/backstage/templates/postgresql-password-lighthouse-secret.yaml @@ -0,0 +1,17 @@ +{{- if .Values.lighthouse.enabled }} +{{- if not .Values.postgresql.enabled }} +--- +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: {{ include "lighthouse.postgresql.passwordSecret" . }} + labels: + release: {{ .Release.Name }} + annotations: + "helm.sh/hook": "pre-install,pre-upgrade" + "helm.sh/hook-delete-policy": "before-hook-creation" +data: + postgresql-password: {{ .Values.lighthouse.database.connection.password | b64enc }} +{{- end }} +{{- end }}