devnet: fix Ready state delay by switching to readinessProbe
This works around an apparent k8s bug where startupProbe does not respect periodSeconds. Instead, use a readinessProbe. Change-Id: I43251284db336ea5ade5b1735a867cf294a7b1c4
This commit is contained in:
parent
818e23ddca
commit
7728b47659
|
@ -48,11 +48,12 @@ spec:
|
||||||
port: rpc
|
port: rpc
|
||||||
- name: tests
|
- name: tests
|
||||||
image: eth-node
|
image: eth-node
|
||||||
|
stdin: true
|
||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- "npm run migrate && npx truffle exec scripts/deploy_test_token.js && nc -l -p 2000 && sleep infinity"
|
- "npm run migrate && npx truffle exec scripts/deploy_test_token.js && nc -lkp 2000 0.0.0.0"
|
||||||
startupProbe:
|
readinessProbe:
|
||||||
periodSeconds: 1
|
periodSeconds: 1
|
||||||
failureThreshold: 300
|
failureThreshold: 300
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
|
|
|
@ -77,11 +77,12 @@ spec:
|
||||||
httpGet:
|
httpGet:
|
||||||
port: rpc
|
port: rpc
|
||||||
path: /health
|
path: /health
|
||||||
|
periodSeconds: 1
|
||||||
- name: setup
|
- name: setup
|
||||||
image: solana-client
|
image: solana-client
|
||||||
command:
|
command:
|
||||||
- /usr/src/solana/devnet_setup.sh
|
- /usr/src/solana/devnet_setup.sh
|
||||||
startupProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: 2000
|
port: 2000
|
||||||
periodSeconds: 1
|
periodSeconds: 1
|
||||||
|
|
|
@ -47,7 +47,4 @@ spl-token mint "$token" 10000000000 "$account"
|
||||||
retry client create-bridge "$bridge_address" "$initial_guardian" 86400 100
|
retry client create-bridge "$bridge_address" "$initial_guardian" 86400 100
|
||||||
|
|
||||||
# Let k8s startup probe succeed
|
# Let k8s startup probe succeed
|
||||||
nc -l -p 2000
|
nc -k -l -p 2000
|
||||||
|
|
||||||
# Keep the container alive for interactive CLI usage
|
|
||||||
sleep infinity
|
|
||||||
|
|
Loading…
Reference in New Issue