framework

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 85 Imported by: 22

README

CAPI e2e testing framework

This framework aims to define common end-to-end patterns that can be reused across Cluster API providers.

See https://cluster-api.sigs.k8s.io/developer/e2e.html for more information.

Documentation

Overview

Package framework implements the test framework.

Index

Constants

This section is empty.

Variables

View Source
var CoreFinalizersAssertionWithClassyClusters = func() map[string]func(types.NamespacedName) []string {
	r := map[string]func(types.NamespacedName) []string{}
	for k, v := range CoreFinalizersAssertionWithLegacyClusters {
		r[k] = v
	}
	r[machineSetKind] = func(_ types.NamespacedName) []string { return []string{clusterv1.MachineSetTopologyFinalizer} }
	r[machineDeploymentKind] = func(_ types.NamespacedName) []string { return []string{clusterv1.MachineDeploymentTopologyFinalizer} }
	return r
}()

CoreFinalizersAssertionWithClassyClusters maps Cluster API core types to their expected finalizers for classy Clusters.

View Source
var CoreFinalizersAssertionWithLegacyClusters = map[string]func(types.NamespacedName) []string{
	// contains filtered or unexported fields
}

CoreFinalizersAssertionWithLegacyClusters maps Cluster API core types to their expected finalizers for legacy Clusters.

View Source
var CoreOwnerReferenceAssertion = map[string]func(types.NamespacedName, []metav1.OwnerReference) error{
	// contains filtered or unexported fields
}

CoreOwnerReferenceAssertion maps Cluster API core types to functions which return an error if the passed OwnerReferences aren't as expected. Note: These relationships are documented in https://github.com/kubernetes-sigs/cluster-api/tree/main/docs/book/src/reference/owner_references.md. That document should be updated if these references change.

View Source
var DockerInfraFinalizersAssertion = map[string]func(types.NamespacedName) []string{
	// contains filtered or unexported fields
}

DockerInfraFinalizersAssertion maps docker infrastructure resource types to their expected finalizers.

View Source
var DockerInfraOwnerReferenceAssertions = map[string]func(types.NamespacedName, []metav1.OwnerReference) error{
	// contains filtered or unexported fields
}

DockerInfraOwnerReferenceAssertions maps Docker Infrastructure types to functions which return an error if the passed OwnerReferences aren't as expected. Note: These relationships are documented in https://github.com/kubernetes-sigs/cluster-api/tree/main/docs/book/src/reference/owner_references.md. That document should be updated if these references change.

View Source
var ExpFinalizersAssertion = map[string]func(types.NamespacedName) []string{
	// contains filtered or unexported fields
}

ExpFinalizersAssertion maps experimental resource types to their expected finalizers.

View Source
var ExpOwnerReferenceAssertions = map[string]func(types.NamespacedName, []metav1.OwnerReference) error{
	// contains filtered or unexported fields
}

ExpOwnerReferenceAssertions maps experimental types to functions which return an error if the passed OwnerReferences aren't as expected. Note: These relationships are documented in https://github.com/kubernetes-sigs/cluster-api/tree/main/docs/book/src/reference/owner_references.md. That document should be updated if these references change.

View Source
var KubeadmBootstrapOwnerReferenceAssertions = map[string]func(types.NamespacedName, []metav1.OwnerReference) error{
	// contains filtered or unexported fields
}

KubeadmBootstrapOwnerReferenceAssertions maps KubeadmBootstrap types to functions which return an error if the passed OwnerReferences aren't as expected. Note: These relationships are documented in https://github.com/kubernetes-sigs/cluster-api/tree/main/docs/book/src/reference/owner_references.md. That document should be updated if these references change.

View Source
var KubeadmControlPlaneFinalizersAssertion = map[string]func(types.NamespacedName) []string{
	// contains filtered or unexported fields
}

KubeadmControlPlaneFinalizersAssertion maps Kubeadm resource types to their expected finalizers.

View Source
var KubeadmControlPlaneOwnerReferenceAssertions = map[string]func(types.NamespacedName, []metav1.OwnerReference) error{
	// contains filtered or unexported fields
}

KubeadmControlPlaneOwnerReferenceAssertions maps Kubeadm control plane types to functions which return an error if the passed OwnerReferences aren't as expected. Note: These relationships are documented in https://github.com/kubernetes-sigs/cluster-api/tree/main/docs/book/src/reference/owner_references.md. That document should be updated if these references change.

View Source
var KubernetesReferenceAssertions = map[string]func(types.NamespacedName, []metav1.OwnerReference) error{
	// contains filtered or unexported fields
}

KubernetesReferenceAssertions maps Kubernetes types to functions which return an error if the passed OwnerReferences aren't as expected. Note: These relationships are documented in https://github.com/kubernetes-sigs/cluster-api/tree/main/docs/book/src/reference/owner_references.md. That document should be updated if these references change.

Functions

func AddDeploymentToWorkloadCluster

func AddDeploymentToWorkloadCluster(ctx context.Context, input AddDeploymentToWorkloadClusterInput)

func AddPodDisruptionBudget

func AddPodDisruptionBudget(ctx context.Context, input AddPodDisruptionBudgetInput)

func AddScaleUpDeploymentAndWait added in v1.5.0

func AddScaleUpDeploymentAndWait(ctx context.Context, input AddScaleUpDeploymentAndWaitInput, intervals ...interface{})

AddScaleUpDeploymentAndWait create a deployment that will trigger the autoscaler to scale up and create a new machine.

func ApplyAutoscalerToWorkloadCluster added in v1.5.0

func ApplyAutoscalerToWorkloadCluster(ctx context.Context, input ApplyAutoscalerToWorkloadClusterInput, intervals ...interface{})

ApplyAutoscalerToWorkloadCluster installs autoscaler on the workload cluster. Installs autoscaler by doing the following: - Create a token on the management cluster with the correct RBAC needed by autoscaler - Applies the workload YAML after processing the yaml (template processing) to the workload cluster. The autoscaler deployment on the workload cluster uses a kubeconfig based on the token created in the above step to access the management cluster.

func AssertControlPlaneFailureDomains

func AssertControlPlaneFailureDomains(ctx context.Context, input AssertControlPlaneFailureDomainsInput)

AssertControlPlaneFailureDomains will look at all control plane machines and see what failure domains they were placed in. If machines were placed in unexpected or wrong failure domains the expectation will fail.

func AssertMachineDeploymentFailureDomains added in v1.2.0

func AssertMachineDeploymentFailureDomains(ctx context.Context, input AssertMachineDeploymentFailureDomainsInput)

AssertMachineDeploymentFailureDomains will look at all MachineDeployment machines and see what failure domains they were placed in. If machines were placed in unexpected or wrong failure domains the expectation will fail.

func AssertMachineDeploymentReplicas added in v1.5.0

func AssertMachineDeploymentReplicas(ctx context.Context, input AssertMachineDeploymentReplicasInput)

func AssertMachinePoolReplicas added in v1.8.0

func AssertMachinePoolReplicas(ctx context.Context, input AssertMachinePoolReplicasInput)

func AssertOwnerReferences added in v1.4.0

func AssertOwnerReferences(namespace, kubeconfigPath string, ownerGraphFilterFunction clusterctlcluster.GetOwnerGraphFilterFunction, assertFuncs ...map[string]func(obj types.NamespacedName, reference []metav1.OwnerReference) error)

func CompleteCommand

func CompleteCommand(cmd *exec.Cmd, desc string, privateArgs bool) *exec.Cmd

CompleteCommand prints a command before running it. Acts as a helper function. privateArgs when true will not print arguments.

func CreateCluster

func CreateCluster(ctx context.Context, input CreateClusterInput, intervals ...interface{})

CreateCluster will create the Cluster and InfraCluster objects.

func CreateKubeadmControlPlane

func CreateKubeadmControlPlane(ctx context.Context, input CreateKubeadmControlPlaneInput, intervals ...interface{})

CreateKubeadmControlPlane creates the control plane object and necessary dependencies.

func CreateMachineDeployment

func CreateMachineDeployment(ctx context.Context, input CreateMachineDeploymentInput)

CreateMachineDeployment creates the machine deployment and dependencies.

func CreateNamespace

func CreateNamespace(ctx context.Context, input CreateNamespaceInput, intervals ...interface{}) *corev1.Namespace

CreateNamespace is used to create a namespace object. If name is empty, a "test-" + util.RandomString(6) name will be generated.

func CreateNamespaceAndWatchEvents

func CreateNamespaceAndWatchEvents(ctx context.Context, input CreateNamespaceAndWatchEventsInput) (*corev1.Namespace, context.CancelFunc)

CreateNamespaceAndWatchEvents creates a namespace and setups a watch for the namespace events.

func CreateRelatedResources

func CreateRelatedResources(ctx context.Context, input CreateRelatedResourcesInput, intervals ...interface{})

CreateRelatedResources is used to create runtime.Objects.

func DeleteAllClustersAndWait

func DeleteAllClustersAndWait(ctx context.Context, input DeleteAllClustersAndWaitInput, intervals ...interface{})

DeleteAllClustersAndWait deletes a cluster object and waits for it to be gone.

func DeleteAndWaitMachineDeployment added in v1.8.0

func DeleteAndWaitMachineDeployment(ctx context.Context, input DeleteAndWaitMachineDeploymentInput)

DeleteAndWaitMachineDeployment deletes MachineDeployment and waits until it is gone.

func DeleteCluster

func DeleteCluster(ctx context.Context, input DeleteClusterInput)

DeleteCluster deletes the cluster.

func DeleteClusterAndWait

