mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
ci: verify all pods in verify e2e
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
5dfa0520ce
commit
eb2f3c3021
1
.github/actions/e2e_test/action.yml
vendored
1
.github/actions/e2e_test/action.yml
vendored
@ -296,6 +296,7 @@ runs:
|
||||
with:
|
||||
cloudProvider: ${{ inputs.cloudProvider }}
|
||||
osImage: ${{ steps.constellation-create.outputs.osImageUsed }}
|
||||
kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }}
|
||||
|
||||
- name: Run recover test
|
||||
if: inputs.test == 'recover'
|
||||
|
32
.github/actions/e2e_verify/action.yml
vendored
32
.github/actions/e2e_verify/action.yml
vendored
@ -8,6 +8,9 @@ inputs:
|
||||
cloudProvider:
|
||||
description: "The cloud provider used in the cluster."
|
||||
required: true
|
||||
kubeconfig:
|
||||
description: "The kubeconfig file for the cluster."
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
@ -31,3 +34,32 @@ runs:
|
||||
- name: Constellation verify
|
||||
shell: bash
|
||||
run: constellation verify --cluster-id $(jq -r ".clusterID" constellation-id.json) --force
|
||||
|
||||
- name: Verify all nodes
|
||||
shell: bash
|
||||
env:
|
||||
KUBECONFIG: ${{ inputs.kubeconfig }}
|
||||
run: |
|
||||
nodes=$(kubectl get nodes -o json | jq -r ".items[].metadata.name")
|
||||
|
||||
for node in $nodes ; do
|
||||
verificationPod=$(kubectl get pods --field-selector spec.nodeName=${node} -n kube-system | grep "verification-service" | cut -d' ' -f1)
|
||||
|
||||
mapfile -t verificationPod <<< "$verificationPod"
|
||||
|
||||
if [[ ${#verificationPod[@]} -ne 1 ]]; then
|
||||
echo "Expected 1 verification pod for node ${node}, found ${#verificationPodArray[@]}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Verifying pod ${pod} on node ${node}"
|
||||
|
||||
kubectl wait -n kube-system "pod/${verificationPod}" --for=condition=ready --timeout=5m
|
||||
kubectl port-forward -n kube-system "pods/${verificationPod}" 9090:9090 &
|
||||
forwarderPID=$!
|
||||
sleep 5
|
||||
|
||||
constellation verify --cluster-id $(jq -r ".clusterID" constellation-id.json) --force --node-endpoint localhost:9090
|
||||
|
||||
kill $forwarderPID
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user