Skip to content

NROP tls-scanner: allow scanner ingress to scheduler pods via Network… - #83815

Open
mrniranjan wants to merge 1 commit into
openshift:mainfrom
mrniranjan:nrop_tls_ingress
Open

NROP tls-scanner: allow scanner ingress to scheduler pods via Network…#83815
mrniranjan wants to merge 1 commit into
openshift:mainfrom
mrniranjan:nrop_tls_ingress

Conversation

@mrniranjan

@mrniranjan mrniranjan commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Allow scanner ingress to scheduler pods via n/w policy

The TLS scanner could not reach NROP scheduler pods (port 10259) in the openshift-numaresources namespace because the namespace's NetworkPolicy denies cross-namespace ingress.

  • Add telcov10n-functional-cnf-compute-nrop-create-network-policy pre-step that applies an additive NetworkPolicy allowing ingress to the secondary-scheduler pods from the scanner namespace, and ensures the scanner namespace exists.
  • Wire the step into the nrop-tls-scanner workflow before tls-scanner-run.
  • Set SCANNER_NAMESPACE=tls-scanner on the scan step so the scanner runs pod-networked, letting the NetworkPolicy namespaceSelector match its traffic (host-networked traffic sources from the node IP and would not).

Summary by CodeRabbit

This PR updates the OpenShift CI NROP TLS scanner workflow. It:

  • Creates the tls-scanner namespace when needed.
  • Applies a NetworkPolicy that allows the scanner to access NROP secondary scheduler pods on TCP port 10259.
  • Runs the scanner in the tls-scanner namespace so the policy can match its traffic.
  • Adds the reusable NetworkPolicy step and its ownership metadata.

…Policy

The TLS scanner could not reach NROP scheduler pods (port 10259) in the
openshift-numaresources namespace because the namespace's NetworkPolicy
denies cross-namespace ingress.

- Add telcov10n-functional-cnf-compute-nrop-create-network-policy pre-step
  that applies an additive NetworkPolicy allowing ingress to the
  secondary-scheduler pods from the scanner namespace, and ensures the
  scanner namespace exists.
- Wire the step into the nrop-tls-scanner workflow before tls-scanner-run.
- Set SCANNER_NAMESPACE=tls-scanner on the scan step so the scanner runs
  pod-networked, letting the NetworkPolicy namespaceSelector match its
  traffic (host-networked traffic sources from the node IP and would not).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 21, 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: Pro Plus

Run ID: 51dd5ff8-8c31-4475-8fe2-6b0064e63d74

📥 Commits

Reviewing files that changed from the base of the PR and between 83f00f5 and cad5d97.

📒 Files selected for processing (6)
  • ci-operator/config/openshift-kni/eco-ci-cd/openshift-kni-eco-ci-cd-main__cnf-compute-nrop-stage-nightly.yaml
  • ci-operator/step-registry/telcov10n/functional/cnf-compute/nrop/create-network-policy/OWNERS
  • ci-operator/step-registry/telcov10n/functional/cnf-compute/nrop/create-network-policy/telcov10n-functional-cnf-compute-nrop-create-network-policy-commands.sh
  • ci-operator/step-registry/telcov10n/functional/cnf-compute/nrop/create-network-policy/telcov10n-functional-cnf-compute-nrop-create-network-policy-ref.metadata.json
  • ci-operator/step-registry/telcov10n/functional/cnf-compute/nrop/create-network-policy/telcov10n-functional-cnf-compute-nrop-create-network-policy-ref.yaml
  • ci-operator/step-registry/telcov10n/functional/cnf-compute/nrop/tls-scanner/telcov10n-functional-cnf-compute-nrop-tls-scanner-workflow.yaml

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

Adds a CI step that creates and verifies an ingress NetworkPolicy for NROP secondary scheduler pods. The TLS scanner workflow runs this step before scanning, and the nightly configuration sets SCANNER_NAMESPACE to tls-scanner.

Changes

