Fake scheduling improvement #3
This file contains 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: "Scheduling Benchmarking" | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- reopened | |
jobs: | |
before: | |
permissions: | |
pull-requests: write | |
name: Before PR | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
k8sVersion: ["1.25.x", "1.26.x", "1.27.x", "1.28.x", "1.29.x", "1.30.x", "1.31.x", "1.32.x"] | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | |
with: | |
python-version: "3.10" | |
- uses: ./.github/actions/install-deps | |
with: | |
k8sVersion: ${{ matrix.k8sVersion }} | |
- name: Kind Cluster | |
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0 | |
- name: check kind cluster and taint nodes | |
shell: bash | |
run: | | |
kubectl config current-context | |
kubectl get nodes | |
kubectl taint nodes chart-testing-control-plane CriticalAddonsOnly:NoSchedule | |
- name: install prometheus | |
uses: ./.github/actions/install-prometheus | |
- name: install pyroscope | |
uses: ./.github/actions/install-pyroscope | |
- name: install kwok and controller | |
shell: bash | |
run: | | |
make toolchain | |
make install-kwok | |
export KWOK_REPO=kind.local | |
export KIND_CLUSTER_NAME=chart-testing | |
make apply-with-kind | |
- name: ping cluster | |
shell: bash | |
run: | | |
sleep 15 | |
kubectl get pods -n kube-system | grep karpenter | |
kubectl get nodepools | |
kubectl get pods -A | |
kubectl describe nodes | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: run scheduling test | |
shell: bash | |
run: | | |
cd pkg/controllers/provisioning/scheduling && go test -tags=test_performance -run=SchedulingProfile >> "$GITHUB_OUTPUT" | |
- uses: actions/github-script@v7 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: '$GITHUB_OUTPUT' | |
}) | |
after: | |
permissions: | |
pull-requests: write | |
name: After PR | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: cd pkg/controllers/provisioning/scheduling && go test -tags=test_performance -run=SchedulingProfile >> "$GITHUB_OUTPUT" | |
- uses: actions/github-script@v7 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: "$GITHUB_OUTPUT" | |
}) |