Skip to content

Commit fd25969

Browse files
committed
feat(dashboard): add runtime branding support via config.json
Introduce a ConfigMap that renders _cluster.branding values as JSON and mounts it into the console container at /usr/share/nginx/html/config.json. The new cozystack-ui reads this file at startup and applies titleText, logoSvg, and logoText to the dashboard shell, restoring cluster-level branding customization that was lost when the static SPA replaced the old configmap-driven UI. Signed-off-by: IvanHunters <[email protected]>
1 parent caaf4f9 commit fd25969

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{- $branding := .Values._cluster.branding | default dict }}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: cozy-dashboard-console-config
6+
data:
7+
config.json: {{ $branding | toJson }}

‎packages/system/dashboard/templates/console.yaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ spec:
8383
type: RuntimeDefault
8484
terminationMessagePath: /dev/termination-log
8585
terminationMessagePolicy: File
86+
volumeMounts:
87+
- name: console-config
88+
mountPath: /usr/share/nginx/html/config.json
89+
subPath: config.json
90+
volumes:
91+
- name: console-config
92+
configMap:
93+
name: cozy-dashboard-console-config
8694
dnsPolicy: ClusterFirst
8795
enableServiceLinks: false
8896
hostIPC: false

0 commit comments

Comments
 (0)