cluster-api: sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/machinefilters Index | Files

package machinefilters

import "sigs.k8s.io/cluster-api/controlplane/kubeadm/internal/machinefilters"

Index

Package Files

machine_filters.go

func AdoptableControlPlaneMachines Uses

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 Uses

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 Uses

func ControlPlaneSelectorForCluster(clusterName string) labels.Selector

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

func HasControllerRef Uses

func HasControllerRef(machine *clusterv1.Machine) bool

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

func HasDeletionTimestamp Uses

func HasDeletionTimestamp(machine *clusterv1.Machine) bool

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

func MatchesKCPConfiguration Uses

func MatchesKCPConfiguration(infraConfigs map[string]*unstructured.Unstructured, machineConfigs map[string]*bootstrapv1.KubeadmConfig, kcp *controlplanev1.KubeadmControlPlane) 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 KubeadmConfig field need to be equivalent.

func OwnedMachines Uses

func OwnedMachines(owner client.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))

type Func Uses

type Func func(machine *clusterv1.Machine) bool

func And Uses

func And(filters ...Func) Func

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

func HasAnnotationKey Uses

func HasAnnotationKey(key string) Func

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

func InFailureDomains Uses

func InFailureDomains(failureDomains ...*string) Func

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

func IsReady Uses

func IsReady() Func

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

func MatchesKubeadmBootstrapConfig Uses

func MatchesKubeadmBootstrapConfig(machineConfigs map[string]*bootstrapv1.KubeadmConfig, kcp *controlplanev1.KubeadmControlPlane) Func

MatchesKubeadmBootstrapConfig checks if machine's KubeadmConfigSpec is equivalent with KCP's KubeadmConfigSpec.

func MatchesKubernetesVersion Uses

func MatchesKubernetesVersion(kubernetesVersion string) Func

MatchesKubernetesVersion returns a filter to find all machines that match a given Kubernetes version.

func MatchesTemplateClonedFrom Uses

func MatchesTemplateClonedFrom(infraConfigs map[string]*unstructured.Unstructured, kcp *controlplanev1.KubeadmControlPlane) Func

MatchesTemplateClonedFrom returns a filter to find all machines that match a given KCP infra template.

func Not Uses

func Not(mf Func) Func

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

func Or Uses

func Or(filters ...Func) Func

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

func ShouldRolloutAfter Uses

func ShouldRolloutAfter(reconciliationTime, rolloutAfter *metav1.Time) Func

ShouldRolloutAfter returns a filter to find all machines where CreationTimestamp < rolloutAfter < reconciliationTIme

Package machinefilters imports 13 packages (graph) and is imported by 2 packages. Updated 2020-10-27. Refresh now. Tools for package owners.