From 9b769a9dbbcc8df58160ac16b81c1406edcbf9e7 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Mon, 11 Aug 2025 17:43:11 -0500 Subject: [PATCH] monerod deployment fix --- services/monero/monerod/deployment.yaml | 44 +++++++++++++++---------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/services/monero/monerod/deployment.yaml b/services/monero/monerod/deployment.yaml index 5ec5f87..88d1daf 100644 --- a/services/monero/monerod/deployment.yaml +++ b/services/monero/monerod/deployment.yaml @@ -18,22 +18,26 @@ spec: initContainers: - name: fetch-monero-cli image: debian:bookworm-slim - command: ["/bin/sh","-lc"] + command: ["/bin/sh","-c"] args: - | - set -euo pipefail + set -euxo pipefail apt-get update apt-get install -y --no-install-recommends ca-certificates curl bzip2 update-ca-certificates + ARCH="$(uname -m)" case "$ARCH" in - x86_64) F="monero-linux-x64" ;; - aarch64|arm64) F="monero-linux-armv8" ;; - armv7l) F="monero-linux-armv7" ;; + x86_64) F="monero-linux-x64" ;; + aarch64|arm64) F="monero-linux-armv8" ;; + armv7l) F="monero-linux-armv7" ;; *) echo "Unsupported arch: $ARCH" >&2; exit 1 ;; esac - VER="v0.18.3.4" # set the version you want - URL="https://downloads.getmonero.org/cli/${F}-${VER}.tar.bz2" + + VER="v0.18.4.1" + # Prefer GitHub release URL (stable + explicit version): + URL="https://github.com/monero-project/monero/releases/download/${VER}/${F}-${VER}.tar.bz2" + echo "Downloading $URL" cd /data curl -fL "$URL" -o monero.tar.bz2 @@ -42,17 +46,21 @@ spec: volumeMounts: - name: data mountPath: /data + containers: - name: monerod image: debian:bookworm-slim - command: ["/bin/sh","-lc"] - args: ["exec /data/monerod --data-dir=/data --non-interactive --prune-blockchain --rpc-bind-ip=0.0.0.0 --rpc-bind-port=18081 --p2p-bind-ip=0.0.0.0 --p2p-bind-port=18080"] - volumeMounts: - - { name: tmp, mountPath: /tmp } - - { name: data, mountPath: /data } + command: ["/bin/sh","-c"] + args: + - exec /data/monerod \ + --data-dir=/data \ + --non-interactive \ + --prune-blockchain \ + --rpc-bind-ip=0.0.0.0 --rpc-bind-port=18081 \ + --p2p-bind-ip=0.0.0.0 --p2p-bind-port=18080 ports: - - { containerPort: 18081, name: rpc } - - { containerPort: 18080, name: p2p } + - { containerPort: 18081, name: rpc } + - { containerPort: 18080, name: p2p } securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true @@ -71,11 +79,11 @@ spec: periodSeconds: 20 timeoutSeconds: 3 failureThreshold: 6 + volumeMounts: + - { name: data, mountPath: /data } + - { name: tmp, mountPath: /tmp } volumes: - name: data - persistentVolumeClaim: - claimName: monerod-chain + persistentVolumeClaim: { claimName: monerod-chain } - name: tmp emptyDir: {} - - name: release-keys - configMap: { name: monero-release-keys }