mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-08-28 11:33:17 +00:00
chore: Add rflood Helm chart with deployment, service, ingress, PVC, and values files
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: rflood
|
||||||
|
description: rTorrent + Flood (hotio/rflood) Helm chart
|
||||||
|
type: application
|
||||||
|
version: 0.1.1
|
||||||
|
appVersion: "release-0.16.8"
|
||||||
|
annotations:
|
||||||
|
version-source: ghcr-tags:hotio/rflood:^release-[0-9]+\.[0-9]+\.[0-9]+$
|
||||||
@@ -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
|
||||||
@@ -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 }}
|
||||||
@@ -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 }}
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# Default values for rflood Helm Chart (hotio/rflood)
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/hotio/rflood
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
webuiPort: 3000
|
||||||
|
rpcPort: 5000
|
||||||
|
torrentPort: 50000
|
||||||
|
|
||||||
|
env:
|
||||||
|
PUID: "1001"
|
||||||
|
PGID: "1001"
|
||||||
|
UMASK: "002"
|
||||||
|
TZ: "Europe/Kyiv"
|
||||||
|
FLOOD_AUTH: "false"
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: "256Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "2"
|
||||||
|
memory: "2Gi"
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
config:
|
||||||
|
size: 2Gi
|
||||||
|
storageClass: ""
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
data:
|
||||||
|
hostPath: ""
|
||||||
|
|
||||||
|
ingresses: {}
|
||||||
|
# https:
|
||||||
|
# host: rflood.example.com
|
||||||
|
# annotations: {}
|
||||||
|
# tls:
|
||||||
|
# - hosts:
|
||||||
|
# - rflood.example.com
|
||||||
@@ -37,7 +37,7 @@ fetch_latest() {
|
|||||||
local token
|
local token
|
||||||
token=$(curl -s "https://ghcr.io/token?scope=repository:${repo}:pull" | jq -r '.token // empty')
|
token=$(curl -s "https://ghcr.io/token?scope=repository:${repo}:pull" | jq -r '.token // empty')
|
||||||
if [ -n "$token" ]; then
|
if [ -n "$token" ]; then
|
||||||
version=$(curl -s -H "Authorization: Bearer $token" "https://ghcr.io/v2/${repo}/tags/list" | jq -r '.tags[]' | grep -E "$pattern" | sort -V -r | head -1)
|
version=$(curl -s -H "Authorization: Bearer $token" "https://ghcr.io/v2/${repo}/tags/list?n=10000" | jq -r '.tags[]' | grep -E "$pattern" | sort -V -r | head -1)
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
Reference in New Issue
Block a user