diff --git a/README.md b/README.md index b6f24cc..77439bc 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 Branding + +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 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 f4d10e7..9fbf56c 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 configuration path + - name: NEBI_BRANDING_CONFIG_PATH + value: "/app/public/config.json" # Storage - name: NEBI_STORAGE_WORKSPACES_DIR value: {{ .Values.persistence.mountPath | quote }} - {{- if .Values.persistence.enabled }} volumeMounts: + - name: branding-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: branding-config + configMap: + name: {{ include "nebari-nebi-pack.fullname" . }}-branding-config + {{- if .Values.persistence.enabled }} - name: environments persistentVolumeClaim: claimName: {{ include "nebari-nebi-pack.fullname" . }}-environments - {{- end }} + {{- end }} diff --git a/values.yaml b/values.yaml index 242e4f1..81cd4bc 100644 --- a/values.yaml +++ b/values.yaml @@ -82,6 +82,16 @@ log: format: json level: info +# Branding settings - rendered into /config.json at deploy time. +# Leave empty to use the built-in Nebi defaults. +branding: + title: "" + logoUrl: "" + faviconUrl: "" + theme: + light: {} + dark: {} + # Queue configuration (single pod = in-memory) queue: type: memory