Skip to content

step-registry/tls-scanner: split CPU/memory into request and limit - #82865

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
redhat-chai-bot:split-scanner-cpu-mem-request-limit
Aug 7, 2026
Merged

step-registry/tls-scanner: split CPU/memory into request and limit#82865
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
redhat-chai-bot:split-scanner-cpu-mem-request-limit

Conversation

@machine424

@machine424 machine424 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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.

Summary by CodeRabbit

The TLS scanner CI steps now support separate CPU and memory requests and limits for scanner and HyperShift guest-cluster pods. This enables lower resource requests with higher limits for cluster-monitoring-operator e2e integration.

Existing SCANNER_CPU, SCANNER_MEMORY, SCANNER_CPU_GUEST, and SCANNER_MEMORY_GUEST variables remain available as deprecated fallbacks. Defaults preserve current scanner resources and define guest-cluster resources.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The TLS scanner now supports separate CPU and memory requests and limits. Legacy combined variables remain as deprecated fallbacks. HyperShift guest scans support guest-specific resource overrides, and generated Pods use independent values.

Changes

TLS scanner resource configuration

Layer / File(s) Summary
Resource variable contracts
ci-operator/step-registry/tls/scanner/*/*-ref.yaml
The scanner references define separate CPU and memory request and limit variables. Legacy combined variables remain as deprecated fallbacks. HyperShift guest settings define guest-specific overrides and retain the guest CPU scheduling constraint.
Resource selection and Pod generation
ci-operator/step-registry/tls/scanner/run/tls-scanner-run-commands.sh
The command selects scanner and guest-specific request and limit values. Logging and generated Pod resources use distinct request and limit fields.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: richardsonnick, smith-xyz


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Container-Privileges ❌ Error The generated Pod sets privileged: true, hostNetwork: true, hostPID: true, and runAsUser: 0 for host-mode scans in tls-scanner-run-commands.sh. Remove privileged, hostNetwork, and hostPID, and run as non-root. If host-mode scanning requires them, isolate it in a separately approved, narrowly scoped workload.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (13 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR changes only YAML and shell files; searches found no Ginkgo test-title declarations or dynamic test names.
Test Structure And Quality ✅ Passed Not applicable: the diff contains only YAML and shell files, with no Ginkgo tests, It blocks, or test paths to review.
Microshift Test Compatibility ✅ Passed The PR changes only scanner YAML references and shell resource logic; it adds no Ginkgo tests or MicroShift-incompatible API/feature usage.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR changes only TLS scanner YAML and shell configuration; no new Ginkgo e2e tests or multi-node test assumptions are present.
Topology-Aware Scheduling Compatibility ✅ Passed The PR only splits scanner CPU and memory requests/limits; the generated Pod has no affinity, spread, replica, node-selector, toleration, or PDB constraints.
Ote Binary Stdout Contract ✅ Passed The diff contains only step YAML and a shell wrapper; it adds no OTE binary or suite setup, and its stdout is CI step logging rather than openshift-tests JSON output.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The commit changes only three scanner YAML/shell files, adds no Ginkgo e2e tests, and adds no IPv4 or external-connectivity test patterns.
No-Weak-Crypto ✅ Passed The HEAD patch only changes scanner resource variables and Kubernetes resource fields; exact searches found no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom crypto, or secret comparisons.
No-Sensitive-Data-In-Logs ✅ Passed The only new runtime log prints CPU and memory resource values; no passwords, tokens, API keys, PII, hostnames, or customer data are added to logs.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: separating CPU and memory resource requests from limits.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

documentation: "Deprecated: use SCANNER_MEM_GUEST_REQUEST and SCANNER_MEM_GUEST_LIMIT. Kept as fallback."
- name: SCANNER_CPU_GUEST_REQUEST
default: "1"
documentation: "CPU request for the scanner pod on the guest cluster. Falls back to SCANNER_CPU_GUEST if unset."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add the Falls back to SCANNER_CPU_GUEST if unset. at the end.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — removed the "Falls back to..." text from all split var docs (both management and guest).


AI-generated. Review for accuracy.

Comment on lines +78 to +81
scanner_cpu_request="${SCANNER_CPU_GUEST_REQUEST:-${SCANNER_CPU_GUEST:-1}}"
scanner_cpu_limit="${SCANNER_CPU_GUEST_LIMIT:-${SCANNER_CPU_GUEST:-1}}"
scanner_mem_request="${SCANNER_MEM_GUEST_REQUEST:-${SCANNER_MEMORY_GUEST:-2Gi}}"
scanner_mem_limit="${SCANNER_MEM_GUEST_LIMIT:-${SCANNER_MEMORY_GUEST:-2Gi}}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the defaults are already defined in ci-operator/step-registry/tls/scanner/hypershift-run/tls-scanner-hypershift-run-ref.yaml

no need to have things like :-1 :-2Gi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — removed hardcoded :-1 / :-2Gi defaults. The ref yaml already sets them.


AI-generated. Review for accuracy.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ci-operator/step-registry/tls/scanner/run/tls-scanner-run-ref.yaml`:
- Around line 22-33: Remove the non-empty defaults from the split scanner
resource declarations so legacy override variables remain effective through the
existing fallback expressions. Update all affected declarations in
ci-operator/step-registry/tls/scanner/run/tls-scanner-run-ref.yaml lines 22-33,
ci-operator/step-registry/tls/scanner/hypershift-run/tls-scanner-hypershift-run-ref.yaml
lines 27-38, and
ci-operator/step-registry/tls/scanner/hypershift-run/tls-scanner-hypershift-run-ref.yaml
lines 45-56; preserve the documentation and fallback behavior for SCANNER_CPU,
SCANNER_MEMORY, and the guest equivalents.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: c069b845-57ca-465c-91ff-c7da64c30a4b

📥 Commits

Reviewing files that changed from the base of the PR and between 82a39e7 and 83f348c.

📒 Files selected for processing (3)
  • ci-operator/step-registry/tls/scanner/hypershift-run/tls-scanner-hypershift-run-ref.yaml
  • ci-operator/step-registry/tls/scanner/run/tls-scanner-run-commands.sh
  • ci-operator/step-registry/tls/scanner/run/tls-scanner-run-ref.yaml

Comment thread ci-operator/step-registry/tls/scanner/run/tls-scanner-run-ref.yaml Outdated
Comment thread ci-operator/step-registry/tls/scanner/run/tls-scanner-run-ref.yaml
@redhat-chai-bot
redhat-chai-bot force-pushed the split-scanner-cpu-mem-request-limit branch from 83f348c to 4b8a7c4 Compare August 4, 2026 08:50
@redhat-chai-bot

Copy link
Copy Markdown
Contributor

/pj-rehearse periodic-ci-openshift-tls-scanner-main-periodic-tls13-adherence


AI-generated. Review for accuracy.

@redhat-chai-bot

Copy link
Copy Markdown
Contributor

/pj-rehearse periodic-ci-openshift-tls-scanner-main-periodic-default-tls


AI-generated. Review for accuracy.

@redhat-chai-bot

Copy link
Copy Markdown
Contributor

/pj-rehearse periodic-ci-openshift-tls-scanner-main-periodic-pqc-readiness


AI-generated. Review for accuracy.

@redhat-chai-bot

Copy link
Copy Markdown
Contributor

/pj-rehearse periodic-ci-openshift-tls-scanner-main-periodic-pqc-readiness-hypershift


AI-generated. Review for accuracy.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

3 similar comments
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci

openshift-ci Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@machine424: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/periodic-ci-openshift-tls-scanner-main-periodic-pqc-readiness-hypershift 4b8a7c4 link unknown /pj-rehearse periodic-ci-openshift-tls-scanner-main-periodic-pqc-readiness-hypershift
ci/rehearse/periodic-ci-openshift-tls-scanner-main-periodic-tls13-adherence 4b8a7c4 link unknown /pj-rehearse periodic-ci-openshift-tls-scanner-main-periodic-tls13-adherence
ci/rehearse/periodic-ci-openshift-tls-scanner-main-periodic-pqc-readiness 4b8a7c4 link unknown /pj-rehearse periodic-ci-openshift-tls-scanner-main-periodic-pqc-readiness

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@machine424

Copy link
Copy Markdown
Contributor Author

/cc @richardsonnick
/cc @smith-xyz

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.
@redhat-chai-bot
redhat-chai-bot force-pushed the split-scanner-cpu-mem-request-limit branch from 4b8a7c4 to 9b231b8 Compare August 6, 2026 18:00
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@machine424: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-machine-config-operator-main-tls-pqc-readiness openshift/machine-config-operator presubmit Registry content changed
pull-ci-openshift-machine-config-operator-release-5.1-tls-pqc-readiness openshift/machine-config-operator presubmit Registry content changed
pull-ci-openshift-machine-config-operator-release-5.0-tls-pqc-readiness openshift/machine-config-operator presubmit Registry content changed
pull-ci-openshift-machine-config-operator-release-4.23-tls-pqc-readiness openshift/machine-config-operator presubmit Registry content changed
pull-ci-openshift-cluster-autoscaler-operator-main-e2e-aws openshift/cluster-autoscaler-operator presubmit Registry content changed
pull-ci-openshift-cluster-autoscaler-operator-release-5.1-e2e-aws openshift/cluster-autoscaler-operator presubmit Registry content changed
pull-ci-openshift-cluster-autoscaler-operator-release-5.0-e2e-aws openshift/cluster-autoscaler-operator presubmit Registry content changed
pull-ci-openshift-cluster-autoscaler-operator-release-4.23-e2e-aws openshift/cluster-autoscaler-operator presubmit Registry content changed
pull-ci-openshift-local-storage-operator-main-tls-scanner-local-storage openshift/local-storage-operator presubmit Registry content changed
pull-ci-openshift-local-storage-operator-release-5.1-tls-scanner-local-storage openshift/local-storage-operator presubmit Registry content changed
pull-ci-openshift-local-storage-operator-release-5.0-tls-scanner-local-storage openshift/local-storage-operator presubmit Registry content changed
pull-ci-openshift-local-storage-operator-release-4.23-tls-scanner-local-storage openshift/local-storage-operator presubmit Registry content changed
pull-ci-openshift-cluster-storage-operator-main-tls-scanner-vsphere-problem-detector openshift/cluster-storage-operator presubmit Registry content changed
pull-ci-openshift-cluster-storage-operator-release-5.1-tls-scanner-vsphere-problem-detector openshift/cluster-storage-operator presubmit Registry content changed
pull-ci-openshift-cluster-storage-operator-release-5.0-tls-scanner-vsphere-problem-detector openshift/cluster-storage-operator presubmit Registry content changed
pull-ci-openshift-cluster-storage-operator-release-4.23-tls-scanner-vsphere-problem-detector openshift/cluster-storage-operator presubmit Registry content changed
pull-ci-openshift-insights-runtime-extractor-main-tls-scanner openshift/insights-runtime-extractor presubmit Registry content changed
pull-ci-openshift-insights-runtime-extractor-release-5.1-tls-scanner openshift/insights-runtime-extractor presubmit Registry content changed
pull-ci-openshift-insights-runtime-extractor-release-5.0-tls-scanner openshift/insights-runtime-extractor presubmit Registry content changed
pull-ci-openshift-insights-runtime-extractor-release-4.23-tls-scanner openshift/insights-runtime-extractor presubmit Registry content changed
pull-ci-openshift-insights-runtime-extractor-release-4.22-tls-scanner openshift/insights-runtime-extractor presubmit Registry content changed
pull-ci-openshift-tls-scanner-main-smoke-tls openshift/tls-scanner presubmit Registry content changed
pull-ci-openshift-tls-scanner-release-5.1-default-tls openshift/tls-scanner presubmit Registry content changed
pull-ci-openshift-tls-scanner-release-5.1-default-pqc-readiness openshift/tls-scanner presubmit Registry content changed
pull-ci-openshift-tls-scanner-release-5.1-tls13-adherence openshift/tls-scanner presubmit Registry content changed

A total of 119 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs.

A full list of affected jobs can be found here

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@richardsonnick

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 6, 2026
@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: machine424, richardsonnick

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2026
@machine424

Copy link
Copy Markdown
Contributor Author

/pj-rehearse ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@machine424: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Aug 7, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit e4211db into openshift:main Aug 7, 2026
11 checks passed
@joelsmith

Copy link
Copy Markdown
Contributor

Our tests which use the old names are now failing. Apparently the fallback doesn't work since our pods which should have 0.5 core and 1GB now have requests of 4 cores and 4 GB and can't schedule.

@machine424

Copy link
Copy Markdown
Contributor Author

Our tests which use the old names are now failing. Apparently the fallback doesn't work since our pods which should have 0.5 core and 1GB now have requests of 4 cores and 4 GB and can't schedule.

That highlights the importance of decoupling requests and limits the hard way.
I should have spent more time rehearsing.

Hopefully, #83145 will resolve the issue for the others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants