Skip to content

Project Network Isolation toggle is visible and editable for RKE2 local clusters #17530

@yonasberhe23

Description

@yonasberhe23

Setup

  • Rancher version: Rancher v2.15-af41a671abab40b0a3972a1180be29bd718deaa7-head /Dashboard master 67aad0f
  • Rancher UI Extensions:
  • Browser type & version:

Describe the bug
When editing a local RKE2 cluster in Cluster Management, the Networking section shows and allows editing of the Project Network Isolation toggle. Saving with this toggle enabled fails with a backend validation error because the backend explicitly rejects enableNetworkPolicy=true for k3s/rke2 clusters.

To Reproduce

  1. Go to Cluster Management.
  2. local RKE2 cluster.
  3. Edit the cluster.
  4. Expand Networking.
  5. Enable Project Network Isolation.
  6. Click Save.

Result
Save fails with HTTP 422 and error message:
enableNetworkPolicy should be false for k3s or rke2 clusters

Expected Result
For k3s and RKE2 clusters, the Project Network Isolation toggle should be hidden entirely (not editable), since the backend explicitly rejects enableNetworkPolicy=true for these cluster types.

Screenshots

Image

Additional context
Discovered while testing #16887 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions