try to fix monero mining
This commit is contained in:
parent
a5b1d2e7a3
commit
41f3746caa
8
infrastructure/core/pc-scavenger.yaml
Normal file
8
infrastructure/core/pc-scavenger.yaml
Normal 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"
|
||||
@ -13,4 +13,5 @@ spec:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
namespace: flux-system
|
||||
wait: true
|
||||
wait: true
|
||||
|
||||
@ -16,4 +16,5 @@ spec:
|
||||
dependsOn:
|
||||
- name: crypto
|
||||
wait: true
|
||||
timeout: 5m
|
||||
timeout: 5m
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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."
|
||||
Loading…
x
Reference in New Issue
Block a user