Enhance pprof handlers for profiling #3789
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: | |
| - master | |
| - "release-[0-9]+.[0-9]+*" | |
| pull_request: | |
| env: | |
| KUBECTL_VERSION: 'v1.33.0' | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.image }} image | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - image: fluentd | |
| context: images/fluentd | |
| tags: fluentd-full:local | |
| target: full | |
| output: fluentd-full.tar | |
| - image: controller | |
| context: . | |
| tags: controller:local | |
| target: e2e-test | |
| build_args: GO_BUILD_FLAGS=-cover -covermode=atomic | |
| output: controller.tar | |
| - image: config-reloader | |
| context: images/config-reloader | |
| tags: config-reloader:local | |
| output: config-reloader.tar | |
| - image: syslog-ng-reloader | |
| context: images/syslog-ng-reloader | |
| tags: syslog-ng-reloader:local | |
| output: syslog-ng-reloader.tar | |
| - image: fluentd-drain-watch | |
| context: images/fluentd-drain-watch | |
| tags: fluentd-drain-watch:local | |
| output: fluentd-drain-watch.tar | |
| - image: node-exporter | |
| context: images/node-exporter | |
| tags: node-exporter:local | |
| output: node-exporter.tar | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | |
| - name: Build and export ${{ matrix.image }}-image | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 | |
| with: | |
| context: ${{ matrix.context }} | |
| tags: ${{ matrix.tags }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| target: ${{ matrix.target }} | |
| build-args: ${{ matrix.build_args }} | |
| outputs: type=docker,dest=/tmp/${{ matrix.output }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: e2e-${{ matrix.image }} | |
| path: /tmp/${{ matrix.output }} | |
| go: | |
| name: Go end2end tests | |
| runs-on: ubuntu-latest | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| # matrix: | |
| # SHARD: [0] | |
| # SHARDS: [1] | |
| steps: | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| # this might remove tools that are actually needed, | |
| # if set to "true" but frees about 6 GB | |
| tool-cache: false | |
| # all of these default to true, but feel free to set to | |
| # "false" if necessary for your workflow | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: false | |
| swap-storage: true | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | |
| - name: Download artifact | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| pattern: e2e-* | |
| path: /tmp | |
| merge-multiple: true | |
| - name: Load image | |
| run: | | |
| docker load --input /tmp/fluentd-full.tar | |
| docker load --input /tmp/config-reloader.tar | |
| docker load --input /tmp/syslog-ng-reloader.tar | |
| docker load --input /tmp/fluentd-drain-watch.tar | |
| docker load --input /tmp/node-exporter.tar | |
| docker load --input /tmp/controller.tar | |
| docker image ls -a | |
| - name: Set up Go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
| with: | |
| go-version-file: '.go-version' | |
| - name: Set up kubectl | |
| uses: azure/setup-kubectl@901a10e89ea615cf61f57ac05cecdf23e7de06d8 # v3 | |
| with: | |
| version: ${{ env.KUBECTL_VERSION }} | |
| - name: Run e2e tests | |
| run: make test-e2e-ci | |
| # env: | |
| # SHARD: ${{ matrix.SHARD }} | |
| # SHARDS: ${{ matrix.SHARDS }} | |
| - name: Run coverage report | |
| uses: vladopajic/go-test-coverage@cc5012c2cfa84542e02b079141958a885861d326 # v2.17.0 | |
| with: | |
| profile: ./build/_test_coverage/coverage_e2e.out | |
| source-dir: ./ | |
| - name: Archive Test Results | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: go-e2e-test-cluster-logs | |
| path: build/_test | |
| retention-days: 5 | |
| chart: | |
| name: Shell script tests with chart install | |
| runs-on: ubuntu-latest | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| kube: ["1.32", "1.33", "1.34"] | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | |
| - name: Download artifact | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| pattern: e2e-* | |
| path: /tmp | |
| merge-multiple: true | |
| - name: Load image | |
| run: | | |
| docker load --input /tmp/fluentd-full.tar | |
| docker load --input /tmp/config-reloader.tar | |
| docker load --input /tmp/syslog-ng-reloader.tar | |
| docker load --input /tmp/fluentd-drain-watch.tar | |
| docker load --input /tmp/node-exporter.tar | |
| docker load --input /tmp/controller.tar | |
| docker image ls -a | |
| - name: Set up kubectl | |
| uses: azure/setup-kubectl@776406bce94f63e41d621b960d78ee25c8b76ede # v4.0.1 | |
| with: | |
| version: ${{ env.KUBECTL_VERSION }} | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| # See https://github.com/kubernetes-sigs/kind/releases/tag/v0.20.0 | |
| - name: Determine KinD node image version | |
| id: node_image | |
| run: | | |
| case ${{ matrix.kube }} in | |
| 1.32) | |
| NODE_IMAGE=kindest/node:v1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027 ;; | |
| 1.33) | |
| NODE_IMAGE=kindest/node:v1.33.0@sha256:02f73d6ae3f11ad5d543f16736a2cb2a63a300ad60e81dac22099b0b04784a4e ;; | |
| 1.34) | |
| NODE_IMAGE=kindest/node:v1.34.0@sha256:7416a61b42b1662ca6ca89f02028ac133a309a2a30ba309614e8ec94d976dc5a ;; | |
| esac | |
| echo "image=$NODE_IMAGE" >> $GITHUB_OUTPUT | |
| - name: Make setup | |
| run: make kind-cluster stern | |
| env: | |
| KIND_IMAGE: ${{ steps.node_image.outputs.image }} | |
| - name: Test | |
| run: hack/test.sh | |
| - name: Print last 10k kubernetes logs from default and logging namespaces | |
| if: always() | |
| run: | | |
| mkdir -p build/_test | |
| bin/stern -n default,logging ".*" --tail 100000 --no-follow > build/_test/cluster.logs | |
| - name: Archive Test Results | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: script-e2e-test-cluster-logs-${{ matrix.kube }} | |
| path: build/_test | |
| retention-days: 5 |