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

@ -14,3 +14,4 @@ spec:
name: flux-system name: flux-system
namespace: flux-system namespace: flux-system
wait: true wait: true

View File

@ -17,3 +17,4 @@ spec:
- name: crypto - name: crypto
wait: true wait: true
timeout: 5m timeout: 5m

View File

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