titan-iac/services/crypto/xmr-miner/xmrig-daemonset.yaml

47 lines
1.5 KiB
YAML
Raw Normal View History

2025-08-13 01:00:20 -05:00
apiVersion: apps/v1
kind: DaemonSet
metadata:
2025-08-14 00:34:13 -05:00
name: monero-xmrig
2025-08-13 01:00:20 -05:00
namespace: crypto
2025-08-14 00:34:13 -05:00
labels: { app: monero-xmrig }
2025-08-13 01:00:20 -05:00
spec:
selector:
2025-08-14 00:34:13 -05:00
matchLabels: { app: monero-xmrig }
2025-08-13 01:32:55 -05:00
updateStrategy: { type: RollingUpdate }
2025-08-13 01:00:20 -05:00
template:
metadata:
2025-08-14 00:34:13 -05:00
labels: { app: monero-xmrig }
2025-08-13 01:00:20 -05:00
spec:
2025-08-13 01:32:55 -05:00
priorityClassName: scavenger
2025-08-13 01:00:20 -05:00
nodeSelector:
2025-08-13 18:11:03 -05:00
node-role.kubernetes.io/worker: "true"
2025-08-13 01:00:20 -05:00
volumes:
- name: payout
secret:
2025-08-14 00:34:13 -05:00
secretName: monero-payout
2025-08-13 01:00:20 -05:00
containers:
- name: xmrig
2025-08-13 07:51:36 -05:00
image: ghcr.io/tari-project/xmrig:latest
2025-08-13 01:32:55 -05:00
imagePullPolicy: IfNotPresent
2025-08-13 01:00:20 -05:00
env:
2025-08-13 01:32:55 -05:00
- name: XMRIG_THREADS
valueFrom: { configMapKeyRef: { name: xmr-miner-sources, key: XMRIG_THREADS, optional: true } }
- name: XMRIG_EXTRA_ARGS
valueFrom: { configMapKeyRef: { name: xmr-miner-sources, key: XMRIG_EXTRA_ARGS, optional: true } }
2025-08-13 01:00:20 -05:00
command: ["/bin/sh","-lc"]
args:
- |
set -eu
THR="${XMRIG_THREADS:-1}"
EXTRA="${XMRIG_EXTRA_ARGS:-}"
2025-08-13 01:32:55 -05:00
# p2pool ignores wallet user; use 'x' or fixed difficulty with x+<diff>
exec nice -n 19 ionice -c3 xmrig \
2025-08-13 01:00:20 -05:00
-o p2pool.crypto.svc.cluster.local:3333 \
2025-08-13 01:32:55 -05:00
-u x \
2025-08-13 01:00:20 -05:00
-k \
2025-08-14 20:37:30 -05:00
--donate-level N \
2025-08-13 01:00:20 -05:00
--cpu-priority 1 \
--threads "${THR}" ${EXTRA}
volumeMounts:
- { name: payout, mountPath: /run/xmr, readOnly: true }