mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-17 13:24:21 -05: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:
|
with:
|
||||||
cloudProvider: ${{ inputs.cloudProvider }}
|
cloudProvider: ${{ inputs.cloudProvider }}
|
||||||
osImage: ${{ steps.constellation-create.outputs.osImageUsed }}
|
osImage: ${{ steps.constellation-create.outputs.osImageUsed }}
|
||||||
|
kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }}
|
||||||
|
|
||||||
- name: Run recover test
|
- name: Run recover test
|
||||||
if: inputs.test == 'recover'
|
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:
|
cloudProvider:
|
||||||
description: "The cloud provider used in the cluster."
|
description: "The cloud provider used in the cluster."
|
||||||
required: true
|
required: true
|
||||||
|
kubeconfig:
|
||||||
|
description: "The kubeconfig file for the cluster."
|
||||||
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
@ -31,3 +34,32 @@ runs:
|
|||||||
- name: Constellation verify
|
- name: Constellation verify
|
||||||
shell: bash
|
shell: bash
|
||||||
run: constellation verify --cluster-id $(jq -r ".clusterID" constellation-id.json) --force
|
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…
x
Reference in New Issue
Block a user