func DeleteClusterAndWait(ctx context.Context, input DeleteClusterAndWaitInput, intervals ...interface{})

DeleteClusterAndWait deletes a cluster object and waits for it to be gone.

func DeleteNamespace

func DeleteNamespace(ctx context.Context, input DeleteNamespaceInput, intervals ...interface{})

DeleteNamespace is used to delete namespace object.

func DeleteScaleUpDeploymentAndWait added in v1.8.0

func DeleteScaleUpDeploymentAndWait(ctx context.Context, input DeleteScaleUpDeploymentAndWaitInput)

DeleteScaleUpDeploymentAndWait deletes the scale up deployment and waits for it to be deleted.

func DeployUnevictablePod

func DeployUnevictablePod(ctx context.Context, input DeployUnevictablePodInput)

func DescribeFailedDeployment

func DescribeFailedDeployment(input WaitForDeploymentsAvailableInput, deployment *appsv1.Deployment) string

DescribeFailedDeployment returns detailed output to help debug a deployment failure in e2e.

func DisableAutoscalerForMachineDeploymentTopologyAndWait added in v1.5.0

func DisableAutoscalerForMachineDeploymentTopologyAndWait(ctx context.Context, input DisableAutoscalerForMachineDeploymentTopologyAndWaitInput)

DisableAutoscalerForMachineDeploymentTopologyAndWait drop the autoscaler annotations from the MachineDeploymentTopology and waits till the annotations are dropped from the underlying MachineDeployment. It also verifies that the replicas fields of the MachineDeployments are not affected after the annotations are dropped.

func DisableAutoscalerForMachinePoolTopologyAndWait added in v1.8.0

func DisableAutoscalerForMachinePoolTopologyAndWait(ctx context.Context, input DisableAutoscalerForMachinePoolTopologyAndWaitInput)

DisableAutoscalerForMachinePoolTopologyAndWait drop the autoscaler annotations from the MachinePoolTopology and waits till the annotations are dropped from the underlying MachinePool. It also verifies that the replicas fields of the MachinePools are not affected after the annotations are dropped.

func DiscoverClusterResourceSetAndWaitForSuccess

func DiscoverClusterResourceSetAndWaitForSuccess(ctx context.Context, input DiscoverClusterResourceSetAndWaitForSuccessInput, intervals ...interface{})

DiscoverClusterResourceSetAndWaitForSuccess patches a ClusterResourceSet label to the cluster and waits for resources to be created in that cluster.

func DiscoverMachineHealthChecksAndWaitForRemediation

func DiscoverMachineHealthChecksAndWaitForRemediation(ctx context.Context, input DiscoverMachineHealthCheckAndWaitForRemediationInput)

DiscoverMachineHealthChecksAndWaitForRemediation patches an unhealthy node condition to one node observed by the Machine Health Check and then wait for remediation.

func DiscoveryAndWaitForCluster

func DiscoveryAndWaitForCluster(ctx context.Context, input DiscoveryAndWaitForClusterInput, intervals ...interface{}) *clusterv1.Cluster

DiscoveryAndWaitForCluster discovers a cluster object in a namespace and waits for the cluster infrastructure to be provisioned.

func DiscoveryAndWaitForControlPlaneInitialized

func DiscoveryAndWaitForControlPlaneInitialized(ctx context.Context, input DiscoveryAndWaitForControlPlaneInitializedInput, intervals ...interface{}) *controlplanev1.KubeadmControlPlane

DiscoveryAndWaitForControlPlaneInitialized discovers the KubeadmControlPlane object attached to a cluster and waits for it to be initialized.

func DiscoveryAndWaitForMachineDeployments

func DiscoveryAndWaitForMachineDeployments(ctx context.Context, input DiscoveryAndWaitForMachineDeploymentsInput, intervals ...interface{}) []*clusterv1.MachineDeployment

DiscoveryAndWaitForMachineDeployments discovers the MachineDeployments existing in a cluster and waits for them to be ready (all the machine provisioned).

func DiscoveryAndWaitForMachinePools

func DiscoveryAndWaitForMachinePools(ctx context.Context, input DiscoveryAndWaitForMachinePoolsInput, intervals ...interface{}) []*expv1.MachinePool

DiscoveryAndWaitForMachinePools discovers the MachinePools existing in a cluster and waits for them to be ready (all the machines provisioned).

func DumpAllResources

func DumpAllResources(ctx context.Context, input DumpAllResourcesInput)

DumpAllResources dumps Cluster API related resources to YAML This dump includes all the types belonging to CAPI providers.

func DumpAllResourcesAndLogs added in v1.7.1

func DumpAllResourcesAndLogs(ctx context.Context, clusterProxy ClusterProxy, artifactFolder string, namespace *corev1.Namespace, cluster *clusterv1.Cluster)

DumpAllResourcesAndLogs dumps all the resources in the spec namespace and the workload cluster.

func DumpResourcesForCluster added in v1.6.0

func DumpResourcesForCluster(ctx context.Context, input DumpResourcesForClusterInput)

DumpResourcesForCluster dumps specified resources to yaml.

func DumpSpecResourcesAndCleanup added in v1.7.1

func DumpSpecResourcesAndCleanup(ctx context.Context, specName string, clusterProxy ClusterProxy, artifactFolder string, namespace *corev1.Namespace, cancelWatches context.CancelFunc, cluster *clusterv1.Cluster, intervalsGetter func(spec, key string) []interface{}, skipCleanup bool)

DumpSpecResourcesAndCleanup dumps all the resources in the spec namespace and cleans up the spec namespace.

func EnableAutoscalerForMachineDeploymentTopologyAndWait added in v1.5.0

func EnableAutoscalerForMachineDeploymentTopologyAndWait(ctx context.Context, input EnableAutoscalerForMachineDeploymentTopologyAndWaitInput)

func EnableAutoscalerForMachinePoolTopologyAndWait added in v1.8.0

func EnableAutoscalerForMachinePoolTopologyAndWait(ctx context.Context, input EnableAutoscalerForMachinePoolTopologyAndWaitInput)

func EnsureNamespace

func EnsureNamespace(ctx context.Context, mgmt client.Client, namespace string)

EnsureNamespace verifies if a namespaces exists. If it doesn't it will create the namespace.

func GatherJUnitReports

func GatherJUnitReports(srcDir string, destDir string) error

GatherJUnitReports will move JUnit files from one directory to another, renaming them in a format expected by Prow.

func GetAllClustersByNamespace

func GetAllClustersByNamespace(ctx context.Context, input GetAllClustersByNamespaceInput) []*clusterv1.Cluster

GetAllClustersByNamespace returns the list of Cluster object in a namespace.

func GetCAPIResources

func GetCAPIResources(ctx context.Context, input GetCAPIResourcesInput) []*unstructured.Unstructured

GetCAPIResources reads all the CAPI resources in a namespace. This list includes all the types belonging to CAPI providers.

func GetClusterByName

func GetClusterByName(ctx context.Context, input GetClusterByNameInput) *clusterv1.Cluster

GetClusterByName returns a Cluster object given his name.

func GetClusterClassByName added in v1.1.0

func GetClusterClassByName(ctx context.Context, input GetClusterClassByNameInput) *clusterv1.ClusterClass

GetClusterClassByName returns a ClusterClass object given his name and namespace.

func GetClusterResourceSetBindingByCluster

func GetClusterResourceSetBindingByCluster(ctx context.Context, input GetClusterResourceSetBindingByClusterInput) *addonsv1.ClusterResourceSetBinding

GetClusterResourceSetBindingByCluster returns the ClusterResourceBinding objects for a cluster.

func GetClusterResourceSets

func GetClusterResourceSets(ctx context.Context, input GetClusterResourceSetsInput) []*addonsv1.ClusterResourceSet

GetClusterResourceSets returns all ClusterResourceSet objects in a namespace.

func GetControlPlaneMachinesByCluster

func GetControlPlaneMachinesByCluster(ctx context.Context, input GetControlPlaneMachinesByClusterInput) []clusterv1.Machine

GetControlPlaneMachinesByCluster returns the Machine objects for a cluster. Important! this method relies on labels that are created by the CAPI controllers during the first reconciliation, so it is necessary to ensure this is already happened before calling it.

func GetControllerDeployments

func GetControllerDeployments(ctx context.Context, input GetControllerDeploymentsInput) []*appsv1.Deployment

GetControllerDeployments returns all the deployment for the cluster API controllers existing in a management cluster.

func GetKubeadmControlPlaneByCluster

func GetKubeadmControlPlaneByCluster(ctx context.Context, input GetKubeadmControlPlaneByClusterInput) *controlplanev1.KubeadmControlPlane

GetKubeadmControlPlaneByCluster returns the KubeadmControlPlane objects for a cluster. Important! this method relies on labels that are created by the CAPI controllers during the first reconciliation, so it is necessary to ensure this is already happened before calling it.

func GetMachineDeploymentsByCluster

func GetMachineDeploymentsByCluster(ctx context.Context, input GetMachineDeploymentsByClusterInput) []*clusterv1.MachineDeployment

GetMachineDeploymentsByCluster returns the MachineDeployments objects for a cluster. Important! this method relies on labels that are created by the CAPI controllers during the first reconciliation, so it is necessary to ensure this is already happened before calling it.

func GetMachineHealthChecksForCluster

func GetMachineHealthChecksForCluster(ctx context.Context, input GetMachineHealthChecksForClusterInput) []*clusterv1.MachineHealthCheck

GetMachineHealthChecksForCluster returns the MachineHealthCheck objects for a cluster. Important! this method relies on labels that are created by the CAPI controllers during the first reconciliation, so it is necessary to ensure this is already happened before calling it.

