forked from vhaudiquet/rhema-claw
The stored `colors` key names a palette — rhema (the default, Jadeite), aquamarine, black-and-white, or dracula — and the Appearance page of /settings cycles it live, like the theme and icon toggles beside it. Each palette carries a dark and a light appearance under the existing `theme` key; dracula's light side is derived, the official palette ships only dark. The appearance decision moves off token comparison: Theme now answers is_dark() from the ground/text luminance, so palettes beyond the original two get the right per-profile fallback tones.
69 lines
2.3 KiB
YAML
69 lines
2.3 KiB
YAML
{{- if .Values.ingress.enabled }}
|
|
{{- if not .Values.ingress.host }}
|
|
{{- fail "ingress.host is required when ingress.enabled: the claw is single-user and bearer-gated, and an unnamed host has no TLS story" }}
|
|
{{- end }}
|
|
{{- if and .Values.ingress.tls.enabled (not .Values.ingress.tls.secretName) }}
|
|
{{- fail "ingress.tls.secretName is required when ingress.tls.enabled: bearer tokens cross this ingress in the clear without TLS" }}
|
|
{{- end }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ include "rhema-claw.fullname" . }}
|
|
labels:
|
|
{{- include "rhema-claw.labels" . | nindent 4 }}
|
|
{{- with .Values.ingress.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.ingress.className }}
|
|
ingressClassName: {{ . }}
|
|
{{- end }}
|
|
{{- if .Values.ingress.tls.enabled }}
|
|
tls:
|
|
- hosts:
|
|
- {{ .Values.ingress.host | quote }}
|
|
secretName: {{ .Values.ingress.tls.secretName }}
|
|
{{- end }}
|
|
rules:
|
|
- host: {{ .Values.ingress.host | quote }}
|
|
http:
|
|
paths:
|
|
{{- if .Values.ui.enabled }}
|
|
# One address, two services: the browser gets the UI on /,
|
|
# the daemon answers /v1 and /healthz (longest prefix wins),
|
|
# and the phone app points at the same host. One origin, so
|
|
# no CORS anywhere; the bearer token is the auth.
|
|
- path: /v1
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "rhema-claw.fullname" . }}
|
|
port:
|
|
name: http
|
|
- path: /healthz
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "rhema-claw.fullname" . }}
|
|
port:
|
|
name: http
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "rhema-claw.fullname" . }}-ui
|
|
port:
|
|
name: http
|
|
{{- else }}
|
|
# No UI in the release: the daemon owns the whole host.
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ include "rhema-claw.fullname" . }}
|
|
port:
|
|
name: http
|
|
{{- end }}
|
|
{{- end }}
|