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:
		
							parent
							
								
									0935d43a97
								
							
						
					
					
						commit
						5530ca92e1
					
				@ -41,6 +41,10 @@ spec:
 | 
				
			|||||||
          secret:
 | 
					          secret:
 | 
				
			||||||
            secretName: storages
 | 
					            secretName: storages
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        - name: app-templates
 | 
				
			||||||
 | 
					          configMap:
 | 
				
			||||||
 | 
					            name: app-templates
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      containers:
 | 
					      containers:
 | 
				
			||||||
        - name: api
 | 
					        - name: api
 | 
				
			||||||
          image: {{ .Values.backend_image }}
 | 
					          image: {{ .Values.backend_image }}
 | 
				
			||||||
@ -61,6 +65,9 @@ spec:
 | 
				
			|||||||
            - name: storages
 | 
					            - name: storages
 | 
				
			||||||
              mountPath: /tmp/storages/
 | 
					              mountPath: /tmp/storages/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            - name: app-templates
 | 
				
			||||||
 | 
					              mountPath: /app/btrixcloud/templates/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          resources:
 | 
					          resources:
 | 
				
			||||||
            limits:
 | 
					            limits:
 | 
				
			||||||
              memory: {{ .Values.backend_memory }}
 | 
					              memory: {{ .Values.backend_memory }}
 | 
				
			||||||
@ -129,6 +136,9 @@ spec:
 | 
				
			|||||||
            - name: storages
 | 
					            - name: storages
 | 
				
			||||||
              mountPath: /tmp/storages/
 | 
					              mountPath: /tmp/storages/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            - name: app-templates
 | 
				
			||||||
 | 
					              mountPath: /app/btrixcloud/templates/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          resources:
 | 
					          resources:
 | 
				
			||||||
            limits:
 | 
					            limits:
 | 
				
			||||||
              memory: {{ .Values.backend_memory }}
 | 
					              memory: {{ .Values.backend_memory }}
 | 
				
			||||||
 | 
				
			|||||||
@ -128,11 +128,8 @@ data:
 | 
				
			|||||||
apiVersion: v1
 | 
					apiVersion: v1
 | 
				
			||||||
kind: ConfigMap
 | 
					kind: ConfigMap
 | 
				
			||||||
metadata:
 | 
					metadata:
 | 
				
			||||||
  name: nginx-config
 | 
					  name: app-templates
 | 
				
			||||||
  namespace: {{ .Release.Namespace }}
 | 
					  namespace: {{ .Release.Namespace }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
data:
 | 
					data:
 | 
				
			||||||
{{ (.Files.Glob "*.conf").AsConfig | indent 2 }}
 | 
					{{ (.Files.Glob "app-templates/*.yaml").AsConfig | indent 2 }}
 | 
				
			||||||
 | 
					 | 
				
			||||||
#{{ (.Files.Glob "frontend/*.*").AsConfig | indent 2 }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user