machinefilters

package
v0.3.7-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdoptableControlPlaneMachines added in v0.3.7

func AdoptableControlPlaneMachines(clusterName string) func(machine *clusterv1.Machine) bool

AdoptableControlPlaneMachines returns a filter to find all un-controlled control plane machines. Usage: managementCluster.GetMachinesForCluster(ctx, cluster, AdoptableControlPlaneMachines(cluster.Name, controlPlane))

func ControlPlaneMachines added in v0.3.7

func ControlPlaneMachines(clusterName string) func(machine *clusterv1.Machine) bool

ControlPlaneMachines returns a filter to find all control plane machines for a cluster, regardless of ownership. Usage: managementCluster.GetMachinesForCluster(ctx, cluster, machinefilters.ControlPlaneMachines(cluster.Name))

func ControlPlaneSelectorForCluster added in v0.3.7

func ControlPlaneSelectorForCluster(clusterName string) labels.Selector

ControlPlaneSelectorForCluster returns the label selector necessary to get control plane machines for a given cluster.

func HasControllerRef added in v0.3.7

func HasControllerRef(machine *clusterv1.Machine) bool

HasControllerRef is a filter that returns true if the machine has a controller ref

func HasDeletionTimestamp

func HasDeletionTimestamp(machine *clusterv1.Machine) bool

HasDeletionTimestamp returns a filter to find all machines that have a deletion timestamp.

func OwnedMachines added in v0.3.7

func OwnedMachines(owner controllerutil.Object) func(machine *clusterv1.Machine) bool

OwnedMachines returns a filter to find all owned control plane machines. Usage: managementCluster.GetMachinesForCluster(ctx, cluster, machinefilters.OwnedMachines(controlPlane))

Types

type Func

type Func func(machine *clusterv1.Machine) bool

func And

func And(filters ...Func) Func

And returns a filter that returns true if all of the given filters returns true.

func HasAnnotationKey

func HasAnnotationKey(key string) Func

HasAnnotationKey returns a filter to find all machines that have the specified Annotation key present

func InFailureDomains

func InFailureDomains(failureDomains ...*string) Func

InFailureDomains returns a filter to find all machines in any of the given failure domains

func IsReady added in v0.3.7

func IsReady() Func

IsReady returns a filter to find all machines with the ReadyCondition equals to True.

func MatchesConfigurationHash

func MatchesConfigurationHash(configHash string) Func

MatchesConfigurationHash returns a filter to find all machines that match a given KubeadmControlPlane configuration hash.

func Not

func Not(mf Func) Func

Not returns a filter that returns the opposite of the given filter.

func OlderThan

func OlderThan(t *metav1.Time) Func

OlderThan returns a filter to find all machines that have a CreationTimestamp earlier than the given time.

func Or

func Or(filters ...Func) Func

Or returns a filter that returns true if any of the given filters returns true.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL