From d8d85fccf0cce24e321962d650901684c754a84f Mon Sep 17 00:00:00 2001 From: Waleed Date: Mon, 26 Jan 2026 13:19:23 -0800 Subject: [PATCH] feat(helm): add branding configmap for custom assets (#3008) --- helm/sim/templates/configmap-branding.yaml | 25 +++++++++++++++++++++ helm/sim/templates/deployment-app.yaml | 14 ++++++++++-- helm/sim/values.yaml | 26 ++++++++++++++++++++++ 3 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 helm/sim/templates/configmap-branding.yaml diff --git a/helm/sim/templates/configmap-branding.yaml b/helm/sim/templates/configmap-branding.yaml new file mode 100644 index 000000000..4e22d3a2b --- /dev/null +++ b/helm/sim/templates/configmap-branding.yaml @@ -0,0 +1,25 @@ +{{- if .Values.branding.enabled }} +--- +# Branding ConfigMap +# Mounts custom branding assets (logos, CSS, etc.) into the application +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "sim.fullname" . }}-branding + namespace: {{ .Release.Namespace }} + labels: + {{- include "sim.labels" . | nindent 4 }} + app.kubernetes.io/component: branding +{{- if .Values.branding.files }} +data: + {{- range $key, $value := .Values.branding.files }} + {{ $key }}: {{ $value | quote }} + {{- end }} +{{- end }} +{{- if .Values.branding.binaryFiles }} +binaryData: + {{- range $key, $value := .Values.branding.binaryFiles }} + {{ $key }}: {{ $value }} + {{- end }} +{{- end }} +{{- end }} diff --git a/helm/sim/templates/deployment-app.yaml b/helm/sim/templates/deployment-app.yaml index 6b1d63289..5362dd43e 100644 --- a/helm/sim/templates/deployment-app.yaml +++ b/helm/sim/templates/deployment-app.yaml @@ -110,8 +110,13 @@ spec: {{- end }} {{- include "sim.resources" .Values.app | nindent 10 }} {{- include "sim.securityContext" .Values.app | nindent 10 }} - {{- if or .Values.extraVolumeMounts .Values.app.extraVolumeMounts }} + {{- if or .Values.branding.enabled .Values.extraVolumeMounts .Values.app.extraVolumeMounts }} volumeMounts: + {{- if .Values.branding.enabled }} + - name: branding + mountPath: {{ .Values.branding.mountPath | default "/app/public/branding" }} + readOnly: true + {{- end }} {{- with .Values.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} @@ -119,8 +124,13 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} {{- end }} - {{- if or .Values.extraVolumes .Values.app.extraVolumes }} + {{- if or .Values.branding.enabled .Values.extraVolumes .Values.app.extraVolumes }} volumes: + {{- if .Values.branding.enabled }} + - name: branding + configMap: + name: {{ include "sim.fullname" . }}-branding + {{- end }} {{- with .Values.extraVolumes }} {{- toYaml . | nindent 8 }} {{- end }} diff --git a/helm/sim/values.yaml b/helm/sim/values.yaml index f0def91cf..dc09a9ce2 100644 --- a/helm/sim/values.yaml +++ b/helm/sim/values.yaml @@ -738,6 +738,32 @@ sharedStorage: extraVolumes: [] extraVolumeMounts: [] +# Branding configuration +# Use this to inject custom branding assets (logos, CSS, etc.) into the application +branding: + # Enable/disable branding ConfigMap + enabled: false + + # Mount path in the container where branding files will be available + mountPath: "/app/public/branding" + + # Text files (CSS, JSON, HTML, etc.) - values are plain text + # Example: + # files: + # custom.css: | + # .logo { background-color: #ff0000; } + # config.json: | + # {"theme": "dark"} + files: {} + + # Binary files (PNG, JPG, ICO, etc.) - values must be base64 encoded + # Generate base64 with: base64 -i logo.png | tr -d '\n' + # Example: + # binaryFiles: + # logo.png: "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk..." + # favicon.ico: "AAABAAEAEBAAAAEAIABoBAAAFgAAAA..." + binaryFiles: {} + # Additional environment variables for custom integrations extraEnvVars: []