diff --git a/charts/invoiceninja/Chart.yaml b/charts/invoiceninja/Chart.yaml index ed4e465..91aab47 100644 --- a/charts/invoiceninja/Chart.yaml +++ b/charts/invoiceninja/Chart.yaml @@ -13,7 +13,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.7.5 +version: 0.7.6 # 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 # follow Semantic Versioning. They should reflect the version the application is using. diff --git a/charts/invoiceninja/README.md b/charts/invoiceninja/README.md index afca6b4..377547c 100644 --- a/charts/invoiceninja/README.md +++ b/charts/invoiceninja/README.md @@ -80,6 +80,7 @@ The following table shows the configuration options for the Invoice Ninja helm c | `image.debug` | Specify if debug logs should be enabled | `false` | | `debug` | Turn on debug mode on Invoice Ninja | `false` | | `appKey` | Laravel Application Key (ignored if existing secret is provided) | _random 32 character alphanumeric string_ | +| `appURL` | Override Laravel Application URL (automatically set if blank) | `""` | | `userEmail` | Initial user email address | `admin@example.com` | | `userPassword` | Initial user password (ignored if existing secret is provided) | `changeme!` | | `logChannel` | Name of log channel to use | `nil` | diff --git a/charts/invoiceninja/templates/_helpers.tpl b/charts/invoiceninja/templates/_helpers.tpl index 63b309a..9f9ea13 100644 --- a/charts/invoiceninja/templates/_helpers.tpl +++ b/charts/invoiceninja/templates/_helpers.tpl @@ -50,7 +50,6 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this {{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}} {{- end -}} - {{/* Create the name of the service account to use */}} @@ -97,6 +96,29 @@ Return the proper Storage Name {{- printf "%s-%s" .Release.Name "storage" | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{/* +Return the proper app URL +*/}} +{{- define "invoiceninja.url" -}} + {{- if .Values.appURL }} + {{- printf "%s" .Values.appURL -}} + {{- else if .Values.nginx.ingress.enabled }} + {{- if .Values.nginx.ingress.tls }} + {{- printf "https://%s" .Values.nginx.ingress.hostname -}} + {{- else }} + {{- printf "http://%s" .Values.nginx.ingress.hostname -}} + {{- end }} + {{- else if .Values.ingress.enabled }} + {{- if .Values.ingress.tls }} + {{- printf "https://%s" .Values.ingress.hostname -}} + {{- else }} + {{- printf "http://%s" .Values.ingress.hostname -}} + {{- end }} + {{- else }} + {{- printf "http://%s" (include "common.names.fullname" .) -}} + {{- end }} +{{- end -}} + {{/* Return the MariaDB Hostname */}} diff --git a/charts/invoiceninja/templates/configmap.yaml b/charts/invoiceninja/templates/configmap.yaml index bebfcf8..86a8f6c 100644 --- a/charts/invoiceninja/templates/configmap.yaml +++ b/charts/invoiceninja/templates/configmap.yaml @@ -12,15 +12,7 @@ metadata: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} data: - {{- if .Values.nginx.ingress.enabled }} - {{- if .Values.nginx.ingress.tls }} - APP_URL: "https://{{ .Values.nginx.ingress.hostname }}" - {{- else }} - APP_URL: "http://{{ .Values.nginx.ingress.hostname }}" - {{- end }} - {{- else }} - APP_URL: "http://{{ include "common.names.fullname" . }}" - {{- end }} + APP_URL: {{ include "invoiceninja.url" . | quote }} APP_DEBUG: {{ .Values.debug | quote }} DB_HOST: {{ include "invoiceninja.databaseHost" . | quote }} DB_PORT: {{ include "invoiceninja.databasePort" . | quote }} diff --git a/charts/invoiceninja/values.yaml b/charts/invoiceninja/values.yaml index 4abcdcd..8daa2d4 100644 --- a/charts/invoiceninja/values.yaml +++ b/charts/invoiceninja/values.yaml @@ -38,6 +38,10 @@ debug: false ## appKey: "" +## Override app URL +## +appURL: "" + ## Email of user to create first run ## If not specified, default user email will be "admin@example.com" ##