Documentation
¶
Index ¶
- func AdoptableControlPlaneMachines(clusterName string) func(machine *clusterv1.Machine) bool
- func ControlPlaneMachines(clusterName string) func(machine *clusterv1.Machine) bool
- func ControlPlaneSelectorForCluster(clusterName string) labels.Selector
- func HasControllerRef(machine *clusterv1.Machine) bool
- func HasDeletionTimestamp(machine *clusterv1.Machine) bool
- func HasUnhealthyCondition(machine *clusterv1.Machine) bool
- func MatchesKCPConfiguration(infraConfigs map[string]*unstructured.Unstructured, ...) func(machine *clusterv1.Machine) bool
- func OwnedMachines(owner controllerutil.Object) func(machine *clusterv1.Machine) bool
- type Func
- func And(filters ...Func) Func
- func HasAnnotationKey(key string) Func
- func InFailureDomains(failureDomains ...*string) Func
- func IsReady() Func
- func MatchesKThreesBootstrapConfig(machineConfigs map[string]*bootstrapv1.KThreesConfig, ...) Func
- func MatchesKubernetesVersion(kubernetesVersion string) Func
- func MatchesTemplateClonedFrom(infraConfigs map[string]*unstructured.Unstructured, ...) Func
- func Not(mf Func) Func
- func Or(filters ...Func) Func
- func ShouldRolloutAfter(reconciliationTime, rolloutAfter *metav1.Time) Func
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdoptableControlPlaneMachines ¶
AdoptableControlPlaneMachines returns a filter to find all un-controlled control plane machines. Usage: managementCluster.GetMachinesForCluster(ctx, cluster, AdoptableControlPlaneMachines(cluster.Name, controlPlane))
func ControlPlaneMachines ¶
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 ¶
ControlPlaneSelectorForCluster returns the label selector necessary to get control plane machines for a given cluster.
func HasControllerRef ¶
HasControllerRef is a filter that returns true if the machine has a controller ref
func HasDeletionTimestamp ¶
HasDeletionTimestamp returns a filter to find all machines that have a deletion timestamp.
func HasUnhealthyCondition ¶
HasUnhealthyCondition returns a filter to find all machines that have a MachineHealthCheckSucceeded condition set to False, indicating a problem was detected on the machine, and the MachineOwnerRemediated condition set, indicating that KCP is responsible of performing remediation as owner of the machine.
func MatchesKCPConfiguration ¶
func MatchesKCPConfiguration(infraConfigs map[string]*unstructured.Unstructured, machineConfigs map[string]*bootstrapv1.KThreesConfig, kcp *controlplanev1.KThreesControlPlane) func(machine *clusterv1.Machine) bool
MatchesKCPConfiguration returns a filter to find all machines that matches with KCP config and do not require any rollout. Kubernetes version, infrastructure template, and KThreesConfig field need to be equivalent.
func OwnedMachines ¶
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 ¶
func HasAnnotationKey ¶
HasAnnotationKey returns a filter to find all machines that have the specified Annotation key present
func InFailureDomains ¶
InFailureDomains returns a filter to find all machines in any of the given failure domains
func IsReady ¶
func IsReady() Func
IsReady returns a filter to find all machines with the ReadyCondition equals to True.
func MatchesKThreesBootstrapConfig ¶
func MatchesKThreesBootstrapConfig(machineConfigs map[string]*bootstrapv1.KThreesConfig, kcp *controlplanev1.KThreesControlPlane) Func
MatchesKThreesBootstrapConfig checks if machine's KThreesConfigSpec is equivalent with KCP's KThreesConfigSpec.
func MatchesKubernetesVersion ¶
MatchesKubernetesVersion returns a filter to find all machines that match a given Kubernetes version.
func MatchesTemplateClonedFrom ¶
func MatchesTemplateClonedFrom(infraConfigs map[string]*unstructured.Unstructured, kcp *controlplanev1.KThreesControlPlane) Func
MatchesTemplateClonedFrom returns a filter to find all machines that match a given KCP infra template.
func ShouldRolloutAfter ¶
ShouldRolloutAfter returns a filter to find all machines where CreationTimestamp < rolloutAfter < reconciliationTIme