Documentation ¶
Index ¶
- type NodeDrainer
- func (nd *NodeDrainer) DrainNode() error
- func (nd *NodeDrainer) SetCordonFn(fn cordonFn) *NodeDrainer
- func (nd *NodeDrainer) SetDeletePodFn(fn deletePodFn) *NodeDrainer
- func (nd *NodeDrainer) SetEvictPodFn(fn evictPodFn) *NodeDrainer
- func (nd *NodeDrainer) SetGetPodFn(fn getPodFn) *NodeDrainer
- func (nd *NodeDrainer) SetGetPodsFn(fn getPodsFn) *NodeDrainer
- func (nd *NodeDrainer) SetSupportEvictionFn(fn supportEvictionFn) *NodeDrainer
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeDrainer ¶
NodeDrainer drains a kubernetes node
func NewNodeDrainer ¶
func NewNodeDrainer(k8scli kubernetes.Interface, logger log.Logger, opts Options, node corev1.Node) *NodeDrainer
NewNodeDrainer initialises a new NodeDrainer
func (*NodeDrainer) DrainNode ¶
func (nd *NodeDrainer) DrainNode() error
DrainNode drains a node in a cluster. Its process is as similar as reasonable to the one implemented by kubectl drain.
func (*NodeDrainer) SetCordonFn ¶
func (nd *NodeDrainer) SetCordonFn(fn cordonFn) *NodeDrainer
SetCordonFn sets nd.supportEvictionFn for mocking
func (*NodeDrainer) SetDeletePodFn ¶
func (nd *NodeDrainer) SetDeletePodFn(fn deletePodFn) *NodeDrainer
SetDeletePodFn sets nd.deletePodFn for mocking
func (*NodeDrainer) SetEvictPodFn ¶
func (nd *NodeDrainer) SetEvictPodFn(fn evictPodFn) *NodeDrainer
SetEvictPodFn sets nd.evictPodFn for mocking
func (*NodeDrainer) SetGetPodFn ¶
func (nd *NodeDrainer) SetGetPodFn(fn getPodFn) *NodeDrainer
SetGetPodFn sets nd.getPodFn for mocking
func (*NodeDrainer) SetGetPodsFn ¶
func (nd *NodeDrainer) SetGetPodsFn(fn getPodsFn) *NodeDrainer
SetGetPodsFn sets nd.getPodsFn for mocking
func (*NodeDrainer) SetSupportEvictionFn ¶
func (nd *NodeDrainer) SetSupportEvictionFn(fn supportEvictionFn) *NodeDrainer
SetSupportEvictionFn sets nd.supportEvictionFn for mocking
Click to show internal directories.
Click to hide internal directories.