@@ -517,6 +517,14 @@ def component_build_pipeline(component_name, dockerfile_path, is_pr: bool = True
517
517
},
518
518
{
519
519
"name" : "clamav-scan" ,
520
+ "podTemplate" : {
521
+ "env" : [
522
+ {
523
+ "name" : "CLAMD_CONF_MaxThreads" ,
524
+ "value" : "10"
525
+ },
526
+ ],
527
+ },
520
528
"params" : [
521
529
{
522
530
"name" : "image-digest" ,
@@ -734,19 +742,50 @@ def component_build_pipeline(component_name, dockerfile_path, is_pr: bool = True
734
742
},
735
743
# https://github.com/tektoncd/pipeline/blob/main/docs/compute-resources.md
736
744
# https://konflux.pages.redhat.com/docs/users/how-tos/configuring/overriding-compute-resources.html
737
- # https://github.com/red-hat-data-services/distributed-workloads/blob/face046a631a1ac9b0fc51bcd2984628e9f3db05/.tekton/training-rocm-push.yaml#L36-L42
738
745
"taskRunSpecs" : [
746
+ # https://tekton.dev/docs/pipelines/taskruns/#overriding-task-steps-and-sidecars
739
747
{
740
748
"pipelineTaskName" : task_name ,
741
749
"computeResources" : {
742
750
# the problem is going over limits, so requests need not be touched at all
751
+ # https://github.com/red-hat-data-services/distributed-workloads/blob/face046a631a1ac9b0fc51bcd2984628e9f3db05/.tekton/training-rocm-push.yaml#L36-L42
743
752
"limits" : {
744
753
"memory" : "8Gi" ,
745
754
},
746
755
},
747
756
# leaving out "prefetch-dependencies" because we don't do hermetic build yet
748
757
# leaving out "build-images" for now, it already has a limit of 8Gi by default
749
758
} for task_name in ("ecosystem-cert-preflight-checks" , "clair-scan" )
759
+ ] + [
760
+ {
761
+ # clamav is memory intensive and by default runs single-threaded
762
+ # https://redhat-internal.slack.com/archives/C04PZ7H0VA8/p1739535522748909?thread_ts=1739441464.370119&cid=C04PZ7H0VA8
763
+ "pipelineTaskName" : "clamav-scan" ,
764
+ # "computeResources": {
765
+ # "requests": {
766
+ # "cpu": "2",
767
+ # },
768
+ # },
769
+ "stepSpecs" : [
770
+ {
771
+ "name" : "extract-and-scan-image" ,
772
+ "computeResources" : {
773
+ "requests" : {
774
+ "cpu" : "8" ,
775
+ },
776
+ "limits" : {
777
+ "cpu" : "10" ,
778
+ }
779
+ },
780
+ # "env": [
781
+ # {
782
+ # "name": "CLAMD_CONF_MaxThreads",
783
+ # "value": "4"
784
+ # }
785
+ # ],
786
+ },
787
+ ],
788
+ },
750
789
],
751
790
"taskRunTemplate" : {},
752
791
"workspaces" : [
0 commit comments