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:
Leo 2021-07-28 14:13:45 +02:00
parent 818e23ddca
commit 7728b47659
3 changed files with 6 additions and 7 deletions

View File

@ -48,11 +48,12 @@ spec:
port: rpc
- name: tests
image: eth-node
stdin: true
command:
- /bin/sh
- -c
- "npm run migrate && npx truffle exec scripts/deploy_test_token.js && nc -l -p 2000 && sleep infinity"
startupProbe:
- "npm run migrate && npx truffle exec scripts/deploy_test_token.js && nc -lkp 2000 0.0.0.0"
readinessProbe:
periodSeconds: 1
failureThreshold: 300
tcpSocket:

View File

@ -77,11 +77,12 @@ spec:
httpGet:
port: rpc
path: /health
periodSeconds: 1
- name: setup
image: solana-client
command:
- /usr/src/solana/devnet_setup.sh
startupProbe:
readinessProbe:
tcpSocket:
port: 2000
periodSeconds: 1

View File

@ -47,7 +47,4 @@ spl-token mint "$token" 10000000000 "$account"
retry client create-bridge "$bridge_address" "$initial_guardian" 86400 100
# Let k8s startup probe succeed
nc -l -p 2000
# Keep the container alive for interactive CLI usage
sleep infinity
nc -k -l -p 2000