func GetMachinePoolsByCluster

func GetMachinePoolsByCluster(ctx context.Context, input GetMachinePoolsByClusterInput) []*expv1.MachinePool

GetMachinePoolsByCluster returns the MachinePools objects for a cluster. Important! this method relies on labels that are created by the CAPI controllers during the first reconciliation, so it is necessary to ensure this is already happened before calling it.

func GetMachineSetsByDeployment added in v1.5.0

func GetMachineSetsByDeployment(ctx context.Context, input GetMachineSetsByDeploymentInput) []*clusterv1.MachineSet

GetMachineSetsByDeployment returns the MachineSets objects for a MachineDeployment. Important! this method relies on labels that are created by the CAPI controllers during the first reconciliation, so it is necessary to ensure this is already happened before calling it.

func GetMachinesByCluster added in v1.4.0

func GetMachinesByCluster(ctx context.Context, input GetMachinesByClusterInput) []clusterv1.Machine

GetMachinesByCluster returns Machine objects for a cluster.

func GetMachinesByMachineDeployments

func GetMachinesByMachineDeployments(ctx context.Context, input GetMachinesByMachineDeploymentsInput) []clusterv1.Machine

GetMachinesByMachineDeployments returns Machine objects for a cluster belonging to a machine deployment. Important! this method relies on labels that are created by the CAPI controllers during the first reconciliation, so it is necessary to ensure this is already happened before calling it.

func GetMachinesByMachineHealthCheck

func GetMachinesByMachineHealthCheck(ctx context.Context, input GetMachinesByMachineHealthCheckInput) []clusterv1.Machine

GetMachinesByMachineHealthCheck returns Machine objects for a cluster that match with MachineHealthCheck selector.

func HasExactOwners added in v1.5.1

func HasExactOwners(gotOwners []metav1.OwnerReference, wantOwners ...metav1.OwnerReference) error

func HasOneOfExactOwners added in v1.5.1

func HasOneOfExactOwners(refList []metav1.OwnerReference, possibleOwners ...[]metav1.OwnerReference) error

HasOneOfExactOwners is a convenience approach for checking owner references on objects that can have different owner references depending on the cluster. In a follow-up iteration we can make improvements to check owner references according to the specific use cases vs checking generically "oneOf".

func ObjectToKind

func ObjectToKind(i runtime.Object) string

ObjectToKind returns the Kind without the package prefix. Pass in a pointer to a struct This will panic if used incorrectly.

func PatchClusterLabel

func PatchClusterLabel(ctx context.Context, input PatchClusterLabelInput)

PatchClusterLabel patches labels to a cluster.

func PatchNodeCondition

func PatchNodeCondition(ctx context.Context, input PatchNodeConditionInput)

PatchNodeCondition patches a node condition to any one of the machines with a node ref.

func PrettyPrint

func PrettyPrint(v interface{}) string

PrettyPrint returns a formatted JSON version of the object given.

func ProcessYAML added in v1.5.0

func ProcessYAML(input *ProcessYAMLInput) ([]byte, error)

func ResolveArtifactsDirectory

func ResolveArtifactsDirectory(input string) string

ResolveArtifactsDirectory attempts to resolve a directory to store test outputs, using either that provided by Prow, or defaulting to _artifacts.

func ScaleAndWaitControlPlane

func ScaleAndWaitControlPlane(ctx context.Context, input ScaleAndWaitControlPlaneInput)

ScaleAndWaitControlPlane scales KCP and waits until all machines have node ref and equal to Replicas.

func ScaleAndWaitMachineDeployment

func ScaleAndWaitMachineDeployment(ctx context.Context, input ScaleAndWaitMachineDeploymentInput)

ScaleAndWaitMachineDeployment scales MachineDeployment and waits until all machines have node ref and equal to Replicas.

func ScaleAndWaitMachineDeploymentTopology added in v1.3.0

func ScaleAndWaitMachineDeploymentTopology(ctx context.Context, input ScaleAndWaitMachineDeploymentTopologyInput)

ScaleAndWaitMachineDeploymentTopology scales MachineDeployment topology and waits until all machines have node ref and equal to Replicas.

func ScaleMachinePoolAndWait

func ScaleMachinePoolAndWait(ctx context.Context, input ScaleMachinePoolAndWaitInput)

ScaleMachinePoolAndWait scales a machine pool and waits for its instances to scale up.

func ScaleMachinePoolTopologyAndWait added in v1.8.0

func ScaleMachinePoolTopologyAndWait(ctx context.Context, input ScaleMachinePoolTopologyAndWaitInput)

ScaleMachinePoolTopologyAndWait scales a machine pool and waits for its instances to scale up.

func ScaleScaleUpDeploymentAndWait added in v1.8.2

func ScaleScaleUpDeploymentAndWait(ctx context.Context, input ScaleScaleUpDeploymentAndWaitInput, intervals ...interface{})

ScaleScaleUpDeploymentAndWait scales the scale up deployment to a given value and waits for it to become ready.

func SetupSpecNamespace added in v1.7.1

func SetupSpecNamespace(ctx context.Context, specName string, clusterProxy ClusterProxy, artifactFolder string, postNamespaceCreated func(ClusterProxy, string)) (*corev1.Namespace, context.CancelFunc)

SetupSpecNamespace creates a namespace for the test spec and setups a watch for the namespace events.

func TryAddDefaultSchemes

func TryAddDefaultSchemes(scheme *runtime.Scheme)

TryAddDefaultSchemes tries to add the following schemes:

  • Kubernetes corev1
  • Kubernetes appsv1
  • CAPI core
  • Kubeadm Bootstrapper
  • Kubeadm ControlPlane

Any error that occurs when trying to add the schemes is ignored.

func UpgradeClusterTopologyAndWaitForUpgrade added in v1.1.0

func UpgradeClusterTopologyAndWaitForUpgrade(ctx context.Context, input UpgradeClusterTopologyAndWaitForUpgradeInput)

UpgradeClusterTopologyAndWaitForUpgrade upgrades a Cluster topology and waits for it to be upgraded. NOTE: This func only works with KubeadmControlPlane.

func UpgradeControlPlaneAndWaitForUpgrade

func UpgradeControlPlaneAndWaitForUpgrade(ctx context.Context, input UpgradeControlPlaneAndWaitForUpgradeInput)

UpgradeControlPlaneAndWaitForUpgrade upgrades a KubeadmControlPlane and waits for it to be upgraded.

func UpgradeMachineDeploymentInPlaceMutableFieldsAndWait added in v1.4.0

func UpgradeMachineDeploymentInPlaceMutableFieldsAndWait(ctx context.Context, input UpgradeMachineDeploymentInPlaceMutableFieldsAndWaitInput)

UpgradeMachineDeploymentInPlaceMutableFieldsAndWait upgrades in-place mutable fields in a MachineDeployment and waits for them to be in-place propagated to MachineSets and Machines.

func UpgradeMachineDeploymentInfrastructureRefAndWait

func UpgradeMachineDeploymentInfrastructureRefAndWait(ctx context.Context, input UpgradeMachineDeploymentInfrastructureRefAndWaitInput)

UpgradeMachineDeploymentInfrastructureRefAndWait upgrades a machine deployment infrastructure ref and waits for its machines to be upgraded.

func UpgradeMachineDeploymentsAndWait

func UpgradeMachineDeploymentsAndWait(ctx context.Context, input UpgradeMachineDeploymentsAndWaitInput)

UpgradeMachineDeploymentsAndWait upgrades a machine deployment and waits for its machines to be upgraded.

func UpgradeMachinePoolAndWait

func UpgradeMachinePoolAndWait(ctx context.Context, input UpgradeMachinePoolAndWaitInput)

UpgradeMachinePoolAndWait upgrades a machine pool and waits for its instances to be upgraded.

func ValidateFinalizersResilience added in v1.6.0

func ValidateFinalizersResilience(ctx context.Context, proxy ClusterProxy, namespace, clusterName string, ownerGraphFilterFunction clusterctlcluster.GetOwnerGraphFilterFunction, finalizerAssertions ...map[string]func(name types.NamespacedName) []string)

ValidateFinalizersResilience checks that expected finalizers are in place, deletes them, and verifies that expected finalizers are properly added again.

func ValidateOwnerReferencesOnUpdate added in v1.4.0

func ValidateOwnerReferencesOnUpdate(ctx context.Context, proxy ClusterProxy, namespace, clusterName string, ownerGraphFilterFunction clusterctlcluster.GetOwnerGraphFilterFunction, assertFuncs ...map[string]func(obj types.NamespacedName, reference []metav1.OwnerReference) error)

ValidateOwnerReferencesOnUpdate checks that expected owner references are updated to the correct apiVersion.

func ValidateOwnerReferencesResilience added in v1.4.0

func ValidateOwnerReferencesResilience(ctx context.Context, proxy ClusterProxy, namespace, clusterName string, ownerGraphFilterFunction clusterctlcluster.GetOwnerGraphFilterFunction, assertFuncs ...map[string]func(obj types.NamespacedName, reference []metav1.OwnerReference) error)

ValidateOwnerReferencesResilience checks that expected owner references are in place, deletes them, and verifies that expect owner references are properly rebuilt.

func ValidateResourceVersionStable added in v1.7.2

func ValidateResourceVersionStable(ctx context.Context, proxy ClusterProxy, namespace string, ownerGraphFilterFunction clusterctlcluster.GetOwnerGraphFilterFunction)

ValidateResourceVersionStable checks that resource versions are stable.

func WaitForClusterDeleted

func WaitForClusterDeleted(ctx context.Context, input WaitForClusterDeletedInput, intervals ...interface{})

