Files
helm-charts/rflood/templates/deployment.yaml
T
shaandClaude Sonnet 4.6 8e77d702ba fix(rflood): add liveness probe and raise memory limit to 4Gi
rtorrent periodically freezes blocking Flood's XMLRPC calls (activity-stream
and client/settings hang). Root causes: pieces.memory.max=1800M near the 2Gi
container limit; no liveness probe to trigger pod restart on hang.

- Liveness probe: exec rtxmlrpc system.time_seconds with 10s timeout; restart
  pod after 3 consecutive failures (every 30s check)
- Default memory limit raised from 2Gi to 4Gi

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 13:25:46 +03:00

80 lines
2.5 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/component: torrent
annotations:
version-source: {{ index .Chart.Annotations "version-source" }}
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
spec:
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
ports:
- containerPort: {{ .Values.webuiPort }}
name: webui
- containerPort: {{ .Values.rpcPort }}
name: rpc
- containerPort: {{ .Values.torrentPort }}
name: torrent-tcp
protocol: TCP
- containerPort: {{ .Values.torrentPort }}
name: torrent-udp
protocol: UDP
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
exec:
{{- toYaml .Values.livenessProbe.exec | nindent 14 }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
{{- end }}
volumeMounts:
- name: config
mountPath: /config
- name: data
mountPath: /data
volumes:
- name: config
persistentVolumeClaim:
claimName: {{ .Release.Name }}-config
- name: data
hostPath:
path: {{ .Values.volumes.data.hostPath }}
type: DirectoryOrCreate