chore: Add rflood Helm chart with deployment, service, ingress, PVC, and values files

This commit is contained in:
sha
2026-04-13 22:39:08 +03:00
parent 2a4fac3136
commit 755c5a1112
7 changed files with 180 additions and 1 deletions
+58
View File
@@ -0,0 +1,58 @@
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:
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 }}
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
+27
View File
@@ -0,0 +1,27 @@
{{- range $name, $config := .Values.ingresses }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $.Release.Name }}-{{ $name }}
{{- with $config.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
rules:
- host: {{ $config.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ $.Release.Name }}
port:
number: {{ $.Values.webuiPort }}
{{- with $config.tls }}
tls:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
+16
View File
@@ -0,0 +1,16 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-config
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
accessModes:
{{- toYaml .Values.persistence.config.accessModes | nindent 4 }}
resources:
requests:
storage: {{ .Values.persistence.config.size | quote }}
{{- with .Values.persistence.config.storageClass }}
storageClassName: {{ . | quote }}
{{- end }}
+28
View File
@@ -0,0 +1,28 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
type: ClusterIP
selector:
app: {{ .Release.Name }}
ports:
- name: webui
port: {{ .Values.webuiPort }}
targetPort: {{ .Values.webuiPort }}
protocol: TCP
- name: rpc
port: {{ .Values.rpcPort }}
targetPort: {{ .Values.rpcPort }}
protocol: TCP
- name: torrent-tcp
port: {{ .Values.torrentPort }}
targetPort: {{ .Values.torrentPort }}
protocol: TCP
- name: torrent-udp
port: {{ .Values.torrentPort }}
targetPort: {{ .Values.torrentPort }}
protocol: UDP