Compare commits

..
Author SHA1 Message Date
Cédric VerstraetenandClaude Fable 5.1 600391152b hub: chart always mounts the frontend /tmp scratch volume (0.210.0)
The hardened hub-frontend image needs a writable /tmp for its generated
runtime configuration and nginx temp files. Until now that emptyDir was a
default entry in kerberoshub.frontend.volumes / volumeMounts, so any values
file that added its own custom-layout mounts replaced the list and dropped
/tmp; with readOnlyRootFilesystem the pod then failed at startup and custom
CSS never showed up.

The chart now renders the frontend-tmp volume and /tmp mount itself (both
frontends), sized by kerberoshub.frontend.tmp.sizeLimit, and appends the
user-supplied volumes and mounts. Values files that still list frontend-tmp
or mount their own volume at /tmp keep working: the built-in entries are
skipped. Also fixes the favicons mount path in the values comment and
documents the UID 65532 / no-shell constraints for custom layout files.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-26 14:06:37 +00:00
6 changed files with 89 additions and 73 deletions
+21 -37
View File
@@ -83,20 +83,25 @@ kerberoshub:
drop: ["ALL"]
seccompProfile:
type: RuntimeDefault
volumes:
- name: frontend-tmp
emptyDir:
medium: Memory
sizeLimit: 16Mi
volumeMounts:
- name: frontend-tmp
mountPath: /tmp
tmp:
sizeLimit: 16Mi
```
Merge the temporary volume into any existing branding/translation mounts rather
than replacing them. Custom files must be readable by UID `65532`; mount them
read-only. Only `/tmp` needs writes for generated public runtime configuration
and nginx's PID/temp files. The web root stays read-only. Health checks can use
Since chart `0.210.0` the chart itself renders the writable `/tmp` (a
memory-backed emptyDir named `frontend-tmp`, sized by
`kerberoshub.frontend.tmp.sizeLimit`) for both frontends. Custom
branding/translation entries in `kerberoshub.frontend.volumes` and
`volumeMounts` are added next to it, so a values file that lists only the
custom mounts no longer drops `/tmp` and crashes the pod at startup. Values
files that still list the `frontend-tmp` entries themselves, or that mount
their own volume at `/tmp`, keep working: the built-in entries are then
skipped.
Custom files must be readable by UID `65532`; mount them read-only and write
them to the volume from outside the frontend pod (a ConfigMap, or a helper pod
on the same PVC), since the image has no shell or `tar` for `kubectl cp`. Only
`/tmp` needs writes for generated public runtime configuration and nginx's
PID/temp files. The web root stays read-only. Health checks can use
`GET /healthz` on the named `http` container port. These settings apply to both
the primary and demo frontends, which share the frontend image tag. Update the
live Argo CD Application's chart pin as well as its values: an image-only
@@ -1729,12 +1734,8 @@ schemas/
declaration and dead-letter settings. `mqtt` adds topic, QoS, retain and
client ID, and needs a forwarder worker with the MQTT provider. Both share
host, port, TLS, credentials, completion mode and retries. The
provider-specific settings use `when`. "Sign in to the broker"
(`authentication`, default on) can be turned off for brokers that allow
anonymous clients: username and password are then hidden and not stored
(see [Forwarder without credentials](#forwarder-without-credentials)).
Deployment-global workflows keep their deployment bindings. No output
fields are declared.
provider-specific settings use `when`. Deployment-global workflows keep
their deployment bindings. No output fields are declared.
- [Custom pose example](examples/workflow-contracts/pose.yaml): hypothetical
worker, demonstrating presentation, settings (`params`), a file catalog, inline
choices and a numeric field.
@@ -1838,9 +1839,9 @@ The forwarder contract follows the same rule: the forwarder becomes authorable
wherever its worker queue is configured. Replace or omit the bundled contract to
prevent that.
Its required custom-workflow settings are `broker`,
Its nine required custom-workflow settings are `broker`,
`mode`, `host`, `port` (whole number, 1-65535), `queue`, `vhost`, `tls`,
and, while `authentication` is on, `username` and `password`. The contract defaults `broker` to `rabbitmq`, `mode`
`username` and `password`. The contract defaults `broker` to `rabbitmq`, `mode`
to `delivered` and `tls` to `true`; those values are stored on save. Destination
and credentials must be supplied before enabling a custom workflow. The password is a secret:
the API masks it on reads and the engine includes it only in worker dispatches.
@@ -1859,23 +1860,6 @@ Custom invocations carry the run's inputs and results, not deployment-specific
field mappings. TLS certificate and queue declaration policies are not node
settings.
#### Forwarder without credentials
Since chart `0.210.0` the bundled forwarder contract has a boolean
`authentication` ("Sign in to the broker", default `true`); `username` and
`password` apply only while it is on (`when: {param: authentication, in:
[true]}`). With it off, MQTT connects without a username or password and
RabbitMQ signs in with SASL ANONYMOUS, which needs RabbitMQ 4.0 or later with
anonymous login enabled.
**Upgrade order:** the forwarder worker that serves the editor's queue must
accept the setting (uug-ai/hub-workflows-forwarder#16) **before** this chart
version is deployed. hub-api stores the default on every saved forwarder node,
and older workers refuse unknown settings permanently, so new runs would fail.
hub-api with uug-ai/hub-api#912 accepts nodes without credentials; older APIs
still require them. Keep the previous contract (your own
`workflowConfiguration` ConfigMap) until both are deployed.
Deploy the engine that stamps the top-level `forwarderDestinationMode`
(`deployment` or `custom`) before the enforcing worker. Missing or invalid mode
is rejected; drain old unstamped dispatches before the worker upgrade. Update
+42
View File
@@ -199,3 +199,45 @@ Usage, as the last line of the container's env list:
{{ toYaml . | indent 8 }}
{{- end -}}
{{- end -}}
{{/*
hub-frontend scratch volume.
The hardened hub-frontend image runs with a read-only root filesystem and
writes its generated runtime configuration (/tmp/frontend-env.js) and nginx's
PID/temp files to /tmp, so every frontend pod needs a writable /tmp. The chart
always renders a memory-backed emptyDir for it, so custom branding or
translation mounts in kerberoshub.frontend.volumes / volumeMounts only add to
the pod and can never drop it (Helm replaces lists, it does not merge them).
Deployments that still list the old frontend-tmp entries themselves, or mount
their own volume at /tmp, keep those: the built-in entries are skipped.
*/}}
{{- define "hub.frontend.hasTmpMount" -}}
{{- range .Values.kerberoshub.frontend.volumeMounts }}{{ if eq .mountPath "/tmp" }}true{{ end }}{{ end }}
{{- end -}}
{{- define "hub.frontend.hasTmpVolume" -}}
{{- range .Values.kerberoshub.frontend.volumes }}{{ if eq .name "frontend-tmp" }}true{{ end }}{{ end }}
{{- end -}}
{{- define "hub.frontend.volumes" -}}
{{- $tmp := .Values.kerberoshub.frontend.tmp | default dict }}
{{- if not (or (include "hub.frontend.hasTmpMount" .) (include "hub.frontend.hasTmpVolume" .)) }}
- name: frontend-tmp
emptyDir:
medium: Memory
sizeLimit: {{ $tmp.sizeLimit | default "16Mi" }}
{{- end }}
{{- with .Values.kerberoshub.frontend.volumes }}
{{ toYaml . }}
{{- end }}
{{- end -}}
{{- define "hub.frontend.volumeMounts" -}}
{{- if not (include "hub.frontend.hasTmpMount" .) }}
- name: frontend-tmp
mountPath: /tmp
{{- end }}
{{- with .Values.kerberoshub.frontend.volumeMounts }}
{{ toYaml . }}
{{- end }}
{{- end -}}
@@ -65,31 +65,18 @@ params:
required: true
default: true
group: Connection
# Off for brokers that allow anonymous clients: username and password are
# then hidden, not required and dropped on save. Needs hub-api with
# uug-ai/hub-api#912 and hub-workflows-forwarder with
# uug-ai/hub-workflows-forwarder#16 (older forwarders reject the setting).
- name: authentication
label: Sign in to the broker
description: Turn off if your broker allows clients without a username and password. For RabbitMQ this needs version 4.0 or later with anonymous login enabled.
type: boolean
required: true
default: true
group: Credentials
- name: username
label: Username
description: Your broker username. Deployment credentials are never used.
type: string
required: true
group: Credentials
when: {param: authentication, in: [true]}
- name: password
label: Password
description: Your broker password. Required before enabling the workflow; masked after saving. Changing the provider or connection asks for it again.
type: secret
required: true
group: Credentials
when: {param: authentication, in: [true]}
# RabbitMQ only.
- name: queue
@@ -89,10 +89,8 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.kerberoshub.frontend.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hub.frontend.volumes" . | trim | nindent 8 }}
{{- with .Values.kerberoshub.frontend.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
@@ -112,10 +110,8 @@ spec:
ports:
- containerPort: {{ .Values.kerberoshub.frontend.containerPort | default 8080 }}
name: http
{{- with .Values.kerberoshub.frontend.volumeMounts}}
volumeMounts:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hub.frontend.volumeMounts" . | trim | nindent 8 }}
env:
- name: SSO_DOMAINS
# get the domain attribute from the list of sso domains
@@ -170,10 +170,8 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.kerberoshub.frontend.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hub.frontend.volumes" . | trim | nindent 8 }}
{{- with .Values.kerberoshub.frontend.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
@@ -193,10 +191,8 @@ spec:
ports:
- containerPort: {{ .Values.kerberoshub.frontend.containerPort | default 8080 }}
name: http
{{- with .Values.kerberoshub.frontend.volumeMounts}}
volumeMounts:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "hub.frontend.volumeMounts" . | trim | nindent 8 }}
env:
- name: LOG_LEVEL
value: "{{ .Values.kerberoshub.frontend.logLevel }}"
+22 -11
View File
@@ -650,15 +650,16 @@ kerberoshub:
drop: ["ALL"]
seccompProfile:
type: RuntimeDefault
# Keep these entries when adding custom branding/translation mounts.
volumes:
- name: frontend-tmp
emptyDir:
medium: Memory
sizeLimit: 16Mi
volumeMounts:
- name: frontend-tmp
mountPath: /tmp
# The hardened image writes its generated runtime configuration and nginx's
# temp files to /tmp. The chart always mounts a memory-backed emptyDir there
# (volume name frontend-tmp); you never have to list it yourself, and the
# custom branding/translation mounts further down only add to it.
tmp:
sizeLimit: 16Mi
# Extra volumes and mounts for this deployment (custom css, favicons,
# translations). See the "Custom layout" section below for the mount paths.
volumes: []
volumeMounts: []
topologySpreadConstraints: [] # Optional pod topology spread constraints (empty = none).
# Set to false to skip rendering the hub-frontend Service (e.g. when an
# external/shared Service is managed elsewhere).
@@ -709,7 +710,14 @@ kerberoshub:
logo: "custom"
# Custom layout: override css, favicons and translations (i18n)
# By providing a style.css file in the custom folder this file will override
# any css styling. Favicons are mounted into the favicon folder.
# any css styling. Favicons are mounted into the favicons folder.
# The image runs as UID 65532 without a shell, so the files must be readable
# by that UID (chmod a+rX) and must be written to the volume from outside the
# frontend pod (a ConfigMap, or a helper pod mounting the same PVC).
# Mounting a directory replaces everything the image ships there: when you
# mount assets/custom, include icons.js, auth-icons.js and logo-sidebar.png
# (copy them from custom-layout/) next to your style.css, or mount only
# style.css with subPath.
#
# Translations (i18n): for each language the served strings are
# deepMerge(assets/i18n/<lang>.json, assets/i18n-custom/<lang>.json)
@@ -731,10 +739,13 @@ kerberoshub:
#volumeMounts:
# - name: custom-layout
# mountPath: /usr/share/nginx/html/assets/custom
# readOnly: true
# - name: custom-favicon
# mountPath: /usr/share/nginx/html/assets/favicon
# mountPath: /usr/share/nginx/html/assets/favicons
# readOnly: true
# - name: custom-i18n
# mountPath: /usr/share/nginx/html/assets/i18n-custom
# readOnly: true
#volumes:
# - name: custom-layout
# persistentVolumeClaim: