Files
helm-charts/patchmon/templates/patchmon-frontend.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

79 lines
2.7 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-frontend
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}-frontend
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}-{{ .Chart.Name }}-frontend
template:
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-frontend
labels:
app: {{ .Release.Name }}-{{ .Chart.Name }}-frontend
spec:
automountServiceAccountToken: false
securityContext:
{{- toYaml .Values.patchmon.frontend.securityContext.pod | nindent 8 }}
containers:
- name: {{ .Release.Name }}-{{ .Chart.Name }}-frontend
image: "ghcr.io/patchmon/patchmon-frontend:{{ .Chart.AppVersion }}"
imagePullPolicy: IfNotPresent
securityContext:
{{- toYaml .Values.patchmon.frontend.securityContext.container | nindent 12 }}
ports:
- containerPort: 3000
protocol: TCP
name: http
env:
- name: BACKEND_URL
value: "{{ .Release.Name }}-{{ .Chart.Name }}-backend-service"
- name: BACKEND_PORT
value: "80"
resources:
{{- include "patchmon.resources" .Values.patchmon.frontend.resources | nindent 12 }}
livenessProbe:
httpGet:
path: /
port: 3000
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /
port: 3000
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
# The startup probe gates liveness/readiness. Startup budget = 5s * 30 = 150s.
startupProbe:
httpGet:
path: /
port: 3000
periodSeconds: 5
timeoutSeconds: 5
failureThreshold: 30
volumeMounts:
- name: patchmon-volume
mountPath: /usr/share/nginx/html/assets
subPath: patchmon-assets
# nginx-unprivileged keeps its pid file and temp dirs in /tmp, and
# its entrypoint renders config templates into /etc/nginx/conf.d;
# both must be writable with a read-only root filesystem.
- name: tmp
mountPath: /tmp
- name: nginx-conf-d
mountPath: /etc/nginx/conf.d
restartPolicy: Always
volumes:
- name: tmp
emptyDir: {}
- name: nginx-conf-d
emptyDir: {}
- name: patchmon-volume
persistentVolumeClaim:
claimName: {{ .Release.Name }}-{{ .Chart.Name }}-pvc