Documentation ¶
Overview ¶
Package framework implements end to end testing.
Index ¶
- func AddDeploymentToWorkloadCluster(ctx context.Context, input AddDeploymentToWorkloadClusterInput)
- func AddPodDisruptionBudget(ctx context.Context, input AddPodDisruptionBudgetInput)
- func AddPodDisruptionBudgetV1Beta1(ctx context.Context, input AddPodDisruptionBudgetInputV1Beta1)
- func AssertControlPlaneFailureDomains(ctx context.Context, input AssertControlPlaneFailureDomainsInput)
- func AssertMachineDeploymentFailureDomains(ctx context.Context, input AssertMachineDeploymentFailureDomainsInput)
- func CreateCluster(ctx context.Context, input CreateClusterInput, intervals ...interface{})
- func CreateK3sControlPlane(ctx context.Context, input CreateK3sControlPlaneInput, ...)
- func CreateMachineDeployment(ctx context.Context, input CreateMachineDeploymentInput)
- func CreateNamespace(ctx context.Context, input CreateNamespaceInput, intervals ...interface{}) *corev1.Namespace
- func CreateNamespaceAndWatchEvents(ctx context.Context, input CreateNamespaceAndWatchEventsInput) (*corev1.Namespace, context.CancelFunc)
- func CreateRelatedResources(ctx context.Context, input CreateRelatedResourcesInput, ...)
- func DeleteAllClustersAndWait(ctx context.Context, input DeleteAllClustersAndWaitInput, ...)
- func DeleteCluster(ctx context.Context, input DeleteClusterInput)
- func DeleteClusterAndWait(ctx context.Context, input DeleteClusterAndWaitInput, intervals ...interface{})
- func DeleteNamespace(ctx context.Context, input DeleteNamespaceInput, intervals ...interface{})
- func DeployUnevictablePod(ctx context.Context, input DeployUnevictablePodInput)
- func DescribeFailedDeployment(input WaitForDeploymentsAvailableInput, deployment *appsv1.Deployment) string
- func DiscoverMachineHealthChecksAndWaitForRemediation(ctx context.Context, ...)
- func DiscoveryAndWaitForCluster(ctx context.Context, input DiscoveryAndWaitForClusterInput, ...) *clusterv1.Cluster
- func DiscoveryAndWaitForControlPlaneInitialized(ctx context.Context, input DiscoveryAndWaitForControlPlaneInitializedInput, ...) *infracontrolplanev1.K3sControlPlane
- func DiscoveryAndWaitForMachineDeployments(ctx context.Context, input DiscoveryAndWaitForMachineDeploymentsInput, ...) []*clusterv1.MachineDeployment
- func DiscoveryAndWaitForMachinePools(ctx context.Context, input DiscoveryAndWaitForMachinePoolsInput, ...) []*expv1.MachinePool
- func DumpAllResources(ctx context.Context, input DumpAllResourcesInput)
- func EnsureNamespace(ctx context.Context, mgmt client.Client, namespace string)
- func GetAllClustersByNamespace(ctx context.Context, input GetAllClustersByNamespaceInput) []*clusterv1.Cluster
- func GetCAPIResources(ctx context.Context, input GetCAPIResourcesInput) []*unstructured.Unstructured
- func GetClusterByName(ctx context.Context, input GetClusterByNameInput) *clusterv1.Cluster
- func GetClusterClassByName(ctx context.Context, input GetClusterClassByNameInput) *clusterv1.ClusterClass
- func GetControlPlaneMachinesByCluster(ctx context.Context, input GetControlPlaneMachinesByClusterInput) []clusterv1.Machine
- func GetControllerDeployments(ctx context.Context, input GetControllerDeploymentsInput) []*appsv1.Deployment
- func GetK3sControlPlaneByCluster(ctx context.Context, input GetK3sControlPlaneByClusterInput) *infracontrolplanev1.K3sControlPlane
- func GetMachineDeploymentsByCluster(ctx context.Context, input GetMachineDeploymentsByClusterInput) []*clusterv1.MachineDeployment
- func GetMachineHealthChecksForCluster(ctx context.Context, input GetMachineHealthChecksForClusterInput) []*clusterv1.MachineHealthCheck
- func GetMachinePoolsByCluster(ctx context.Context, input GetMachinePoolsByClusterInput) []*expv1.MachinePool
- func GetMachinesByMachineDeployments(ctx context.Context, input GetMachinesByMachineDeploymentsInput) []clusterv1.Machine
- func GetMachinesByMachineHealthCheck(ctx context.Context, input GetMachinesByMachineHealthCheckInput) []clusterv1.Machine
- func ObjectToKind(i runtime.Object) string
- func PatchClusterLabel(ctx context.Context, input PatchClusterLabelInput)
- func PatchNodeCondition(ctx context.Context, input PatchNodeConditionInput)
- func PrettyPrint(v interface{}) string
- func ScaleAndWaitControlPlane(ctx context.Context, input ScaleAndWaitControlPlaneInput)
- func ScaleAndWaitMachineDeployment(ctx context.Context, input ScaleAndWaitMachineDeploymentInput)
- func ScaleAndWaitMachineDeploymentTopology(ctx context.Context, input ScaleAndWaitMachineDeploymentTopologyInput)
- func ScaleMachinePoolAndWait(ctx context.Context, input ScaleMachinePoolAndWaitInput)
- func TryAddDefaultSchemes(scheme *runtime.Scheme)
- func UpgradeClusterTopologyAndWaitForUpgrade(ctx context.Context, input UpgradeClusterTopologyAndWaitForUpgradeInput)
- func UpgradeControlPlaneAndWaitForUpgrade(ctx context.Context, input UpgradeControlPlaneAndWaitForUpgradeInput)
- func UpgradeMachineDeploymentInfrastructureRefAndWait(ctx context.Context, ...)
- func UpgradeMachineDeploymentsAndWait(ctx context.Context, input UpgradeMachineDeploymentsAndWaitInput)
- func UpgradeMachinePoolAndWait(ctx context.Context, input UpgradeMachinePoolAndWaitInput)
- func WaitForClusterDeleted(ctx context.Context, input WaitForClusterDeletedInput, ...)
- func WaitForClusterToProvision(ctx context.Context, input WaitForClusterToProvisionInput, ...) *clusterv1.Cluster
- func WaitForControlPlaneAndMachinesReady(ctx context.Context, input WaitForControlPlaneAndMachinesReadyInput, ...)
- func WaitForControlPlaneMachinesToBeUpgraded(ctx context.Context, input WaitForControlPlaneMachinesToBeUpgradedInput, ...)
- func WaitForControlPlaneToBeReady(ctx context.Context, input WaitForControlPlaneToBeReadyInput, ...)
- func WaitForDNSUpgrade(ctx context.Context, input WaitForDNSUpgradeInput, intervals ...interface{})
- func WaitForDeploymentsAvailable(ctx context.Context, input WaitForDeploymentsAvailableInput, ...)
- func WaitForK3sControlPlaneMachinesToExist(ctx context.Context, input WaitForK3sControlPlaneMachinesToExistInput, ...)
- func WaitForKubeProxyUpgrade(ctx context.Context, input WaitForKubeProxyUpgradeInput, ...)
- func WaitForMachineDeploymentMachinesToBeUpgraded(ctx context.Context, input WaitForMachineDeploymentMachinesToBeUpgradedInput, ...)
- func WaitForMachineDeploymentNodesToExist(ctx context.Context, input WaitForMachineDeploymentNodesToExistInput, ...)
- func WaitForMachineDeploymentRollingUpgradeToComplete(ctx context.Context, ...)
- func WaitForMachineDeploymentRollingUpgradeToStart(ctx context.Context, input WaitForMachineDeploymentRollingUpgradeToStartInput, ...)
- func WaitForMachineHealthCheckToRemediateUnhealthyNodeCondition(ctx context.Context, ...)
- func WaitForMachinePoolInstancesToBeUpgraded(ctx context.Context, input WaitForMachinePoolInstancesToBeUpgradedInput, ...)
- func WaitForMachinePoolNodesToExist(ctx context.Context, input WaitForMachinePoolNodesToExistInput, ...)
- func WaitForMachineStatusCheck(ctx context.Context, input WaitForMachineStatusCheckInput, ...)
- func WaitForOneK3sControlPlaneMachineToExist(ctx context.Context, input WaitForOneK3sControlPlaneMachineToExistInput, ...)
- func WaitForPodListCondition(ctx context.Context, input WaitForPodListConditionInput, ...)
- func WatchDeploymentLogs(ctx context.Context, input WatchDeploymentLogsInput)
- func WatchNamespaceEvents(ctx context.Context, input WatchNamespaceEventsInput)
- func WatchPodMetrics(ctx context.Context, input WatchPodMetricsInput)
- type AddDeploymentToWorkloadClusterInput
- type AddPodDisruptionBudgetInput
- type AddPodDisruptionBudgetInputV1Beta1
- type AssertControlPlaneFailureDomainsInput
- type AssertMachineDeploymentFailureDomainsInput
- type ClusterLogCollector
- type ClusterProxy
- type CreateClusterInput
- type CreateK3sControlPlaneInput
- type CreateMachineDeploymentInput
- type CreateNamespaceAndWatchEventsInput
- type CreateNamespaceInput
- type CreateRelatedResourcesInput
- type Creator
- type DeleteAllClustersAndWaitInput
- type DeleteClusterAndWaitInput
- type DeleteClusterInput
- type DeleteNamespaceInput
- type Deleter
- type DeployUnevictablePodInput
- type DiscoverMachineHealthCheckAndWaitForRemediationInput
- type DiscoveryAndWaitForClusterInput
- type DiscoveryAndWaitForControlPlaneInitializedInput
- type DiscoveryAndWaitForMachineDeploymentsInput
- type DiscoveryAndWaitForMachinePoolsInput
- type DumpAllResourcesInput
- type GetAllClustersByNamespaceInput
- type GetCAPIResourcesInput
- type GetClusterByNameInput
- type GetClusterClassByNameInput
- type GetControlPlaneMachinesByClusterInput
- type GetControllerDeploymentsInput
- type GetK3sControlPlaneByClusterInput
- type GetLister
- type GetMachineDeploymentsByClusterInput
- type GetMachineHealthChecksForClusterInput
- type GetMachinePoolsByClusterInput
- type GetMachinesByMachineDeploymentsInput
- type GetMachinesByMachineHealthCheckInput
- type GetMachinesPoolInstancesInput
- type Getter
- type Lister
- type MachineStatusCheck
- type Option
- type PatchClusterLabelInput
- type PatchNodeConditionInput
- type PodListCondition
- type ScaleAndWaitControlPlaneInput
- type ScaleAndWaitMachineDeploymentInput
- type ScaleAndWaitMachineDeploymentTopologyInput
- type ScaleMachinePoolAndWaitInput
- type UpgradeClusterTopologyAndWaitForUpgradeInput
- type UpgradeControlPlaneAndWaitForUpgradeInput
- type UpgradeMachineDeploymentInfrastructureRefAndWaitInput
- type UpgradeMachineDeploymentsAndWaitInput
- type UpgradeMachinePoolAndWaitInput
- type WaitForClusterDeletedInput
- type WaitForClusterToProvisionInput
- type WaitForControlPlaneAndMachinesReadyInput
- type WaitForControlPlaneMachinesToBeUpgradedInput
- type WaitForControlPlaneToBeReadyInput
- type WaitForDNSUpgradeInput
- type WaitForDeploymentsAvailableInput
- type WaitForK3sControlPlaneMachinesToExistInput
- type WaitForKubeProxyUpgradeInput
- type WaitForMachineDeploymentMachinesToBeUpgradedInput
- type WaitForMachineDeploymentNodesToExistInput
- type WaitForMachineDeploymentRollingUpgradeToCompleteInput
- type WaitForMachineDeploymentRollingUpgradeToStartInput
- type WaitForMachineHealthCheckToRemediateUnhealthyNodeConditionInput
- type WaitForMachinePoolInstancesToBeUpgradedInput
- type WaitForMachinePoolNodesToExistInput
- type WaitForMachineStatusCheckInput
- type WaitForOneK3sControlPlaneMachineToExistInput
- type WaitForPodListConditionInput
- type WatchDeploymentLogsInput
- type WatchNamespaceEventsInput
- type WatchPodMetricsInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDeploymentToWorkloadCluster ¶
func AddDeploymentToWorkloadCluster(ctx context.Context, input AddDeploymentToWorkloadClusterInput)
AddDeploymentToWorkloadCluster adds a deployment to the workload cluster.
func AddPodDisruptionBudget ¶
func AddPodDisruptionBudget(ctx context.Context, input AddPodDisruptionBudgetInput)
AddPodDisruptionBudget adds a PodDisruptionBudget to the workload cluster.
func AddPodDisruptionBudgetV1Beta1 ¶
func AddPodDisruptionBudgetV1Beta1(ctx context.Context, input AddPodDisruptionBudgetInputV1Beta1)
AddPodDisruptionBudgetV1Beta1 adds a PodDisruptionBudget to the workload 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 ¶
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 CreateCluster ¶
func CreateCluster(ctx context.Context, input CreateClusterInput, intervals ...interface{})
CreateCluster will create the Cluster and InfraCluster objects.
func CreateK3sControlPlane ¶
func CreateK3sControlPlane(ctx context.Context, input CreateK3sControlPlaneInput, intervals ...interface{})
CreateK3sControlPlane 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 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 DeployUnevictablePod ¶
func DeployUnevictablePod(ctx context.Context, input DeployUnevictablePodInput)
DeployUnevictablePod deploys a pod that is not evictable.
func DescribeFailedDeployment ¶
func DescribeFailedDeployment(input WaitForDeploymentsAvailableInput, deployment *appsv1.Deployment) string
DescribeFailedDeployment returns detailed output to help debug a deployment failure in e2e.
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{}) *infracontrolplanev1.K3sControlPlane
DiscoveryAndWaitForControlPlaneInitialized discovers the K3sControlPlane 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 EnsureNamespace ¶
EnsureNamespace verifies if a namespaces exists. If it doesn't it will create the namespace.
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 ¶
func GetClusterClassByName(ctx context.Context, input GetClusterClassByNameInput) *clusterv1.ClusterClass
GetClusterClassByName returns a ClusterClass object given his name and 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 GetK3sControlPlaneByCluster ¶
func GetK3sControlPlaneByCluster(ctx context.Context, input GetK3sControlPlaneByClusterInput) *infracontrolplanev1.K3sControlPlane
GetK3sControlPlaneByCluster returns the K3sControlPlane 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 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 ObjectToKind ¶
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 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 ¶
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 TryAddDefaultSchemes ¶
TryAddDefaultSchemes tries to add the following schemes:
- Kubernetes corev1
- Kubernetes appsv1
- CAPI core
- K3s Bootstrapper
- K3s ControlPlane
Any error that occurs when trying to add the schemes is ignored.
func UpgradeClusterTopologyAndWaitForUpgrade ¶
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 K3sControlPlane.
func UpgradeControlPlaneAndWaitForUpgrade ¶
func UpgradeControlPlaneAndWaitForUpgrade(ctx context.Context, input UpgradeControlPlaneAndWaitForUpgradeInput)
UpgradeControlPlaneAndWaitForUpgrade upgrades a K3sControlPlane and waits for it to be upgraded.
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 WaitForClusterDeleted ¶
func WaitForClusterDeleted(ctx context.Context, input WaitForClusterDeletedInput, intervals ...interface{})
WaitForClusterDeleted waits until the cluster object has been deleted.
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 K3sControlPlane 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 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 WaitForK3sControlPlaneMachinesToExist ¶
func WaitForK3sControlPlaneMachinesToExist(ctx context.Context, input WaitForK3sControlPlaneMachinesToExistInput, intervals ...interface{})
WaitForK3sControlPlaneMachinesToExist will wait until all control plane machines have node refs.
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 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 WaitForMachineDeploymentRollingUpgradeToComplete ¶
func WaitForMachineDeploymentRollingUpgradeToComplete(ctx context.Context, input WaitForMachineDeploymentRollingUpgradeToCompleteInput, intervals ...interface{})
WaitForMachineDeploymentRollingUpgradeToComplete waits until rolling upgrade is complete.
func WaitForMachineDeploymentRollingUpgradeToStart ¶
func WaitForMachineDeploymentRollingUpgradeToStart(ctx context.Context, input WaitForMachineDeploymentRollingUpgradeToStartInput, intervals ...interface{})
WaitForMachineDeploymentRollingUpgradeToStart waits until rolling upgrade starts.
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 WaitForOneK3sControlPlaneMachineToExist ¶
func WaitForOneK3sControlPlaneMachineToExist(ctx context.Context, input WaitForOneK3sControlPlaneMachineToExistInput, intervals ...interface{})
WaitForOneK3sControlPlaneMachineToExist 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 WatchDeploymentLogs ¶
func WatchDeploymentLogs(ctx context.Context, input WatchDeploymentLogsInput)
WatchDeploymentLogs 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 }
AddDeploymentToWorkloadClusterInput is the input for AddDeploymentToWorkloadCluster.
type AddPodDisruptionBudgetInput ¶
type AddPodDisruptionBudgetInput struct { ClientSet *kubernetes.Clientset Budget *policyv1.PodDisruptionBudget Namespace string }
AddPodDisruptionBudgetInput is the input for AddPodDisruptionBudget.
type AddPodDisruptionBudgetInputV1Beta1 ¶
type AddPodDisruptionBudgetInputV1Beta1 struct { ClientSet *kubernetes.Clientset Budget *v1beta1.PodDisruptionBudget Namespace string }
AddPodDisruptionBudgetInputV1Beta1 is the input for AddPodDisruptionBudgetV1Beta1.
type AssertControlPlaneFailureDomainsInput ¶
AssertControlPlaneFailureDomainsInput is the input for AssertControlPlaneFailureDomains.
type AssertMachineDeploymentFailureDomainsInput ¶
type AssertMachineDeploymentFailureDomainsInput struct { Lister Lister Cluster *clusterv1.Cluster MachineDeployment *clusterv1.MachineDeployment }
AssertMachineDeploymentFailureDomainsInput is the input for AssertMachineDeploymentFailureDomains.
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 }
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 // GetLogCollector returns the machine log collector for the Kubernetes cluster. GetLogCollector() ClusterLogCollector // Apply to apply YAML to the Kubernetes cluster, `kubectl apply`. Apply(ctx context.Context, resources []byte, args ...string) error // GetWorkloadCluster returns a proxy to a workload cluster defined in the Kubernetes cluster. GetWorkloadCluster(ctx context.Context, namespace, name string) ClusterProxy // CollectWorkloadClusterLogs collects machines 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 CreateK3sControlPlaneInput ¶
type CreateK3sControlPlaneInput struct { Creator Creator ControlPlane *infracontrolplanev1.K3sControlPlane MachineTemplate client.Object }
CreateK3sControlPlaneInput is the input for CreateK3sControlPlane.
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 }
CreateNamespaceAndWatchEventsInput is the input type for CreateNamespaceAndWatchEvents.
type CreateNamespaceInput ¶
CreateNamespaceInput is the input type for CreateNamespace.
type CreateRelatedResourcesInput ¶
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 ¶
DeleteAllClustersAndWaitInput is the input type for DeleteAllClustersAndWait.
type DeleteClusterAndWaitInput ¶
DeleteClusterAndWaitInput is the input type for DeleteClusterAndWait.
type DeleteClusterInput ¶
DeleteClusterInput is the input for DeleteCluster.
type DeleteNamespaceInput ¶
DeleteNamespaceInput is the input type for DeleteNamespace.
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 *infracontrolplanev1.K3sControlPlane DeploymentName string Namespace string WaitForDeploymentAvailableInterval []interface{} }
DeployUnevictablePodInput is the input for DeployUnevictablePod.
type DiscoverMachineHealthCheckAndWaitForRemediationInput ¶
type DiscoverMachineHealthCheckAndWaitForRemediationInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster WaitForMachineRemediation []interface{} }
DiscoverMachineHealthCheckAndWaitForRemediationInput is the input for DiscoverMachineHealthCheckAndWait.
type DiscoveryAndWaitForClusterInput ¶
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 ¶
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 DumpAllResourcesInput ¶
DumpAllResourcesInput is the input for DumpAllResources.
type GetAllClustersByNamespaceInput ¶
GetAllClustersByNamespaceInput is the input for GetAllClustersByNamespace.
type GetCAPIResourcesInput ¶
GetCAPIResourcesInput is the input for GetCAPIResources.
type GetClusterByNameInput ¶
GetClusterByNameInput is the input for GetClusterByName.
type GetClusterClassByNameInput ¶
GetClusterClassByNameInput is the input for GetClusterClassByName.
type GetControlPlaneMachinesByClusterInput ¶
type GetControlPlaneMachinesByClusterInput struct { Lister Lister ClusterName string Namespace string }
GetControlPlaneMachinesByClusterInput is the input for GetControlPlaneMachinesByCluster.
type GetControllerDeploymentsInput ¶
GetControllerDeploymentsInput is the input for GetControllerDeployments.
type GetK3sControlPlaneByClusterInput ¶
GetK3sControlPlaneByClusterInput is the input for GetK3sControlPlaneByCluster.
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 ¶
GetMachinePoolsByClusterInput is the input for GetMachinePoolsByCluster.
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 Lister ¶
type Lister interface {
List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
}
Lister can lists resources.
type MachineStatusCheck ¶
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 WithMachineLogCollector ¶
func WithMachineLogCollector(logCollector ClusterLogCollector) Option
WithMachineLogCollector allows to define the machine log collector to be used with this Cluster.
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 ¶
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 ScaleAndWaitControlPlaneInput ¶
type ScaleAndWaitControlPlaneInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster ControlPlane *infracontrolplanev1.K3sControlPlane Replicas int32 WaitForControlPlane []interface{} }
ScaleAndWaitControlPlaneInput is the input for ScaleAndWaitControlPlane.
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 ¶
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{} }
ScaleMachinePoolAndWaitInput is the input type for ScaleMachinePoolAndWait.
type UpgradeClusterTopologyAndWaitForUpgradeInput ¶
type UpgradeClusterTopologyAndWaitForUpgradeInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster ControlPlane *infracontrolplanev1.K3sControlPlane EtcdImageTag string DNSImageTag string MachineDeployments []*clusterv1.MachineDeployment KubernetesUpgradeVersion string WaitForMachinesToBeUpgraded []interface{} WaitForKubeProxyUpgrade []interface{} WaitForDNSUpgrade []interface{} WaitForEtcdUpgrade []interface{} PreWaitForControlPlaneToBeUpgraded func() PreWaitForMachineDeploymentToBeUpgraded func() }
UpgradeClusterTopologyAndWaitForUpgradeInput is the input type for UpgradeClusterTopologyAndWaitForUpgrade.
type UpgradeControlPlaneAndWaitForUpgradeInput ¶
type UpgradeControlPlaneAndWaitForUpgradeInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster ControlPlane *infracontrolplanev1.K3sControlPlane KubernetesUpgradeVersion string UpgradeMachineTemplate *string EtcdImageTag string DNSImageTag string WaitForMachinesToBeUpgraded []interface{} WaitForDNSUpgrade []interface{} WaitForKubeProxyUpgrade []interface{} WaitForEtcdUpgrade []interface{} }
UpgradeControlPlaneAndWaitForUpgradeInput is the input type for UpgradeControlPlaneAndWaitForUpgrade.
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{} }
UpgradeMachinePoolAndWaitInput is the input type for UpgradeMachinePoolAndWait.
type WaitForClusterDeletedInput ¶
WaitForClusterDeletedInput is the input for WaitForClusterDeleted.
type WaitForClusterToProvisionInput ¶
WaitForClusterToProvisionInput is the input for WaitForClusterToProvision.
type WaitForControlPlaneAndMachinesReadyInput ¶
type WaitForControlPlaneAndMachinesReadyInput struct { GetLister GetLister Cluster *clusterv1.Cluster ControlPlane *infracontrolplanev1.K3sControlPlane }
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 *infracontrolplanev1.K3sControlPlane }
WaitForControlPlaneToBeReadyInput is the input for WaitForControlPlaneToBeReady.
type WaitForDNSUpgradeInput ¶
WaitForDNSUpgradeInput is the input for WaitForDNSUpgrade.
type WaitForDeploymentsAvailableInput ¶
type WaitForDeploymentsAvailableInput struct { Getter Getter Deployment *appsv1.Deployment }
WaitForDeploymentsAvailableInput is the input for WaitForDeploymentsAvailable.
type WaitForK3sControlPlaneMachinesToExistInput ¶
type WaitForK3sControlPlaneMachinesToExistInput struct { Lister Lister Cluster *clusterv1.Cluster ControlPlane *infracontrolplanev1.K3sControlPlane }
WaitForK3sControlPlaneMachinesToExistInput is the input for WaitForK3sControlPlaneMachinesToExist.
type WaitForKubeProxyUpgradeInput ¶
WaitForKubeProxyUpgradeInput is the input for WaitForKubeProxyUpgrade.
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 WaitForMachineDeploymentRollingUpgradeToCompleteInput ¶
type WaitForMachineDeploymentRollingUpgradeToCompleteInput struct { Getter Getter MachineDeployment *clusterv1.MachineDeployment }
WaitForMachineDeploymentRollingUpgradeToCompleteInput is the input for WaitForMachineDeploymentRollingUpgradeToComplete.
type WaitForMachineDeploymentRollingUpgradeToStartInput ¶
type WaitForMachineDeploymentRollingUpgradeToStartInput struct { Getter Getter MachineDeployment *clusterv1.MachineDeployment }
WaitForMachineDeploymentRollingUpgradeToStartInput is the input for WaitForMachineDeploymentRollingUpgradeToStart.
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 WaitForOneK3sControlPlaneMachineToExistInput ¶
type WaitForOneK3sControlPlaneMachineToExistInput struct { Lister Lister Cluster *clusterv1.Cluster ControlPlane *infracontrolplanev1.K3sControlPlane }
WaitForOneK3sControlPlaneMachineToExistInput is the input for WaitForK3sControlPlaneMachinesToExist.
type WaitForPodListConditionInput ¶
type WaitForPodListConditionInput struct { Lister Lister ListOptions *client.ListOptions Condition PodListCondition }
WaitForPodListConditionInput is the input args for WaitForPodListCondition.
type WatchDeploymentLogsInput ¶
type WatchDeploymentLogsInput struct { GetLister GetLister ClientSet *kubernetes.Clientset Deployment *appsv1.Deployment LogPath string }
WatchDeploymentLogsInput is the input for WatchDeploymentLogs.
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 }
WatchPodMetricsInput is the input for WatchPodMetrics.
Source Files ¶
- alltypes_helpers.go
- cluster_helpers.go
- cluster_proxy.go
- cluster_topology_helpers.go
- controller_helpers.go
- controlplane_helpers.go
- convenience.go
- daemonset_helpers.go
- deployment_helpers.go
- doc.go
- interfaces.go
- machine_helpers.go
- machinedeployment_helpers.go
- machinehealthcheck_helpers.go
- machinepool_helpers.go
- namespace_helpers.go
- pod_helpers.go
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. |
internal
|
|
log
Package log implements test framework logging.
|
Package log implements test framework logging. |