Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPlugin ¶
func NewPlugin() proto.PluginClient
Types ¶
type EntriesByRequestedRAM ¶
type EntriesByRequestedRAM []*InstanceEntry
EntriesByRequestedRAM implements sort.Interface based on the value returned by NodeResourceRequirements.RAMRequested().
func NewSortedEntriesByRequestedRAM ¶
func NewSortedEntriesByRequestedRAM(in []*InstanceEntry) EntriesByRequestedRAM
NewSortedEntriesByRequestedRAM makes deep copy of passed slice and invoke sort.Sort on it NewSortedEntriesByRequestedRAM returns copied slice sorted in descending order
func (EntriesByRequestedRAM) Len ¶
func (e EntriesByRequestedRAM) Len() int
func (EntriesByRequestedRAM) Less ¶
func (e EntriesByRequestedRAM) Less(i, j int) bool
func (EntriesByRequestedRAM) Swap ¶
func (e EntriesByRequestedRAM) Swap(i, j int)
type EntriesByWastedRAM ¶
type EntriesByWastedRAM []*InstanceEntry
EntriesByWastedRAM implements sort.Interface based on the value returned by NodeResourceRequirements.RAMWasted().
func NewSortedEntriesByWastedRAM ¶
func NewSortedEntriesByWastedRAM(in []*InstanceEntry) EntriesByWastedRAM
NewSortedEntriesByWastedRAM makes deep copy of passed slice and invoke sort.Sort on it NewSortedEntriesByWastedRAM returns copied slice sorted in descending order
func (EntriesByWastedRAM) Len ¶
func (e EntriesByWastedRAM) Len() int
func (EntriesByWastedRAM) Less ¶
func (e EntriesByWastedRAM) Less(i, j int) bool
func (EntriesByWastedRAM) Swap ¶
func (e EntriesByWastedRAM) Swap(i, j int)
type InstanceEntry ¶
type InstanceEntry struct { CloudProvider cloudprovider.ComputeInstance `json:"cloudProvider"` Price cloudprovider.ProductPrice `json:"price"` WorkerNode kube.NodeResourceRequirements `json:"kube"` }
InstanceEntry struct represents Kelly's "instances to sunset" table entry, It consists of some k8s cluster worker node params ans some ec2 instance params
func CheckAllPodsAtATime ¶
func CheckAllPodsAtATime(unsortedEntries []*InstanceEntry) []InstanceEntry
CheckAllPodsAtATime makes simple check that it is possible to move all pods of a node to another node.
func CheckEachPodOneByOne ¶
func CheckEachPodOneByOne(unsortedEntries []*InstanceEntry) []InstanceEntry
func (*InstanceEntry) CPUWasted ¶
func (m *InstanceEntry) CPUWasted() int64
func (*InstanceEntry) RAMRequested ¶
func (m *InstanceEntry) RAMRequested() int64
func (*InstanceEntry) RAMWasted ¶
func (m *InstanceEntry) RAMWasted() int64