WaitForClusterDeleted waits until the cluster object has been deleted.

func WaitForClusterMachineNodeRefs

func WaitForClusterMachineNodeRefs(ctx context.Context, input WaitForClusterMachineNodeRefsInput, intervals ...interface{})

WaitForClusterMachineNodeRefs waits until all nodes associated with a machine deployment exist.

func WaitForClusterMachinesReady

func WaitForClusterMachinesReady(ctx context.Context, input WaitForClusterMachinesReadyInput, intervals ...interface{})

func WaitForClusterResourceSetToApplyResources

func WaitForClusterResourceSetToApplyResources(ctx context.Context, input WaitForClusterResourceSetToApplyResourcesInput, intervals ...interface{})

WaitForClusterResourceSetToApplyResources wait until all ClusterResourceSet resources are created in the matching cluster.

func WaitForClusterToProvision

func WaitForClusterToProvision(ctx context.Context, input WaitForClusterToProvisionInput, intervals ...interface{}) *clusterv1.Cluster

WaitForClusterToProvision will wait for a cluster to have a phase status of provisioned.

func WaitForControlPlaneAndMachinesReady

func WaitForControlPlaneAndMachinesReady(ctx context.Context, input WaitForControlPlaneAndMachinesReadyInput, intervals ...interface{})

WaitForControlPlaneAndMachinesReady waits for a KubeadmControlPlane object to be ready (all the machine provisioned and one node ready).

func WaitForControlPlaneMachinesToBeUpgraded

func WaitForControlPlaneMachinesToBeUpgraded(ctx context.Context, input WaitForControlPlaneMachinesToBeUpgradedInput, intervals ...interface{})

WaitForControlPlaneMachinesToBeUpgraded waits until all machines are upgraded to the correct Kubernetes version.

func WaitForControlPlaneToBeReady

func WaitForControlPlaneToBeReady(ctx context.Context, input WaitForControlPlaneToBeReadyInput, intervals ...interface{})

WaitForControlPlaneToBeReady will wait for a control plane to be ready.

func WaitForControlPlaneToBeUpToDate

func WaitForControlPlaneToBeUpToDate(ctx context.Context, input WaitForControlPlaneToBeUpToDateInput, intervals ...interface{})

WaitForControlPlaneToBeUpToDate will wait for a control plane to be fully up-to-date.

func WaitForDNSUpgrade

func WaitForDNSUpgrade(ctx context.Context, input WaitForDNSUpgradeInput, intervals ...interface{})

WaitForDNSUpgrade waits until CoreDNS version matches with the CoreDNS upgrade version and all its replicas are ready for use with the upgraded version. This is called during KCP upgrade.

func WaitForDeploymentsAvailable

func WaitForDeploymentsAvailable(ctx context.Context, input WaitForDeploymentsAvailableInput, intervals ...interface{})

WaitForDeploymentsAvailable waits until the Deployment has status.Available = True, that signals that all the desired replicas are in place. This can be used to check if Cluster API controllers installed in the management cluster are working.

func WaitForKubeProxyUpgrade

func WaitForKubeProxyUpgrade(ctx context.Context, input WaitForKubeProxyUpgradeInput, intervals ...interface{})

WaitForKubeProxyUpgrade waits until kube-proxy version matches with the kubernetes version. This is called during KCP upgrade.

func WaitForKubeadmControlPlaneMachinesToExist

func WaitForKubeadmControlPlaneMachinesToExist(ctx context.Context, input WaitForKubeadmControlPlaneMachinesToExistInput, intervals ...interface{})

WaitForKubeadmControlPlaneMachinesToExist will wait until all control plane machines have node refs.

func WaitForMachineDeploymentMachinesToBeUpgraded

func WaitForMachineDeploymentMachinesToBeUpgraded(ctx context.Context, input WaitForMachineDeploymentMachinesToBeUpgradedInput, intervals ...interface{})

WaitForMachineDeploymentMachinesToBeUpgraded waits until all machines belonging to a MachineDeployment are upgraded to the correct kubernetes version.

func WaitForMachineDeploymentNodesToExist

func WaitForMachineDeploymentNodesToExist(ctx context.Context, input WaitForMachineDeploymentNodesToExistInput, intervals ...interface{})

WaitForMachineDeploymentNodesToExist waits until all nodes associated with a machine deployment exist.

func WaitForMachineHealthCheckToRemediateUnhealthyNodeCondition

func WaitForMachineHealthCheckToRemediateUnhealthyNodeCondition(ctx context.Context, input WaitForMachineHealthCheckToRemediateUnhealthyNodeConditionInput, intervals ...interface{})

WaitForMachineHealthCheckToRemediateUnhealthyNodeCondition patches a node condition to any one of the machines with a node ref.

func WaitForMachinePoolInstancesToBeUpgraded

func WaitForMachinePoolInstancesToBeUpgraded(ctx context.Context, input WaitForMachinePoolInstancesToBeUpgradedInput, intervals ...interface{})

WaitForMachinePoolInstancesToBeUpgraded waits until all instances belonging to a MachinePool are upgraded to the correct kubernetes version.

func WaitForMachinePoolNodesToExist

func WaitForMachinePoolNodesToExist(ctx context.Context, input WaitForMachinePoolNodesToExistInput, intervals ...interface{})

WaitForMachinePoolNodesToExist waits until all nodes associated with a machine pool exist.

func WaitForMachineStatusCheck

func WaitForMachineStatusCheck(ctx context.Context, input WaitForMachineStatusCheckInput, intervals ...interface{})

WaitForMachineStatusCheck waits for the specified status to be true for the machine.

func WaitForNodesReady

func WaitForNodesReady(ctx context.Context, input WaitForNodesReadyInput)

WaitForNodesReady waits until there are exactly the given count nodes and they have the correct Kubernetes version and are ready.

func WaitForOneKubeadmControlPlaneMachineToExist

func WaitForOneKubeadmControlPlaneMachineToExist(ctx context.Context, input WaitForOneKubeadmControlPlaneMachineToExistInput, intervals ...interface{})

WaitForOneKubeadmControlPlaneMachineToExist will wait until all control plane machines have node refs.

func WaitForPodListCondition

func WaitForPodListCondition(ctx context.Context, input WaitForPodListConditionInput, intervals ...interface{})

WaitForPodListCondition waits for the specified condition to be true for all pods returned from the list filter.

func WatchDaemonSetLogsByLabelSelector added in v1.6.1

func WatchDaemonSetLogsByLabelSelector(ctx context.Context, input WatchDaemonSetLogsByLabelSelectorInput)

WatchDaemonSetLogsByLabelSelector streams logs for all containers for all pods belonging to a daemonset on the basis of label. Each container's logs are streamed in a separate goroutine so they can all be streamed concurrently. This only causes a test failure if there are errors retrieving the daemonset, its pods, or setting up a log file. If there is an error with the log streaming itself, that does not cause the test to fail.

func WatchDeploymentLogsByLabelSelector added in v1.4.0

func WatchDeploymentLogsByLabelSelector(ctx context.Context, input WatchDeploymentLogsByLabelSelectorInput)

WatchDeploymentLogsByLabelSelector streams logs for all containers for all pods belonging to a deployment on the basis of label. Each container's logs are streamed in a separate goroutine so they can all be streamed concurrently. This only causes a test failure if there are errors retrieving the deployment, its pods, or setting up a log file. If there is an error with the log streaming itself, that does not cause the test to fail.

func WatchDeploymentLogsByName added in v1.4.0

func WatchDeploymentLogsByName(ctx context.Context, input WatchDeploymentLogsByNameInput)

WatchDeploymentLogsByName streams logs for all containers for all pods belonging to a deployment. Each container's logs are streamed in a separate goroutine so they can all be streamed concurrently. This only causes a test failure if there are errors retrieving the deployment, its pods, or setting up a log file. If there is an error with the log streaming itself, that does not cause the test to fail.

func WatchNamespaceEvents

func WatchNamespaceEvents(ctx context.Context, input WatchNamespaceEventsInput)

WatchNamespaceEvents creates a watcher that streams namespace events into a file. Example usage:

ctx, cancelWatches := context.WithCancel(context.Background())
go func() {
	defer GinkgoRecover()
	framework.WatchNamespaceEvents(ctx, framework.WatchNamespaceEventsInput{
		ClientSet: clientSet,
		Name: namespace.Name,
		LogFolder:   logFolder,
	})
}()
defer cancelWatches()

func WatchPodMetrics

func WatchPodMetrics(ctx context.Context, input WatchPodMetricsInput)

WatchPodMetrics captures metrics from all pods every 5s. It expects to find port 8080 open on the controller.

Types

type AddDeploymentToWorkloadClusterInput

type AddDeploymentToWorkloadClusterInput struct {
	ClientSet  *kubernetes.Clientset
	Deployment *appsv1.Deployment
	Namespace  string
}

type AddPodDisruptionBudgetInput

type AddPodDisruptionBudgetInput struct {
	ClientSet *kubernetes.Clientset
	Budget    *policyv1.PodDisruptionBudget
	Namespace string
}

type AddScaleUpDeploymentAndWaitInput added in v1.5.0

type AddScaleUpDeploymentAndWaitInput struct {
	ClusterProxy   ClusterProxy
	ContainerImage string
}

AddScaleUpDeploymentAndWaitInput is the input for AddScaleUpDeploymentAndWait.

type ApplyAutoscalerToWorkloadClusterInput added in v1.5.0

