try to fix monero mining

This commit is contained in:
Brad Stein 2025-08-13 08:17:31 -05:00
parent a5b1d2e7a3
commit 41f3746caa
5 changed files with 37 additions and 31 deletions

View File

@ -0,0 +1,8 @@
# infrastructure/core/pc-scavenger.yaml
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: scavenger
value: -10
globalDefault: false
description: "For pods and processes only meant to consume unutilized resources"

View File

@ -13,4 +13,5 @@ spec:
kind: GitRepository
name: flux-system
namespace: flux-system
wait: true
wait: true

View File

@ -16,4 +16,5 @@ spec:
dependsOn:
- name: crypto
wait: true
timeout: 5m
timeout: 5m

View File

@ -3,36 +3,40 @@ kind: Deployment
metadata:
name: p2pool
namespace: crypto
labels: { app: p2pool }
spec:
replicas: 1
selector: { matchLabels: { app: p2pool } }
selector:
matchLabels: { app: p2pool }
template:
metadata:
labels: { app: p2pool }
spec:
priorityClassName: scavenger
nodeSelector:
kubernetes.io/arch: arm64
volumes:
- name: payout
secret:
secretName: xmr-payout
priorityClassName: scavenger
containers:
- name: p2pool
image: ghcr.io/schernykh/p2pool:latest
imagePullPolicy: IfNotPresent
command: ["/bin/sh","-c"]
image: ghcr.io/sethforprivacy/p2pool:latest
command: ["p2pool"]
args:
- |
set -eu
ADDR="$(cat /run/xmr/address)"
exec nice -n 19 ionice -c3 p2pool \
--wallet "$ADDR" \
--host monerod.crypto.svc.cluster.local \
--rpc-port 18081 \
--zmq-port 18083 \
--stratum 0.0.0.0:3333
- "--wallet=$(XMR_ADDR)"
- "--host=monerod.crypto.svc.cluster.local"
- "--rpc-port=18081"
- "--zmq-port=18083"
- "--stratum=0.0.0.0:3333"
# - "--light-mode"
# - "--no-randomx"
# - "--no-cache"
env:
- name: XMR_ADDR
valueFrom:
secretKeyRef:
name: xmr-payout
key: address
ports:
- { containerPort: 3333, name: stratum, protocol: TCP }
volumeMounts:
- { name: payout, mountPath: /run/xmr, readOnly: true }
- { name: stratum, containerPort: 3333, protocol: TCP }
readinessProbe:
tcpSocket: { port: 3333 }
initialDelaySeconds: 10
periodSeconds: 10

View File

@ -1,8 +0,0 @@
# services/crypto/xmr-miner/priority-class.yaml
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: scavenger
value: -10
globalDefault: false
description: "Preemptible background miners."