NROP TLS scanner network policy

Layer / File(s) Summary
Network policy step
ci-operator/step-registry/telcov10n/functional/cnf-compute/nrop/create-network-policy/*
Defines the CI step, ownership metadata, and fail-fast script. The script creates the scanner namespace, applies an ingress-only NetworkPolicy for matching scheduler pods, and verifies the applied policy.
Workflow and scanner configuration
ci-operator/step-registry/telcov10n/functional/cnf-compute/nrop/tls-scanner/*, ci-operator/config/openshift-kni/eco-ci-cd/*cnf-compute-nrop-stage-nightly.yaml
Runs the network-policy step before TLS scanning and sets SCANNER_NAMESPACE to tls-scanner.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🟡 Moderate · up to cad5d

The PR adds a network-policy setup step and changes scanner namespace behavior, but the CI configuration must first be regenerated with make update and any resulting changes included or explicitly accepted. Until that required validation is complete, the PR is not ready to merge.

Sequence Diagram(s)

sequenceDiagram
  participant TLSScannerWorkflow
  participant NetworkPolicyStep
  participant KubernetesAPI
  TLSScannerWorkflow->>NetworkPolicyStep: invoke pre-step
  NetworkPolicyStep->>KubernetesAPI: create tls-scanner namespace
  NetworkPolicyStep->>KubernetesAPI: apply ingress NetworkPolicy
  NetworkPolicyStep->>KubernetesAPI: retrieve NetworkPolicy for verification
Loading
🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (5 skipped: 5 unsupported.)
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 patch adds CI YAML, a shell script, metadata, and workflow wiring; it introduces no Ginkgo It, Describe, Context, or When test title.
Test Structure And Quality ✅ Passed The PR changes only CI YAML, OWNERS, metadata, and a Bash script; it adds no Ginkgo test code, so the listed test-quality checks do not apply.
Microshift Test Compatibility ✅ Passed The patch changes only CI YAML, metadata, OWNERS, and a shell command; it adds no Ginkgo test source or It/Describe/Context/When constructs.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The pull request changes only YAML, shell, JSON, and OWNERS files; it adds no Ginkgo e2e tests, so the SNO test-compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed The diff adds CI step metadata, a NetworkPolicy script, and workflow/environment wiring; it adds no deployment/controller scheduling constraints such as affinity, spread, replicas, selectors, toler...
Ote Binary Stdout Contract ✅ Passed The diff adds only YAML, JSON, OWNERS, and a Bash CI step; it changes no OTE binary or listed process-level Go/Ginkgo code that could corrupt JSON stdout.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The diff adds CI YAML, metadata, and a NetworkPolicy shell step only; it adds no Ginkgo e2e tests, IPv4 assumptions, or external connectivity.
No-Weak-Crypto ✅ Passed The pull-request diff adds namespace configuration, NetworkPolicy YAML, metadata, and shell orchestration only; no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret comparisons appear.
Container-Privileges ✅ Passed The diff adds no listed privilege settings. SCANNER_NAMESPACE selects scanner pod mode with hostNetwork/hostPID false, runAsNonRoot true, and allowPrivilegeEscalation false.
No-Sensitive-Data-In-Logs ✅ Passed The diff adds only namespace, label, port, policy, and status logging; no passwords, tokens, API keys, PII, session IDs, hostnames, or customer data are logged.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: allowing TLS scanner ingress to NROP scheduler pods through a NetworkPolicy.
✨ 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.

@openshift-ci

openshift-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrniranjan

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 21, 2026
@openshift-ci
openshift-ci Bot requested review from dgoodwin and kononovn August 21, 2026 13:29
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@mrniranjan: 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
periodic-ci-openshift-kni-eco-ci-cd-main-cnf-compute-nrop-stage-nightly-e2e-telcov10n-nrop-tls-scanner-5-0-nightly N/A periodic Ci-operator config changed

Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

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.

@openshift-ci

openshift-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

@mrniranjan: 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