Skip to content

[release-v1.16] Add Konflux configurations #6693

[release-v1.16] Add Konflux configurations

[release-v1.16] Add Konflux configurations #6693

Workflow file for this run

name: e2e
on:
pull_request:
branches: [ 'main', 'release-*' ]
defaults:
run:
shell: bash
jobs:
test:
name: test
runs-on: ubuntu-latest
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
k8s-version:
- v1.28.x
- v1.29.x
test-suite:
- ./test/conformance
- ./test/e2e
istio-profile:
- no-mesh
- ambient
env:
KO_DOCKER_REPO: kind.local
# Use a semi-random cluster suffix, but somewhat predictable
# so reruns don't just give us a completely new value.
CLUSTER_SUFFIX: c${{ github.run_id }}.local
steps:
- uses: knative/actions/setup-go@main
- uses: ko-build/[email protected]
- uses: actions/checkout@v4
- uses: chainguard-dev/actions/setup-kind@main
id: kind
with:
k8s-version: ${{ matrix.k8s-version }}
kind-worker-count: 1
cluster-suffix: "${CLUSTER_SUFFIX}"
- name: Install Knative net-istio
run: |
set -o pipefail
# Replace cluster.local with random suffix.
sed -ie "s/cluster\.local/${CLUSTER_SUFFIX}/g" third_party/istio-latest/istio-kind-${{ matrix.istio-profile }}/istio.yaml
# Deploy Istio
kubectl apply -f ./third_party/istio-latest/istio-kind-${{ matrix.istio-profile }}
# Remove Knative Certificate as we are running without Serving CRs
rm -f config/700-istio-knative-certificate.yaml
# Build and Publish our containers to the docker daemon (including test assets)
ko resolve --platform=linux/amd64 -f test/config/ -f config/ | kubectl apply -f -
CONFIG_ISTIO="./third_party/istio-latest/istio-kind-${{ matrix.istio-profile }}/config-istio.yaml"
if [[ -f "${CONFIG_ISTIO}" ]]; then
kubectl apply -f "${CONFIG_ISTIO}"
fi
echo "GATEWAY_NAMESPACE_OVERRIDE=istio-system" >> $GITHUB_ENV
- name: Upload Test Images
run: |
# Build and Publish our test images to the docker daemon.
./test/upload-test-images.sh
- name: Wait for Ready
run: |
echo Waiting for Pods to become ready.
# # TODO: Find a good way to do this with chaos enabled.
# kubectl wait pod --for=condition=Ready -n knative-serving -l '!job-name'
kubectl wait pod --for=condition=Ready -n ${GATEWAY_NAMESPACE_OVERRIDE} -l '!job-name'
# For debugging.
kubectl get pods --all-namespaces
- name: Run e2e Tests
run: |
set -x
# Exclude the control-plane node, which doesn't seem to expose the nodeport service.
IPS=( $(kubectl get nodes -lkubernetes.io/hostname!=kind-control-plane -ojsonpath='{.items[*].status.addresses[?(@.type=="InternalIP")].address}') )
# Run the tests tagged as e2e on the KinD cluster.
go test -race -count=1 -short -timeout=20m -tags=e2e ${{ matrix.test-suite }} \
--enable-alpha --enable-beta \
--ingressendpoint="${IPS[0]}" \
--ingressClass=istio.ingress.networking.knative.dev \
--cluster-suffix=$CLUSTER_SUFFIX