type ApplyAutoscalerToWorkloadClusterInput struct {
	ClusterctlConfigPath string

	ArtifactFolder                        string
	InfrastructureMachineTemplateKind     string
	InfrastructureMachinePoolTemplateKind string
	InfrastructureMachinePoolKind         string
	InfrastructureAPIGroup                string
	// WorkloadYamlPath should point the yaml that will be applied on the workload cluster.
	// The YAML file should:
	//  - Be creating the autoscaler deployment in the workload cluster
	//    - must deploy objects in the cluster-autoscaler-system namespace
	//    - must create a deployment named "cluster-autoscaler"
	//    - must create a ServiceAccount, ClusterRole, ClusterRoleBinding needed by the autoscaler deployment
	//    - must run the autoscaler with --cloud-provider=clusterapi,
	//      --node-group-auto-discovery=clusterapi:namespace=${CLUSTER_NAMESPACE},clusterName=${CLUSTER_NAME}
	//      and --cloud-config pointing to a kubeconfig to connect to the management cluster
	//      using a token.
	//    - could use following vars to build the management cluster kubeconfig:
	//      - $MANAGEMENT_CLUSTER_TOKEN
	//      - $MANAGEMENT_CLUSTER_ADDRESS
	//      - $MANAGEMENT_CLUSTER_CA
	//      - $AUTOSCALER_VERSION
	//      - $CLUSTER_NAMESPACE
	WorkloadYamlPath  string
	AutoscalerVersion string

	ManagementClusterProxy ClusterProxy
	Cluster                *clusterv1.Cluster
	WorkloadClusterProxy   ClusterProxy

	AutoscalerOnManagementCluster bool
}

ApplyAutoscalerToWorkloadClusterInput is the input for ApplyAutoscalerToWorkloadCluster.

type AssertControlPlaneFailureDomainsInput

type AssertControlPlaneFailureDomainsInput struct {
	Lister  Lister
	Cluster *clusterv1.Cluster
}

AssertControlPlaneFailureDomainsInput is the input for AssertControlPlaneFailureDomains.

type AssertMachineDeploymentFailureDomainsInput added in v1.2.0

type AssertMachineDeploymentFailureDomainsInput struct {
	Lister            Lister
	Cluster           *clusterv1.Cluster
	MachineDeployment *clusterv1.MachineDeployment
}

AssertMachineDeploymentFailureDomainsInput is the input for AssertMachineDeploymentFailureDomains.

type AssertMachineDeploymentReplicasInput added in v1.5.0

type AssertMachineDeploymentReplicasInput struct {
	Getter                   Getter
	MachineDeployment        *clusterv1.MachineDeployment
	Replicas                 int32
	WaitForMachineDeployment []interface{}
}

type AssertMachinePoolReplicasInput added in v1.8.0

type AssertMachinePoolReplicasInput struct {
	Getter             Getter
	MachinePool        *expv1.MachinePool
	Replicas           int32
	WaitForMachinePool []interface{}
}

type ClusterLogCollector

type ClusterLogCollector interface {
	// CollectMachineLog collects log from a machine.
	// TODO: describe output folder struct
	CollectMachineLog(ctx context.Context, managementClusterClient client.Client, m *clusterv1.Machine, outputPath string) error
	CollectMachinePoolLog(ctx context.Context, managementClusterClient client.Client, m *expv1.MachinePool, outputPath string) error
	// CollectInfrastructureLogs collects log from the infrastructure.
	CollectInfrastructureLogs(ctx context.Context, managementClusterClient client.Client, c *clusterv1.Cluster, outputPath string) error
}

ClusterLogCollector defines an object that can collect logs from a machine.

type ClusterProxy

type ClusterProxy interface {
	// GetName returns the name of the cluster.
	GetName() string

	// GetKubeconfigPath returns the path to the kubeconfig file to be used to access the Kubernetes cluster.
	GetKubeconfigPath() string

	// GetScheme returns the scheme defining the types hosted in the Kubernetes cluster.
	// It is used when creating a controller-runtime client.
	GetScheme() *runtime.Scheme

	// GetClient returns a controller-runtime client to the Kubernetes cluster.
	GetClient() client.Client

	// GetClientSet returns a client-go client to the Kubernetes cluster.
	GetClientSet() *kubernetes.Clientset

	// GetRESTConfig returns the REST config for direct use with client-go if needed.
	GetRESTConfig() *rest.Config

	// GetCache returns a controller-runtime cache to create informer from.
	GetCache(ctx context.Context) cache.Cache

	// GetLogCollector returns the machine log collector for the Kubernetes cluster.
	GetLogCollector() ClusterLogCollector

	// CreateOrUpdate creates or updates objects using the clusterProxy client
	CreateOrUpdate(ctx context.Context, resources []byte, options ...CreateOrUpdateOption) error

	// GetWorkloadCluster returns a proxy to a workload cluster defined in the Kubernetes cluster.
	GetWorkloadCluster(ctx context.Context, namespace, name string, options ...Option) ClusterProxy

	// CollectWorkloadClusterLogs collects machines and infrastructure logs from the workload cluster.
	CollectWorkloadClusterLogs(ctx context.Context, namespace, name, outputPath string)

	// Dispose proxy's internal resources (the operation does not affects the Kubernetes cluster).
	// This should be implemented as a synchronous function.
	Dispose(context.Context)
}

ClusterProxy defines the behavior of a type that acts as an intermediary with an existing Kubernetes cluster. It should work with any Kubernetes cluster, no matter if the Cluster was created by a bootstrap.ClusterProvider, by Cluster API (a workload cluster or a self-hosted cluster) or else.

func NewClusterProxy

func NewClusterProxy(name string, kubeconfigPath string, scheme *runtime.Scheme, options ...Option) ClusterProxy

NewClusterProxy returns a clusterProxy given a KubeconfigPath and the scheme defining the types hosted in the cluster. If a kubeconfig file isn't provided, standard kubeconfig locations will be used (kubectl loading rules apply).

type CreateClusterInput

type CreateClusterInput struct {
	Creator      Creator
	Cluster      *clusterv1.Cluster
	InfraCluster client.Object
}

CreateClusterInput is the input for CreateCluster.

type CreateKubeadmControlPlaneInput

type CreateKubeadmControlPlaneInput struct {
	Creator         Creator
	ControlPlane    *controlplanev1.KubeadmControlPlane
	MachineTemplate client.Object
}

CreateKubeadmControlPlaneInput is the input for CreateKubeadmControlPlane.

type CreateMachineDeploymentInput

type CreateMachineDeploymentInput struct {
	Creator                 Creator
	MachineDeployment       *clusterv1.MachineDeployment
	BootstrapConfigTemplate client.Object
	InfraMachineTemplate    client.Object
}

CreateMachineDeploymentInput is the input for CreateMachineDeployment.

type CreateNamespaceAndWatchEventsInput

type CreateNamespaceAndWatchEventsInput struct {
	Creator   Creator
	ClientSet *kubernetes.Clientset
	Name      string
	LogFolder string

	// IgnoreAlreadyExists if set to true will ignore the "AlreadyExists" error if the function
	// is trying to create a namespace that already exists.
	// If false, it will error and cause test failure.
	IgnoreAlreadyExists bool
}

CreateNamespaceAndWatchEventsInput is the input type for CreateNamespaceAndWatchEvents.

type CreateNamespaceInput

type CreateNamespaceInput struct {
	Creator Creator
	Name    string

	// IgnoreAlreadyExists if set to true will ignore the "AlreadyExists" error if the function
	// is trying to create a namespace that already exists.
	// If false, it will error and cause test failure.
	IgnoreAlreadyExists bool
}

CreateNamespaceInput is the input type for CreateNamespace.

type CreateOrUpdateOption added in v1.8.0

type CreateOrUpdateOption func(*createOrUpdateConfig)

CreateOrUpdateOption is a configuration option supplied to CreateOrUpdate.

func WithLabelSelector added in v1.8.0

func WithLabelSelector(labelSelector labels.Selector) CreateOrUpdateOption

WithLabelSelector allows definition of the LabelSelector to be used in CreateOrUpdate.

type CreateRelatedResourcesInput

type CreateRelatedResourcesInput struct {
	Creator          Creator
	RelatedResources []client.Object
}

CreateRelatedResourcesInput is the input type for CreateRelatedResources.

type Creator

type Creator interface {
	Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
}

Creator can creates resources.

type DeleteAllClustersAndWaitInput

type DeleteAllClustersAndWaitInput struct {
	Client    client.Client
	Namespace string
	// ArtifactFolder, if set, clusters will be dumped if deletion times out
	ArtifactFolder string
}

DeleteAllClustersAndWaitInput is the input type for DeleteAllClustersAndWait.

type DeleteAndWaitMachineDeploymentInput added in v1.8.0

type DeleteAndWaitMachineDeploymentInput struct {
	ClusterProxy              ClusterProxy
	Cluster                   *clusterv1.Cluster
	MachineDeployment         *clusterv1.MachineDeployment
	WaitForMachineDeployments []interface{}
	DeletePropagationPolicy   *metav1.DeletionPropagation
}

DeleteAndWaitMachineDeploymentInput is the input for DeleteAndWaitMachineDeployment.

type DeleteClusterAndWaitInput

type DeleteClusterAndWaitInput struct {
	Client  client.Client
	Cluster *clusterv1.Cluster
	// ArtifactFolder, if set, clusters will be dumped if deletion times out
	ArtifactFolder string
}

DeleteClusterAndWaitInput is the input type for DeleteClusterAndWait.

type DeleteClusterInput

type DeleteClusterInput struct {
	Deleter Deleter
	Cluster *clusterv1.Cluster
}

DeleteClusterInput is the input for DeleteCluster.

type DeleteNamespaceInput

type DeleteNamespaceInput struct {
	Deleter Deleter
	Name    string
}

