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 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 MatchesKubeadmBootstrapConfig(machineConfigs map[string]*bootstrapv1.KubeadmConfig, ...) 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 ¶ added in v0.3.7
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
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
ControlPlaneSelectorForCluster returns the label selector necessary to get control plane machines for a given cluster.
func HasControllerRef ¶ added in v0.3.7
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 MatchesKCPConfiguration ¶ added in v0.3.7
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 ¶ 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 ¶
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 ¶ added in v0.3.7
func IsReady() Func
IsReady returns a filter to find all machines with the ReadyCondition equals to True.
func MatchesKubeadmBootstrapConfig ¶ added in v0.3.7
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 ¶ added in v0.3.7
MatchesKubernetesVersion returns a filter to find all machines that match a given Kubernetes version.
func MatchesTemplateClonedFrom ¶ added in v0.3.7
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 ShouldRolloutAfter ¶ added in v0.3.7
ShouldRolloutAfter returns a filter to find all machines where CreationTimestamp < rolloutAfter < reconciliationTIme