Move backend app templates to be installed from configmap volume (#1331)

Instead of adding the app templates launched from the backend via
`backend/btrixcloud/templates`, add them to a configmap and mount the
configmap in the same location.

This allows these templates to be updated, like other values in
charts/... without having to rebuild any of the images, speeding up dev
and maintenance time.

Changes include:
- move backend/btrixcloud/templates -> chart/app-templates/
- add app-templates/*.yaml to app-templates configmap
- mount app-templates configmap to /app/btrixcloud/templates/ in api and op containers
This commit is contained in:
Ilya Kreymer 2023-11-06 09:37:48 -08:00 committed by GitHub
parent 0935d43a97
commit 5530ca92e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 12 additions and 5 deletions

View File

@ -41,6 +41,10 @@ spec:
secret:
secretName: storages
- name: app-templates
configMap:
name: app-templates
containers:
- name: api
image: {{ .Values.backend_image }}
@ -61,6 +65,9 @@ spec:
- name: storages
mountPath: /tmp/storages/
- name: app-templates
mountPath: /app/btrixcloud/templates/
resources:
limits:
memory: {{ .Values.backend_memory }}
@ -129,6 +136,9 @@ spec:
- name: storages
mountPath: /tmp/storages/
- name: app-templates
mountPath: /app/btrixcloud/templates/
resources:
limits:
memory: {{ .Values.backend_memory }}

View File

@ -128,11 +128,8 @@ data:
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
name: app-templates
namespace: {{ .Release.Namespace }}
data:
{{ (.Files.Glob "*.conf").AsConfig | indent 2 }}
#{{ (.Files.Glob "frontend/*.*").AsConfig | indent 2 }}
{{ (.Files.Glob "app-templates/*.yaml").AsConfig | indent 2 }}