mirror of
https://github.com/codex-storage/bittorrent-benchmarks.git
synced 2025-01-24 18:08:50 +00:00
add working k8s manifests for a deluge network
This commit is contained in:
parent
23a74a0e78
commit
edc04eb530
11
k8s/deluge-pvc.yaml
Normal file
11
k8s/deluge-pvc.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: deluge-pvc
|
||||
namespace: codex-benchmarks
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
53
k8s/deluge-statefulset.yaml
Normal file
53
k8s/deluge-statefulset.yaml
Normal file
@ -0,0 +1,53 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: deluge-nodes
|
||||
namespace: codex-benchmarks
|
||||
|
||||
spec:
|
||||
replicas: 5
|
||||
serviceName: deluge-service
|
||||
selector:
|
||||
matchLabels:
|
||||
app: deluge-nodes
|
||||
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: deluge-nodes
|
||||
|
||||
spec:
|
||||
containers:
|
||||
- name: deluge
|
||||
image: codexstorage/deluge
|
||||
ports:
|
||||
- containerPort: 6890
|
||||
env:
|
||||
- name: CLIENT_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: DELUGE_RPC_PORT
|
||||
value: "6890"
|
||||
- name: DELUGE_LISTEN_PORTS
|
||||
value: "6891,6892"
|
||||
|
||||
command: [ "/bin/bash", "--login", "-c" ]
|
||||
args:
|
||||
- |
|
||||
export DELUGE_CONFIG_DIR=/var/lib/deluge/${CLIENT_POD_NAME}
|
||||
|
||||
# Makes sure there's no previous garbage in there.
|
||||
rm -rf ${DELUGE_CONFIG_DIR}
|
||||
mkdir -p ${DELUGE_CONFIG_DIR}
|
||||
|
||||
${DELUGE_APP}/docker/bin/start.sh
|
||||
|
||||
volumeMounts:
|
||||
- name: deluge-volume
|
||||
mountPath: /var/lib/deluge
|
||||
|
||||
volumes:
|
||||
- name: deluge-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: deluge-pvc
|
4
k8s/namespace.yaml
Normal file
4
k8s/namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: codex-benchmarks
|
Loading…
x
Reference in New Issue
Block a user