Documentation ¶
Index ¶
- Constants
- Variables
- type ClusterConfig
- func (config *ClusterConfig) CPUManagerEnabled() bool
- func (config *ClusterConfig) CPUNodeDiscoveryEnabled() bool
- func (config *ClusterConfig) DataVolumesEnabled() bool
- func (config *ClusterConfig) GPUPassthroughEnabled() bool
- func (c *ClusterConfig) GetCPUModel() string
- func (c *ClusterConfig) GetCPURequest() *resource.Quantity
- func (c *ClusterConfig) GetConfig() (config *v1.KubeVirtConfiguration)
- func (c *ClusterConfig) GetDefaultClusterConfig() *v1.KubeVirtConfiguration
- func (c *ClusterConfig) GetDefaultNetworkInterface() string
- func (c *ClusterConfig) GetEmulatedMachines() []string
- func (c *ClusterConfig) GetImagePullPolicy() (policy k8sv1.PullPolicy)
- func (c *ClusterConfig) GetLessPVCSpaceToleration() int
- func (c *ClusterConfig) GetMachineType() string
- func (c *ClusterConfig) GetMemoryOvercommit() int
- func (c *ClusterConfig) GetMigrationConfiguration() *v1.MigrationConfiguration
- func (c *ClusterConfig) GetNodeSelectors() map[string]string
- func (c *ClusterConfig) GetOVMFPath() string
- func (c *ClusterConfig) GetResourceVersion() string
- func (c *ClusterConfig) GetSELinuxLauncherType() string
- func (c *ClusterConfig) GetSMBIOS() *v1.SMBiosConfiguration
- func (c *ClusterConfig) GetSupportedAgentVersions() []string
- func (c *ClusterConfig) HasDataVolumeAPI() bool
- func (config *ClusterConfig) HostDiskEnabled() bool
- func (config *ClusterConfig) HypervStrictCheckEnabled() bool
- func (config *ClusterConfig) IgnitionEnabled() bool
- func (c *ClusterConfig) IsBridgeInterfaceOnPodNetworkEnabled() bool
- func (c *ClusterConfig) IsSlirpInterfaceEnabled() bool
- func (c *ClusterConfig) IsUseEmulation() bool
- func (config *ClusterConfig) LiveMigrationEnabled() bool
- func (c *ClusterConfig) SetConfigModifiedCallback(cb ConfigModifiedFn)
- func (config *ClusterConfig) SidecarEnabled() bool
- func (config *ClusterConfig) SnapshotEnabled() bool
- func (config *ClusterConfig) SriovEnabled() bool
- type ConfigModifiedFn
Constants ¶
const ( ConfigMapName = "kubevirt-config" FeatureGatesKey = "feature-gates" EmulatedMachinesKey = "emulated-machines" MachineTypeKey = "machine-type" UseEmulationKey = "debug.useEmulation" ImagePullPolicyKey = "dev.imagePullPolicy" MigrationsConfigKey = "migrations" CPUModelKey = "default-cpu-model" CPURequestKey = "cpu-request" MemoryOvercommitKey = "memory-overcommit" LessPVCSpaceTolerationKey = "pvc-tolerate-less-space-up-to-percent" NodeSelectorsKey = "node-selectors" NetworkInterfaceKey = "default-network-interface" PermitSlirpInterface = "permitSlirpInterface" PermitBridgeInterfaceOnPodNetwork = "permitBridgeInterfaceOnPodNetwork" NodeDrainTaintDefaultKey = "kubevirt.io/drain" SmbiosConfigKey = "smbios" SELinuxLauncherTypeKey = "selinuxLauncherType" SupportedGuestAgentVersionsKey = "supported-guest-agent" OVMFPathKey = "ovmfPath" )
const ( CPUManager = "CPUManager" IgnitionGate = "ExperimentalIgnitionSupport" LiveMigrationGate = "LiveMigration" CPUNodeDiscoveryGate = "CPUNodeDiscovery" HypervStrictCheckGate = "HypervStrictCheck" SidecarGate = "Sidecar" GPUGate = "GPU" SnapshotGate = "Snapshot" DataVolumesGate = "DataVolumes" SRIOVGate = "SRIOVGate" HostDiskGate = "HostDisk" )
const ( ParallelOutboundMigrationsPerNodeDefault uint32 = 2 ParallelMigrationsPerClusterDefault uint32 = 5 BandwithPerMigrationDefault = "64Mi" MigrationAllowAutoConverge bool = false MigrationProgressTimeout int64 = 150 MigrationCompletionTimeoutPerGiB int64 = 800 DefaultAMD64MachineType = "q35" DefaultPPC64LEMachineType = "pseries" DefaultCPURequest = "100m" DefaultMemoryOvercommit = 100 DefaultAMD64EmulatedMachines = "q35*,pc-q35*" DefaultPPC64LEEmulatedMachines = "pseries*" DefaultLessPVCSpaceToleration = 10 DefaultNodeSelectors = "" DefaultNetworkInterface = "bridge" DefaultImagePullPolicy = k8sv1.PullIfNotPresent DefaultUseEmulation = false DefaultUnsafeMigrationOverride = false DefaultPermitSlirpInterface = false SmbiosConfigDefaultFamily = "KubeVirt" SmbiosConfigDefaultManufacturer = "KubeVirt" SmbiosConfigDefaultProduct = "None" DefaultPermitBridgeInterfaceOnPodNetwork = true DefaultSELinuxLauncherType = "" SupportedGuestAgentVersions = "3.*,4.*" DefaultOVMFPath = "/usr/share/OVMF" )
Variables ¶
var DefaultMachineType, DefaultEmulatedMachines = getDefaultMachinesForArch()
Functions ¶
This section is empty.
Types ¶
type ClusterConfig ¶ added in v0.16.0
type ClusterConfig struct {
// contains filtered or unexported fields
}
func NewClusterConfig ¶ added in v0.16.0
func NewClusterConfig(configMapInformer cache.SharedIndexInformer, crdInformer cache.SharedIndexInformer, kubeVirtInformer cache.SharedIndexInformer, namespace string) *ClusterConfig
NewClusterConfig represents the `kubevirt-config` config map. It can be used to live-update values if the config changes. The config update works like this: 1. Check if the config exists. If it does not exist, return the default config 2. Check if the config got updated. If so, try to parse and return it 3. In case of errors or no updates (resource version stays the same), it returns the values from the last good config
func (*ClusterConfig) CPUManagerEnabled ¶ added in v0.18.0
func (config *ClusterConfig) CPUManagerEnabled() bool
func (*ClusterConfig) CPUNodeDiscoveryEnabled ¶ added in v0.18.0
func (config *ClusterConfig) CPUNodeDiscoveryEnabled() bool
func (*ClusterConfig) DataVolumesEnabled ¶ added in v0.18.0
func (config *ClusterConfig) DataVolumesEnabled() bool
func (*ClusterConfig) GPUPassthroughEnabled ¶ added in v0.22.0
func (config *ClusterConfig) GPUPassthroughEnabled() bool
func (*ClusterConfig) GetCPUModel ¶ added in v0.17.0
func (c *ClusterConfig) GetCPUModel() string
func (*ClusterConfig) GetCPURequest ¶ added in v0.17.0
func (c *ClusterConfig) GetCPURequest() *resource.Quantity
func (*ClusterConfig) GetConfig ¶ added in v0.31.0
func (c *ClusterConfig) GetConfig() (config *v1.KubeVirtConfiguration)
getConfig returns the latest valid parsed config map result, or updates it if a newer version is available. XXX Rework this, to happen mostly in informer callbacks. This will also allow us then to react to config changes and e.g. restart some controllers
func (*ClusterConfig) GetDefaultClusterConfig ¶ added in v0.31.0
func (c *ClusterConfig) GetDefaultClusterConfig() *v1.KubeVirtConfiguration
func (*ClusterConfig) GetDefaultNetworkInterface ¶ added in v0.19.0
func (c *ClusterConfig) GetDefaultNetworkInterface() string
func (*ClusterConfig) GetEmulatedMachines ¶ added in v0.18.0
func (c *ClusterConfig) GetEmulatedMachines() []string
func (*ClusterConfig) GetImagePullPolicy ¶ added in v0.16.0
func (c *ClusterConfig) GetImagePullPolicy() (policy k8sv1.PullPolicy)
func (*ClusterConfig) GetLessPVCSpaceToleration ¶ added in v0.18.0
func (c *ClusterConfig) GetLessPVCSpaceToleration() int
func (*ClusterConfig) GetMachineType ¶ added in v0.17.0
func (c *ClusterConfig) GetMachineType() string
func (*ClusterConfig) GetMemoryOvercommit ¶ added in v0.19.0
func (c *ClusterConfig) GetMemoryOvercommit() int
func (*ClusterConfig) GetMigrationConfiguration ¶ added in v0.31.0
func (c *ClusterConfig) GetMigrationConfiguration() *v1.MigrationConfiguration
func (*ClusterConfig) GetNodeSelectors ¶ added in v0.18.0
func (c *ClusterConfig) GetNodeSelectors() map[string]string
func (*ClusterConfig) GetOVMFPath ¶ added in v0.30.0
func (c *ClusterConfig) GetOVMFPath() string
func (*ClusterConfig) GetResourceVersion ¶ added in v0.30.5
func (c *ClusterConfig) GetResourceVersion() string
func (*ClusterConfig) GetSELinuxLauncherType ¶ added in v0.26.1
func (c *ClusterConfig) GetSELinuxLauncherType() string
func (*ClusterConfig) GetSMBIOS ¶ added in v0.21.0
func (c *ClusterConfig) GetSMBIOS() *v1.SMBiosConfiguration
func (*ClusterConfig) GetSupportedAgentVersions ¶ added in v0.29.0
func (c *ClusterConfig) GetSupportedAgentVersions() []string
func (*ClusterConfig) HasDataVolumeAPI ¶ added in v0.20.0
func (c *ClusterConfig) HasDataVolumeAPI() bool
func (*ClusterConfig) HostDiskEnabled ¶ added in v0.30.3
func (config *ClusterConfig) HostDiskEnabled() bool
func (*ClusterConfig) HypervStrictCheckEnabled ¶ added in v0.18.0
func (config *ClusterConfig) HypervStrictCheckEnabled() bool
func (*ClusterConfig) IgnitionEnabled ¶ added in v0.18.0
func (config *ClusterConfig) IgnitionEnabled() bool
func (*ClusterConfig) IsBridgeInterfaceOnPodNetworkEnabled ¶ added in v0.21.0
func (c *ClusterConfig) IsBridgeInterfaceOnPodNetworkEnabled() bool
func (*ClusterConfig) IsSlirpInterfaceEnabled ¶ added in v0.19.0
func (c *ClusterConfig) IsSlirpInterfaceEnabled() bool
func (*ClusterConfig) IsUseEmulation ¶ added in v0.16.0
func (c *ClusterConfig) IsUseEmulation() bool
func (*ClusterConfig) LiveMigrationEnabled ¶ added in v0.18.0
func (config *ClusterConfig) LiveMigrationEnabled() bool
func (*ClusterConfig) SetConfigModifiedCallback ¶ added in v0.20.0
func (c *ClusterConfig) SetConfigModifiedCallback(cb ConfigModifiedFn)
func (*ClusterConfig) SidecarEnabled ¶ added in v0.20.0
func (config *ClusterConfig) SidecarEnabled() bool
func (*ClusterConfig) SnapshotEnabled ¶ added in v0.31.0
func (config *ClusterConfig) SnapshotEnabled() bool
func (*ClusterConfig) SriovEnabled ¶ added in v0.31.0
func (config *ClusterConfig) SriovEnabled() bool
type ConfigModifiedFn ¶ added in v0.20.0
type ConfigModifiedFn func()