(helm) allow to load custom theme file in a configMap

In order to load a custom theme file with our helm chart, we allow to
load the content of a file into a config map and then use this configmap
as a volume in the backend deployment
This commit is contained in:
Manuel Raynaud
2025-05-07 16:30:41 +02:00
parent 76c28760dc
commit 16e20e984c
7 changed files with 109 additions and 77 deletions

View File

@@ -90,6 +90,11 @@ spec:
subPath: {{ .subPath | default "" }}
readOnly: {{ .readOnly }}
{{- end }}
{{- if .Values.backend.themeCustomization.enabled }}
- name: theme-customization
mountPath: {{ .Values.backend.themeCustomization.mount_path }}
readOnly: true
{{- end }}
{{- with .Values.backend.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
@@ -117,6 +122,11 @@ spec:
claimName: "{{ $fullName }}-{{ $name }}"
{{- end }}
{{- end }}
{{- if .Values.backend.themeCustomization.enabled }}
- name: theme-customization
configMap:
name: docs-theme-customization
{{- end }}
{{- range .Values.backend.extraVolumes }}
- name: {{ .name }}
{{- if .existingClaim }}

View File

@@ -0,0 +1,10 @@
{{- if .Values.backend.themeCustomization.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: docs-theme-customization
namespace: {{ .Release.Namespace }}
data:
default.json: |
{{ .Values.backend.themeCustomization.file_content | toJson | indent 4 }}
{{- end }}