Documentation ¶
Index ¶
Constants ¶
View Source
const ( // EvictionKind represents the kind of evictions object EvictionKind = "Eviction" // EvictionSubresource represents the kind of evictions object as Pod's subresource EvictionSubresource = "pods/eviction" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Evictor ¶
Evictor contains the parameters to control the behaviour of the evictor
func New ¶
func New(clientSet kubernetes.Interface, maxGracePeriod time.Duration, ignoreDaemonSets []metav1.ObjectMeta, disableEviction bool) *Evictor
func (*Evictor) CanUseEvictions ¶
CanUseEvictions uses Discovery API to find out if evictions are supported
func (*Evictor) EvictOrDeletePod ¶
EvictOrDeletePod will evict Pod if policy API is available, otherwise deletes it. If disableEviction is true, we skip straight to the delete step NOTE: CanUseEvictions must be called prior to this
func (*Evictor) GetPodsForEviction ¶
func (d *Evictor) GetPodsForEviction(nodeName string) (*PodDeleteList, []error)
GetPodsForEviction lists all pods on a given node, filters those using the default filters, and returns PodDeleteList along with any errors. All pods that are ready to be deleted can be obtained with .Pods(), and string with all warning can be obtained with .Warnings()
type PodDelete ¶
type PodDelete struct { Pod corev1.Pod Status PodDeleteStatus }
type PodDeleteList ¶
type PodDeleteList struct {
Items []PodDelete
}
func (*PodDeleteList) Pods ¶
func (l *PodDeleteList) Pods() []corev1.Pod
func (*PodDeleteList) Warnings ¶
func (l *PodDeleteList) Warnings() string
type PodDeleteStatus ¶
Click to show internal directories.
Click to hide internal directories.