sunsetting

package
v0.0.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

README

#Nodes Sunsetting plugin

#Design Sunsetting plugin diagram

##Open questions:

    • Weakness Current implementation do not assume that cluster shall survive single node failure.
    • Solution Make configuration checkbox preserve_resources_for_single_node_failure to calculate possible candidates for sunsetting preserving needed spare resources.
    • Weakness Current implementation do not counts that some pods can't be rescheduled based on:
      • Taints and Tolerations
      • Node affinity
      • Inter-pod affinity/anti-affinity
      • PV Claims
      • etc...
    • Possible solution Make all listed checks.

##Note Works only when ProviderID is set. (currently only AWS is supported)
it matches EC2 instances with k8s cluster minions based on next equality: k8s node -> ProviderID === ec2 instance -> Instance ID

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

Directories

Path Synopsis
aws

Jump to

Keyboard shortcuts

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