Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { // List of master nodes. Masters []*v1.Node // List of worker nodes. Workers []*v1.Node // MaxDisruption defines the max no. of nodes that will be rebooted in parallel. // Accepts int eg. '3' for no. of nodes, and string '30%' for percent. // Defaults to 100%. MaxDisruption intstr.IntOrString // contains filtered or unexported fields }
Cluster is a simple abstraction that stores cluster nodes. It allows rebooting the entire cluster / nodes.
func New ¶
func New(client kubernetes.Interface, opts ...Options) (*Cluster, error)
New creates a new Cluster with the given options.
func (*Cluster) RebootAll ¶
RebootAll reboots all the nodes that are accessible ie. have ExternalIP.
func (*Cluster) RebootMasters ¶
RebootMasters reboots all the master nodes that are accessible ie. have ExternalIP.
func (*Cluster) RebootNode ¶
RebootNode reboots a node addressable with `host`. Uses *Cluster sshClient.
type Options ¶
type Options func(c *Cluster)
Options sets Cluster object options.
func WithMaxDisruption ¶
func WithMaxDisruption(d interface{}) Options
WithMaxDisruption defines the no. of parallel nodes rebooting.
func WithSSHIdentityKeyFile ¶
WithSSHIdentityKeyFile defines the path of the key to be used for ssh.
func WithSSHPort ¶
WithSSHPort defines the port to be used for ssh.
func WithSSHUser ¶
WithSSHUser defines the user to be used for ssh.