From f169263a85d80910ad5acac2e584b71f9ec18c53 Mon Sep 17 00:00:00 2001 From: Misha Sugakov <537715+msugakov@users.noreply.github.com> Date: Tue, 12 Mar 2024 20:01:46 +0100 Subject: [PATCH] chore: Override `cpu` `requests` for bad days of Konflux (#1401) --- .tekton/scanner-db-pull-request.yaml | 10 ++++++++++ .tekton/scanner-db-push.yaml | 10 ++++++++++ .tekton/scanner-db-slim-pull-request.yaml | 10 ++++++++++ .tekton/scanner-db-slim-push.yaml | 10 ++++++++++ .tekton/scanner-pull-request.yaml | 18 ++++++++++++++++++ .tekton/scanner-push.yaml | 18 ++++++++++++++++++ .tekton/scanner-slim-pull-request.yaml | 18 ++++++++++++++++++ .tekton/scanner-slim-push.yaml | 18 ++++++++++++++++++ 8 files changed, 112 insertions(+) diff --git a/.tekton/scanner-db-pull-request.yaml b/.tekton/scanner-db-pull-request.yaml index ff019cfb9..705bf3388 100644 --- a/.tekton/scanner-db-pull-request.yaml +++ b/.tekton/scanner-db-pull-request.yaml @@ -62,6 +62,16 @@ spec: secret: secretName: '{{ git_auth_secret }}' + taskRunSpecs: + - pipelineTaskName: clamav-scan + stepSpecs: + # Provision more CPU to speed up ClamAV scan compared to the defaults. + # https://github.com/redhat-appstudio/build-definitions/blob/main/task/clamav-scan/0.1/clamav-scan.yaml#L48 + - name: extract-and-scan-image + computeResources: + requests: + cpu: 1 + pipelineSpec: finally: diff --git a/.tekton/scanner-db-push.yaml b/.tekton/scanner-db-push.yaml index 87c492c62..c45a46e36 100644 --- a/.tekton/scanner-db-push.yaml +++ b/.tekton/scanner-db-push.yaml @@ -60,6 +60,16 @@ spec: secret: secretName: '{{ git_auth_secret }}' + taskRunSpecs: + - pipelineTaskName: clamav-scan + stepSpecs: + # Provision more CPU to speed up ClamAV scan compared to the defaults. + # https://github.com/redhat-appstudio/build-definitions/blob/main/task/clamav-scan/0.1/clamav-scan.yaml#L48 + - name: extract-and-scan-image + computeResources: + requests: + cpu: 1 + pipelineSpec: finally: diff --git a/.tekton/scanner-db-slim-pull-request.yaml b/.tekton/scanner-db-slim-pull-request.yaml index 99fd5acc3..81cb01538 100644 --- a/.tekton/scanner-db-slim-pull-request.yaml +++ b/.tekton/scanner-db-slim-pull-request.yaml @@ -61,6 +61,16 @@ spec: secret: secretName: '{{ git_auth_secret }}' + taskRunSpecs: + - pipelineTaskName: clamav-scan + stepSpecs: + # Provision more CPU to speed up ClamAV scan compared to the defaults. + # https://github.com/redhat-appstudio/build-definitions/blob/main/task/clamav-scan/0.1/clamav-scan.yaml#L48 + - name: extract-and-scan-image + computeResources: + requests: + cpu: 1 + pipelineSpec: finally: diff --git a/.tekton/scanner-db-slim-push.yaml b/.tekton/scanner-db-slim-push.yaml index 33beca4bc..ea5123c8d 100644 --- a/.tekton/scanner-db-slim-push.yaml +++ b/.tekton/scanner-db-slim-push.yaml @@ -59,6 +59,16 @@ spec: secret: secretName: '{{ git_auth_secret }}' + taskRunSpecs: + - pipelineTaskName: clamav-scan + stepSpecs: + # Provision more CPU to speed up ClamAV scan compared to the defaults. + # https://github.com/redhat-appstudio/build-definitions/blob/main/task/clamav-scan/0.1/clamav-scan.yaml#L48 + - name: extract-and-scan-image + computeResources: + requests: + cpu: 1 + pipelineSpec: finally: diff --git a/.tekton/scanner-pull-request.yaml b/.tekton/scanner-pull-request.yaml index 5ca41ce7e..afcdcdff0 100644 --- a/.tekton/scanner-pull-request.yaml +++ b/.tekton/scanner-pull-request.yaml @@ -56,6 +56,24 @@ spec: secret: secretName: '{{ git_auth_secret }}' + taskRunSpecs: + - pipelineTaskName: build-container + stepSpecs: + # Provision more CPU to speed up build compared to the defaults. + # https://github.com/redhat-appstudio/build-definitions/blob/main/task/buildah/0.1/buildah.yaml#L126 + - name: build + computeResources: + requests: + cpu: 2 + - pipelineTaskName: clamav-scan + stepSpecs: + # Provision more CPU to speed up ClamAV scan compared to the defaults. + # https://github.com/redhat-appstudio/build-definitions/blob/main/task/clamav-scan/0.1/clamav-scan.yaml#L48 + - name: extract-and-scan-image + computeResources: + requests: + cpu: 1 + pipelineSpec: finally: diff --git a/.tekton/scanner-push.yaml b/.tekton/scanner-push.yaml index e5fbd04e2..3a86faeab 100644 --- a/.tekton/scanner-push.yaml +++ b/.tekton/scanner-push.yaml @@ -55,6 +55,24 @@ spec: secret: secretName: '{{ git_auth_secret }}' + taskRunSpecs: + - pipelineTaskName: build-container + stepSpecs: + # Provision more CPU to speed up build compared to the defaults. + # https://github.com/redhat-appstudio/build-definitions/blob/main/task/buildah/0.1/buildah.yaml#L126 + - name: build + computeResources: + requests: + cpu: 2 + - pipelineTaskName: clamav-scan + stepSpecs: + # Provision more CPU to speed up ClamAV scan compared to the defaults. + # https://github.com/redhat-appstudio/build-definitions/blob/main/task/clamav-scan/0.1/clamav-scan.yaml#L48 + - name: extract-and-scan-image + computeResources: + requests: + cpu: 1 + pipelineSpec: finally: diff --git a/.tekton/scanner-slim-pull-request.yaml b/.tekton/scanner-slim-pull-request.yaml index e660ff9d5..b0bf8957d 100644 --- a/.tekton/scanner-slim-pull-request.yaml +++ b/.tekton/scanner-slim-pull-request.yaml @@ -55,6 +55,24 @@ spec: secret: secretName: '{{ git_auth_secret }}' + taskRunSpecs: + - pipelineTaskName: build-container + stepSpecs: + # Provision more CPU to speed up build compared to the defaults. + # https://github.com/redhat-appstudio/build-definitions/blob/main/task/buildah/0.1/buildah.yaml#L126 + - name: build + computeResources: + requests: + cpu: 2 + - pipelineTaskName: clamav-scan + stepSpecs: + # Provision more CPU to speed up ClamAV scan compared to the defaults. + # https://github.com/redhat-appstudio/build-definitions/blob/main/task/clamav-scan/0.1/clamav-scan.yaml#L48 + - name: extract-and-scan-image + computeResources: + requests: + cpu: 1 + pipelineSpec: finally: diff --git a/.tekton/scanner-slim-push.yaml b/.tekton/scanner-slim-push.yaml index 423227db4..1aeee5824 100644 --- a/.tekton/scanner-slim-push.yaml +++ b/.tekton/scanner-slim-push.yaml @@ -54,6 +54,24 @@ spec: secret: secretName: '{{ git_auth_secret }}' + taskRunSpecs: + - pipelineTaskName: build-container + stepSpecs: + # Provision more CPU to speed up build compared to the defaults. + # https://github.com/redhat-appstudio/build-definitions/blob/main/task/buildah/0.1/buildah.yaml#L126 + - name: build + computeResources: + requests: + cpu: 2 + - pipelineTaskName: clamav-scan + stepSpecs: + # Provision more CPU to speed up ClamAV scan compared to the defaults. + # https://github.com/redhat-appstudio/build-definitions/blob/main/task/clamav-scan/0.1/clamav-scan.yaml#L48 + - name: extract-and-scan-image + computeResources: + requests: + cpu: 1 + pipelineSpec: finally: