From 418e6cea1ed9d2727ec2fc117cf39915dd12ad8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=E1=B4=87=CA=80=C9=B4=E1=B4=85=20S=E1=B4=84=CA=9C?= =?UTF-8?q?=E1=B4=8F=CA=80=C9=A2=E1=B4=87=CA=80s?= Date: Tue, 5 Jul 2022 15:23:45 +0200 Subject: [PATCH] [tt-rss] Fix env vars (#1690) --- charts/stable/tt-rss/Chart.yaml | 8 +++----- charts/stable/tt-rss/templates/common.yaml | 21 --------------------- charts/stable/tt-rss/values.yaml | 8 ++++---- 3 files changed, 7 insertions(+), 30 deletions(-) diff --git a/charts/stable/tt-rss/Chart.yaml b/charts/stable/tt-rss/Chart.yaml index 4f233f86..d9528ed9 100644 --- a/charts/stable/tt-rss/Chart.yaml +++ b/charts/stable/tt-rss/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 appVersion: v1.8723.0 description: Tiny Tiny RSS is a free and open source web-based news feed (RSS/Atom) reader and aggregator name: tt-rss -version: 5.0.0 +version: 5.0.1 kubeVersion: ">=1.16.0-0" keywords: - tt-rss @@ -24,7 +24,5 @@ dependencies: condition: postgresql.enabled annotations: artifacthub.io/changes: |- - - kind: changed - description: Upgraded `postgresql` chart dependency to version 11.6.12 - - kind: changed - description: Changed the default user for the postgresql database to `tt-rss` + - kind: fixed + description: Fixed the default values for the database environment variables. diff --git a/charts/stable/tt-rss/templates/common.yaml b/charts/stable/tt-rss/templates/common.yaml index a825c85d..a6613c2c 100644 --- a/charts/stable/tt-rss/templates/common.yaml +++ b/charts/stable/tt-rss/templates/common.yaml @@ -1,22 +1 @@ -{{/* Make sure all variables are set properly */}} -{{- include "common.values.setup" . }} - -{{/* if TTRSS_DB_HOST is not set use internal postgres chart */}} -{{- if eq .Values.env.TTRSS_DB_HOST "" -}} - {{- $_ := set .Values.env "TTRSS_DB_HOST" (printf "%s-postgresql" .Release.Name) -}} -{{- end -}} -{{/* if TTRSS_DB_USER is not set use internal postgres chart */}} -{{- if eq .Values.env.TTRSS_DB_USER "" -}} - {{- $_ := set .Values.env "TTRSS_DB_USER" .Values.postgresql.auth.username -}} -{{- end -}} -{{/* if TTRSS_DB_USER is not set use internal postgres chart */}} -{{- if eq .Values.env.TTRSS_DB_PASS "" -}} - {{- $_ := set .Values.env "TTRSS_DB_PASS" .Values.postgresql.auth.password -}} -{{- end -}} -{{/* if TTRSS_DB_USER is not set use internal postgres chart */}} -{{- if eq .Values.env.TTRSS_DB_NAME "" -}} - {{- $_ := set .Values.env "TTRSS_DB_NAME" .Values.postgresql.auth.database -}} -{{- end -}} - -{{/* Render the templates */}} {{ include "common.all" . }} diff --git a/charts/stable/tt-rss/values.yaml b/charts/stable/tt-rss/values.yaml index 73125f6b..dc12c164 100644 --- a/charts/stable/tt-rss/values.yaml +++ b/charts/stable/tt-rss/values.yaml @@ -21,18 +21,18 @@ env: TTRSS_SELF_URL_PATH: "" # -- Postgres database hostname # @default -- internal postgresql URL - TTRSS_DB_HOST: "" + TTRSS_DB_HOST: "{{ printf \"%s-postgresql\" .Release.Name }}" # -- Postgres database port. TTRSS_DB_PORT: "5432" # -- Postgres database user name # @default -- postgresql.auth.username value - TTRSS_DB_USER: "" + TTRSS_DB_USER: "{{ .Values.postgresql.auth.username }}" # -- Postgres database password # @default -- postgresql.auth.password value - TTRSS_DB_PASS: "" + TTRSS_DB_PASS: "{{ .Values.postgresql.auth.password }}" # -- Postgres database password # @default -- postgresql.auth.database value - TTRSS_DB_NAME: "" + TTRSS_DB_NAME: "{{ .Values.postgresql.auth.database }}" # -- Configure the services for the chart here. # @default -- See below.