DeleteNamespaceInput is the input type for DeleteNamespace.

type DeleteScaleUpDeploymentAndWaitInput added in v1.8.0

type DeleteScaleUpDeploymentAndWaitInput struct {
	ClusterProxy  ClusterProxy
	Name          string
	WaitForDelete []interface{}
}

DeleteScaleUpDeploymentAndWaitInput is the input for DeleteScaleUpDeploymentAndWait.

type Deleter

type Deleter interface {
	Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
}

Deleter can delete resources.

type DeployUnevictablePodInput

type DeployUnevictablePodInput struct {
	WorkloadClusterProxy ClusterProxy
	ControlPlane         *controlplanev1.KubeadmControlPlane
	DeploymentName       string
	Namespace            string

	WaitForDeploymentAvailableInterval []interface{}
}

type DisableAutoscalerForMachineDeploymentTopologyAndWaitInput added in v1.5.0

type DisableAutoscalerForMachineDeploymentTopologyAndWaitInput struct {
	ClusterProxy                  ClusterProxy
	Cluster                       *clusterv1.Cluster
	WaitForAnnotationsToBeDropped []interface{}
}

type DisableAutoscalerForMachinePoolTopologyAndWaitInput added in v1.8.0

type DisableAutoscalerForMachinePoolTopologyAndWaitInput struct {
	ClusterProxy                  ClusterProxy
	Cluster                       *clusterv1.Cluster
	WaitForAnnotationsToBeDropped []interface{}
}

type DiscoverClusterResourceSetAndWaitForSuccessInput

type DiscoverClusterResourceSetAndWaitForSuccessInput struct {
	ClusterProxy ClusterProxy
	Cluster      *clusterv1.Cluster
}

DiscoverClusterResourceSetAndWaitForSuccessInput is the input for DiscoverClusterResourceSetAndWaitForSuccess.

type DiscoverMachineHealthCheckAndWaitForRemediationInput

type DiscoverMachineHealthCheckAndWaitForRemediationInput struct {
	ClusterProxy              ClusterProxy
	Cluster                   *clusterv1.Cluster
	WaitForMachineRemediation []interface{}
}

DiscoverMachineHealthCheckAndWaitForRemediationInput is the input for DiscoverMachineHealthCheckAndWait.

type DiscoveryAndWaitForClusterInput

type DiscoveryAndWaitForClusterInput struct {
	Getter    Getter
	Namespace string
	Name      string
}

DiscoveryAndWaitForClusterInput is the input type for DiscoveryAndWaitForCluster.

type DiscoveryAndWaitForControlPlaneInitializedInput

type DiscoveryAndWaitForControlPlaneInitializedInput struct {
	Lister  Lister
	Cluster *clusterv1.Cluster
}

DiscoveryAndWaitForControlPlaneInitializedInput is the input type for DiscoveryAndWaitForControlPlaneInitialized.

type DiscoveryAndWaitForMachineDeploymentsInput

type DiscoveryAndWaitForMachineDeploymentsInput struct {
	Lister  Lister
	Cluster *clusterv1.Cluster
}

DiscoveryAndWaitForMachineDeploymentsInput is the input type for DiscoveryAndWaitForMachineDeployments.

type DiscoveryAndWaitForMachinePoolsInput

type DiscoveryAndWaitForMachinePoolsInput struct {
	Getter  Getter
	Lister  Lister
	Cluster *clusterv1.Cluster
}

DiscoveryAndWaitForMachinePoolsInput is the input type for DiscoveryAndWaitForMachinePools.

type DockerLogCollector

type DockerLogCollector struct{}

DockerLogCollector collect logs from a CAPD workload cluster.

func (DockerLogCollector) CollectInfrastructureLogs added in v1.5.0

func (k DockerLogCollector) CollectInfrastructureLogs(ctx context.Context, _ client.Client, c *clusterv1.Cluster, outputPath string) error

func (DockerLogCollector) CollectMachineLog

func (k DockerLogCollector) CollectMachineLog(ctx context.Context, _ client.Client, m *clusterv1.Machine, outputPath string) error

func (DockerLogCollector) CollectMachinePoolLog

func (k DockerLogCollector) CollectMachinePoolLog(ctx context.Context, _ client.Client, m *expv1.MachinePool, outputPath string) error

type DumpAllResourcesInput

type DumpAllResourcesInput struct {
	Lister       Lister
	Namespace    string
	LogPath      string
	IncludeTypes []metav1.TypeMeta
}

DumpAllResourcesInput is the input for DumpAllResources.

type DumpNamespaceAndGVK added in v1.6.0

type DumpNamespaceAndGVK struct {
	GVK       schema.GroupVersionKind
	Namespace string
}

DumpNamespaceAndGVK specifies a GVK and namespace to be dumped.

type DumpResourcesForClusterInput added in v1.6.0

type DumpResourcesForClusterInput struct {
	Lister    Lister
	LogPath   string
	Cluster   *clusterv1.Cluster
	Resources []DumpNamespaceAndGVK
}

DumpResourcesForClusterInput is the input for DumpResourcesForCluster.

type EnableAutoscalerForMachineDeploymentTopologyAndWaitInput added in v1.5.0

type EnableAutoscalerForMachineDeploymentTopologyAndWaitInput struct {
	ClusterProxy                ClusterProxy
	Cluster                     *clusterv1.Cluster
	NodeGroupMinSize            string
	NodeGroupMaxSize            string
	WaitForAnnotationsToBeAdded []interface{}
}

type EnableAutoscalerForMachinePoolTopologyAndWaitInput added in v1.8.0

type EnableAutoscalerForMachinePoolTopologyAndWaitInput struct {
	ClusterProxy                ClusterProxy
	Cluster                     *clusterv1.Cluster
	NodeGroupMinSize            string
	NodeGroupMaxSize            string
	WaitForAnnotationsToBeAdded []interface{}
}

type GetAllClustersByNamespaceInput

type GetAllClustersByNamespaceInput struct {
	Lister    Lister
	Namespace string
}

GetAllClustersByNamespaceInput is the input for GetAllClustersByNamespace.

type GetCAPIResourcesInput

type GetCAPIResourcesInput struct {
	Lister       Lister
	Namespace    string
	IncludeTypes []metav1.TypeMeta
}

GetCAPIResourcesInput is the input for GetCAPIResources.

type GetClusterByNameInput

type GetClusterByNameInput struct {
	Getter    Getter
	Name      string
	Namespace string
}

GetClusterByNameInput is the input for GetClusterByName.

type GetClusterClassByNameInput added in v1.1.0

type GetClusterClassByNameInput struct {
	Getter    Getter
	Name      string
	Namespace string
}

GetClusterClassByNameInput is the input for GetClusterClassByName.

type GetClusterResourceSetBindingByClusterInput

type GetClusterResourceSetBindingByClusterInput struct {
	Getter      Getter
	ClusterName string
	Namespace   string
}

GetClusterResourceSetBindingByClusterInput is the input for GetClusterResourceSetBindingByCluster.

type GetClusterResourceSetsInput

type GetClusterResourceSetsInput struct {
	Lister    Lister
	Namespace string
}

GetClusterResourceSetsInput is the input for GetClusterResourceSets.

type GetControlPlaneMachinesByClusterInput

type GetControlPlaneMachinesByClusterInput struct {
	Lister      Lister
	ClusterName string
	Namespace   string
}

GetControlPlaneMachinesByClusterInput is the input for GetControlPlaneMachinesByCluster.

type GetControllerDeploymentsInput

type GetControllerDeploymentsInput struct {
	Lister            Lister
	ExcludeNamespaces []string
}

GetControllerDeploymentsInput is the input for GetControllerDeployments.

type GetKubeadmControlPlaneByClusterInput

type GetKubeadmControlPlaneByClusterInput struct {
	Lister      Lister
	ClusterName string
	Namespace   string
}

GetKubeadmControlPlaneByClusterInput is the input for GetKubeadmControlPlaneByCluster.

type GetLister

type GetLister interface {
	Getter
	Lister
}

GetLister can get and list resources.

type GetMachineDeploymentsByClusterInput

type GetMachineDeploymentsByClusterInput struct {
	Lister      Lister
	ClusterName string
	Namespace   string
}

GetMachineDeploymentsByClusterInput is the input for GetMachineDeploymentsByCluster.

type GetMachineHealthChecksForClusterInput

type GetMachineHealthChecksForClusterInput struct {
	Lister      Lister
	ClusterName string
	Namespace   string
}

GetMachineHealthChecksForClusterInput is the input for GetMachineHealthChecksForCluster.

type GetMachinePoolsByClusterInput

type GetMachinePoolsByClusterInput struct {
	Lister      Lister
	ClusterName string
	Namespace   string
}

GetMachinePoolsByClusterInput is the input for GetMachinePoolsByCluster.

type GetMachineSetsByDeploymentInput added in v1.5.0

type GetMachineSetsByDeploymentInput struct {
	Lister    Lister
	MDName    string
	Namespace string
}

GetMachineSetsByDeploymentInput is the input for GetMachineSetsByDeployment.

type GetMachinesByClusterInput added in v1.4.0

type GetMachinesByClusterInput struct {
	Lister      Lister
	ClusterName string
	Namespace   string
}

GetMachinesByClusterInput is the input for GetMachinesByCluster.

type GetMachinesByMachineDeploymentsInput

type GetMachinesByMachineDeploymentsInput struct {
	Lister            Lister
	ClusterName       string
	Namespace         string
	MachineDeployment clusterv1.MachineDeployment
}

GetMachinesByMachineDeploymentsInput is the input for GetMachinesByMachineDeployments.

type GetMachinesByMachineHealthCheckInput

type GetMachinesByMachineHealthCheckInput struct {
	Lister             Lister
	ClusterName        string
	MachineHealthCheck *clusterv1.MachineHealthCheck
}

GetMachinesByMachineHealthCheckInput is the input for GetMachinesByMachineHealthCheck.

type GetMachinesPoolInstancesInput

type GetMachinesPoolInstancesInput struct {
	WorkloadClusterGetter Getter
	Namespace             string
	MachinePool           *expv1.MachinePool
}

GetMachinesPoolInstancesInput is the input for GetMachinesPoolInstances.

type Getter

type Getter interface {
	Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error
}

Getter can get resources.

type Lister

type Lister interface {
	List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
}

Lister can lists resources.

type MachineStatusCheck

type MachineStatusCheck func(p *clusterv1.Machine) error

MachineStatusCheck is a type that operates a status check on a Machine.

func MachineNodeRefCheck

func MachineNodeRefCheck() MachineStatusCheck

MachineNodeRefCheck is a MachineStatusCheck ensuring that a NodeRef is assigned to the machine.

func MachinePhaseCheck

func MachinePhaseCheck(expectedPhase string) MachineStatusCheck

MachinePhaseCheck is a MachineStatusCheck ensuring that a machines is in the expected phase.

type Option

type Option func(*clusterProxy)

Option is a configuration option supplied to NewClusterProxy.

func WithCacheOptionsModifier added in v1.8.4

func WithCacheOptionsModifier(f func(*cache.Options)) Option

WithCacheOptionsModifier allows to modify the options passed to cache.New the first time it's created.

func WithMachineLogCollector

func WithMachineLogCollector(logCollector ClusterLogCollector) Option

WithMachineLogCollector allows to define the machine log collector to be used with this Cluster.

func WithRESTConfigModifier added in v1.8.0

func WithRESTConfigModifier(f func(*rest.Config)) Option

WithRESTConfigModifier allows to modify the rest config in GetRESTConfig. Using this function it is possible to create ClusterProxy that can work with workload clusters hosted in places not directly accessible from the machine where we run the E2E tests, e.g. inside kind.

type PatchClusterLabelInput

type PatchClusterLabelInput struct {
	ClusterProxy ClusterProxy
	Cluster      *clusterv1.Cluster
	Labels       map[string]string
}

PatchClusterLabelInput is the input for PatchClusterLabel.

type PatchNodeConditionInput

type PatchNodeConditionInput struct {
	ClusterProxy  ClusterProxy
	Cluster       *clusterv1.Cluster
	NodeCondition corev1.NodeCondition
	Machine       clusterv1.Machine
}

PatchNodeConditionInput is the input for PatchNodeCondition.

type PodListCondition

type PodListCondition func(p *corev1.PodList) error

PodListCondition is a type that operates a condition on a Pod.

func EtcdImageTagCondition

func EtcdImageTagCondition(expectedTag string, expectedCount int) PodListCondition

EtcdImageTagCondition returns a podListCondition that ensures the pod image contains the specified image tag.

func PhasePodCondition

func PhasePodCondition(expectedPhase corev1.PodPhase) PodListCondition

PhasePodCondition is a podListCondition ensuring that pods are in the expected pod phase.

type ProcessYAMLInput added in v1.5.0

type ProcessYAMLInput struct {
	Template             []byte
	ClusterctlConfigPath string
	Env                  map[string]string
}

type ScaleAndWaitControlPlaneInput

type ScaleAndWaitControlPlaneInput struct {
	ClusterProxy        ClusterProxy
	Cluster             *clusterv1.Cluster
	ControlPlane        *controlplanev1.KubeadmControlPlane
	Replicas            int32
	WaitForControlPlane []interface{}
}

type ScaleAndWaitMachineDeploymentInput

type ScaleAndWaitMachineDeploymentInput struct {
	ClusterProxy              ClusterProxy
	Cluster                   *clusterv1.Cluster
	MachineDeployment         *clusterv1.MachineDeployment
	Replicas                  int32
	WaitForMachineDeployments []interface{}
}

ScaleAndWaitMachineDeploymentInput is the input for ScaleAndWaitMachineDeployment.

type ScaleAndWaitMachineDeploymentTopologyInput added in v1.3.0

type ScaleAndWaitMachineDeploymentTopologyInput struct {
	ClusterProxy              ClusterProxy
	Cluster                   *clusterv1.Cluster
	Replicas                  int32
	WaitForMachineDeployments []interface{}
}

ScaleAndWaitMachineDeploymentTopologyInput is the input for ScaleAndWaitMachineDeployment.

type ScaleMachinePoolAndWaitInput

type ScaleMachinePoolAndWaitInput struct {
	ClusterProxy              ClusterProxy
	Cluster                   *clusterv1.Cluster
	Replicas                  int32
	MachinePools              []*expv1.MachinePool
	WaitForMachinePoolToScale []interface{}
}

type ScaleMachinePoolTopologyAndWaitInput added in v1.8.0

type ScaleMachinePoolTopologyAndWaitInput struct {
	ClusterProxy        ClusterProxy
	Cluster             *clusterv1.Cluster
	Replicas            int32
	WaitForMachinePools []interface{}
	Getter              Getter
}

type ScaleScaleUpDeploymentAndWaitInput added in v1.8.2

type ScaleScaleUpDeploymentAndWaitInput struct {
	ClusterProxy ClusterProxy
	Name         string
	Replicas     int32
}

ScaleScaleUpDeploymentAndWaitInput is the input for ScaleScaleUpDeploymentAndWait.

type UpgradeClusterTopologyAndWaitForUpgradeInput added in v1.1.0

type UpgradeClusterTopologyAndWaitForUpgradeInput struct {
	ClusterProxy                       ClusterProxy
	Cluster                            *clusterv1.Cluster
	ControlPlane                       *controlplanev1.KubeadmControlPlane
	EtcdImageTag                       string
	DNSImageTag                        string
	MachineDeployments                 []*clusterv1.MachineDeployment
	MachinePools                       []*expv1.MachinePool
	KubernetesUpgradeVersion           string
	WaitForMachinesToBeUpgraded        []interface{}
	WaitForMachinePoolToBeUpgraded     []interface{}
	WaitForKubeProxyUpgrade            []interface{}
	WaitForDNSUpgrade                  []interface{}
	WaitForEtcdUpgrade                 []interface{}
	PreWaitForControlPlaneToBeUpgraded func()
	PreWaitForWorkersToBeUpgraded      func()
	SkipKubeProxyCheck                 bool
}

UpgradeClusterTopologyAndWaitForUpgradeInput is the input type for UpgradeClusterTopologyAndWaitForUpgrade.

type UpgradeControlPlaneAndWaitForUpgradeInput

type UpgradeControlPlaneAndWaitForUpgradeInput struct {
	ClusterProxy                       ClusterProxy
	Cluster                            *clusterv1.Cluster
	ControlPlane                       *controlplanev1.KubeadmControlPlane
	KubernetesUpgradeVersion           string
	UpgradeMachineTemplate             *string
	EtcdImageTag                       string
	DNSImageTag                        string
	WaitForMachinesToBeUpgraded        []interface{}
	WaitForDNSUpgrade                  []interface{}
	WaitForKubeProxyUpgrade            []interface{}
	WaitForEtcdUpgrade                 []interface{}
	PreWaitForControlPlaneToBeUpgraded func()
}

UpgradeControlPlaneAndWaitForUpgradeInput is the input type for UpgradeControlPlaneAndWaitForUpgrade.

type UpgradeMachineDeploymentInPlaceMutableFieldsAndWaitInput added in v1.4.0

type UpgradeMachineDeploymentInPlaceMutableFieldsAndWaitInput struct {
	ClusterProxy                ClusterProxy
	Cluster                     *clusterv1.Cluster
	MachineDeployments          []*clusterv1.MachineDeployment
	WaitForMachinesToBeUpgraded []interface{}
}

UpgradeMachineDeploymentInPlaceMutableFieldsAndWaitInput is the input type for UpgradeMachineDeploymentInPlaceMutableFieldsAndWait.

type UpgradeMachineDeploymentInfrastructureRefAndWaitInput

type UpgradeMachineDeploymentInfrastructureRefAndWaitInput struct {
	ClusterProxy                ClusterProxy
	Cluster                     *clusterv1.Cluster
	MachineDeployments          []*clusterv1.MachineDeployment
	WaitForMachinesToBeUpgraded []interface{}
}

UpgradeMachineDeploymentInfrastructureRefAndWaitInput is the input type for UpgradeMachineDeploymentInfrastructureRefAndWait.

type UpgradeMachineDeploymentsAndWaitInput

type UpgradeMachineDeploymentsAndWaitInput struct {
	ClusterProxy                ClusterProxy
	Cluster                     *clusterv1.Cluster
	UpgradeVersion              string
	UpgradeMachineTemplate      *string
	MachineDeployments          []*clusterv1.MachineDeployment
	WaitForMachinesToBeUpgraded []interface{}
}

UpgradeMachineDeploymentsAndWaitInput is the input type for UpgradeMachineDeploymentsAndWait.

type UpgradeMachinePoolAndWaitInput

type UpgradeMachinePoolAndWaitInput struct {
	ClusterProxy                   ClusterProxy
	Cluster                        *clusterv1.Cluster
	UpgradeVersion                 string
	MachinePools                   []*expv1.MachinePool
	WaitForMachinePoolToBeUpgraded []interface{}
}

type WaitForClusterDeletedInput

