This works around an apparent k8s bug where startupProbe does not respect periodSeconds. Instead, use a readinessProbe. Change-Id: I43251284db336ea5ade5b1735a867cf294a7b1c4
@@ -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:
@@ -77,11 +77,12 @@ spec:
httpGet:
path: /health
+ periodSeconds: 1
- name: setup
image: solana-client
- /usr/src/solana/devnet_setup.sh
port: 2000
@@ -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