Documentation ¶
Index ¶
Constants ¶
const MetricsNameKillPod = "kill_pod"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsynchronizedPodKiller ¶
AsynchronizedPodKiller pushed killing actions into a queue and returns true directly, another go routine will be responsible to perform killing actions instead.
func (*AsynchronizedPodKiller) EvictPod ¶
func (a *AsynchronizedPodKiller) EvictPod(rp *rule.RuledEvictPod) error
func (*AsynchronizedPodKiller) EvictPods ¶
func (a *AsynchronizedPodKiller) EvictPods(rpList rule.RuledEvictPodList) error
func (*AsynchronizedPodKiller) Name ¶
func (a *AsynchronizedPodKiller) Name() string
func (*AsynchronizedPodKiller) Start ¶
func (a *AsynchronizedPodKiller) Start(ctx context.Context)
type DeletionAPIKiller ¶
type DeletionAPIKiller struct {
// contains filtered or unexported fields
}
DeletionAPIKiller implements Killer interface it evict those given pods by calling pod deletion API.
func NewDeletionAPIKiller ¶
func NewDeletionAPIKiller(client kubernetes.Interface, recorder events.EventRecorder, emitter metrics.MetricEmitter) *DeletionAPIKiller
func (*DeletionAPIKiller) Name ¶
func (d *DeletionAPIKiller) Name() string
type DummyKiller ¶
type DummyKiller struct{}
DummyKiller is a stub implementation for Killer interface.
func (DummyKiller) Name ¶
func (d DummyKiller) Name() string
type DummyPodKiller ¶
type DummyPodKiller struct{}
DummyPodKiller is a stub implementation for Killer interface.
func (DummyPodKiller) EvictPod ¶
func (d DummyPodKiller) EvictPod(*rule.RuledEvictPod) error
func (DummyPodKiller) EvictPods ¶
func (d DummyPodKiller) EvictPods(rule.RuledEvictPodList) error
func (DummyPodKiller) Name ¶
func (d DummyPodKiller) Name() string
func (DummyPodKiller) Start ¶
func (d DummyPodKiller) Start(_ context.Context)
type EvictionAPIKiller ¶
type EvictionAPIKiller struct {
// contains filtered or unexported fields
}
EvictionAPIKiller implements Killer interface it evict those given pods by eviction API, and wait until pods have actually been deleted.
func NewEvictionAPIKiller ¶
func NewEvictionAPIKiller(client kubernetes.Interface, recorder events.EventRecorder, emitter metrics.MetricEmitter) *EvictionAPIKiller
NewEvictionAPIKiller returns a new updater Object.
func (*EvictionAPIKiller) Name ¶
func (e *EvictionAPIKiller) Name() string
type Killer ¶
type Killer interface { // Name returns name as identifier for a specific Killer. Name() string // Evict for given pods and corresponding graceful period seconds. Evict(ctx context.Context, pod *v1.Pod, gracePeriodSeconds int64, reason string) error }
Killer implements pod eviction logic.
type PodKiller ¶
type PodKiller interface { // Name returns name as identifier for a specific Killer. Name() string // Start pod killer logic, prepare to receive on-killing pods. Start(ctx context.Context) // EvictPods send on-killing pods to pod killer. EvictPods(rpList rule.RuledEvictPodList) error // EvictPod a pod with the specified grace period. EvictPod(rp *rule.RuledEvictPod) error }
PodKiller implements the killing actions for given pods.
func NewAsynchronizedPodKiller ¶
func NewAsynchronizedPodKiller(killer Killer, client kubernetes.Interface) PodKiller
type SynchronizedPodKiller ¶
type SynchronizedPodKiller struct {
// contains filtered or unexported fields
}
SynchronizedPodKiller trigger killing actions immediately after receiving killing requests; only returns true if all pods are successfully evicted.
func (*SynchronizedPodKiller) EvictPod ¶
func (s *SynchronizedPodKiller) EvictPod(rp *rule.RuledEvictPod) error
func (*SynchronizedPodKiller) EvictPods ¶
func (s *SynchronizedPodKiller) EvictPods(rpList rule.RuledEvictPodList) error
func (*SynchronizedPodKiller) Name ¶
func (s *SynchronizedPodKiller) Name() string
func (*SynchronizedPodKiller) Start ¶
func (s *SynchronizedPodKiller) Start(_ context.Context)