diff --git a/charts/umap/templates/configmap-templates.yaml b/charts/umap/templates/configmap-templates.yaml new file mode 100644 index 00000000..71d12599 --- /dev/null +++ b/charts/umap/templates/configmap-templates.yaml @@ -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}} \ No newline at end of file diff --git a/charts/umap/templates/deployment.yaml b/charts/umap/templates/deployment.yaml index 96780f95..20ba1ca9 100644 --- a/charts/umap/templates/deployment.yaml +++ b/charts/umap/templates/deployment.yaml @@ -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 }} diff --git a/charts/umap/values.yaml b/charts/umap/values.yaml index de72d63b..966e5bc5 100644 --- a/charts/umap/values.yaml +++ b/charts/umap/values.yaml @@ -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: | + # Imprint + # 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 *