Files
helm-charts/matrix-synapse/templates/matrix-delegation-nginx.deployment.yaml
T
jklein 91a2fbcb05 Compute memory/ephemeral-storage limits from requests, drop default CPU limits
Every chart now renders its container resources through a duplicated
_helpers.tpl helper (reference implementation in template-chart): requests
ship as chart defaults, missing memory and ephemeral-storage limits are
computed as resources.limitFactor x the request (default 3, satisfactory
keeps 2 to preserve its previously published 8Gi limit), an explicitly set
limit always wins, and a CPU limit is only rendered when set explicitly.
Fixed limit defaults are removed from all values.yaml files; teamspeak-server
gains a values-driven resources block instead of hardcoded template values.
Major version bump for all published charts.
2026-08-21 23:34:09 +02:00

74 lines
2.4 KiB
YAML

{{- if .Values.matrix.delegation.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx
template:
metadata:
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx
spec:
automountServiceAccountToken: false
securityContext:
{{- toYaml .Values.matrix.delegation.securityContext.pod | nindent 8 }}
containers:
- name: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx
image: "nginx:1.28.3"
securityContext:
{{- toYaml .Values.matrix.delegation.securityContext.container | nindent 12 }}
ports:
- containerPort: 8080
name: http
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
# The mounted nginx.conf points the pid file and all temp paths to
# /tmp, so a single writable emptyDir suffices with a read-only
# root filesystem.
- name: tmp
mountPath: /tmp
resources:
{{- include "matrix-synapse.resources" .Values.matrix.delegation.resources | nindent 12 }}
readinessProbe:
httpGet:
path: /.well-known/matrix/server
port: http
scheme: HTTP
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
livenessProbe:
httpGet:
path: /.well-known/matrix/server
port: http
scheme: HTTP
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
# The startup probe gates liveness/readiness. Startup budget = 5s * 30 = 150s.
startupProbe:
httpGet:
path: /.well-known/matrix/server
port: http
scheme: HTTP
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 30
volumes:
- name: tmp
emptyDir: {}
- name: nginx-config
configMap:
name: {{ .Release.Name }}-{{ .Chart.Name }}-delegation-nginx-config
items:
- key: nginx.conf
path: nginx.conf
{{- end }}