virtconfig

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: Apache-2.0 Imports: 15 Imported by: 7

Documentation

Index

Constants

View Source
const (
	FeatureGatesKey = "feature-gates"

	ParallelOutboundMigrationsPerNodeDefault uint32 = 2
	ParallelMigrationsPerClusterDefault      uint32 = 5
	BandwithPerMigrationDefault                     = "64Mi"
	MigrationProgressTimeout                 int64  = 150
	MigrationCompletionTimeoutPerGiB         int64  = 800
	DefaultMachineType                              = "q35"
	DefaultCPURequest                               = "100m"

	NodeDrainTaintDefaultKey = "kubevirt.io/drain"
)
View Source
const (
	SRIOVGate             = "SRIOV"
	CPUNodeDiscoveryGate  = "CPUNodeDiscovery"
	HypervStrictCheckGate = "HypervStrictCheck"
)

Variables

This section is empty.

Functions

func CPUManagerEnabled

func CPUManagerEnabled() bool

func Clear added in v0.16.0

func Clear()

func DataVolumesEnabled

func DataVolumesEnabled() bool

func HypervStrictCheckEnabled added in v0.16.0

func HypervStrictCheckEnabled() bool

func IgnitionEnabled added in v0.15.0

func IgnitionEnabled() bool

func Init

func Init()

We cannot rely on automatic invocation of 'init' method because this initialization code assumes a cluster is available to pull the configmap from

func InitFromConfigMap added in v0.16.0

func InitFromConfigMap(cfgMap *k8sv1.ConfigMap)

func LiveMigrationEnabled

func LiveMigrationEnabled() bool

func SRIOVEnabled

func SRIOVEnabled() bool

func SupportedEmulatedMachines

func SupportedEmulatedMachines() []string

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

func (c *ClusterConfig) GetImagePullPolicy() (policy k8sv1.PullPolicy)

func (*ClusterConfig) GetMachineType added in v0.17.0

func (c *ClusterConfig) GetMachineType() string

func (*ClusterConfig) GetMigrationConfig added in v0.16.0

func (c *ClusterConfig) GetMigrationConfig() *MigrationConfig

func (*ClusterConfig) IsUseEmulation added in v0.16.0

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

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"`
}

Jump to

Keyboard shortcuts

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