Files
rhema-together/deploy/helm/rhema-together/templates/deployment.yaml
T
vhaudiquet 3b82719d56 feat: add account avatars and a deployable image
Accounts get a profile page with an uploaded picture, shown in the
sidebar, the room bar, and every human message. Pictures live in the
SQLite database and are served through an authenticated route.

Hardening from the security audit: preview hosts expire after 24 hours
and carry no-referrer; removing a member or archiving a room ends their
event feed, presence socket, and terminal within seconds; previews and
the terminal pin the SSH host key; invites are claimed atomically;
missing accounts spend the same argon2 time as wrong passwords;
registration is closed by default; WebSockets check the origin; and the
master key is created with mode 0600.

The Dockerfile builds one image with the static client and the server.
The Helm chart runs a single replica with a SQLite volume, a wildcard
preview ingress, and the proxy settings the event feed and uploads
need. It refuses more than one replica because state is in process.
2026-11-28 02:07:26 +01:00

112 lines
3.6 KiB
YAML

{{- if ne (int .Values.replicaCount) 1 }}
{{- fail "replicaCount must be 1: state lives in one SQLite file and in-process tunnels" }}
{{- end }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "rhema-together.fullname" . }}
labels:
{{- include "rhema-together.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
strategy:
type: Recreate
selector:
matchLabels:
{{- include "rhema-together.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "rhema-together.selectorLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: rhema-together
image: {{ include "rhema-together.image" . | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
ports:
- name: http
containerPort: 7800
protocol: TCP
env:
- name: TOGETHER_LISTEN
value: "0.0.0.0:7800"
- name: TOGETHER_PUBLIC_URL
value: {{ required "set app.publicUrl" .Values.app.publicUrl | quote }}
- name: TOGETHER_PREVIEW_ORIGIN
value: {{ .Values.app.previewOrigin | quote }}
- name: TOGETHER_DATABASE
value: /data/together.db
- name: TOGETHER_SECRET_KEY_FILE
value: /data/secret.key
- name: TOGETHER_WEB_DIR
value: /app/web
- name: TOGETHER_ALLOW_REGISTRATION
value: {{ .Values.app.allowRegistration | quote }}
- name: TOGETHER_MAX_TURN_STEPS
value: {{ .Values.app.maxTurnSteps | quote }}
- name: RUST_LOG
value: {{ .Values.app.logLevel | quote }}
{{- with .Values.app.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: data
mountPath: /data
- name: tmp
mountPath: /tmp
readinessProbe:
httpGet:
path: /api/bootstrap
port: http
initialDelaySeconds: 3
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
livenessProbe:
httpGet:
path: /api/bootstrap
port: http
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 3
failureThreshold: 3
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (printf "%s-data" (include "rhema-together.fullname" .)) }}
{{- else }}
emptyDir: {}
{{- end }}
- name: tmp
emptyDir: {}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}