Skip to content

MetalLB operator: add tls-scanner job - #82125

Open
oribon wants to merge 1 commit into
openshift:mainfrom
oribon:metallb_tlsscanner
Open

MetalLB operator: add tls-scanner job#82125
oribon wants to merge 1 commit into
openshift:mainfrom
oribon:metallb_tlsscanner

Conversation

@oribon

@oribon oribon commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Adds support in the OpenShift CI config for the MetalLB operator to run an optional tls-scanner workflow on AWS amd64 (OpenShift 4.22). The change provisions a new tls-scanner-tool base image (tag 5.0), then (when enabled) installs the MetalLB operator bundle, deploys a MetalLB custom resource, waits for the MetalLB controller/speaker and the openshift-frr-k8s components (frr-k8s-statuscleaner and frr-k8s daemonset) to become ready, and finally executes the scanner via generic-claim using ref: tls-scanner-run.

@openshift-ci
openshift-ci Bot requested review from dougbtv and fedepaol July 19, 2026 10:52
@openshift-ci

openshift-ci Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: oribon

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 Jul 19, 2026
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 8fcf1064-bfb3-49b7-8298-39da87bd77b5

📥 Commits

Reviewing files that changed from the base of the PR and between 12f76e4 and f062cc8.

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/openshift/metallb-operator/openshift-metallb-operator-main-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (1)
  • ci-operator/config/openshift/metallb-operator/openshift-metallb-operator-main.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • ci-operator/config/openshift/metallb-operator/openshift-metallb-operator-main.yaml

Walkthrough

The OpenShift CI configuration adds the tls-scanner-tool 5.0 base image and an optional amd64/AWS OpenShift 4.22 MetalLB TLS scanner workflow that installs the operator, deploys MetalLB and FRR components, and runs tls-scanner-run.

Changes

MetalLB TLS scanner

Layer / File(s) Summary
TLS scanner image configuration
ci-operator/config/openshift/metallb-operator/openshift-metallb-operator-main.yaml
Adds the tls-scanner-tool 5.0 base image from the ocp namespace.
TLS scanner test workflow
ci-operator/config/openshift/metallb-operator/openshift-metallb-operator-main.yaml
Adds an optional workflow that installs the operator, deploys MetalLB, waits for MetalLB and FRR components, and invokes tls-scanner-run with scanner environment variables.

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

Sequence Diagram(s)

sequenceDiagram
  participant CI as tls-scanner test
  participant Operator as operator-bundle install
  participant MetalLB as MetalLB controller/speaker
  participant FRR as openshift-frr-k8s
  participant Scanner as generic-claim tls-scanner-run
  CI->>Operator: Install bundle and wait for controller/webhook
  CI->>MetalLB: Apply MetalLB custom resource and wait for controller/speaker
  CI->>FRR: Wait for statuscleaner and daemonset
  CI->>Scanner: Invoke tls-scanner-run
Loading

Possibly related PRs

  • openshift/release#82110: Adds another TLS scanner flow using the same scanner image tag and tls-scanner-run step.

Suggested reviewers: fedepaol, dougbtv


Important

Pre-merge checks failed

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

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Container-Privileges ❌ Error The new tls-scanner job invokes a pod spec that sets privileged:true, hostNetwork:true, hostPID:true, and runAsUser:0. Avoid the privileged host-mode scanner path or switch to the restricted management/pod-mode settings; otherwise add an explicit exception and justification.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a tls-scanner job for the MetalLB operator.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 only adds CI YAML workflow names; no Ginkgo It/Describe/Context/When titles or dynamic test names were introduced.
Test Structure And Quality ✅ Passed No Ginkgo test code changed; the PR only adds CI/job YAML, so the test-structure review is not applicable.
Microshift Test Compatibility ✅ Passed PR only adds CI/job YAML for tls-scanner; no new Ginkgo e2e tests or test names to evaluate for MicroShift compatibility.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR adds a CI workflow, not Ginkgo tests; its steps deploy MetalLB and daemonsets without any multi-node/SNO-only assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed Only ci-operator test config changed; no operator code/manifests or scheduling constraints were introduced.
Ote Binary Stdout Contract ✅ Passed PR only changes ci-operator YAML/job config; no OTE binary or process-level stdout writes were modified.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo test code was added; the new job only deploys cluster-internal components and tls-scanner-run, with no hardcoded IPv4/public internet use.
No-Weak-Crypto ✅ Passed The PR only adds CI/job config for tls-scanner; no MD5/SHA1/DES/RC4/3DES/Blowfish, custom crypto, or secret-comparison code appears.
No-Sensitive-Data-In-Logs ✅ Passed The new tls-scanner workflow only logs namespaces, pod status, and scanner output; no passwords, tokens, PII, or other sensitive values are introduced.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@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/config/openshift/metallb-operator/openshift-metallb-operator-main.yaml`:
- Around line 106-117: Remove the duplicate optional field from the tls-scanner
test mapping, retaining a single optional: true entry alongside the existing
cluster_claim and steps configuration.
🪄 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: 7eafc94e-3623-46f1-b6f0-0334ac1bc5e9

📥 Commits

Reviewing files that changed from the base of the PR and between 4b842bc and 12f76e4.

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/openshift/metallb-operator/openshift-metallb-operator-main-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (1)
  • ci-operator/config/openshift/metallb-operator/openshift-metallb-operator-main.yaml

Comment on lines +106 to +117
- always_run: false
as: tls-scanner
optional: true
cluster_claim:
architecture: amd64
cloud: aws
owner: openshift-ci
product: ocp
timeout: 1h0m0s
version: "4.22"
optional: true
steps:

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Duplicate optional key in the same mapping.

optional: true is declared twice (Line 108 and Line 116) as sibling keys of the same tls-scanner test object. This is an invalid YAML mapping and is flagged by yamllint's key-duplicates check, which will likely fail CI validation/regeneration.

🐛 Proposed fix
     version: "4.22"
-  optional: true
   steps:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- always_run: false
as: tls-scanner
optional: true
cluster_claim:
architecture: amd64
cloud: aws
owner: openshift-ci
product: ocp
timeout: 1h0m0s
version: "4.22"
optional: true
steps:
- always_run: false
as: tls-scanner
optional: true
cluster_claim:
architecture: amd64
cloud: aws
owner: openshift-ci
product: ocp
timeout: 1h0m0s
version: "4.22"
steps:
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 116-116: duplication of key "optional" in mapping

(key-duplicates)

🤖 Prompt for 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.

In
`@ci-operator/config/openshift/metallb-operator/openshift-metallb-operator-main.yaml`
around lines 106 - 117, Remove the duplicate optional field from the tls-scanner
test mapping, retaining a single optional: true entry alongside the existing
cluster_claim and steps configuration.

Source: Linters/SAST tools

Signed-off-by: Ori Braunshtein <obraunsh@redhat.com>
@oribon
oribon force-pushed the metallb_tlsscanner branch from 12f76e4 to f062cc8 Compare July 19, 2026 11:15
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@oribon: 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-metallb-operator-main-tls-scanner openshift/metallb-operator presubmit Presubmit changed
pull-ci-openshift-metallb-operator-main-ci-bundle-operatorbundle openshift/metallb-operator presubmit Ci-operator config changed
pull-ci-openshift-metallb-operator-main-images openshift/metallb-operator presubmit Ci-operator config changed
pull-ci-openshift-metallb-operator-main-metallb-e2e-metal openshift/metallb-operator presubmit Ci-operator config changed
pull-ci-openshift-metallb-operator-main-operator-e2e openshift/metallb-operator presubmit Ci-operator config changed
pull-ci-openshift-metallb-operator-main-periodics-ci-bundle-operatorbundle openshift/metallb-operator presubmit Ci-operator config changed
pull-ci-openshift-metallb-operator-main-periodics-images openshift/metallb-operator presubmit Ci-operator config changed
pull-ci-openshift-metallb-operator-main-security openshift/metallb-operator presubmit Ci-operator config changed
pull-ci-openshift-metallb-operator-main-verify-deps openshift/metallb-operator presubmit Ci-operator config changed
periodic-ci-openshift-metallb-operator-main-periodics-operator-e2e-periodic N/A periodic Ci-operator config changed
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.

@oribon

oribon commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse pull-ci-openshift-metallb-operator-main-tls-scanner

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@openshift-ci

openshift-ci Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

@oribon: all tests passed!

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.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant