Skip to content

Commit

Permalink
Start test only after all P2Ps are ready
Browse files Browse the repository at this point in the history
  • Loading branch information
akoptelov committed Nov 16, 2023
1 parent f9bb2e8 commit d43500f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
10 changes: 5 additions & 5 deletions openmina-discovery/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
dependencies:
- name: ocaml-test-node
repository: file://../ocaml-test-node
version: 0.0.2
version: 0.0.3
- name: ocaml-test-node
repository: file://../ocaml-test-node
version: 0.0.2
version: 0.0.3
- name: rust-test-node
repository: file://../rust-test-node
version: 0.0.1
digest: sha256:5ad99b514c4ba2afa14e99d3643705f5f3d939abd6253ad4f5a3cb793a2d50c3
generated: "2023-11-16T12:49:09.832980503+03:00"
version: 0.0.2
digest: sha256:f148e6afe2ee14ca4b11d16b27cda5007bd729a5e85a171aca025d0f33ff7a3c
generated: "2023-11-16T16:36:52.585039263+03:00"
8 changes: 4 additions & 4 deletions openmina-discovery/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.3
version: 0.0.4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand All @@ -28,12 +28,12 @@ dependencies:
- name: ocaml-test-node
repository: file://../ocaml-test-node
alias: seed
version: ">=0.0.2"
version: ">=0.0.3"
- name: ocaml-test-node
alias: ocaml
repository: file://../ocaml-test-node
version: ">=0.0.2"
version: ">=0.0.3"
- name: rust-test-node
alias: rust
repository: file://../rust-test-node
version: ">=0.0.0"
version: ">=0.0.2"
3 changes: 3 additions & 0 deletions openmina-discovery/scripts/wait.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

kubectl wait --for=condition=available --timeout=5m deployment $(for app in $*; do echo "$INSTANCE-$app"; done)
10 changes: 10 additions & 0 deletions openmina-discovery/templates/test-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ spec:
spec:
serviceAccount: {{ default "default" .Values.serviceAccount }}
restartPolicy: OnFailure
initContainers:
- name: wait
image: alpine/k8s:1.28.0
command: [ "sh", "/scripts/wait.sh", {{ .Values.nodes | quote }} ]
volumeMounts:
- name: scripts
mountPath: /scripts
env:
- name: INSTANCE
value: {{ .Release.Name }}
containers:
- name: main
image: alpine/k8s:1.28.0
Expand Down
6 changes: 3 additions & 3 deletions openmina-discovery/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
nodes: seed ocaml rust
global:
readinessProbe: P2PSocket

seed:
daemonJson:
Expand All @@ -15,11 +17,9 @@ ocaml:
daemonJson:
local:
path: /var/lib/coda/berkeley.json
seedWaitTimeout: 20
seedWaitTimeout: 5

rust:
peers:
- name: seed
peerId: 12D3KooWBT8pyJAfWJhdeGYAtKvcaUmm78ExyZ6uo6BEimYNVat1
probes:
readiness: false

0 comments on commit d43500f

Please sign in to comment.