Documentation ¶
Index ¶
- Constants
- func AreTSCFrequencyTopologyHintsDefined(vmi *k6tv1.VirtualMachineInstance) bool
- func CalculateTSCLabelDiff(frequenciesInUse []int64, frequenciesOnNode []int64, nodeFrequency int64, ...) (toAdd []int64, toRemove []int64)
- func FilterNodesFromCache(objs []interface{}, predicates ...FilterPredicateFunc) []*v1.Node
- func HasInvTSCFrequency(node *v1.Node) bool
- func IsManualTSCFrequencyRequired(vmi *k6tv1.VirtualMachineInstance) bool
- func IsSchedulable(node *v1.Node) bool
- func LowestTSCFrequency(nodes []*v1.Node) int64
- func NewTopologyHinter(nodeStore cache.Store, vmiStore cache.Store, arch string, ...) *topologyHinter
- func TSCFrequenciesOnNode(node *v1.Node) (frequencies []int64)
- func TSCFrequencyFromNode(node *v1.Node) (frequency int64, scalable bool, err error)
- func TSCFrequencyFromPod(pod *v1.Pod) (frequency int64, err error)
- func ToTSCSchedulableLabel(frequency int64) string
- func ToTSCSchedulableLabels(frequencies []int64) (labels []string)
- type FilterPredicateFunc
- type Hinter
- type MockHinter
- func (_m *MockHinter) EXPECT() *_MockHinterRecorder
- func (_m *MockHinter) IsTscFrequencyRequiredForBoot(vmi *v1.VirtualMachineInstance) bool
- func (_m *MockHinter) LowestTSCFrequencyOnCluster() (int64, error)
- func (_m *MockHinter) TSCFrequenciesInUse() []int64
- func (_m *MockHinter) TopologyHintsForVMI(vmi *v1.VirtualMachineInstance) (*v1.TopologyHints, TscFrequencyRequirementType, error)
- type MockNodeTopologyUpdater
- type NodeTopologyUpdater
- type TscFrequencyRequirement
- type TscFrequencyRequirementType
Constants ¶
View Source
const TSCFrequencyLabel = virtv1.CPUTimerLabel + "tsc-frequency"
View Source
const TSCFrequencySchedulingLabel = "scheduling.node.kubevirt.io/tsc-frequency"
View Source
const TSCScalableLabel = virtv1.CPUTimerLabel + "tsc-scalable"
Variables ¶
This section is empty.
Functions ¶
func AreTSCFrequencyTopologyHintsDefined ¶ added in v0.56.0
func AreTSCFrequencyTopologyHintsDefined(vmi *k6tv1.VirtualMachineInstance) bool
func CalculateTSCLabelDiff ¶
func FilterNodesFromCache ¶
func FilterNodesFromCache(objs []interface{}, predicates ...FilterPredicateFunc) []*v1.Node
func HasInvTSCFrequency ¶
func IsManualTSCFrequencyRequired ¶ added in v0.56.0
func IsManualTSCFrequencyRequired(vmi *k6tv1.VirtualMachineInstance) bool
func IsSchedulable ¶
func LowestTSCFrequency ¶
func NewTopologyHinter ¶
func NewTopologyHinter(nodeStore cache.Store, vmiStore cache.Store, arch string, clusterConfig *virtconfig.ClusterConfig) *topologyHinter
func TSCFrequenciesOnNode ¶
func TSCFrequencyFromNode ¶
func ToTSCSchedulableLabel ¶
func ToTSCSchedulableLabels ¶
Types ¶
type FilterPredicateFunc ¶
func NodeOfVMI ¶
func NodeOfVMI(vmi *virtv1.VirtualMachineInstance) FilterPredicateFunc
func Not ¶
func Not(f FilterPredicateFunc) FilterPredicateFunc
func TSCFrequencyGreaterEqual ¶
func TSCFrequencyGreaterEqual(frequency int64) FilterPredicateFunc
type Hinter ¶
type Hinter interface { TopologyHintsForVMI(vmi *k6tv1.VirtualMachineInstance) (hints *k6tv1.TopologyHints, requirement TscFrequencyRequirementType, err error) IsTscFrequencyRequiredForBoot(vmi *k6tv1.VirtualMachineInstance) bool TSCFrequenciesInUse() []int64 LowestTSCFrequencyOnCluster() (int64, error) }
type MockHinter ¶
type MockHinter struct {
// contains filtered or unexported fields
}
Mock of Hinter interface
func NewMockHinter ¶
func NewMockHinter(ctrl *gomock.Controller) *MockHinter
func (*MockHinter) EXPECT ¶
func (_m *MockHinter) EXPECT() *_MockHinterRecorder
func (*MockHinter) IsTscFrequencyRequiredForBoot ¶ added in v0.56.1
func (_m *MockHinter) IsTscFrequencyRequiredForBoot(vmi *v1.VirtualMachineInstance) bool
func (*MockHinter) LowestTSCFrequencyOnCluster ¶
func (_m *MockHinter) LowestTSCFrequencyOnCluster() (int64, error)
func (*MockHinter) TSCFrequenciesInUse ¶
func (_m *MockHinter) TSCFrequenciesInUse() []int64
func (*MockHinter) TopologyHintsForVMI ¶
func (_m *MockHinter) TopologyHintsForVMI(vmi *v1.VirtualMachineInstance) (*v1.TopologyHints, TscFrequencyRequirementType, error)
type MockNodeTopologyUpdater ¶
type MockNodeTopologyUpdater struct {
// contains filtered or unexported fields
}
Mock of NodeTopologyUpdater interface
func NewMockNodeTopologyUpdater ¶
func NewMockNodeTopologyUpdater(ctrl *gomock.Controller) *MockNodeTopologyUpdater
func (*MockNodeTopologyUpdater) EXPECT ¶
func (_m *MockNodeTopologyUpdater) EXPECT() *_MockNodeTopologyUpdaterRecorder
func (*MockNodeTopologyUpdater) Run ¶
func (_m *MockNodeTopologyUpdater) Run(interval time.Duration, stopChan <-chan struct{})
type NodeTopologyUpdater ¶
func NewNodeTopologyUpdater ¶
func NewNodeTopologyUpdater(clientset kubecli.KubevirtClient, hinter Hinter, nodeInformer cache.SharedIndexInformer) NodeTopologyUpdater
type TscFrequencyRequirement ¶ added in v0.56.1
type TscFrequencyRequirement struct { Type TscFrequencyRequirementType Reason string }
func GetTscFrequencyRequirement ¶ added in v0.56.1
func GetTscFrequencyRequirement(vmi *k6tv1.VirtualMachineInstance) TscFrequencyRequirement
type TscFrequencyRequirementType ¶ added in v0.56.1
type TscFrequencyRequirementType int
const ( RequiredForBoot TscFrequencyRequirementType = iota RequiredForMigration NotRequired )
Click to show internal directories.
Click to hide internal directories.