Skip to content

Commit

Permalink
ci: wait for all pods ready post-deploy
Browse files Browse the repository at this point in the history
Slightly smarter CI logic, which will block until all pods are marked
Ready post-deployment. Due to an oversight, the "part-of" label wasn't
applied to the fullnode pods, so the deploy script exited after the
validators were running, but before the fullnodes were finished setting
up. That was fine, until #3336, which tacked on a subsequent deploy step
that assumes the RPC is ready to rock.

Also updates the statefulsets to deploy the child pods in parallel,
rather than serially, which shaves a few minutes off setup/teardown.
Only really affects preview env, which has frequent deploy churn.
  • Loading branch information
conorsch committed Mar 22, 2024
1 parent 97c86a2 commit 81a9b92
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
app.kubernetes.io/part-of: {{ include "penumbra-network.part_of" $ }}
{{- include "penumbra-network.labels" $ | nindent 4 }}
spec:
podManagementPolicy: Parallel
replicas: {{ $count }}
volumeClaimTemplates:
- metadata:
Expand Down
2 changes: 2 additions & 0 deletions deployments/charts/penumbra-node/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ metadata:
"app.kubernetes.io/part-of": {{ .Values.part_of }}
{{- end }}
spec:
podManagementPolicy: Parallel
replicas: {{ .Values.nodes | len | int }}
volumeClaimTemplates:
- metadata:
Expand Down Expand Up @@ -48,6 +49,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "penumbra-node.labels" . | nindent 8 }}
{{- include "penumbra-node.selectorLabels" . | nindent 8 }}
spec:
# Force the pods to different k8s nodes, so that egress ip is unique per CometBFT node.
Expand Down
3 changes: 2 additions & 1 deletion deployments/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ function helm_install() {
}

function wait_for_pods_to_be_running() {
echo "Waiting for pods to be running..."
echo "Waiting for pods to be running ($(date))..."
kubectl wait --for=condition=ready pods --timeout=5m \
-l app.kubernetes.io/part-of="$HELM_RELEASE"
echo "Done waiting for pods to be running ($(date))"
}

# Deploy a fresh testnet, destroying all prior chain state with new genesis.
Expand Down

0 comments on commit 81a9b92

Please sign in to comment.