Skip to content

Support per-namespace network providers for CnsFileAccessConfig#3976

Open
divyenpatel wants to merge 1 commit intokubernetes-sigs:masterfrom
divyenpatel:support-per-namespace-network-provider
Open

Support per-namespace network providers for CnsFileAccessConfig#3976
divyenpatel wants to merge 1 commit intokubernetes-sigs:masterfrom
divyenpatel:support-per-namespace-network-provider

Conversation

@divyenpatel
Copy link
Copy Markdown
Member

What this PR does / why we need it:

Resolve network provider and external VM IP from the namespace's NetworkSettings CR when WCP capability supports_per_namespace_network_providers is enabled; otherwise keep reading wcp-network-config via GetNetworkProvider.

  • List NetworkSettings in the namespace and require exactly one object; map status.provider (vsphere-distributed / nsx-tier1 / vpc) to existing VDS / NSX-T / VPC IP logic.
  • When per-namespace mode is on, use SNAT when present else fall back to VM primary IP (NSX-T and VPC); legacy behavior unchanged when the capability is off.
  • Register the capability in WCP feature maps and SupportsLateEnablement; start HandleLateEnablementOfCapability from metadatasyncer so the syncer restarts when the capability is enabled later.
  • Add/adjust unit tests (fake dynamic client with NetworkSettingsList).

Testing done:
In Progress

Special notes for your reviewer:

Release note:

Support per-namespace network providers for CnsFileAccessConfig

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 18, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: divyenpatel

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 18, 2026
Resolve network provider and external VM IP from the namespace's
NetworkSettings CR when WCP capability supports_per_namespace_network_providers
is enabled; otherwise keep reading wcp-network-config via GetNetworkProvider.

- List NetworkSettings in the namespace and require exactly one object;
  map status.provider (vsphere-distributed / nsx-tier1 / vpc) to existing
  VDS / NSX-T / VPC IP logic.
- When per-namespace mode is on, use SNAT when present else fall back to
  VM primary IP (NSX-T and VPC); legacy behavior unchanged when the
  capability is off.
- Register the capability in WCP feature maps and SupportsLateEnablement;
  start HandleLateEnablementOfCapability from metadatasyncer so the syncer
  restarts when the capability is enabled later.
- Add/adjust unit tests (fake dynamic client with NetworkSettingsList).
@divyenpatel divyenpatel force-pushed the support-per-namespace-network-provider branch from 6e98bf3 to 34fa747 Compare April 18, 2026 20:15
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants