virtconfig

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2020 License: Apache-2.0 Imports: 18 Imported by: 7

Documentation

Index

Constants

View Source
const (
	FeatureGatesKey     = "feature-gates"
	EmulatedMachinesKey = "emulated-machines"
	MachineTypeKey      = "machine-type"

	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"
)
View Source
const (
	IgnitionGate = "ExperimentalIgnitionSupport"

	CPUNodeDiscoveryGate  = "CPUNodeDiscovery"
	HypervStrictCheckGate = "HypervStrictCheck"
	SidecarGate           = "Sidecar"
	GPUGate               = "GPU"
)
View Source
const (
	ParallelOutboundMigrationsPerNodeDefault uint32 = 2
	ParallelMigrationsPerClusterDefault      uint32 = 5
	BandwithPerMigrationDefault                     = "64Mi"
	MigrationAllowAutoConverge               bool   = false
	MigrationProgressTimeout                 int64  = 150
	MigrationCompletionTimeoutPerGiB         int64  = 800
	DefaultMachineType                              = "q35"
	DefaultCPURequest                               = "100m"
	DefaultMemoryOvercommit                         = 100
	DefaultEmulatedMachines                         = "q35*,pc-q35*"
	DefaultLessPVCSpaceToleration                   = 10
	DefaultNodeSelectors                            = ""
	DefaultNetworkInterface                         = "bridge"
	DefaultImagePullPolicy                          = k8sv1.PullIfNotPresent
	DefaultUseEmulation                             = false
	DefaultUnsafeMigrationOverride                  = false
	DefaultPermitSlirpInterface                     = false
	SmbiosConfigDefaultFamily                       = "KubeVirt"
	SmbiosConfigDefaultManufacturer                 = "KubeVirt"
	SmbiosConfigDefaultProduct                      = "None"
	DefaultPermitBridgeInterfaceOnPodNetwork        = true
)

Variables

This section is empty.

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, 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) 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) 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) GetMigrationConfig added in v0.16.0

func (c *ClusterConfig) GetMigrationConfig() *MigrationConfig

func (*ClusterConfig) GetNodeSelectors added in v0.18.0

func (c *ClusterConfig) GetNodeSelectors() map[string]string

func (*ClusterConfig) GetSMBIOS added in v0.21.0

func (c *ClusterConfig) GetSMBIOS() *cmdv1.SMBios

func (*ClusterConfig) HasDataVolumeAPI added in v0.20.0

func (c *ClusterConfig) HasDataVolumeAPI() 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

type Config added in v0.16.0

type Config struct {
	ResourceVersion                   string
	UseEmulation                      bool
	MigrationConfig                   *MigrationConfig
	ImagePullPolicy                   k8sv1.PullPolicy
	MachineType                       string
	CPUModel                          string
	CPURequest                        resource.Quantity
	MemoryOvercommit                  int
	EmulatedMachines                  []string
	FeatureGates                      string
	LessPVCSpaceToleration            int
	NodeSelectors                     map[string]string
	NetworkInterface                  string
	PermitSlirpInterface              bool
	PermitBridgeInterfaceOnPodNetwork bool
	SmbiosConfig                      *cmdv1.SMBios
}

type ConfigModifiedFn added in v0.20.0

type ConfigModifiedFn func()

type MigrationConfig added in v0.16.0

type MigrationConfig struct {
	ParallelOutboundMigrationsPerNode *uint32            `json:"parallelOutboundMigrationsPerNode,omitempty"`
	ParallelMigrationsPerCluster      *uint32            `json:"parallelMigrationsPerCluster,omitempty"`
	BandwidthPerMigration             *resource.Quantity `json:"bandwidthPerMigration,omitempty"`
	NodeDrainTaintKey                 *string            `json:"nodeDrainTaintKey,omitempty"`
	ProgressTimeout                   *int64             `json:"progressTimeout,omitempty"`
	CompletionTimeoutPerGiB           *int64             `json:"completionTimeoutPerGiB,omitempty"`
	UnsafeMigrationOverride           bool               `json:"unsafeMigrationOverride"`
	AllowAutoConverge                 bool               `json:"allowAutoConverge"`
}

Jump to

Keyboard shortcuts

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