mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Problem: BigchainDB liveness probe should be HTTP API (#2251)
This commit is contained in:
parent
7b0f6f6322
commit
85683af2eb
@ -118,7 +118,7 @@ spec:
|
|||||||
key: bdb-rpc-port
|
key: bdb-rpc-port
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 200m
|
cpu: 1
|
||||||
memory: 5G
|
memory: 5G
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: bdb-data
|
- name: bdb-data
|
||||||
@ -285,23 +285,10 @@ spec:
|
|||||||
cpu: 200m
|
cpu: 200m
|
||||||
memory: 2G
|
memory: 2G
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
exec:
|
httpGet:
|
||||||
command:
|
path: /
|
||||||
- /bin/bash
|
port: bdb-port
|
||||||
- "-c"
|
|
||||||
- |
|
|
||||||
curl -s --fail --max-time 10 "http://${BIGCHAINDB_TENDERMINT_HOST}:${BIGCHAINDB_TENDERMINT_PORT}/abci_info" > /dev/null
|
|
||||||
ERR=$?
|
|
||||||
if [ "$ERR" == 28 ]; then
|
|
||||||
exit 1
|
|
||||||
elif [[ $(curl --max-time 10 "http://${BIGCHAINDB_TENDERMINT_HOST}:${BIGCHAINDB_TENDERMINT_PORT}/abci_info" | jq -r ".error.code") == -32603 ]]; then
|
|
||||||
exit 1
|
|
||||||
elif [ "$ERR" != 0 ]; then
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
initialDelaySeconds: 60
|
initialDelaySeconds: 60
|
||||||
periodSeconds: 10
|
periodSeconds: 15
|
||||||
failureThreshold: 3
|
failureThreshold: 3
|
||||||
timeoutSeconds: 15
|
timeoutSeconds: 15
|
||||||
|
Loading…
x
Reference in New Issue
Block a user