diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-12-17 16:10:02 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-01-22 13:17:53 +0000 |
| commit | 44f2ad31190603135f4ac758273f26111ca6003c (patch) | |
| tree | 4f6190f27654e45bfb3bcd71d4c53adc533909a1 /syz-cluster/kernel-disk | |
| parent | da72ac06e38cf1dd2ecbddd5502225ff7589542d (diff) | |
syz-cluster: initial code
The basic code of a K8S-based cluster that:
* Aggregates new LKML patch series.
* Determines the kernel trees to apply them to.
* Builds the basic and the patched kernel.
* Displays the results on a web dashboard.
This is a very rudimentary version with a lot of TODOs that
provides a skeleton for further work.
The project makes use of Argo workflows and Spanner DB.
Bootstrap is used for the web interface.
Overall structure:
* syz-cluster/dashboard: a web dashboard listing patch series
and their test results.
* syz-cluster/series-tracker: polls Lore archives and submits
the new patch series to the DB.
* syz-cluster/controller: schedules workflows and provides API for them.
* syz-cluster/kernel-disk: a cron job that keeps a kernel checkout up to date.
* syz-cluster/workflow/*: workflow steps.
For the DB structure see syz-cluster/pkg/db/migrations/*.
Diffstat (limited to 'syz-cluster/kernel-disk')
| -rw-r--r-- | syz-cluster/kernel-disk/cron.yaml | 45 | ||||
| -rw-r--r-- | syz-cluster/kernel-disk/kustomization.yaml | 6 | ||||
| -rw-r--r-- | syz-cluster/kernel-disk/pvc.yaml | 14 |
3 files changed, 65 insertions, 0 deletions
diff --git a/syz-cluster/kernel-disk/cron.yaml b/syz-cluster/kernel-disk/cron.yaml new file mode 100644 index 000000000..8249e9c77 --- /dev/null +++ b/syz-cluster/kernel-disk/cron.yaml @@ -0,0 +1,45 @@ +# Copyright 2025 syzkaller project authors. All rights reserved. +# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +apiVersion: batch/v1 +kind: CronJob +metadata: + name: kernel-repo-update +spec: + schedule: "0 */6 * * *" # Update every 6 hours + jobTemplate: + spec: + template: + spec: + restartPolicy: Never + volumes: + - name: git-repo + persistentVolumeClaim: + claimName: base-kernel-repo-pv-claim + containers: + - name: git-updater-debug-job + image: alpine/git:latest + imagePullPolicy: IfNotPresent + volumeMounts: + - name: git-repo + mountPath: /repo.git + resources: + requests: + cpu: 4 + memory: 8G + limits: + cpu: 8 + memory: 16G + command: # TODO: request the trees via the controller's API. + - "/bin/sh" + - "-c" + - | + cd /repo.git + if [ ! -d "refs" ]; then + git init --bare + fi + if ! git config --get remote.torvalds.url > /dev/null; then + git remote add torvalds git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git + fi + git fetch torvalds --tags + git tag -f torvalds-head torvalds/master diff --git a/syz-cluster/kernel-disk/kustomization.yaml b/syz-cluster/kernel-disk/kustomization.yaml new file mode 100644 index 000000000..aeff33f63 --- /dev/null +++ b/syz-cluster/kernel-disk/kustomization.yaml @@ -0,0 +1,6 @@ +# Copyright 2025 syzkaller project authors. All rights reserved. +# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +resources: + - pvc.yaml + - cron.yaml diff --git a/syz-cluster/kernel-disk/pvc.yaml b/syz-cluster/kernel-disk/pvc.yaml new file mode 100644 index 000000000..1977e969b --- /dev/null +++ b/syz-cluster/kernel-disk/pvc.yaml @@ -0,0 +1,14 @@ +# Copyright 2025 syzkaller project authors. All rights reserved. +# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: base-kernel-repo-pv-claim +spec: + storageClassName: standard + accessModes: + - ReadWriteMany + resources: + requests: + storage: 32Gi |
