From 526ff0b79480c95b83cec91e6cceace75f3c1eeb Mon Sep 17 00:00:00 2001 From: Zakariah Nuccio Date: Thu, 15 Feb 2024 13:41:10 +0000 Subject: [PATCH] Add django api url --- templates/ui-configmap.yaml | 11 +++++++++++ templates/ui-deployment.yaml | 2 +- values.yaml | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 templates/ui-configmap.yaml diff --git a/templates/ui-configmap.yaml b/templates/ui-configmap.yaml new file mode 100644 index 0000000..d230938 --- /dev/null +++ b/templates/ui-configmap.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: "{{ template "spade.name" . }}-ui-env" + labels: + app: "{{ template "spade.name" . }}-ui" +data: + VITE_BACKEND_BASE_URL: "{{ .Values.spade.django.apiUrl }}" + {{- range $setting, $option := .Values.environment }} + {{ $setting }}: "{{ $option }}" + {{- end }} diff --git a/templates/ui-deployment.yaml b/templates/ui-deployment.yaml index eb95460..91f8b0c 100644 --- a/templates/ui-deployment.yaml +++ b/templates/ui-deployment.yaml @@ -15,7 +15,7 @@ spec: template: metadata: annotations: - checksum/spade-configmap: {{ include (print $.Template.BasePath "/django-configmap.yaml") . | sha256sum }} + checksum/spade-configmap: {{ include (print $.Template.BasePath "/ui-configmap.yaml") . | sha256sum }} labels: app: {{ template "spade.name" . }} component: "{{ template "spade.name" . }}-ui" diff --git a/values.yaml b/values.yaml index 05c0a63..de267da 100644 --- a/values.yaml +++ b/values.yaml @@ -9,6 +9,7 @@ docker: spade: django: + apiUrl: https://backend/api/v1 allowedHosts: backend adminUrl: admin/ collectFastStrategy: collectfast.strategies.filesystem.FileSystemStrategy