util

package
v0.36.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2021 License: Apache-2.0 Imports: 7 Imported by: 20

Documentation

Index

Constants

View Source
const CPUManagerOS3Path = HostRootMount + "var/lib/origin/openshift.local.volumes/cpu_manager_state"
View Source
const CPUManagerPath = HostRootMount + "var/lib/kubelet/cpu_manager_state"
View Source
const ExtensionAPIServerAuthenticationConfigMap = "extension-apiserver-authentication"
View Source
const HostRootMount = "/proc/1/root/"
View Source
const KubeletPodsDir = "/var/lib/kubelet/pods"
View Source
const NetworkInfoDir = VirtPrivateDir + "/network-info-cache"
View Source
const PCI_ADDRESS_PATTERN = `^([\da-fA-F]{4}):([\da-fA-F]{2}):([\da-fA-F]{2}).([0-7]{1})$`
View Source
const RequestHeaderClientCAFileKey = "requestheader-client-ca-file"
View Source
const VirtLibDir = "/var/lib/kubevirt"
View Source
const VirtPrivateDir = "/var/run/kubevirt-private"
View Source
const VirtShareDir = "/var/run/kubevirt"

Variables

View Source
var VMIInterfaceDir = NetworkInfoDir + "/%s"
View Source
var VMIInterfacepath = NetworkInfoDir + "/%s/%s"

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 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 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 ParsePciAddress

func ParsePciAddress(pciAddress string) ([]string, error)

ParsePciAddress returns an array of PCI DBSF fields (domain, bus, slot, function)

func ResourceNameToEnvVar added in v0.36.0

func ResourceNameToEnvVar(prefix string, resourceName string) string

func WriteBytes added in v0.36.4

func WriteBytes(f *os.File, c byte, n int64) error

Types

This section is empty.

Directories

Path Synopsis
net
dns
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL