From 633f761c712c0965d4ad84174898779462030db2 Mon Sep 17 00:00:00 2001 From: jessebot Date: Sat, 18 Jan 2025 12:08:39 +0100 Subject: [PATCH] fix db host templating --- charts/pixelfed/Chart.yaml | 2 +- charts/pixelfed/README.md | 4 ++-- charts/pixelfed/templates/deployment.yaml | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/charts/pixelfed/Chart.yaml b/charts/pixelfed/Chart.yaml index 8aa8695..a91bd78 100644 --- a/charts/pixelfed/Chart.yaml +++ b/charts/pixelfed/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.1 +version: 0.4.2 # This is the version number of the application being deployed. # renovate:image=ghcr.io/mattlqx/docker-pixelfed diff --git a/charts/pixelfed/README.md b/charts/pixelfed/README.md index 12225e3..e88f777 100644 --- a/charts/pixelfed/README.md +++ b/charts/pixelfed/README.md @@ -1,6 +1,6 @@ # pixelfed -![Version: 0.4.1](https://img.shields.io/badge/Version-0.4.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.3-nginx](https://img.shields.io/badge/AppVersion-v0.12.3--nginx-informational?style=flat-square) +![Version: 0.4.2](https://img.shields.io/badge/Version-0.4.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.3-nginx](https://img.shields.io/badge/AppVersion-v0.12.3--nginx-informational?style=flat-square) A Helm chart for deploying Pixelfed on Kubernetes @@ -193,4 +193,4 @@ A Helm chart for deploying Pixelfed on Kubernetes | volumes | list | `[]` | Additional volumes on the output Deployment definition. | ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) +Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) diff --git a/charts/pixelfed/templates/deployment.yaml b/charts/pixelfed/templates/deployment.yaml index 3bbb695..8764ec3 100644 --- a/charts/pixelfed/templates/deployment.yaml +++ b/charts/pixelfed/templates/deployment.yaml @@ -270,15 +270,14 @@ spec: - name: DB_CONNECTION value: {{ .Values.externalDatabase.connection }} - name: DB_HOST - {{- if .Values.externalDatabase.enabled }} - {{- if .Values.externalDatabase.existingSecret }} + {{- if and .Values.externalDatabase.enabled .Values.externalDatabase.existingSecret }} valueFrom: secretKeyRef: name: {{ .Values.externalDatabase.existingSecret }} key: {{ .Values.externalDatabase.existingSecretKeys.host }} - {{- else }} + {{- else if and .Values.externalDatabase.enabled (not .Values.externalDatabase.existingSecret) }} value: {{ .Values.externalDatabase.host }} - {{- end }} + {{- else }} value: {{ .Values.postgresql.fullnameOverride }} {{- end }} - name: DB_USERNAME