Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Drainer ¶
type Drainer struct {
// contains filtered or unexported fields
}
Drainer will store Kubernetes client that will be used in the cordon and drain operation. Use 'NewK8sClientsetFromKubeconfigPath' or 'NewK8sClientsetFromKubeconfigBytes' to generate one.
func NewK8sClientsetFromKubeconfigBytes ¶
NewK8sClientsetFromKubeconfigBytes takes byte slice of Kubeconfig file and returns Drainer pointer and error (if any)
func NewK8sClientsetFromKubeconfigPath ¶
NewK8sClientsetFromKubeconfigPath takes file path to Kubeconfig file and returns Drainer pointer and error (if any)
func (*Drainer) CordonAndDrainNode ¶
CordonAndDrainNode will set nodeName to unschedulable and release all workloads running inside it. If the node has been cordoned and drained, it will not raise any error. If the node is not found, it will return an error.
func (*Drainer) CordonNode ¶
CordonNode will set nodeName to unschedulable. If the node has been cordoned, it will not raise any error.