Skip to content

Commit 5530ca9

Browse files
authored
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
1 parent 0935d43 commit 5530ca9

File tree

9 files changed

+12
-5
lines changed

9 files changed

+12
-5
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

chart/templates/backend.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ spec:
4141
secret:
4242
secretName: storages
4343

44+
- name: app-templates
45+
configMap:
46+
name: app-templates
47+
4448
containers:
4549
- name: api
4650
image: {{ .Values.backend_image }}
@@ -61,6 +65,9 @@ spec:
6165
- name: storages
6266
mountPath: /tmp/storages/
6367

68+
- name: app-templates
69+
mountPath: /app/btrixcloud/templates/
70+
6471
resources:
6572
limits:
6673
memory: {{ .Values.backend_memory }}
@@ -129,6 +136,9 @@ spec:
129136
- name: storages
130137
mountPath: /tmp/storages/
131138

139+
- name: app-templates
140+
mountPath: /app/btrixcloud/templates/
141+
132142
resources:
133143
limits:
134144
memory: {{ .Values.backend_memory }}

chart/templates/configmap.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,8 @@ data:
128128
apiVersion: v1
129129
kind: ConfigMap
130130
metadata:
131-
name: nginx-config
131+
name: app-templates
132132
namespace: {{ .Release.Namespace }}
133133

134134
data:
135-
{{ (.Files.Glob "*.conf").AsConfig | indent 2 }}
136-
137-
#{{ (.Files.Glob "frontend/*.*").AsConfig | indent 2 }}
138-
135+
{{ (.Files.Glob "app-templates/*.yaml").AsConfig | indent 2 }}

0 commit comments

Comments
 (0)