Skip to content

Commit

Permalink
feat: add e2e setup workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-jhartmann committed Jun 27, 2024
1 parent 0d0324e commit db3a8c1
Showing 1 changed file with 9 additions and 34 deletions.
43 changes: 9 additions & 34 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ jobs:

- name: Install NGINX Ingress Controller
run: |
kubectl create namespace ingress-nginx
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install ingress-nginx ingress-nginx/ingress-nginx --namespace ingress-nginx
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
- name: Verify Ingress Controller installation
run: |
Expand All @@ -56,38 +53,16 @@ jobs:
run: |
echo "${{ env.INGRESS_IP }} example.tx.test" | sudo tee -a /etc/hosts
- name: Create Ingress Resource
- name: Create Test Ingress Resource
run: |
cat <<EOF | kubectl apply -f -
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example-ingress
namespace: default
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: example.tx.test
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: example-service
port:
number: 80
EOF
- name: Verify Ingress Resource
run: |
kubectl wait --namespace default \
--for=condition=ready pod \
--selector=app=example-app \
--timeout=120s
kubectl apply -f https://kind.sigs.k8s.io/examples/ingress/usage.yaml
- name: Ping ingress
if: always()
run: |
ping example.tx.test
# should output "foo-app"
curl localhost/foo/hostname
# should output "bar-app"
curl localhost/bar/hostname
# ping example.tx.test

0 comments on commit db3a8c1

Please sign in to comment.