fixed monerod hopefully
This commit is contained in:
parent
ab04f3fbfd
commit
e7f1285d38
@ -23,37 +23,36 @@ spec:
|
|||||||
- |
|
- |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y --no-install-recommends ca-certificates curl gnupg tar bzip2
|
apt-get install -y --no-install-recommends ca-certificates curl bzip2
|
||||||
mkdir -p /opt/monero/bin /tmp/gnupg
|
update-ca-certificates
|
||||||
gpg --homedir /tmp/gnupg --import /keys/binaryfate.asc
|
ARCH="$(uname -m)"
|
||||||
curl -fL https://downloads.getmonero.org/cli/linux64 -o /tmp/monero-cli.tar.bz2
|
case "$ARCH" in
|
||||||
curl -fL https://downloads.getmonero.org/cli/linux64.sig -o /tmp/monero-cli.tar.bz2.asc
|
x86_64) F="monero-linux-x64" ;;
|
||||||
gpg --homedir /tmp/gnupg --verify /tmp/monero-cli.tar.bz2.asc /tmp/monero-cli.tar.bz2
|
aarch64|arm64) F="monero-linux-armv8" ;;
|
||||||
tar -xjf /tmp/monero-cli.tar.bz2 -C /opt/monero
|
armv7l) F="monero-linux-armv7" ;;
|
||||||
MONEROD=$(find /opt/monero -type f -name monerod | head -n1)
|
*) echo "Unsupported arch: $ARCH" >&2; exit 1 ;;
|
||||||
install -m 0755 "$MONEROD" /opt/monero/bin/monerod
|
esac
|
||||||
|
VER="v0.18.3.4" # set the version you want
|
||||||
|
URL="https://downloads.getmonero.org/cli/${F}-${VER}.tar.bz2"
|
||||||
|
echo "Downloading $URL"
|
||||||
|
cd /data
|
||||||
|
curl -fL "$URL" -o monero.tar.bz2
|
||||||
|
tar -xjf monero.tar.bz2 --strip-components=1
|
||||||
|
rm -f monero.tar.bz2
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- { name: monero-bin, mountPath: /opt/monero }
|
- name: data
|
||||||
- { name: release-keys, mountPath: /keys, readOnly: true }
|
mountPath: /data
|
||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: monerod
|
- name: monerod
|
||||||
image: debian:bookworm-slim
|
image: debian:bookworm-slim
|
||||||
command: ["/bin/sh","-lc"]
|
command: ["/bin/sh","-lc"]
|
||||||
args:
|
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"]
|
||||||
- |
|
|
||||||
exec /opt/monero/bin/monerod \
|
|
||||||
--data-dir /chain \
|
|
||||||
--prune-blockchain \
|
|
||||||
--rpc-bind-ip 0.0.0.0 --rpc-bind-port 18081 \
|
|
||||||
--confirm-external-bind \
|
|
||||||
--non-interactive \
|
|
||||||
--max-concurrency 2
|
|
||||||
ports:
|
|
||||||
- { containerPort: 18081, name: rpc }
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- { name: chain, mountPath: /chain }
|
- { name: tmp, mountPath: /tmp }
|
||||||
- { name: monero-bin, mountPath: /opt/monero/bin }
|
- { name: data, mountPath: /data }
|
||||||
|
ports:
|
||||||
|
- { containerPort: 18081, name: rpc }
|
||||||
|
- { containerPort: 18080, name: p2p }
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
@ -62,16 +61,21 @@ spec:
|
|||||||
capabilities: { drop: ["ALL"] }
|
capabilities: { drop: ["ALL"] }
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet: { path: /get_info, port: 18081 }
|
httpGet: { path: /get_info, port: 18081 }
|
||||||
initialDelaySeconds: 20
|
initialDelaySeconds: 90
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 6
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet: { path: /get_info, port: 18081 }
|
httpGet: { path: /get_info, port: 18081 }
|
||||||
initialDelaySeconds: 60
|
initialDelaySeconds: 180
|
||||||
periodSeconds: 20
|
periodSeconds: 20
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 6
|
||||||
volumes:
|
volumes:
|
||||||
- name: chain
|
- name: data
|
||||||
persistentVolumeClaim: { claimName: monerod-chain }
|
persistentVolumeClaim:
|
||||||
- name: monero-bin
|
claimName: monerod-chain
|
||||||
|
- name: tmp
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: release-keys
|
- name: release-keys
|
||||||
configMap: { name: monero-release-keys }
|
configMap: { name: monero-release-keys }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user