From beaa471aca01fd26f1737228853be0f0de94b2d1 Mon Sep 17 00:00:00 2001 From: RocketProto <142548912+rocketproto@users.noreply.github.com> Date: Sun, 27 Aug 2023 06:56:45 +0930 Subject: [PATCH] fix: Decouple BASE_URL from Ingress host (#498) Closes #496 --- charts/planka/Chart.yaml | 2 +- charts/planka/templates/deployment.yaml | 4 +++- charts/planka/values.yaml | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/charts/planka/Chart.yaml b/charts/planka/Chart.yaml index bea7c895..867a7067 100644 --- a/charts/planka/Chart.yaml +++ b/charts/planka/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.1.1 +version: 0.1.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/planka/templates/deployment.yaml b/charts/planka/templates/deployment.yaml index d9b56cd6..1af54075 100644 --- a/charts/planka/templates/deployment.yaml +++ b/charts/planka/templates/deployment.yaml @@ -64,7 +64,9 @@ spec: name: planka-postgresql-svcbind-custom-user key: uri - name: BASE_URL - {{- if .Values.ingress.enabled }} + {{- if .Values.baseUrl }} + value: {{ .Values.baseUrl }} + {{- else if .Values.ingress.enabled }} value: {{ printf "https://%s" (first .Values.ingress.hosts).host }} {{- else }} value: http://localhost:3000 diff --git a/charts/planka/values.yaml b/charts/planka/values.yaml index 67e48431..7d6e319a 100644 --- a/charts/planka/values.yaml +++ b/charts/planka/values.yaml @@ -17,6 +17,10 @@ fullnameOverride: "" # Generate a secret using openssl rand -base64 45 secretkey: "" +# Base url for Planka. Will override `ingress.hosts[0].host` +# Defaults to `http://localhost:3000` if ingress is disabled. +baseUrl: "" + serviceAccount: # Specifies whether a service account should be created create: true @@ -50,6 +54,7 @@ ingress: # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" hosts: + # Used to set planka BASE_URL if no `baseurl` is provided. - host: planka.local paths: - path: /