Skip to content

Commit

Permalink
feat(KONFLUX-1503): Set some requests and limits so pods can spread a…
Browse files Browse the repository at this point in the history
…cross cluster nodes
  • Loading branch information
jhutar committed Aug 5, 2024
1 parent 589299a commit 4f5a77f
Showing 1 changed file with 58 additions and 2 deletions.
60 changes: 58 additions & 2 deletions task/buildah/0.2/buildah.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,10 @@ spec:
computeResources:
limits:
memory: 4Gi
cpu: 4000m
requests:
memory: 512Mi
cpu: 250m
cpu: 500m
env:
- name: COMMIT_SHA
value: $(params.COMMIT_SHA)
Expand Down Expand Up @@ -376,6 +377,13 @@ spec:
# Respect Syft configuration if the user has it in the root of their repository
# (need to set the workdir, see https://github.com/anchore/syft/issues/2465)
workingDir: $(workspaces.source.path)/source
computeResources:
limits:
memory: 4Gi
cpu: 4000m
requests:
memory: 512Mi
cpu: 500m
script: |
echo "Running syft on the source directory"
syft dir:$(workspaces.source.path)/source --output cyclonedx-json=$(workspaces.source.path)/sbom-source.json
Expand All @@ -389,6 +397,13 @@ spec:
name: shared
- name: analyse-dependencies-java-sbom
image: quay.io/redhat-appstudio/hacbs-jvm-build-request-processor:127ee0c223a2b56a9bd20a6f2eaeed3bd6015f77
computeResources:
limits:
memory: 4Gi
cpu: 4000m
requests:
memory: 512Mi
cpu: 500m
script: |
if [ -f /var/lib/containers/java ]; then
/opt/jboss/container/java/run/run-java.sh analyse-dependencies path $(cat /shared/container_path) -s $(workspaces.source.path)/sbom-image.json --task-run-name $(context.taskRun.name) --publishers $(results.SBOM_JAVA_COMPONENTS_COUNT.path)
Expand All @@ -406,6 +421,13 @@ spec:

- name: merge-syft-sboms
image: registry.access.redhat.com/ubi9/python-39:1-192@sha256:01c9e53b32acd96f9fe7781727140df6868c91ebc916ed95dc58999fbf4d8ddd
computeResources:
limits:
memory: 4Gi
cpu: 4000m
requests:
memory: 512Mi
cpu: 500m
script: |
#!/bin/python3
import json
Expand Down Expand Up @@ -441,6 +463,13 @@ spec:

- name: merge-cachi2-sbom
image: quay.io/redhat-appstudio/cachi2:0.9.1@sha256:df67f9e063b544a8c49a271359377fed560562615e0278f6d0b9a3485f3f8fad
computeResources:
limits:
memory: 4Gi
cpu: 4000m
requests:
memory: 512Mi
cpu: 500m
script: |
if [ -f "sbom-cachi2.json" ]; then
echo "Merging contents of sbom-cachi2.json into sbom-cyclonedx.json"
Expand All @@ -455,6 +484,13 @@ spec:

- name: create-purl-sbom
image: registry.access.redhat.com/ubi9/python-39:1-192@sha256:01c9e53b32acd96f9fe7781727140df6868c91ebc916ed95dc58999fbf4d8ddd
computeResources:
limits:
memory: 4Gi
cpu: 4000m
requests:
memory: 512Mi
cpu: 500m
script: |
#!/bin/python3
import json
Expand All @@ -473,6 +509,13 @@ spec:

- name: create-base-images-sbom
image: quay.io/redhat-appstudio/base-images-sbom-script@sha256:667669e3def018f9dbb8eaf8868887a40bc07842221e9a98f6787edcff021840
computeResources:
limits:
memory: 4Gi
cpu: 4000m
requests:
memory: 512Mi
cpu: 500m
script: |
python3 /app/base_images_sbom_script.py \
--sbom=sbom-cyclonedx.json \
Expand All @@ -484,7 +527,13 @@ spec:

- name: inject-sbom-and-push
image: quay.io/konflux-ci/buildah:latest@sha256:3fe211715717eca9eca1f19d326e19dd052c92fc6eb4f2434d8f903fe5b9aeb7
computeResources: {}
computeResources:
limits:
memory: 4Gi
cpu: 4000m
requests:
memory: 512Mi
cpu: 500m
script: |
#!/bin/bash
set -e
Expand Down Expand Up @@ -553,6 +602,13 @@ spec:

- name: upload-sbom
image: quay.io/redhat-appstudio/cosign:v2.1.1@sha256:c883d6f8d39148f2cea71bff4622d196d89df3e510f36c140c097b932f0dd5d5
computeResources:
limits:
memory: 4Gi
cpu: 4000m
requests:
memory: 512Mi
cpu: 500m
args:
- attach
- sbom
Expand Down

0 comments on commit 4f5a77f

Please sign in to comment.