Documentation ¶
Index ¶
- Constants
- func IsMaster(node corev1.Node) bool
- type NodeMap
- type UtilsClient
- func (utilsClient *UtilsClient) ChangeNCNCordonState(ncn string, cordoned bool) error
- func (utilsClient *UtilsClient) CordonNCN(ncn string) error
- func (utilsClient *UtilsClient) DeleteNCN(ncn string) error
- func (utilsClient *UtilsClient) DrainNCN(ncn string) error
- func (utilsClient *UtilsClient) GetNodes() (nodeMap NodeMap, err error)
- func (utilsClient *UtilsClient) IsMember(ncn string) (bool, error)
- func (utilsClient *UtilsClient) UnCordonNCN(ncn string) error
Constants ¶
View Source
const MinMasters = 1
MinMasters - Minimum number of master nodes the cluster can survive with.
View Source
const MinWorkers = 2
MinWorkers - Minimum number of workers nodes the cluster can survive with.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UtilsClient ¶
type UtilsClient struct { Logger kubernetesLogger // contains filtered or unexported fields }
UtilsClient - Structure for kubernetes client.
func NewKubernetesClient ¶
func NewKubernetesClient(kubeconfig string) (utilsClient *UtilsClient, err error)
NewKubernetesClient - Creates a new kubernetes client.
func (*UtilsClient) ChangeNCNCordonState ¶
func (utilsClient *UtilsClient) ChangeNCNCordonState(ncn string, cordoned bool) error
ChangeNCNCordonState - Cordons or uncordons the given NCN.
func (*UtilsClient) CordonNCN ¶
func (utilsClient *UtilsClient) CordonNCN(ncn string) error
CordonNCN - Cordons the given NCN.
func (*UtilsClient) DeleteNCN ¶
func (utilsClient *UtilsClient) DeleteNCN(ncn string) error
DeleteNCN - Deletes the NCN from Kubernetes.
func (*UtilsClient) DrainNCN ¶
func (utilsClient *UtilsClient) DrainNCN(ncn string) error
DrainNCN - Draining an NCN is really 3 individual steps:
- Cordon the node.
- Identify any pods that might be on that node in violation of any pod distribution budgets and move them.
- Drain the node.
func (*UtilsClient) GetNodes ¶
func (utilsClient *UtilsClient) GetNodes() (nodeMap NodeMap, err error)
GetNodes - Returns a map of all the nodes.
func (*UtilsClient) IsMember ¶
func (utilsClient *UtilsClient) IsMember(ncn string) (bool, error)
IsMember - Returns true if the given NCN is a member of Kubernetes.
func (*UtilsClient) UnCordonNCN ¶
func (utilsClient *UtilsClient) UnCordonNCN(ncn string) error
UnCordonNCN - Uncordons the given NCN.
Click to show internal directories.
Click to hide internal directories.