forked from kubernetes-sigs/karpenter
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (92 loc) · 3.02 KB
/
scheduling-benchmarking.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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"
})