MCPcopy Create free account
hub / github.com/NVIDIA/gpu-operator / applyHostNetworkConfig

Function applyHostNetworkConfig

controllers/object_controls.go:58–63  ·  view source on GitHub ↗

applyHostNetworkConfig sets hostNetwork and the corresponding DNSPolicy on a pod spec if the provided hostNetwork bool pointer is non-nil and true.

(podSpec *corev1.PodSpec, hostNetwork *bool)

Source from the content-addressed store, hash-verified

56// applyHostNetworkConfig sets hostNetwork and the corresponding DNSPolicy on a pod spec
57// if the provided hostNetwork bool pointer is non-nil and true.
58func applyHostNetworkConfig(podSpec *corev1.PodSpec, hostNetwork *bool) {
59 if hostNetwork != nil && *hostNetwork {
60 podSpec.HostNetwork = true
61 podSpec.DNSPolicy = corev1.DNSClusterFirstWithHostNet
62 }
63}
64
65const (
66 // DefaultContainerdConfigFile indicates default config file path for containerd

Callers 15

TransformDriverFunction · 0.85
TransformVGPUManagerFunction · 0.85
TransformToolkitFunction · 0.85
TransformDevicePluginFunction · 0.85
TransformDCGMFunction · 0.85
TransformMIGManagerFunction · 0.85
TransformKataManagerFunction · 0.85
TransformVFIOManagerFunction · 0.85

Calls

no outgoing calls

Tested by 1