Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add validator 5 to staging-preview and staging-preprod #169

Merged
merged 3 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/actions/deploy/deploy-staging-preprod/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ runs:
kubectl delete pod staging-preprod-validator-2 -n staging-preprod || true
kubectl delete pod staging-preprod-validator-3 -n staging-preprod || true
kubectl delete pod staging-preprod-validator-4 -n staging-preprod || true
kubectl delete pod staging-preprod-validator-5 -n staging-preprod || true
echo "Waiting for pods to delete..."
kubectl wait --for=delete pod/staging-preprod-validator-1 pod/staging-preprod-validator-2 pod/staging-preprod-validator-3 pod/staging-preprod-validator-4 -n staging-preprod --timeout=120s || true
kubectl wait --for=delete pod/staging-preprod-validator-1 pod/staging-preprod-validator-2 pod/staging-preprod-validator-3 pod/staging-preprod-validator-4 pod/staging-preprod-validator-5 -n staging-preprod --timeout=120s || true
shell: bash

- name: Delete substrate PVCs
Expand All @@ -70,8 +71,9 @@ runs:
kubectl delete pvc staging-preprod-validator-2-claim-substrate-node-data -n staging-preprod
kubectl delete pvc staging-preprod-validator-3-claim-substrate-node-data -n staging-preprod
kubectl delete pvc staging-preprod-validator-4-claim-substrate-node-data -n staging-preprod
kubectl delete pvc staging-preprod-validator-5-claim-substrate-node-data -n staging-preprod
echo "Waiting for PVCs to delete..."
kubectl wait --for=delete pvc/staging-preprod-validator-1-claim-substrate-node-data pvc/staging-preprod-validator-2-claim-substrate-node-data pvc/staging-preprod-validator-3-claim-substrate-node-data pvc/staging-preprod-validator-4-claim-substrate-node-data -n staging-preprod --timeout=120s
kubectl wait --for=delete pvc/staging-preprod-validator-1-claim-substrate-node-data pvc/staging-preprod-validator-2-claim-substrate-node-data pvc/staging-preprod-validator-3-claim-substrate-node-data pvc/staging-preprod-validator-4-claim-substrate-node-data pvc/staging-preprod-validator-5-claim-substrate-node-data -n staging-preprod --timeout=120s
shell: bash

- name: Deploy with chain-spec and image override
Expand All @@ -81,6 +83,7 @@ runs:
helm upgrade --install staging-preprod-validator-2 . -f values/chains/staging-preprod.yaml -f values/nodes/staging-preprod/validator/staging-preprod-validator-2 --set images.substrateNode="${{ inputs.image }}" --set chain.chainspec_secretName="staging-preprod-chain-spec-${{ inputs.sha }}"
helm upgrade --install staging-preprod-validator-3 . -f values/chains/staging-preprod.yaml -f values/nodes/staging-preprod/validator/staging-preprod-validator-3 --set images.substrateNode="${{ inputs.image }}" --set chain.chainspec_secretName="staging-preprod-chain-spec-${{ inputs.sha }}"
helm upgrade --install staging-preprod-validator-4 . -f values/chains/staging-preprod.yaml -f values/nodes/staging-preprod/validator/staging-preprod-validator-4 --set images.substrateNode="${{ inputs.image }}" --set chain.chainspec_secretName="staging-preprod-chain-spec-${{ inputs.sha }}"
helm upgrade --install staging-preprod-validator-5 . -f values/chains/staging-preprod.yaml -f values/nodes/staging-preprod/validator/staging-preprod-validator-5 --set images.substrateNode="${{ inputs.image }}" --set chain.chainspec_secretName="staging-preprod-chain-spec-${{ inputs.sha }}"
shell: bash

- name: Wait
Expand All @@ -93,6 +96,8 @@ runs:
kubectl wait --for=condition=ready pod staging-preprod-validator-3 -n staging-preprod --timeout=300s
echo "Waiting for staging-preprod-validator-4..."
kubectl wait --for=condition=ready pod staging-preprod-validator-4 -n staging-preprod --timeout=300s
echo "Waiting for staging-preprod-validator-5..."
kubectl wait --for=condition=ready pod staging-preprod-validator-5 -n staging-preprod --timeout=300s
shell: bash

- name: Validate
Expand All @@ -105,6 +110,8 @@ runs:
kubectl get pod staging-preprod-validator-3 -n staging-preprod -o jsonpath="{.status.containerStatuses[*].ready}"
echo "Checking staging-preprod-validator-4..."
kubectl get pod staging-preprod-validator-4 -n staging-preprod -o jsonpath="{.status.containerStatuses[*].ready}"
kubectl get pods -n staging-preprod -o custom-columns='NAME:.metadata.name,READY:.status.containerStatuses[*].ready' | grep -E '^(staging-preprod-validator-1|staging-preprod-validator-2|staging-preprod-validator-3|staging-preprod-validator-4)' | awk '{if ($2 != "true,true,true,true") exit 1}'
echo "All pods are 4/4 up and ready"
shell: bash
echo "Checking staging-preprod-validator-5..."
kubectl get pod staging-preprod-validator-5 -n staging-preprod -o jsonpath="{.status.containerStatuses[*].ready}"
kubectl get pods -n staging-preprod -o custom-columns='NAME:.metadata.name,READY:.status.containerStatuses[*].ready' | grep -E '^(staging-preprod-validator-1|staging-preprod-validator-2|staging-preprod-validator-3|staging-preprod-validator-4|staging-preprod-validator-5)' | awk '{if ($2 != "true,true,true,true") exit 1}'
echo "All pods are 5/5 up and ready"
shell: bash
17 changes: 12 additions & 5 deletions .github/actions/deploy/deploy-staging-preview/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ runs:
kubectl delete pod staging-preview-validator-2 -n staging-preview || true
kubectl delete pod staging-preview-validator-3 -n staging-preview || true
kubectl delete pod staging-preview-validator-4 -n staging-preview || true
kubectl delete pod staging-preview-validator-5 -n staging-preview || true
echo "Waiting for pods to delete..."
kubectl wait --for=delete pod/staging-preview-validator-1 pod/staging-preview-validator-2 pod/staging-preview-validator-3 pod/staging-preview-validator-4 -n staging-preview --timeout=120s || true
kubectl wait --for=delete pod/staging-preview-validator-1 pod/staging-preview-validator-2 pod/staging-preview-validator-3 pod/staging-preview-validator-4 pod/staging-preview-validator-5 -n staging-preview --timeout=120s || true
shell: bash

- name: Delete substrate PVCs
Expand All @@ -70,8 +71,9 @@ runs:
kubectl delete pvc staging-preview-validator-2-claim-substrate-node-data -n staging-preview
kubectl delete pvc staging-preview-validator-3-claim-substrate-node-data -n staging-preview
kubectl delete pvc staging-preview-validator-4-claim-substrate-node-data -n staging-preview
kubectl delete pvc staging-preview-validator-5-claim-substrate-node-data -n staging-preview
echo "Waiting for PVCs to delete..."
kubectl wait --for=delete pvc/staging-preview-validator-1-claim-substrate-node-data pvc/staging-preview-validator-2-claim-substrate-node-data pvc/staging-preview-validator-3-claim-substrate-node-data pvc/staging-preview-validator-4-claim-substrate-node-data -n staging-preview --timeout=120s
kubectl wait --for=delete pvc/staging-preview-validator-1-claim-substrate-node-data pvc/staging-preview-validator-2-claim-substrate-node-data pvc/staging-preview-validator-3-claim-substrate-node-data pvc/staging-preview-validator-4-claim-substrate-node-data pvc/staging-preview-validator-5-claim-substrate-node-data -n staging-preview --timeout=120s
shell: bash

- name: Deploy with chain-spec and image override
Expand All @@ -81,6 +83,7 @@ runs:
helm upgrade --install staging-preview-validator-2 . -f values/chains/staging-preview.yaml -f values/nodes/staging-preview/validator/staging-preview-validator-2 --set images.substrateNode="${{ inputs.image }}" --set chain.chainspec_secretName="staging-preview-chain-spec-${{ inputs.sha }}"
helm upgrade --install staging-preview-validator-3 . -f values/chains/staging-preview.yaml -f values/nodes/staging-preview/validator/staging-preview-validator-3 --set images.substrateNode="${{ inputs.image }}" --set chain.chainspec_secretName="staging-preview-chain-spec-${{ inputs.sha }}"
helm upgrade --install staging-preview-validator-4 . -f values/chains/staging-preview.yaml -f values/nodes/staging-preview/validator/staging-preview-validator-4 --set images.substrateNode="${{ inputs.image }}" --set chain.chainspec_secretName="staging-preview-chain-spec-${{ inputs.sha }}"
helm upgrade --install staging-preview-validator-5 . -f values/chains/staging-preview.yaml -f values/nodes/staging-preview/validator/staging-preview-validator-5 --set images.substrateNode="${{ inputs.image }}" --set chain.chainspec_secretName="staging-preview-chain-spec-${{ inputs.sha }}"
shell: bash

- name: Wait
Expand All @@ -93,6 +96,8 @@ runs:
kubectl wait --for=condition=ready pod staging-preview-validator-3 -n staging-preview --timeout=300s
echo "Waiting for staging-preview-validator-4..."
kubectl wait --for=condition=ready pod staging-preview-validator-4 -n staging-preview --timeout=300s
echo "Waiting for staging-preview-validator-5..."
kubectl wait --for=condition=ready pod staging-preview-validator-5 -n staging-preview --timeout=300s
shell: bash

- name: Validate
Expand All @@ -105,6 +110,8 @@ runs:
kubectl get pod staging-preview-validator-3 -n staging-preview -o jsonpath="{.status.containerStatuses[*].ready}"
echo "Checking staging-preview-validator-4..."
kubectl get pod staging-preview-validator-4 -n staging-preview -o jsonpath="{.status.containerStatuses[*].ready}"
kubectl get pods -n staging-preview -o custom-columns='NAME:.metadata.name,READY:.status.containerStatuses[*].ready' | grep -E '^(staging-preview-validator-1|staging-preview-validator-2|staging-preview-validator-3|staging-preview-validator-4)' | awk '{if ($2 != "true,true,true,true") exit 1}'
echo "All pods are 4/4 up and ready"
shell: bash
echo "Checking staging-preview-validator-5..."
kubectl get pod staging-preview-validator-5 -n staging-preview -o jsonpath="{.status.containerStatuses[*].ready}"
kubectl get pods -n staging-preview -o custom-columns='NAME:.metadata.name,READY:.status.containerStatuses[*].ready' | grep -E '^(staging-preview-validator-1|staging-preview-validator-2|staging-preview-validator-3|staging-preview-validator-4|staging-preview-validator-5)' | awk '{if ($2 != "true,true,true,true") exit 1}'
echo "All pods are 5/5 up and ready"
shell: bash
Loading