1
0
Fork 0

add deluge

This commit is contained in:
Massaki Archambault 2023-06-20 19:55:33 -04:00
parent 422c98755a
commit 47eee3dd77
8 changed files with 162 additions and 1 deletions

View File

@ -0,0 +1,90 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: server
labels:
app.kubernetes.io/name: deluge
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: deluge
template:
metadata:
labels:
app.kubernetes.io/name: deluge
spec:
containers:
- image: lscr.io/linuxserver/deluge
name: deluge
ports:
- name: http
containerPort: 8112
- name: deluge-daemon
containerPort: 58846
- name: torrent-tcp
containerPort: 6881
hostPort: 6881
protocol: TCP
- name: torrent-udp
containerPort: 6881
hostPort: 6881
protocol: UDP
resources:
requests:
cpu: 1500m
memory: 250Mi
limits:
cpu: 1500m
memory: 250Mi
volumeMounts:
- name: deluge-config-pvc
mountPath: /config
volumes:
- name: deluge-config-pvc
persistentVolumeClaim:
claimName: deluge-config-pvc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: deluge-config-pvc
labels:
app.kubernetes.io/name: deluge
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: Service
metadata:
name: webui
labels:
app.kubernetes.io/name: deluge
spec:
selector:
app.kubernetes.io/name: deluge
ports:
- name: http
port: 80
targetPort: http
---
apiVersion: v1
kind: Service
metadata:
name: daemon
labels:
app.kubernetes.io/name: gitea
spec:
type: NodePort
selector:
app.kubernetes.io/name: gitea
ports:
- port: 58846
targetPort: deluge-daemon
nodePort: 31000

View File

@ -0,0 +1,19 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: webui
labels:
app.kubernetes.io/name: deluge
probe: blackbox-http
spec:
rules:
- host: ${DELUGE_EXTERNAL_HOST}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: webui
port:
name: http

View File

@ -0,0 +1,25 @@
resources:
- deluge-deployment.yaml
- deluge-ingress.yaml
namePrefix: deluge-
commonLabels:
app.kubernetes.io/name: deluge
configMapGenerator:
- name: kustomize-generated-config
literals:
- DELUGE_EXTERNAL_HOST=deluge.badjware.dev
replacements:
- source:
kind: ConfigMap
name: kustomize-generated-config
fieldPath: data.DELUGE_EXTERNAL_HOST
targets:
- select:
kind: Ingress
name: webui
fieldPaths:
- spec.rules.0.host

View File

@ -9,6 +9,7 @@ resources:
- ../../overlays/nextcloud
- ../../overlays/home-assistant
- ../../overlays/jellyfin
- ../../overlays/deluge
# resources:
# - probes/external-services-bobcat-miner.yaml
@ -77,6 +78,11 @@ patches:
kind: Deployment
name: jellyfin-server
path: patches/jellyfin-deployment-patch.yaml
- target:
version: v1
kind: Deployment
name: deluge-server
path: patches/deluge-deployment-patch.yaml
# - target:
# version: v1
# kind: Prometheus

View File

@ -0,0 +1,12 @@
- op: add
path: /spec/template/spec/containers/0/volumeMounts/-
value:
name: share-media-downloads-nfs
mountPath: /share/media/Downloads
- op: add
path: /spec/template/spec/volumes/-
value:
name: share-media-downloads-nfs
nfs:
server: 192.168.20.30
path: /mnt/pool0/media/Downloads

View File

@ -0,0 +1,5 @@
resources:
- namespace.yaml
- ../../bases/deluge
namespace: deluge

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: deluge