titan-iac/services/crypto/monerod/deployment.yaml

91 lines
2.8 KiB
YAML
Raw Normal View History

2025-08-12 16:31:27 -05:00
# services/crypto/monerod
2025-08-10 20:41:01 -05:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: monerod
2025-08-12 14:30:04 -05:00
namespace: crypto
2025-08-10 20:41:01 -05:00
labels: { app: monerod }
spec:
replicas: 1
strategy: { type: Recreate }
selector: { matchLabels: { app: monerod } }
template:
metadata:
labels: { app: monerod }
spec:
securityContext:
fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch
2025-08-13 18:09:28 -05:00
nodeSelector:
2025-08-13 18:11:03 -05:00
node-role.kubernetes.io/worker: "true"
2025-09-02 10:43:44 -05:00
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: hardware
operator: In
values: ["rpi4","rpi5"]
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 50
preference:
matchExpressions:
- key: hardware
operator: In
values: ["rpi4"]
2025-08-10 20:41:01 -05:00
containers:
- name: monerod
image: registry.bstein.dev/infra/monerod:0.18.4.1
command: ["/opt/monero/monerod"]
2025-08-11 17:43:11 -05:00
args:
2025-08-12 16:31:27 -05:00
- --data-dir=/data
- --non-interactive
- --prune-blockchain
- --rpc-bind-ip=0.0.0.0
- --rpc-bind-port=18081
- --confirm-external-bind
- --p2p-bind-ip=0.0.0.0
- --p2p-bind-port=18080
2025-08-13 01:00:20 -05:00
- --zmq-pub=tcp://0.0.0.0:18083
- --out-peers=32
- --in-peers=64
- --add-priority-node=p2pmd.xmrvsbeast.com:18080
- --add-priority-node=nodes.hashvault.pro:18080
- --disable-dns-checkpoints
- --enable-dns-blocklist
2025-08-11 08:54:22 -05:00
ports:
2025-08-12 16:31:27 -05:00
- { name: rpc, containerPort: 18081 }
- { name: p2p, containerPort: 18080 }
2025-08-13 01:32:55 -05:00
- { name: zmq, containerPort: 18083 }
2025-08-12 15:25:11 -05:00
# securityContext:
# allowPrivilegeEscalation: false
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
# capabilities: { drop: ["ALL"] }
2025-08-10 20:41:01 -05:00
readinessProbe:
httpGet: { path: /get_info, port: 18081 }
2025-08-12 15:25:11 -05:00
initialDelaySeconds: 120
2025-08-10 20:41:01 -05:00
periodSeconds: 10
2025-08-11 08:54:22 -05:00
timeoutSeconds: 3
failureThreshold: 6
2025-08-10 20:41:01 -05:00
livenessProbe:
httpGet: { path: /get_info, port: 18081 }
2025-08-12 15:25:11 -05:00
initialDelaySeconds: 300
2025-08-10 20:41:01 -05:00
periodSeconds: 20
2025-08-11 08:54:22 -05:00
timeoutSeconds: 3
failureThreshold: 6
terminationGracePeriodSeconds: 120
lifecycle:
preStop:
exec:
command: ["sh","-lc","kill -TERM 1; for i in $(seq 1 110); do kill -0 1 2>/dev/null || exit 0; sleep 1; done; exit 0"]
2025-08-11 17:43:11 -05:00
volumeMounts:
- { name: data, mountPath: /data }
- { name: tmp, mountPath: /tmp }
2025-08-10 20:41:01 -05:00
volumes:
2025-08-11 08:54:22 -05:00
- name: data
2025-08-11 17:43:11 -05:00
persistentVolumeClaim: { claimName: monerod-chain }
2025-08-11 08:54:22 -05:00
- name: tmp
2025-08-10 20:41:01 -05:00
emptyDir: {}