Documentation ¶
Index ¶
- Constants
- func Contains(list []string, strToSearch string) bool
- func Copy(m *clusterv1.Machine) *clusterv1.Machine
- func ExecCommand(name string, args ...string) (string, error)
- func Filter(list []string, strToFilter string) (newList []string)
- func GetControlPlaneMachine(machines []*clusterv1.Machine) *clusterv1.Machine
- func GetControlPlaneMachines(machines []*clusterv1.Machine) (res []*clusterv1.Machine)
- func GetDefaultKubeConfigPath() string
- func GetMachineIfExists(c client.Client, namespace, name string) (*clusterv1.Machine, error)
- func GetNamespaceOrDefault(namespace string) string
- func HasOwner(refList []metav1.OwnerReference, apiVersion string, kinds []string) bool
- func Home() string
- func IsControlPlaneMachine(machine *clusterv1.Machine) bool
- func IsNodeReady(node *v1.Node) bool
- func ParseClusterYaml(file string) (*clusterv1.Cluster, error)
- func ParseMachinesYaml(file string) ([]*clusterv1.Machine, error)
- func PointsTo(refs []metav1.OwnerReference, target *metav1.ObjectMeta) bool
- func Poll(interval, timeout time.Duration, condition wait.ConditionFunc) error
- func PollImmediate(interval, timeout time.Duration, condition wait.ConditionFunc) error
- func RandomString(n int) string
- func RandomToken() string
- func Retry(fn wait.ConditionFunc, initialBackoffSec int) error
Constants ¶
const ( // CharSet defines the alphanumeric set for random string generation CharSet = "0123456789abcdefghijklmnopqrstuvwxyz" // MachineListFormatDeprecationMessage notifies the user that the old // MachineList format is no longer supported MachineListFormatDeprecationMessage = "Your MachineList items must include Kind and APIVersion" )
Variables ¶
This section is empty.
Functions ¶
func ExecCommand ¶
ExecCommand Executes a local command in the current shell.
func GetControlPlaneMachine ¶
GetControlPlaneMachine returns a control plane machine from input. Deprecated: use GetControlPlaneMachines.
func GetControlPlaneMachines ¶
GetControlPlaneMachines returns a slice containing control plane machines.
func GetDefaultKubeConfigPath ¶
func GetDefaultKubeConfigPath() string
GetDefaultKubeConfigPath returns the standard user kubeconfig
func GetMachineIfExists ¶
GetMachineIfExists gets a machine from the API server if it exists
func GetNamespaceOrDefault ¶
GetNamespaceOrDefault returns the default namespace if given empty output.
func HasOwner ¶ added in v0.1.9
func HasOwner(refList []metav1.OwnerReference, apiVersion string, kinds []string) bool
HasOwner checks if any of the references in the past list match the given apiVersion and one of the given kinds
func IsControlPlaneMachine ¶
IsControlPlaneMachine checks machine is a control plane node.
func IsNodeReady ¶
IsNodeReady returns true if a node is ready.
func ParseClusterYaml ¶
ParseClusterYaml parses a YAML file for cluster objects.
func ParseMachinesYaml ¶
ParseMachinesYaml extracts machine objects from a file.
func PointsTo ¶ added in v0.1.9
func PointsTo(refs []metav1.OwnerReference, target *metav1.ObjectMeta) bool
Returns true if any of the owner references point to the given target
func PollImmediate ¶
func PollImmediate(interval, timeout time.Duration, condition wait.ConditionFunc) error
func RandomString ¶
RandomString returns a random alphanumeric string.
Types ¶
This section is empty.