From e580452cbfc5884b146e6a30d23f2a042b115338 Mon Sep 17 00:00:00 2001 From: "anujkumar.singh" Date: Mon, 1 Jun 2026 19:45:13 +0530 Subject: [PATCH 1/2] add Runtime Theming Helm Wiring --- README.md | 18 +++++++++++++++++- templates/deployment.yaml | 17 +++++++++++++---- templates/theme-configmap.yaml | 18 ++++++++++++++++++ values.yaml | 8 ++++++++ 4 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 templates/theme-configmap.yaml diff --git a/README.md b/README.md index b6f24cc..fa79310 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,18 @@ # nebari-nebi-pack -Nebi deployment pack for Nebari + +Nebi deployment pack for Nebari. + +## Runtime Theming + +This chart supports runtime UI branding/theming through `theme.*` values. It renders a `ConfigMap` as `/app/public/config.json` and sets `NEBI_THEME_CONFIG_PATH=/app/public/config.json` on the Nebi container. + +Example: + +```bash +helm upgrade --install nebi . \ + --set theme.title="Acme Nebi" \ + --set theme.logoUrl="https://assets.example.com/acme-logo.svg" \ + --set theme.faviconUrl="https://assets.example.com/acme-favicon.ico" \ + --set theme.light.primary="#0b63f6" \ + --set theme.dark.primary="#8db0ff" +``` diff --git a/templates/deployment.yaml b/templates/deployment.yaml index f4d10e7..dd9fc37 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -80,14 +80,20 @@ spec: value: {{ .Values.log.format | quote }} - name: NEBI_LOG_LEVEL value: {{ .Values.log.level | quote }} + # Runtime branding/theming configuration path + - name: NEBI_THEME_CONFIG_PATH + value: "/app/public/config.json" # Storage - name: NEBI_STORAGE_WORKSPACES_DIR value: {{ .Values.persistence.mountPath | quote }} - {{- if .Values.persistence.enabled }} volumeMounts: + - name: theme-config + mountPath: /app/public + readOnly: true + {{- if .Values.persistence.enabled }} - name: environments mountPath: {{ .Values.persistence.mountPath }} - {{- end }} + {{- end }} livenessProbe: httpGet: path: /api/v1/health @@ -106,9 +112,12 @@ spec: resources: {{- toYaml . | nindent 12 }} {{- end }} - {{- if .Values.persistence.enabled }} volumes: + - name: theme-config + configMap: + name: {{ include "nebari-nebi-pack.fullname" . }}-theme-config + {{- if .Values.persistence.enabled }} - name: environments persistentVolumeClaim: claimName: {{ include "nebari-nebi-pack.fullname" . }}-environments - {{- end }} + {{- end }} diff --git a/templates/theme-configmap.yaml b/templates/theme-configmap.yaml new file mode 100644 index 0000000..ab85b4f --- /dev/null +++ b/templates/theme-configmap.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "nebari-nebi-pack.fullname" . }}-theme-config + namespace: {{ .Release.Namespace }} + labels: + {{- include "nebari-nebi-pack.labels" . | nindent 4 }} +data: + config.json: | + { + "title": {{ .Values.theme.title | quote }}, + "logoUrl": {{ .Values.theme.logoUrl | quote }}, + "faviconUrl": {{ .Values.theme.faviconUrl | quote }}, + "theme": { + "light": {{ .Values.theme.light | default dict | toJson }}, + "dark": {{ .Values.theme.dark | default dict | toJson }} + } + } diff --git a/values.yaml b/values.yaml index 242e4f1..2b1ec32 100644 --- a/values.yaml +++ b/values.yaml @@ -82,6 +82,14 @@ log: format: json level: info +# Runtime theming/branding configuration +theme: + title: "" + logoUrl: "" + faviconUrl: "" + light: {} + dark: {} + # Queue configuration (single pod = in-memory) queue: type: memory From e2b7cae4dcc8670793c17aed7d39414c9c7f380f Mon Sep 17 00:00:00 2001 From: "anujkumar.singh" Date: Tue, 2 Jun 2026 17:12:52 +0530 Subject: [PATCH 2/2] update to branding terminology --- README.md | 14 +++++++------- templates/branding-configmap.yaml | 20 ++++++++++++++++++++ templates/deployment.yaml | 10 +++++----- templates/theme-configmap.yaml | 18 ------------------ values.yaml | 10 ++++++---- 5 files changed, 38 insertions(+), 34 deletions(-) create mode 100644 templates/branding-configmap.yaml delete mode 100644 templates/theme-configmap.yaml diff --git a/README.md b/README.md index fa79310..77439bc 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,17 @@ Nebi deployment pack for Nebari. -## Runtime Theming +## Runtime Branding -This chart supports runtime UI branding/theming through `theme.*` values. It renders a `ConfigMap` as `/app/public/config.json` and sets `NEBI_THEME_CONFIG_PATH=/app/public/config.json` on the Nebi container. +This chart supports runtime branding through `branding.*` values. It renders a `ConfigMap` as `/app/public/config.json` and sets `NEBI_BRANDING_CONFIG_PATH=/app/public/config.json` on the Nebi container. Example: ```bash helm upgrade --install nebi . \ - --set theme.title="Acme Nebi" \ - --set theme.logoUrl="https://assets.example.com/acme-logo.svg" \ - --set theme.faviconUrl="https://assets.example.com/acme-favicon.ico" \ - --set theme.light.primary="#0b63f6" \ - --set theme.dark.primary="#8db0ff" + --set branding.title="Acme Nebi" \ + --set branding.logoUrl="https://assets.example.com/acme-logo.svg" \ + --set branding.faviconUrl="https://assets.example.com/acme-favicon.ico" \ + --set branding.theme.light.primary="#0b63f6" \ + --set branding.theme.dark.primary="#8db0ff" ``` diff --git a/templates/branding-configmap.yaml b/templates/branding-configmap.yaml new file mode 100644 index 0000000..9412e2a --- /dev/null +++ b/templates/branding-configmap.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "nebari-nebi-pack.fullname" . }}-branding-config + namespace: {{ .Release.Namespace }} + labels: + {{- include "nebari-nebi-pack.labels" . | nindent 4 }} +data: + config.json: | + { + "branding": { + "title": {{ .Values.branding.title | quote }}, + "logoUrl": {{ .Values.branding.logoUrl | quote }}, + "faviconUrl": {{ .Values.branding.faviconUrl | quote }}, + "theme": { + "light": {{ .Values.branding.theme.light | default dict | toJson }}, + "dark": {{ .Values.branding.theme.dark | default dict | toJson }} + } + } + } diff --git a/templates/deployment.yaml b/templates/deployment.yaml index dd9fc37..9fbf56c 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -80,14 +80,14 @@ spec: value: {{ .Values.log.format | quote }} - name: NEBI_LOG_LEVEL value: {{ .Values.log.level | quote }} - # Runtime branding/theming configuration path - - name: NEBI_THEME_CONFIG_PATH + # Runtime branding configuration path + - name: NEBI_BRANDING_CONFIG_PATH value: "/app/public/config.json" # Storage - name: NEBI_STORAGE_WORKSPACES_DIR value: {{ .Values.persistence.mountPath | quote }} volumeMounts: - - name: theme-config + - name: branding-config mountPath: /app/public readOnly: true {{- if .Values.persistence.enabled }} @@ -113,9 +113,9 @@ spec: {{- toYaml . | nindent 12 }} {{- end }} volumes: - - name: theme-config + - name: branding-config configMap: - name: {{ include "nebari-nebi-pack.fullname" . }}-theme-config + name: {{ include "nebari-nebi-pack.fullname" . }}-branding-config {{- if .Values.persistence.enabled }} - name: environments persistentVolumeClaim: diff --git a/templates/theme-configmap.yaml b/templates/theme-configmap.yaml deleted file mode 100644 index ab85b4f..0000000 --- a/templates/theme-configmap.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "nebari-nebi-pack.fullname" . }}-theme-config - namespace: {{ .Release.Namespace }} - labels: - {{- include "nebari-nebi-pack.labels" . | nindent 4 }} -data: - config.json: | - { - "title": {{ .Values.theme.title | quote }}, - "logoUrl": {{ .Values.theme.logoUrl | quote }}, - "faviconUrl": {{ .Values.theme.faviconUrl | quote }}, - "theme": { - "light": {{ .Values.theme.light | default dict | toJson }}, - "dark": {{ .Values.theme.dark | default dict | toJson }} - } - } diff --git a/values.yaml b/values.yaml index 2b1ec32..81cd4bc 100644 --- a/values.yaml +++ b/values.yaml @@ -82,13 +82,15 @@ log: format: json level: info -# Runtime theming/branding configuration -theme: +# Branding settings - rendered into /config.json at deploy time. +# Leave empty to use the built-in Nebi defaults. +branding: title: "" logoUrl: "" faviconUrl: "" - light: {} - dark: {} + theme: + light: {} + dark: {} # Queue configuration (single pod = in-memory) queue: