mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
feat(helm): custom template support with helm charts
This commit is contained in:
parent
eb50d8adf4
commit
fa82f8ef0a
3 changed files with 38 additions and 0 deletions
12
charts/umap/templates/configmap-templates.yaml
Normal file
12
charts/umap/templates/configmap-templates.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{ if .Values.umap.templates}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "umap.fullname" . }}-templates
|
||||
labels:
|
||||
{{- include "umap.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{- range $k, $v := .Values.umap.templates }}
|
||||
{{ $k }}: {{ $v | quote }}
|
||||
{{- end }}
|
||||
{{end}}
|
|
@ -13,6 +13,7 @@ spec:
|
|||
metadata:
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/secret-config.yaml") . | sha256sum }}
|
||||
checksum/templates: {{ include (print $.Template.BasePath "/configmap-templates.yaml") . | sha256sum }}
|
||||
checksum/env: {{ include (print $.Template.BasePath "/secret-env.yaml") . | sha256sum }}
|
||||
{{- with .Values.podAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
@ -77,6 +78,14 @@ spec:
|
|||
- name: data
|
||||
mountPath: /srv/umap/uploads/
|
||||
{{- end }}
|
||||
{{- if .Values.umap.templates}}
|
||||
{{- range $k, $v := .Values.umap.templates }}
|
||||
- name: templates
|
||||
mountPath: /venv/lib/python3.11/site-packages/umap/templates/umap/{{- $k }}
|
||||
subPath: {{ $k }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
volumes:
|
||||
- name: config
|
||||
secret:
|
||||
|
@ -88,6 +97,12 @@ spec:
|
|||
persistentVolumeClaim:
|
||||
claimName: {{ include "umap.pvcName" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.umap.templates}}
|
||||
- name: templates
|
||||
configMap:
|
||||
name: {{ include "umap.fullname" . }}-templates
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
|
|
@ -77,6 +77,17 @@ umap:
|
|||
SECRET_KEY: CHANGE_ME
|
||||
STATIC_ROOT: /srv/umap/static
|
||||
MEDIA_ROOT: /srv/umap/uploads
|
||||
|
||||
templates: {}
|
||||
# Overwrite templates like footer.html or header.html
|
||||
# footer.html: |
|
||||
# <a href="/imprint">Imprint</a>
|
||||
# header.html: |
|
||||
# custom Header
|
||||
#
|
||||
# It is not recommended to overwrite other templates!
|
||||
# list of templates: https://github.com/umap-project/umap/tree/master/umap/templates/umap
|
||||
|
||||
# You can also provide umap.conf content here:
|
||||
config: |
|
||||
from umap.settings.base import *
|
||||
|
|
Loading…
Reference in a new issue