mirror of
https://github.com/codex-storage/bittorrent-benchmarks.git
synced 2025-01-27 03:15:12 +00:00
62 lines
2.0 KiB
YAML
62 lines
2.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: deluge-nodes-{{ .Release.Name }}
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
spec:
|
|
replicas: {{ .Values.experiment.networkSize }}
|
|
serviceName: deluge-nodes-{{ .Release.Name }}-service
|
|
podManagementPolicy: Parallel
|
|
selector:
|
|
matchLabels:
|
|
app: deluge-nodes-{{ .Release.Name }}
|
|
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: deluge-nodes-{{ .Release.Name }}
|
|
|
|
spec:
|
|
containers:
|
|
- name: deluge-{{ .Release.Name }}
|
|
image: codexstorage/deluge
|
|
imagePullPolicy: Always
|
|
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"
|
|
- name: DELUGE_LOG_LEVEL
|
|
value: "info"
|
|
command: [ "/bin/bash", "--login", "-c" ]
|
|
args:
|
|
- |
|
|
export DELUGE_NODE_ID=${CLIENT_POD_NAME}
|
|
# Sadly we can't mount a subpath, so need add the correct prefix
|
|
# into all of the config directories.
|
|
export DELUGE_CONFIG_DIR=/var/lib/deluge/${CLIENT_POD_NAME}
|
|
export DELUGE_DOWNLOAD_DIR=${DELUGE_CONFIG_DIR}/downloads
|
|
export DELUGE_TORRENTFILE_DIR=${DELUGE_CONFIG_DIR}/downloads
|
|
export DELUGE_PLUGINS_DIR=${DELUGE_CONFIG_DIR}/plugins
|
|
|
|
# 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-{{ .Release.Name }}-volume
|
|
mountPath: /var/lib/deluge
|
|
|
|
volumes:
|
|
- name: deluge-{{ .Release.Name }}-volume
|
|
persistentVolumeClaim:
|
|
claimName: {{ include "deluge.pvc" . }}
|