Skip to content

Add per-component hostNetwork support for all DaemonSet operands#2246

Open
calmkart wants to merge 1 commit intoNVIDIA:mainfrom
calmkart:feat/add-hostnetwork-support-for-all-daemonsets
Open

Add per-component hostNetwork support for all DaemonSet operands#2246
calmkart wants to merge 1 commit intoNVIDIA:mainfrom
calmkart:feat/add-hostnetwork-support-for-all-daemonsets

Conversation

@calmkart
Copy link
Copy Markdown

@calmkart calmkart commented Mar 24, 2026

Summary

  • Add per-component hostNetwork support for all DaemonSet operands in ClusterPolicy CRD
  • Previously only DCGMExporter supported this; now all 16 DaemonSet components support it
  • Each component gets an optional hostNetwork boolean field, following the existing DCGMExporter pattern

Test plan

  • Unit tests added for applyHostNetworkConfig helper (nil/true/false cases)
  • All existing controller tests pass
  • make generate and make manifests run successfully
  • Build passes cleanly

Description

Previously, only DCGMExporter supported configuring hostNetwork through the ClusterPolicy CRD. This commit extends hostNetwork support to all remaining DaemonSet components: Driver, VGPUManager, Toolkit, DevicePlugin, SandboxDevicePlugin, KataDevicePlugin, DCGM, NodeStatusExporter, GPUFeatureDiscovery, MIGManager, KataManager, VFIOManager, CCManager, VGPUDeviceManager, and Validator.

Each component's Spec type now includes an optional HostNetwork *bool field following the same pattern as DCGMExporterSpec. When enabled, the controller sets hostNetwork: true and DNSPolicy: ClusterFirstWithHostNet on the corresponding DaemonSet pod spec.

Changes:

  • Add HostNetwork field to 15 component Spec types in ClusterPolicy CRD
  • Add applyHostNetworkConfig helper and call it in 17 Transform functions
  • Add hostNetwork values and Helm template rendering for all components
  • Regenerate deepcopy functions and CRD manifests
  • Add unit tests for applyHostNetworkConfig

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Mar 24, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Previously, only DCGMExporter supported configuring hostNetwork through
the ClusterPolicy CRD. This commit extends hostNetwork support to all
remaining DaemonSet components: Driver, VGPUManager, Toolkit,
DevicePlugin, SandboxDevicePlugin, KataDevicePlugin, DCGM,
NodeStatusExporter, GPUFeatureDiscovery, MIGManager, KataManager,
VFIOManager, CCManager, VGPUDeviceManager, and Validator.

Each component's Spec type now includes an optional HostNetwork *bool
field following the same pattern as DCGMExporterSpec. When enabled, the
controller sets hostNetwork: true and DNSPolicy: ClusterFirstWithHostNet
on the corresponding DaemonSet pod spec.

Changes:
- Add HostNetwork field to 15 component Spec types in ClusterPolicy CRD
- Add applyHostNetworkConfig helper and call it in 17 Transform functions
- Add hostNetwork values and Helm template rendering for all components
- Regenerate deepcopy functions and CRD manifests
- Add unit tests for applyHostNetworkConfig

Signed-off-by: Calm Peng <494296669@qq.com>
@calmkart calmkart force-pushed the feat/add-hostnetwork-support-for-all-daemonsets branch from bf629bf to f847562 Compare March 24, 2026 07:39
@calmkart
Copy link
Copy Markdown
Author

@cdesiniotis @karthikvetrivel @tariq1890 PTAL, Thanks!

@rahulait rahulait added this to the v26.3.1 milestone Mar 25, 2026
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.

2 participants