type WaitForClusterDeletedInput struct {
	Client  client.Client
	Cluster *clusterv1.Cluster
	// ArtifactFolder, if set, clusters will be dumped if deletion times out
	ArtifactFolder string
}

WaitForClusterDeletedInput is the input for WaitForClusterDeleted.

type WaitForClusterMachineNodeRefsInput

type WaitForClusterMachineNodeRefsInput struct {
	GetLister GetLister
	Cluster   *clusterv1.Cluster
}

WaitForClusterMachineNodeRefsInput is the input for WaitForClusterMachineNodesRefs.

type WaitForClusterMachinesReadyInput

type WaitForClusterMachinesReadyInput struct {
	GetLister  GetLister
	NodeGetter Getter
	Cluster    *clusterv1.Cluster
}

type WaitForClusterResourceSetToApplyResourcesInput

type WaitForClusterResourceSetToApplyResourcesInput struct {
	ClusterProxy       ClusterProxy
	Cluster            *clusterv1.Cluster
	ClusterResourceSet *addonsv1.ClusterResourceSet
}

WaitForClusterResourceSetToApplyResourcesInput is the input for WaitForClusterResourceSetToApplyResources.

type WaitForClusterToProvisionInput

type WaitForClusterToProvisionInput struct {
	Getter  Getter
	Cluster *clusterv1.Cluster
}

WaitForClusterToProvisionInput is the input for WaitForClusterToProvision.

type WaitForControlPlaneAndMachinesReadyInput

type WaitForControlPlaneAndMachinesReadyInput struct {
	GetLister    GetLister
	Cluster      *clusterv1.Cluster
	ControlPlane *controlplanev1.KubeadmControlPlane
}

WaitForControlPlaneAndMachinesReadyInput is the input type for WaitForControlPlaneAndMachinesReady.

type WaitForControlPlaneMachinesToBeUpgradedInput

type WaitForControlPlaneMachinesToBeUpgradedInput struct {
	Lister                   Lister
	Cluster                  *clusterv1.Cluster
	KubernetesUpgradeVersion string
	MachineCount             int
}

WaitForControlPlaneMachinesToBeUpgradedInput is the input for WaitForControlPlaneMachinesToBeUpgraded.

type WaitForControlPlaneToBeReadyInput

type WaitForControlPlaneToBeReadyInput struct {
	Getter       Getter
	ControlPlane *controlplanev1.KubeadmControlPlane
}

WaitForControlPlaneToBeReadyInput is the input for WaitForControlPlaneToBeReady.

type WaitForControlPlaneToBeUpToDateInput

type WaitForControlPlaneToBeUpToDateInput struct {
	Getter       Getter
	ControlPlane *controlplanev1.KubeadmControlPlane
}

WaitForControlPlaneToBeUpToDateInput is the input for WaitForControlPlaneToBeUpToDate.

type WaitForDNSUpgradeInput

type WaitForDNSUpgradeInput struct {
	Getter     Getter
	DNSVersion string
}

WaitForDNSUpgradeInput is the input for WaitForDNSUpgrade.

type WaitForDeploymentsAvailableInput

type WaitForDeploymentsAvailableInput struct {
	Getter     Getter
	Deployment *appsv1.Deployment
}

WaitForDeploymentsAvailableInput is the input for WaitForDeploymentsAvailable.

type WaitForKubeProxyUpgradeInput

type WaitForKubeProxyUpgradeInput struct {
	Getter            Getter
	KubernetesVersion string
}

WaitForKubeProxyUpgradeInput is the input for WaitForKubeProxyUpgrade.

type WaitForKubeadmControlPlaneMachinesToExistInput

type WaitForKubeadmControlPlaneMachinesToExistInput struct {
	Lister       Lister
	Cluster      *clusterv1.Cluster
	ControlPlane *controlplanev1.KubeadmControlPlane
}

WaitForKubeadmControlPlaneMachinesToExistInput is the input for WaitForKubeadmControlPlaneMachinesToExist.

type WaitForMachineDeploymentMachinesToBeUpgradedInput

type WaitForMachineDeploymentMachinesToBeUpgradedInput struct {
	Lister                   Lister
	Cluster                  *clusterv1.Cluster
	KubernetesUpgradeVersion string
	MachineCount             int
	MachineDeployment        clusterv1.MachineDeployment
}

WaitForMachineDeploymentMachinesToBeUpgradedInput is the input for WaitForMachineDeploymentMachinesToBeUpgraded.

type WaitForMachineDeploymentNodesToExistInput

type WaitForMachineDeploymentNodesToExistInput struct {
	Lister            Lister
	Cluster           *clusterv1.Cluster
	MachineDeployment *clusterv1.MachineDeployment
}

WaitForMachineDeploymentNodesToExistInput is the input for WaitForMachineDeploymentNodesToExist.

type WaitForMachineHealthCheckToRemediateUnhealthyNodeConditionInput

type WaitForMachineHealthCheckToRemediateUnhealthyNodeConditionInput struct {
	ClusterProxy       ClusterProxy
	Cluster            *clusterv1.Cluster
	MachineHealthCheck *clusterv1.MachineHealthCheck
	MachinesCount      int
}

WaitForMachineHealthCheckToRemediateUnhealthyNodeConditionInput is the input for WaitForMachineHealthCheckToRemediateUnhealthyNodeCondition.

type WaitForMachinePoolInstancesToBeUpgradedInput

type WaitForMachinePoolInstancesToBeUpgradedInput struct {
	Getter                   Getter
	WorkloadClusterGetter    Getter
	Cluster                  *clusterv1.Cluster
	KubernetesUpgradeVersion string
	MachineCount             int
	MachinePool              *expv1.MachinePool
}

WaitForMachinePoolInstancesToBeUpgradedInput is the input for WaitForMachinePoolInstancesToBeUpgraded.

type WaitForMachinePoolNodesToExistInput

type WaitForMachinePoolNodesToExistInput struct {
	Getter      Getter
	MachinePool *expv1.MachinePool
}

WaitForMachinePoolNodesToExistInput is the input for WaitForMachinePoolNodesToExist.

type WaitForMachineStatusCheckInput

type WaitForMachineStatusCheckInput struct {
	Getter       Getter
	Machine      *clusterv1.Machine
	StatusChecks []MachineStatusCheck
}

WaitForMachineStatusCheckInput is the input for WaitForMachineStatusCheck.

type WaitForNodesReadyInput

type WaitForNodesReadyInput struct {
	Lister            Lister
	KubernetesVersion string
	Count             int
	WaitForNodesReady []interface{}
}

WaitForNodesReadyInput is the input for WaitForNodesReady.

type WaitForOneKubeadmControlPlaneMachineToExistInput

type WaitForOneKubeadmControlPlaneMachineToExistInput struct {
	Lister       Lister
	Cluster      *clusterv1.Cluster
	ControlPlane *controlplanev1.KubeadmControlPlane
}

WaitForOneKubeadmControlPlaneMachineToExistInput is the input for WaitForKubeadmControlPlaneMachinesToExist.

type WaitForPodListConditionInput

type WaitForPodListConditionInput struct {
	Lister      Lister
	ListOptions *client.ListOptions
	Condition   PodListCondition
}

WaitForPodListConditionInput is the input args for WaitForPodListCondition.

type WatchDaemonSetLogsByLabelSelectorInput added in v1.6.1

type WatchDaemonSetLogsByLabelSelectorInput struct {
	GetLister GetLister
	Cache     toolscache.Cache
	ClientSet *kubernetes.Clientset
	Labels    map[string]string
	LogPath   string
}

WatchDaemonSetLogsByLabelSelectorInput is the input for WatchDaemonSetLogsByLabelSelector.

type WatchDeploymentLogsByLabelSelectorInput added in v1.4.0

type WatchDeploymentLogsByLabelSelectorInput struct {
	GetLister GetLister
	Cache     toolscache.Cache
	ClientSet *kubernetes.Clientset
	Labels    map[string]string
	LogPath   string
}

WatchDeploymentLogsByLabelSelectorInput is the input for WatchDeploymentLogsByLabelSelector.

type WatchDeploymentLogsByNameInput added in v1.4.0

type WatchDeploymentLogsByNameInput struct {
	GetLister  GetLister
	Cache      toolscache.Cache
	ClientSet  *kubernetes.Clientset
	Deployment *appsv1.Deployment
	LogPath    string
}

WatchDeploymentLogsByNameInput is the input for WatchDeploymentLogsByName.

type WatchNamespaceEventsInput

type WatchNamespaceEventsInput struct {
	ClientSet *kubernetes.Clientset
	Name      string
	LogFolder string
}

WatchNamespaceEventsInput is the input type for WatchNamespaceEvents.

type WatchPodMetricsInput

type WatchPodMetricsInput struct {
	GetLister   GetLister
	ClientSet   *kubernetes.Clientset
	Deployment  *appsv1.Deployment
	MetricsPath string
}

Directories

Path Synopsis
Package bootstrap implements bootstrap functionality for e2e testing.
Package bootstrap implements bootstrap functionality for e2e testing.
Package clusterctl implements clusterctl interaction.
Package clusterctl implements clusterctl interaction.
logger
Package logger implements clusterctl logging functionality.
Package logger implements clusterctl logging functionality.
Package exec implements command execution functionality.
Package exec implements command execution functionality.
Package ginkgoextensions extends ginkgo.
Package ginkgoextensions extends ginkgo.
internal
log
Package log implements test framework logging.
Package log implements test framework logging.
Package kubernetesversions implements kubernetes version functions.
Package kubernetesversions implements kubernetes version functions.
Package kubetest implmements kubetest functionality.
Package kubetest implmements kubetest functionality.

Jump to

Keyboard shortcuts

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