chore(deps): bump the k8s group with 3 updates #806
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: e2e tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e: | |
| name: Run end-2-end Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Build image | |
| run: ./testdata/e2e/buildImage.sh | |
| - name: Install kind with registry | |
| uses: bakito/kind-with-registry-action@9c031e8b0c6f20fec65ca5a58901d05e585ff5d0 # v1.0.0 | |
| with: | |
| docker_image_name: k8s-event-logger:e2e | |
| - name: Install helm chart | |
| run: | | |
| ./testdata/e2e/installChart.sh | |
| kubectl create ns e2e-test | |
| - name: Start 'old' eventlogger pod | |
| run: | | |
| kubectl apply -f testdata/e2e/old-eventlogger-pod.yaml | |
| kubectl wait --namespace e2e-test --for=condition=ready pod event-logger-example-eventlogger-old-version --timeout=90s | |
| - name: Setup an EventLogger | |
| run: | | |
| kubectl apply -f testdata/e2e/test-eventlogger.yaml | |
| if ! kubectl wait --namespace e2e-test \ | |
| --for=condition=ready pod \ | |
| --selector=app.kubernetes.io/component=event-logger-example-eventlogger \ | |
| --timeout=90s | |
| then | |
| echo "ERROR: EventLogger pod did not become ready in namespace e2e-test" >&2 | |
| echo "--- Pods (wide) ---" >&2 | |
| kubectl get pods -n e2e-test -o wide >&2 || true | |
| echo "--- Events (sorted by lastTimestamp) ---" >&2 | |
| kubectl get events -n e2e-test --sort-by='.lastTimestamp' >&2 || true | |
| exit 1 | |
| fi | |
| - name: Check 'old' eventlogger pod is deleted | |
| run: | | |
| test $(kubectl get pod event-logger-example-eventlogger-old-version --no-headers | wc -l) -eq 0 | |
| - name: Start/Stop test pod | |
| run: | | |
| kubectl apply -f testdata/e2e/test-pod.yaml | |
| kubectl wait --namespace e2e-test --for=condition=ready pod nginx --timeout=90s | |
| kubectl delete -f testdata/e2e/test-pod.yaml | |
| - name: Check logs | |
| run: | | |
| kubectl get pods -n e2e-test | |
| kubectl logs -n e2e-test -l app.kubernetes.io/component=event-logger-example-eventlogger | |
| kubectl logs -n e2e-test -l app.kubernetes.io/component=event-logger-example-eventlogger | grep '"logger":"event"' | |
| - name: Print logs | |
| timeout-minutes: 2 | |
| run: | | |
| echo 'Pod logs' >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| kubectl logs -n e2e-test -l app.kubernetes.io/component=event-logger-example-eventlogger >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY |