Documentation ¶
Index ¶
- Constants
- func AllocateDeviceVolume(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ...) (fits bool, units []cache.AllocatedUnit, err error)
- func AllocateLVMVolume(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ...) (fits bool, units []cache.AllocatedUnit, err error)
- func AllocateMountPointVolume(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ...) (fits bool, units []cache.AllocatedUnit, err error)
- func Binpack(pod *corev1.Pod, pvc *corev1.PersistentVolumeClaim, node *corev1.Node, ...) (fits bool, units []cache.AllocatedUnit, err error)
- func CheckExclusiveResourceMeetsPVCSize(resource localtype.VolumeType, ers []cache.ExclusiveResource, ...) (fits bool, units []cache.AllocatedUnit, err error)
- func DivideLVMPVCs(pvcs []*corev1.PersistentVolumeClaim, ctx *algorithm.SchedulingContext) (pvcsWithVG, pvcsWithoutVG []*corev1.PersistentVolumeClaim)
- func DividePVCAccordingToMediaType(pvcs []*corev1.PersistentVolumeClaim, ...) (pvcsWithTypeSSD, pvcsWithTypeHDD []*corev1.PersistentVolumeClaim, err error)
- func GetCacheDeviceCount(node *corev1.Node, ctx *algorithm.SchedulingContext) (count int64, err error)
- func GetCacheMPCount(node *corev1.Node, ctx *algorithm.SchedulingContext) (count int64, err error)
- func GetFreeDevice(node *corev1.Node, ctx *algorithm.SchedulingContext) (freeDeviceSSD, freeDeviceHDD []cache.ExclusiveResource, err error)
- func GetFreeMP(node *corev1.Node, ctx *algorithm.SchedulingContext) (freeMPSSD, freeMPHDD []cache.ExclusiveResource, err error)
- func GetNodeVGMap(node *corev1.Node, ctx *algorithm.SchedulingContext) (cacheVGsMap map[cache.ResourceName]cache.SharedResource, err error)
- func HandleInlineLVMVolume(ctx *algorithm.SchedulingContext, node *corev1.Node, pod *corev1.Pod) (fits bool, units []cache.AllocatedUnit, err error)
- func ProcessDevicePVC(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ...) (fits bool, units []cache.AllocatedUnit, err error)
- func ProcessLVMPVCPredicate(pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ...) (fits bool, units []cache.AllocatedUnit, err error)
- func ProcessLVMPVCPriority(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ...) (fits bool, units []cache.AllocatedUnit, err error)
- func ProcessMPPVC(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ...) (fits bool, units []cache.AllocatedUnit, err error)
- func ProcessSnapshotPVC(pvcs []*corev1.PersistentVolumeClaim, nodeName string, ...) (fits bool, err error)
- func ScoreDevice(units []cache.AllocatedUnit) (score int)
- func ScoreDeviceVolume(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ...) (score int, units []cache.AllocatedUnit, err error)
- func ScoreInlineLVMVolume(pod *corev1.Pod, node *corev1.Node, ctx *algorithm.SchedulingContext) (score int, units []cache.AllocatedUnit, err error)
- func ScoreLVM(units []cache.AllocatedUnit, ...) (score int)
- func ScoreLVMVolume(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ...) (score int, units []cache.AllocatedUnit, err error)
- func ScoreMP(units []cache.AllocatedUnit) (score int)
- func ScoreMountPointVolume(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ...) (score int, units []cache.AllocatedUnit, err error)
- func Spread(pod *corev1.Pod, pvc *corev1.PersistentVolumeClaim, node *corev1.Node, ...) (fits bool, units []cache.AllocatedUnit, err error)
Constants ¶
View Source
const MaxScore int = 10
View Source
const MinScore int = 0
Variables ¶
This section is empty.
Functions ¶
func AllocateDeviceVolume ¶
func AllocateDeviceVolume(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ctx *algorithm.SchedulingContext) (fits bool, units []cache.AllocatedUnit, err error)
func AllocateLVMVolume ¶
func AllocateLVMVolume(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ctx *algorithm.SchedulingContext) (fits bool, units []cache.AllocatedUnit, err error)
AllocateLVMVolume contains two policy: BINPACK/SPREAD
func AllocateMountPointVolume ¶
func AllocateMountPointVolume( pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ctx *algorithm.SchedulingContext) (fits bool, units []cache.AllocatedUnit, err error)
func Binpack ¶
func Binpack(pod *corev1.Pod, pvc *corev1.PersistentVolumeClaim, node *corev1.Node, cacheVGsMap map[cache.ResourceName]cache.SharedResource) (fits bool, units []cache.AllocatedUnit, err error)
func CheckExclusiveResourceMeetsPVCSize ¶
func CheckExclusiveResourceMeetsPVCSize(resource localtype.VolumeType, ers []cache.ExclusiveResource, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ctx *algorithm.SchedulingContext) (fits bool, units []cache.AllocatedUnit, err error)
func DivideLVMPVCs ¶
func DivideLVMPVCs(pvcs []*corev1.PersistentVolumeClaim, ctx *algorithm.SchedulingContext) (pvcsWithVG, pvcsWithoutVG []*corev1.PersistentVolumeClaim)
DivideLVMPVCs divide pvcs into pvcsWithVG and pvcsWithoutVG
func DividePVCAccordingToMediaType ¶
func DividePVCAccordingToMediaType(pvcs []*corev1.PersistentVolumeClaim, scLister storagelisters.StorageClassLister) (pvcsWithTypeSSD, pvcsWithTypeHDD []*corev1.PersistentVolumeClaim, err error)
DividePVCAccordingToMediaType divide pvcs into pvcsWithSSD and pvcsWithHDD
func GetCacheDeviceCount ¶
func GetCacheDeviceCount(node *corev1.Node, ctx *algorithm.SchedulingContext) (count int64, err error)
GetCacheDeviceCount get Device count from ClusterNodeCache
func GetCacheMPCount ¶
GetCacheMPCount get MP count from ClusterNodeCache
func GetFreeDevice ¶
func GetFreeDevice(node *corev1.Node, ctx *algorithm.SchedulingContext) (freeDeviceSSD, freeDeviceHDD []cache.ExclusiveResource, err error)
GetFreeDevice divide nodeCache.Devices into freeDeviceSSD and freeDeviceHDD
func GetFreeMP ¶
func GetFreeMP(node *corev1.Node, ctx *algorithm.SchedulingContext) (freeMPSSD, freeMPHDD []cache.ExclusiveResource, err error)
GetFreeMP divide nodeCache.MountPoints into freeMPSSD and freeMPHDD
func GetNodeVGMap ¶
func GetNodeVGMap(node *corev1.Node, ctx *algorithm.SchedulingContext) (cacheVGsMap map[cache.ResourceName]cache.SharedResource, err error)
GetNodeVGMap make a copy map of NodeCache VGs
func HandleInlineLVMVolume ¶ added in v0.5.0
func HandleInlineLVMVolume(ctx *algorithm.SchedulingContext, node *corev1.Node, pod *corev1.Pod) (fits bool, units []cache.AllocatedUnit, err error)
func ProcessDevicePVC ¶
func ProcessDevicePVC(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ctx *algorithm.SchedulingContext) (fits bool, units []cache.AllocatedUnit, err error)
func ProcessLVMPVCPredicate ¶
func ProcessLVMPVCPredicate(pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ctx *algorithm.SchedulingContext) (fits bool, units []cache.AllocatedUnit, err error)
func ProcessLVMPVCPriority ¶
func ProcessLVMPVCPriority(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ctx *algorithm.SchedulingContext) (fits bool, units []cache.AllocatedUnit, err error)
func ProcessMPPVC ¶
func ProcessMPPVC(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ctx *algorithm.SchedulingContext) (fits bool, units []cache.AllocatedUnit, err error)
func ProcessSnapshotPVC ¶
func ProcessSnapshotPVC(pvcs []*corev1.PersistentVolumeClaim, nodeName string, coreV1Informers corev1informers.Interface, snapshotInformers volumesnapshotinformers.Interface) (fits bool, err error)
If there is no readonly snapshot pvc, just return true
func ScoreDevice ¶
func ScoreDevice(units []cache.AllocatedUnit) (score int)
func ScoreDeviceVolume ¶
func ScoreDeviceVolume( pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ctx *algorithm.SchedulingContext) (score int, units []cache.AllocatedUnit, err error)
func ScoreInlineLVMVolume ¶ added in v0.5.0
func ScoreInlineLVMVolume(pod *corev1.Pod, node *corev1.Node, ctx *algorithm.SchedulingContext) (score int, units []cache.AllocatedUnit, err error)
func ScoreLVM ¶
func ScoreLVM(units []cache.AllocatedUnit, cacheVGsMap map[cache.ResourceName]cache.SharedResource) (score int)
func ScoreLVMVolume ¶
func ScoreLVMVolume(pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ctx *algorithm.SchedulingContext) (score int, units []cache.AllocatedUnit, err error)
不需要单独处理 readonly snapshot, 因为若filter阶段只选出一个node,不会进入score。
func ScoreMP ¶
func ScoreMP(units []cache.AllocatedUnit) (score int)
func ScoreMountPointVolume ¶
func ScoreMountPointVolume( pod *corev1.Pod, pvcs []*corev1.PersistentVolumeClaim, node *corev1.Node, ctx *algorithm.SchedulingContext) (score int, units []cache.AllocatedUnit, err error)
func Spread ¶
func Spread(pod *corev1.Pod, pvc *corev1.PersistentVolumeClaim, node *corev1.Node, cacheVGsMap map[cache.ResourceName]cache.SharedResource) (fits bool, units []cache.AllocatedUnit, err error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.