github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/syz-cluster/kernel-disk/fetch-kernels-template.yaml (about)

     1  # Copyright 2025 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  apiVersion: argoproj.io/v1alpha1
     5  kind: WorkflowTemplate
     6  metadata:
     7    name: fetch-kernels-workflow-template
     8  spec:
     9    entrypoint: main
    10    podMetadata:
    11      labels:
    12        tier: workflow
    13    podGC:
    14      strategy: OnPodCompletion
    15      deleteDelayDuration: 12h
    16    ttlStrategy:
    17      secondsAfterCompletion: 86400
    18    serviceAccountName: argo-executor-ksa
    19    templates:
    20      - name: main
    21        parallelism: 1
    22        steps:
    23          - - name: query-trees
    24              template: query-trees-template
    25          - - name: iterate-trees
    26              template: process-tree
    27              arguments:
    28                parameters:
    29                  - name: tree
    30                    value: "{{item}}"
    31              withParam: "{{=jsonpath(steps['query-trees'].outputs.result, '$.trees')}}"
    32              continueOn:
    33                failed: true
    34      - name: query-trees-template
    35        http:
    36          url: "http://controller-service:8080/trees"
    37          method: "GET"
    38      - name: process-tree
    39        inputs:
    40          parameters:
    41            - name: tree
    42        volumes:
    43          - name: git-repo
    44            persistentVolumeClaim:
    45              claimName: base-kernel-repo-pv-claim
    46        container:
    47          image: alpine/git:latest
    48          imagePullPolicy: IfNotPresent
    49          volumeMounts:
    50            - name: git-repo
    51              mountPath: /repo.git
    52          resources:
    53            requests:
    54              cpu: 4
    55              memory: 8G
    56            limits:
    57              cpu: 8
    58              memory: 16G
    59          command:
    60            - "/bin/sh"
    61            - "-c"
    62            - |
    63              cd /repo.git
    64              if [ -f "packed-refs.lock" ]; then
    65                echo "Found stale 'packed-refs.lock' at start. Removing it."
    66                rm -f packed-refs.lock
    67              fi
    68              if [ ! -d "refs" ]; then
    69                git init --bare
    70              fi
    71              NAME="{{=jsonpath(inputs.parameters.tree, '$.name')}}"
    72              REPO="{{=jsonpath(inputs.parameters.tree, '$.URL')}}"
    73              BRANCH="{{=jsonpath(inputs.parameters.tree, '$.branch')}}"
    74              echo "${NAME}: ${REPO}/${BRANCH}"
    75              git remote remove ${NAME} || true
    76              git remote add ${NAME} ${REPO}
    77              git fetch ${NAME} ${BRANCH} --tags "+refs/heads/*:refs/heads/${NAME}/*" "+refs/tags/*:refs/tags/${NAME}/*"
    78              git log -1 --format="%h %an %ad %s" ${NAME}/${BRANCH}