Skip to content

Link explicit Ingress classes and scoped class parameters - #2008

Open
nadaverell wants to merge 4 commits into
mainfrom
feature/relationship-ingress-classes
Open

nadaverell wants to merge 4 commits into
mainfrom
feature/relationship-ingress-classes

Conversation

@nadaverell

@nadaverell nadaverell commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

The Ingress drawer showed spec.ingressClassName as plain text, and an IngressClass's spec.parameters could not be opened. Both are now links:

  • Ingress → IngressClass. An explicit spec.ingressClassName opens the cluster-scoped networking.k8s.io IngressClass. The legacy kubernetes.io/ingress.class annotation stays plain text, because its value is a controller-specific string, not necessarily an IngressClass name.
  • IngressClass → parameters. The parameters link keeps the declared kind and API group. As the Kubernetes API specifies, an omitted apiGroup means the core group and an omitted scope means Cluster. A scope: Namespace reference with no namespace stays plain text instead of guessing one.

IngressClassParams (AWS Load Balancer Controller) is singular and plural at once, so English pluralization turns it into the nonexistent ingressclassparamses. Radar resolves it through API discovery, but Radar Hub's fleet view navigates without discovery, so the link would have opened a missing resource there. A builtin ingressclassparams ↔ IngressClassParams entry in the navigation map fixes this for every host, including Hub's fold back to a Kind, which its event query filters on.

Scope: the shared UI (@skyhook-io/k8s-ui), used by Radar and Radar Hub. No topology, MCP context or readiness inference. A default class is not inferred.

Validation: tests cover the parameter-reference conversion, Ingress and both parameter scopes clicked through, the legacy annotation (no link), and the no-discovery plural mapping. In a browser on a kind cluster with the official AWS Load Balancer Controller CRD installed, the links open the IngressClass, the real IngressClassParams object and a ConfigMap in its declared namespace; the legacy annotation renders without a link.

Declared IngressClass parameters


Note

Low Risk
UI-only navigation and pluralization fixes in shared k8s-ui renderers; no auth, data, or cluster mutation paths.

Overview
Ingress and IngressClass drawers now use clickable ResourceLink navigation instead of plain text where the API gives a real object reference.

An Ingress with spec.ingressClassName opens the cluster-scoped networking.k8s.io IngressClass. The deprecated kubernetes.io/ingress.class annotation is still shown as text only, since it is not guaranteed to name an IngressClass resource.

IngressClass spec.parameters link to the referenced object when a ResourceRef can be built: default core API group and Cluster scope when omitted; namespaced parameters require an explicit namespace (otherwise the name stays plain text). IngressClassRenderer accepts onNavigate like other renderers.

Navigation without API discovery gains a builtin map entry for AWS IngressClassParams (elbv2.k8s.aws), whose plural is identical to the kind and would otherwise break English pluralization in Radar Hub’s fleet view.

Tests cover parameter ref conversion, click-through for Ingress class and both parameter scopes, legacy annotation behavior, and the no-discovery plural mapping.

Reviewed by Cursor Bugbot for commit 13c6413. Bugbot is set up for automated code reviews on this repo. Configure here.

@nadaverell
nadaverell requested a review from hisco as a code owner October 7, 2026 05:14
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Link Ingress classes and scoped IngressClass parameters

✨ Enhancement 🧪 Tests 🕐 20-40 Minutes

Grey Divider

AI Description

• Make explicit Ingress class names navigable while keeping legacy annotations as plain text.
• Link IngressClass parameters using their declared API group and scope, requiring a namespace when
 namespaced.
• Test reference identities and click-through navigation for cluster- and namespace-scoped targets.
Diagram

graph TD
  C["IngressClass renderer"] --> H["Reference helper"] --> L["ResourceLink"] --> N["Drawer navigation"] --> T["Referenced resource"]
  I["Ingress renderer"] --> L
Loading
High-Level Assessment

The focused approach is appropriate: reuse ResourceLink and the existing drawer path, with a small helper for Kubernetes parameter-reference semantics. Broader relationship discovery or inferred references would change behavior beyond the explicitly declared links.

Files changed (5) +66 / -6

Enhancement (4) +39 / -6
IngressClassRenderer.tsxLink valid IngressClass parameter names +10/-3

Link valid IngressClass parameter names

• Accepts drawer navigation and renders a parameter name as a ResourceLink when its reference can be resolved. A namespaced reference without a namespace remains plain text.

packages/k8s-ui/src/components/resources/renderers/IngressClassRenderer.tsx

IngressRenderer.tsxLink explicitly declared Ingress classes +6/-2

Link explicitly declared Ingress classes

• Links spec.ingressClassName to a cluster-scoped networking.k8s.io IngressClass. The legacy ingress-class annotation remains plain text.

packages/k8s-ui/src/components/resources/renderers/IngressRenderer.tsx

ResourceRendererDispatch.tsxPass navigation into the IngressClass renderer +1/-1

Pass navigation into the IngressClass renderer

• Forwards the existing drawer navigation callback so parameter links can open their target resources.

packages/k8s-ui/src/components/shared/ResourceRendererDispatch.tsx

ingress-class-references.tsResolve scoped IngressClass parameter references +22/-0

Resolve scoped IngressClass parameter references

• Builds ResourceRef values from declared kind, name, API group, and scope. Defaults omitted group and scope to core and Cluster, and rejects namespace-scoped references without a namespace.

packages/k8s-ui/src/utils/ingress-class-references.ts

Tests (1) +27 / -0
IngressClassReferences.test.tsxTest reference identity and drawer-link clicks +27/-0

Test reference identity and drawer-link clicks

• Checks parameter references for custom API groups, core resources, and namespace requirements. DOM tests click explicit class and parameter links and confirm a legacy annotation remains text.

packages/k8s-ui/src/components/resources/renderers/IngressClassReferences.test.tsx

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can route each severity your way: inline, summary, both, or drop

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

IngressClassParams is singular and plural at once, so hosts that navigate
without loaded discovery (Radar Hub's fleet view, Radar's cold direct-URL load)
pluralized the parameter link to the nonexistent ingressclassparamses.
Hosts without discovery also fold the plural back with pluralToKind, which
produced Ingressclassparam and dropped the object's events in Radar Hub. One
unqualified entry serves both directions, so the group-qualified Kind entry is
no longer needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant