aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster/workflow/triage-step/workflow-template.yaml
blob: 35a163bddf4691465b54a2de2c72374e9f99b518 (plain)
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
# 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: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: triage-step-template
spec:
  templates:
    - name: triage-step
      retryStrategy:
        limit: "3"
        backoff:
          duration: "5m"
      securityContext:
        runAsUser: 10000
        fsGroup: 10000
      initContainers:
        - name: setup-repo
          image: ${IMAGE_PREFIX}triage-step:${IMAGE_TAG}
          imagePullPolicy: IfNotPresent
          command:
            - sh
            - -c
            - |
              git clone --reference /kernel-repo -c remote.origin.fetch="+refs/heads/*:refs/heads/*" /kernel-repo /workdir
          env:
            - name: GIT_DISCOVERY_ACROSS_FILESYSTEM
              value: "1"
          volumeMounts:
            - name: base-kernel-repo
              mountPath: /kernel-repo
              readOnly: true
            - name: workdir
              mountPath: /workdir
      container:
          image: ${IMAGE_PREFIX}triage-step:${IMAGE_TAG}
          imagePullPolicy: IfNotPresent
          command: ["/bin/triage-step"]
          args: [
            "--session", "{{workflow.parameters.session-id}}",
            "--repository", "/workdir",
            "--verdict", "/output/result.json"
            ]
          resources:
            requests:
              cpu: 1
              memory: 8G
            limits:
              cpu: 4
              memory: 16G
          env:
            - name: GIT_DISCOVERY_ACROSS_FILESYSTEM
              value: "1"
            - name: HOME # Otherwise it's failing with "warning: unable to access '/root/.config/git/attributes': Permission denied.".
              value: "/home/syzkaller"
          volumeMounts:
            - name: base-kernel-repo
              mountPath: /kernel-repo
              readOnly: true
            - name: workdir
              mountPath: /workdir
            - name: output
              mountPath: /output
      volumes:
        - name: base-kernel-repo
          persistentVolumeClaim:
            claimName: base-kernel-repo-pv-claim
        - name: workdir
          emptyDir: {}
        - name: output
          emptyDir: {}
      outputs:
        parameters:
          - name: result
            valueFrom:
              path: /output/result.json