DPTP-5114: Split scanner CPU/memory request and limit configuration - #87
Conversation
Replace the SCANNER_CPU and SCANNER_MEM variables with separate SCANNER_CPU_REQUEST/LIMIT and SCANNER_MEM_REQUEST/LIMIT variables in deploy.sh and the scanner job template. This allows a lower CPU request (e.g. 500m) for scheduling while keeping a higher limit (4) for bursting. The old SCANNER_CPU and SCANNER_MEM variables are retained as deprecated fallbacks that set both request and limit when the new split variables are not explicitly configured.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: richardsonnick The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@richardsonnick: This pull request references DPTP-5114 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Code Review by Qodo
Context used✅ Compliance rules (platform):
10 rules 1.
|
…ly to catch invalid env var values before deployment.
|
@richardsonnick: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/lgtm |
Align the step-registry env vars with the upstream tls-scanner change (openshift/tls-scanner#87) that splits SCANNER_CPU / SCANNER_MEMORY into separate request and limit variables. New variables (both run and hypershift-run refs): SCANNER_CPU_REQUEST / SCANNER_CPU_LIMIT (default 4 / 4) SCANNER_MEM_REQUEST / SCANNER_MEM_LIMIT (default 4Gi / 4Gi) New guest-cluster variables (hypershift-run ref only): SCANNER_CPU_GUEST_REQUEST / SCANNER_CPU_GUEST_LIMIT (default 1 / 1) SCANNER_MEM_GUEST_REQUEST / SCANNER_MEM_GUEST_LIMIT (default 2Gi / 2Gi) The original SCANNER_CPU, SCANNER_MEMORY, SCANNER_CPU_GUEST, and SCANNER_MEMORY_GUEST are preserved as deprecated fallbacks so that existing CI configs continue to work without changes. This unblocks openshift#82553 (add tls-scanner to cluster-monitoring-operator e2e) which uses the new split vars to set a lower CPU request for scheduling while keeping a higher burst limit.
Align the step-registry env vars with the upstream tls-scanner change (openshift/tls-scanner#87) that splits SCANNER_CPU / SCANNER_MEMORY into separate request and limit variables. New variables (both run and hypershift-run refs): SCANNER_CPU_REQUEST / SCANNER_CPU_LIMIT (default 4 / 4) SCANNER_MEM_REQUEST / SCANNER_MEM_LIMIT (default 4Gi / 4Gi) New guest-cluster variables (hypershift-run ref only): SCANNER_CPU_GUEST_REQUEST / SCANNER_CPU_GUEST_LIMIT (default 1 / 1) SCANNER_MEM_GUEST_REQUEST / SCANNER_MEM_GUEST_LIMIT (default 2Gi / 2Gi) The original SCANNER_CPU, SCANNER_MEMORY, SCANNER_CPU_GUEST, and SCANNER_MEMORY_GUEST are preserved as deprecated fallbacks so that existing CI configs continue to work without changes. This unblocks openshift#82553 (add tls-scanner to cluster-monitoring-operator e2e) which uses the new split vars to set a lower CPU request for scheduling while keeping a higher burst limit.
Align the step-registry env vars with the upstream tls-scanner change (openshift/tls-scanner#87) that splits SCANNER_CPU / SCANNER_MEMORY into separate request and limit variables. New variables (both run and hypershift-run refs): SCANNER_CPU_REQUEST / SCANNER_CPU_LIMIT (default 4 / 4) SCANNER_MEM_REQUEST / SCANNER_MEM_LIMIT (default 4Gi / 4Gi) New guest-cluster variables (hypershift-run ref only): SCANNER_CPU_GUEST_REQUEST / SCANNER_CPU_GUEST_LIMIT (default 1 / 1) SCANNER_MEM_GUEST_REQUEST / SCANNER_MEM_GUEST_LIMIT (default 2Gi / 2Gi) The original SCANNER_CPU, SCANNER_MEMORY, SCANNER_CPU_GUEST, and SCANNER_MEMORY_GUEST are preserved as deprecated fallbacks so that existing CI configs continue to work without changes. This unblocks openshift#82553 (add tls-scanner to cluster-monitoring-operator e2e) which uses the new split vars to set a lower CPU request for scheduling while keeping a higher burst limit.
…82865) Align the step-registry env vars with the upstream tls-scanner change (openshift/tls-scanner#87) that splits SCANNER_CPU / SCANNER_MEMORY into separate request and limit variables. New variables (both run and hypershift-run refs): SCANNER_CPU_REQUEST / SCANNER_CPU_LIMIT (default 4 / 4) SCANNER_MEM_REQUEST / SCANNER_MEM_LIMIT (default 4Gi / 4Gi) New guest-cluster variables (hypershift-run ref only): SCANNER_CPU_GUEST_REQUEST / SCANNER_CPU_GUEST_LIMIT (default 1 / 1) SCANNER_MEM_GUEST_REQUEST / SCANNER_MEM_GUEST_LIMIT (default 2Gi / 2Gi) The original SCANNER_CPU, SCANNER_MEMORY, SCANNER_CPU_GUEST, and SCANNER_MEMORY_GUEST are preserved as deprecated fallbacks so that existing CI configs continue to work without changes. This unblocks #82553 (add tls-scanner to cluster-monitoring-operator e2e) which uses the new split vars to set a lower CPU request for scheduling while keeping a higher burst limit. Co-authored-by: Chai Bot <ship-help-github@redhat.com>
Replaces SCANNER_CPU and SCANNER_MEM with SCANNER_CPU_{REQUEST,LIMIT} SCANNER_MEM_{REQUEST,LIMIT} while keeping the (now deprecated) SCANNER_CPU and SCANNER_MEM for for backwards compat with existing workflows.