mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-12 17:34:28 -05:00
93fcb51e67
Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>
54 lines
1.8 KiB
YAML
54 lines
1.8 KiB
YAML
name: E2E load balancer test
|
|
description: "Test load balancer functionality."
|
|
|
|
inputs:
|
|
kubeconfig:
|
|
description: "The kubeconfig of the cluster to test."
|
|
required: true
|
|
cloudProvider:
|
|
description: "The CSP this test runs on. Some tests exercise functionality not supported everywhere."
|
|
required: false
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
# This action assumes that the cluster is in an ready state, with all nodes joined and ready.
|
|
- name: Create deployments
|
|
shell: bash
|
|
env:
|
|
KUBECONFIG: ${{ inputs.kubeconfig }}
|
|
working-directory: ./.github/actions/e2e_lb
|
|
run: |
|
|
kubectl apply -f ns.yml
|
|
kubectl apply -f lb.yml
|
|
bazel run --test_timeout=14400 //e2e/internal/lb:lb_test
|
|
|
|
- name: Test AWS Ingress
|
|
if: inputs.cloudProvider == 'aws'
|
|
shell: bash
|
|
env:
|
|
KUBECONFIG: ${{ inputs.kubeconfig }}
|
|
working-directory: ./.github/actions/e2e_lb
|
|
run: |
|
|
kubectl apply -f aws-ingress.yml
|
|
kubectl wait -n lb-test ing/whoami --for=jsonpath='{.status.loadBalancer.ingress}' --timeout=5m
|
|
host=$(kubectl get -n lb-test ingress whoami -o=jsonpath='{.status.loadBalancer.ingress[0].hostname}')
|
|
for i in $(seq 30); do
|
|
curl --silent --fail --connect-timeout 5 --output /dev/null http://$host && exit 0
|
|
sleep 10
|
|
done
|
|
echo "::error::Ingress did not become ready in the alloted time."
|
|
kubectl describe ing -n lb-test
|
|
exit 1
|
|
|
|
- name: Delete deployment
|
|
if: always()
|
|
shell: bash
|
|
env:
|
|
KUBECONFIG: ${{ inputs.kubeconfig }}
|
|
working-directory: ./.github/actions/e2e_lb
|
|
run: |
|
|
kubectl delete -f lb.yml
|
|
kubectl delete --ignore-not-found -f aws-ingress.yml
|
|
kubectl delete -f ns.yml --timeout=5m
|