Skip to content

OCPBUGS-65942: Add pod selector columns to Service, ReplicaSet, Job, and ReplicationController lists#16748

Open
rzhabbarov wants to merge 1 commit into
openshift:mainfrom
rzhabbarov:rzhabbarov/OCPBUGS-65942-add-pod-selector-column
Open

OCPBUGS-65942: Add pod selector columns to Service, ReplicaSet, Job, and ReplicationController lists#16748
rzhabbarov wants to merge 1 commit into
openshift:mainfrom
rzhabbarov:rzhabbarov/OCPBUGS-65942-add-pod-selector-column

Conversation

@rzhabbarov

@rzhabbarov rzhabbarov commented Jul 11, 2026

Copy link
Copy Markdown

Analysis / Root cause:
Service, ReplicaSet, Job, and ReplicationController list views did not expose pod selector. This made these resources inconsistent with other workload list views such as Deployment, StatefulSet, DaemonSet, and DeploymentConfig, where users can see and click pod selectors directly from the table.
For Service specifically, the resource was using the generic default list page, so there was no Service-specific table definition where a Pod selector column could be added.

Solution description:
Added a Pod selector column to the ReplicaSet, Job, and ReplicationController list views.
Added a dedicated Kubernetes Service list page and registered it in the resource page mapping so Services can display resource-specific columns. The new Service list includes Name, Namespace, Labels, Pod selector, Created, and row actions.
The Pod selector cells reuse the existing Selector component, which renders clickable selector links to the Pod search page with the appropriate namespace and label query.

Screenshots / screen recording:
services

Test setup:
No special setup required.

Test cases:

  • Verify the Service list view shows a Pod selector column.
  • Verify the ReplicaSet list view shows a Pod selector column.
  • Verify the Job list view shows a Pod selector column.
  • Verify the ReplicationController list view shows a Pod selector column.
  • Verify selectors render as clickable links.
  • Verify clicking a selector navigates to /search/ns/<namespace>?kind=Pod&q=<selector>.
  • Verify resources without a selector show No selector.
  • Verify existing columns, sorting, row actions, and resource links still work.

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:

Reviewers and assignees:

Summary by CodeRabbit

  • New Features
    • Added a Services list page with columns for name, namespace, labels, pod selector, creation time, and actions.
    • Added Services to resource navigation and page handling.
    • Added Pod selector columns to Jobs, ReplicaSets, and Replication Controllers tables.
    • Pod selectors are now displayed and sortable where applicable.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 11, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@rzhabbarov: This pull request references Jira Issue OCPBUGS-65942, which is invalid:

  • expected the bug to target either version "5.0." or "openshift-5.0.", but it targets "4.21" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Analysis / Root cause:
Service, ReplicaSet, Job, and ReplicationController list views did not expose pod selector. This made these resources inconsistent with other workload list views such as Deployment, StatefulSet, DaemonSet, and DeploymentConfig, where users can see and click pod selectors directly from the table.
For Service specifically, the resource was using the generic default list page, so there was no Service-specific table definition where a Pod selector column could be added.

Solution description:
Added a Pod selector column to the ReplicaSet, Job, and ReplicationController list views.
Added a dedicated Kubernetes Service list page and registered it in the resource page mapping so Services can display resource-specific columns. The new Service list includes Name, Namespace, Labels, Pod selector, Created, and row actions.
The Pod selector cells reuse the existing Selector component, which renders clickable selector links to the Pod search page with the appropriate namespace and label query.

Screenshots / screen recording:
services

Test setup:
No special setup required.

Test cases:

  • Verify the Service list view shows a Pod selector column.
  • Verify the ReplicaSet list view shows a Pod selector column.
  • Verify the Job list view shows a Pod selector column.
  • Verify the ReplicationController list view shows a Pod selector column.
  • Verify selectors render as clickable links.
  • Verify clicking a selector navigates to /search/ns/<namespace>?kind=Pod&q=<selector>.
  • Verify resources without a selector show No selector.
  • Verify existing columns, sorting, row actions, and resource links still work.

Browser conformance:

  • Chrome
  • Firefox
  • Safari (or Epiphany on Linux)

Additional info:

Reviewers and assignees:

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.

@openshift-ci openshift-ci Bot added the component/core Related to console core functionality label Jul 11, 2026
@openshift-ci

openshift-ci Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rzhabbarov
Once this PR has been reviewed and has the lgtm label, please assign cajieh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 11, 2026
@openshift-ci

openshift-ci Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Hi @rzhabbarov. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Adds a Services list page and registers it for Service resources. Jobs, ReplicaSets, and ReplicationControllers tables now display Pod selector columns with updated column mappings.

Changes

Service list and selector UI

Layer / File(s) Summary
Pod selector columns
frontend/public/components/job.tsx, frontend/public/components/replicaset.jsx, frontend/public/components/replication-controller.jsx
Adds Pod selector cells and updates subsequent table column IDs, sorting, and render mappings.
Services list page
frontend/public/components/service.tsx
Adds Service row rendering, configurable columns, loading behavior, list composition, and page props.
Service page registration
frontend/public/components/resource-pages.ts
Registers the Service model to lazy-load ServicesPage.

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

Sequence Diagram(s)

sequenceDiagram
  participant ServicesPage
  participant ListPage
  participant ServicesList
  participant ConsoleDataView
  ServicesPage->>ListPage: render Service list page
  ListPage->>ServicesList: pass page props
  ServicesList->>ConsoleDataView: provide service rows and columns
  ConsoleDataView->>ServicesList: render selector and action cells
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.
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 changes frontend component/page files, and searches found no Ginkgo-style It/Describe/Context/When titles to destabilize.
Test Structure And Quality ✅ Passed No Ginkgo test files were added or modified; the PR only changes frontend components, so the test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the diff only touches frontend list-page components and contains no MicroShift-unsafe test constructs.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS: PR only changes frontend list-page components and adds no Ginkgo/e2e tests or multi-node assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed PR only changes frontend list/table pages to show pod selectors and a Service page; no manifests, controllers, replicas, affinity, node selectors, or PDBs were added.
Ote Binary Stdout Contract ✅ Passed Changed files are frontend components only; no main/init/TestMain/BeforeSuite code or stdout/logging calls were found, so the binary stdout contract is unaffected.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PASS: The diff only changes frontend components; no *_test.go files or Ginkgo It/Describe blocks were added, and no IPv4/external-network assumptions were found.
No-Weak-Crypto ✅ Passed Changed files are list-page UI only; no MD5/SHA1/DES/RC4/3DES/Blowfish, custom crypto, or secret/token comparisons were added.
Container-Privileges ✅ Passed No changed manifest/container specs or privilege settings were added; PR only updates frontend list-page components.
No-Sensitive-Data-In-Logs ✅ Passed No logging calls or sensitive-data terms were added in the touched files; the scan returned no matches.
Title check ✅ Passed The title accurately names the added pod selector columns across the listed resources and matches the change set.
Description check ✅ Passed The description covers root cause, solution, screenshots, test cases, setup, and browser conformance, with only minor sections left blank.
✨ 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.

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

Labels

component/core Related to console core functionality jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants