mirror of
https://github.com/alexandrev/xslt-lab.git
synced 2026-09-20 04:23:16 +00:00
feat(chart): allow configuring backend URL
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: xslt-playground
|
||||
description: Helm chart for xslt-playground frontend and backend
|
||||
version: 0.1.0
|
||||
version: 0.1.1
|
||||
appVersion: "0.1.0"
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@ Key parameters in `values.yaml`:
|
||||
- `ingress` – configure ingress for the frontend service. The backend is exposed
|
||||
through a second ingress using the hostname `backend.<hostname>` with the same
|
||||
settings.
|
||||
- `frontend.backendUrl` – value for `VITE_BACKEND_URL` used by the frontend.
|
||||
When empty it defaults to the internal backend service URL.
|
||||
- `hpa` – enable CPU-based autoscaling for both deployments.
|
||||
|
||||
When `firebase.enabled` is true you must create the secret before installing the chart:
|
||||
|
||||
@@ -22,7 +22,7 @@ spec:
|
||||
imagePullPolicy: {{ .Values.image.frontend.pullPolicy }}
|
||||
env:
|
||||
- name: VITE_BACKEND_URL
|
||||
value: http://{{ include "xslt-playground.fullname" . }}-backend:{{ .Values.service.backend.port }}
|
||||
value: {{ default (printf "http://%s-backend:%d" (include "xslt-playground.fullname" .) .Values.service.backend.port) .Values.frontend.backendUrl | quote }}
|
||||
{{- if .Values.firebase.enabled }}
|
||||
- name: VITE_FIREBASE_CONFIG
|
||||
valueFrom:
|
||||
|
||||
@@ -58,3 +58,8 @@ storage:
|
||||
enabled: true
|
||||
databaseUrl: postgres://postgres:postgres@db/xslt?sslmode=disable
|
||||
|
||||
frontend:
|
||||
# URL used by the frontend to reach the backend. Defaults to the
|
||||
# internal service URL when empty.
|
||||
backendUrl: ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user