eviction

package
v0.3.31 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewControllerRecommendationInfoMap added in v0.3.30

func NewControllerRecommendationInfoMap(client client.Client, podRecommendations []*datahub_v1alpha1.PodRecommendation) map[string]*controllerRecommendationInfo

Types

type Config

type Config struct {
	CheckCycle              int64            `mapstructure:"check-cycle"`
	Enable                  bool             `mapstructure:"enable"`
	TriggerThreshold        triggerThreshold `mapstructure:"trigger-threshold"`
	PurgeContainerCPUMemory bool             `mapstructure:"purge-container-cpu-memory"`
}

Config is eviction configuration

func NewDefaultConfig

func NewDefaultConfig() Config

NewDefaultConfig returns Config instance

func (*Config) Validate

func (c *Config) Validate() error

type EvictionRestriction added in v0.3.28

type EvictionRestriction interface {
	IsEvictabel(pod *core_v1.Pod) (isEvictabel bool, err error)
}

func NewEvictionRestriction added in v0.3.28

func NewEvictionRestriction(client client.Client, preservationPercentage float64, triggerThreshold triggerThreshold, podRecommendations []*datahub_v1alpha1.PodRecommendation) EvictionRestriction

type Evictioner

type Evictioner struct {
	// contains filtered or unexported fields
}

Evictioner deletes pods which need to apply recommendation

func NewEvictioner

func NewEvictioner(checkCycle int64,
	datahubClnt datahub_v1alpha1.DatahubServiceClient,
	k8sClienit client.Client,
	evictCfg Config,
	purgeContainerCPUMemory bool) *Evictioner

NewEvictioner return Evictioner instance

func (*Evictioner) Start

func (evictioner *Evictioner) Start()

Start checking pods need to apply recommendation

Jump to

Keyboard shortcuts

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