Documentation
¶
Index ¶
- Constants
- func CloseIOAndCheckErr(c io.Closer, err *error)
- func HasHugePages(vmi *v1.VirtualMachineInstance) bool
- func HasKernelBootContainerImage(vmi *v1.VirtualMachineInstance) bool
- func IsGPUVMI(vmi *v1.VirtualMachineInstance) bool
- func IsHostDevVMI(vmi *v1.VirtualMachineInstance) bool
- func IsNonRootVMI(vmi *v1.VirtualMachineInstance) bool
- func IsSRIOVVmi(vmi *v1.VirtualMachineInstance) bool
- func IsVFIOVMI(vmi *v1.VirtualMachineInstance) bool
- func IsVMIVirtiofsEnabled(vmi *v1.VirtualMachineInstance) bool
- func MkdirAllWithNosec(pathName string) error
- func NeedVirtioNetDevice(vmi *v1.VirtualMachineInstance, allowEmulation bool) bool
- func OpenFileWithNosec(pathName string, flag int) (*os.File, error)
- func ResourceNameToEnvVar(prefix string, resourceName string) string
- func UseSoftwareEmulationForDevice(devicePath string, allowEmulation bool) (bool, error)
- func WantVirtioNetDevice(vmi *v1.VirtualMachineInstance) bool
- func WriteFileWithNosec(pathName string, data []byte) error
Constants ¶
const CPUManagerOS3Path = HostRootMount + "var/lib/origin/openshift.local.volumes/cpu_manager_state"
const CPUManagerPath = HostRootMount + "var/lib/kubelet/cpu_manager_state"
const ExtensionAPIServerAuthenticationConfigMap = "extension-apiserver-authentication"
const HostRootMount = "/proc/1/root/"
const KubeletPodsDir = "/var/lib/kubelet/pods"
const NonRootUID = 107
const NonRootUserString = "qemu"
const RequestHeaderClientCAFileKey = "requestheader-client-ca-file"
const RootUser = 0
const VirtLibDir = "/var/lib/kubevirt"
const VirtPrivateDir = "/var/run/kubevirt-private"
const VirtShareDir = "/var/run/kubevirt"
Variables ¶
This section is empty.
Functions ¶
func CloseIOAndCheckErr ¶ added in v0.36.0
func CloseIOAndCheckErr(c io.Closer, err *error)
CloseIOAndCheckErr closes the file and check the returned error. If there was an error a log messages will be printed. If a valid address (not nil) is passed in err the function will also update the error Note: to update the error the calling funtion need to use named returned variable (If called as defer function)
func HasHugePages ¶ added in v0.44.1
func HasHugePages(vmi *v1.VirtualMachineInstance) bool
func HasKernelBootContainerImage ¶ added in v0.42.0
func HasKernelBootContainerImage(vmi *v1.VirtualMachineInstance) bool
Checks if kernel boot is defined in a valid way
func IsGPUVMI ¶ added in v0.22.0
func IsGPUVMI(vmi *v1.VirtualMachineInstance) bool
Check if a VMI spec requests GPU
func IsHostDevVMI ¶ added in v0.36.0
func IsHostDevVMI(vmi *v1.VirtualMachineInstance) bool
Check if a VMI spec requests a HostDevice
func IsNonRootVMI ¶ added in v0.44.1
func IsNonRootVMI(vmi *v1.VirtualMachineInstance) bool
func IsSRIOVVmi ¶ added in v0.21.0
func IsSRIOVVmi(vmi *v1.VirtualMachineInstance) bool
func IsVFIOVMI ¶ added in v0.36.0
func IsVFIOVMI(vmi *v1.VirtualMachineInstance) bool
Check if a VMI spec requests a VFIO device
func IsVMIVirtiofsEnabled ¶ added in v0.34.0
func IsVMIVirtiofsEnabled(vmi *v1.VirtualMachineInstance) bool
Check if a VMI spec requests VirtIO-FS
func MkdirAllWithNosec ¶ added in v0.40.0
func MkdirAllWithNosec(pathName string) error
func NeedVirtioNetDevice ¶ added in v0.44.1
func NeedVirtioNetDevice(vmi *v1.VirtualMachineInstance, allowEmulation bool) bool
NeedVirtioNetDevice checks whether a VMI requires the presence of the "virtio" net device. This happens when the VMI wants to use a "virtio" network interface, and software emulation is disallowed.
func OpenFileWithNosec ¶ added in v0.40.0
func OpenFileWithNosec(pathName string, flag int) (*os.File, error)
func ResourceNameToEnvVar ¶ added in v0.36.0
func ResourceNameToEnvVar(prefix string, resourceName string) string
func UseSoftwareEmulationForDevice ¶ added in v0.44.1
func UseSoftwareEmulationForDevice(devicePath string, allowEmulation bool) (bool, error)
UseSoftwareEmulationForDevice determines whether to fallback to software emulation for the given device. This happens when the given device doesn't exist, and software emulation is enabled.
func WantVirtioNetDevice ¶ added in v0.45.0
func WantVirtioNetDevice(vmi *v1.VirtualMachineInstance) bool
WantVirtioNetDevice checks whether a VMI references at least one "virtio" network interface. Note that the reference can be explicit or implicit (unspecified nic models defaults to "virtio").
func WriteFileWithNosec ¶ added in v0.40.0
func WriteFileWithNosec(pathName string, data []byte) error
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
net
|
|
grpc
* This file is part of the KubeVirt project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
|
* This file is part of the KubeVirt project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. |
ip
* This file is part of the KubeVirt project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
|
* This file is part of the KubeVirt project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. |