Documentation ¶
Index ¶
- Constants
- func ApplyYAMLURL(ctx context.Context, input ApplyYAMLURLInput)
- func AssertAllClusterAPIResourcesAreGone(ctx context.Context, input AssertAllClusterAPIResourcesAreGoneInput)
- func AssertControlPlaneFailureDomains(ctx context.Context, input AssertControlPlaneFailureDomainsInput)
- func CompleteCommand(cmd *exec.Cmd, desc string, privateArgs bool) *exec.Cmd
- func CreateCluster(ctx context.Context, input CreateClusterInput, intervals ...interface{})
- func CreateJUnitReporterForProw(artifactsDirectory string) *reporters.JUnitReporter
- func CreateKubeadmControlPlane(ctx context.Context, input CreateKubeadmControlPlaneInput, ...)
- 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 DescribeFailedDeployment(input WaitForDeploymentsAvailableInput, deployment *appsv1.Deployment) string
- func DiscoverClusterResourceSetAndWaitForSuccess(ctx context.Context, input DiscoverClusterResourceSetAndWaitForSuccessInput, ...)
- func DiscoverMachineHealthChecksAndWaitForRemediation(ctx context.Context, ...)
- func DiscoveryAndWaitForCluster(ctx context.Context, input DiscoveryAndWaitForClusterInput, ...) *clusterv1.Cluster
- func DiscoveryAndWaitForControlPlaneInitialized(ctx context.Context, input DiscoveryAndWaitForControlPlaneInitializedInput, ...) *controlplanev1.KubeadmControlPlane
- func DiscoveryAndWaitForMachineDeployments(ctx context.Context, input DiscoveryAndWaitForMachineDeploymentsInput, ...) []*clusterv1.MachineDeployment
- func DiscoveryAndWaitForMachinePools(ctx context.Context, input DiscoveryAndWaitForMachinePoolsInput, ...) []*clusterv1exp.MachinePool
- func DumpAllResources(ctx context.Context, input DumpAllResourcesInput)
- func DumpProviderResources(mgmt ManagementCluster, resources map[string]runtime.Object, ...) error
- func DumpResources(mgmt ManagementCluster, resourcePath string, writer io.Writer) error
- func EnsureNamespace(ctx context.Context, mgmt client.Client, namespace string)
- func EtcdImageTagCondition(expectedTag string, expectedCount int) podListCondition
- func GatherJUnitReports(srcDir string, destDir string) error
- 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 GetClusterResourceSetBindingByCluster(ctx context.Context, input GetClusterResourceSetBindingByClusterInput) *addonsv1.ClusterResourceSetBinding
- func GetClusterResourceSets(ctx context.Context, input GetClusterResourceSetsInput) []*addonsv1.ClusterResourceSet
- func GetControlPlaneMachinesByCluster(ctx context.Context, input GetControlPlaneMachinesByClusterInput) []clusterv1.Machine
- func GetControllerDeployments(ctx context.Context, input GetControllerDeploymentsInput) []*appsv1.Deployment
- func GetKubeadmControlPlaneByCluster(ctx context.Context, input GetKubeadmControlPlaneByClusterInput) *controlplanev1.KubeadmControlPlane
- func GetMachineDeploymentsByCluster(ctx context.Context, input GetMachineDeploymentsByClusterInput) []*clusterv1.MachineDeployment
- func GetMachineHealthChecksForCluster(ctx context.Context, input GetMachineHealthChecksForClusterInput) []*clusterv1.MachineHealthCheck
- func GetMachinePoolInstanceVersions(ctx context.Context, input GetMachinesPoolInstancesInput) []string
- func GetMachinePoolsByCluster(ctx context.Context, input GetMachinePoolsByClusterInput) []*clusterv1exp.MachinePool
- func GetMachinesByMachineDeployments(ctx context.Context, input GetMachinesByMachineDeploymentsInput) []clusterv1.Machine
- func GetMachinesByMachineHealthCheck(ctx context.Context, input GetMachinesByMachineHealthCheckInput) []clusterv1.Machine
- func InstallComponents(ctx context.Context, mgmt Applier, components ...ComponentGenerator)
- func ObjectToKind(i runtime.Object) string
- func PatchClusterLabel(ctx context.Context, input PatchClusterLabelInput)
- func PatchNodeCondition(ctx context.Context, input PatchNodeConditionInput)
- func PhasePodCondition(expectedPhase corev1.PodPhase) podListCondition
- func PrettyPrint(v interface{}) string
- func ResolveArtifactsDirectory(input string) string
- func ScaleAndWaitMachineDeployment(ctx context.Context, input ScaleAndWaitMachineDeploymentInput)
- func ScaleMachinePoolAndWait(ctx context.Context, input ScaleMachinePoolAndWaitInput)
- func TryAddDefaultSchemes(scheme *runtime.Scheme)
- func TypeToKind(i interface{}) string
- 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 WaitForAPIServiceAvailable(ctx context.Context, mgmt Waiter, serviceName string)
- func WaitForClusterDeleted(ctx context.Context, input WaitForClusterDeletedInput, ...)
- func WaitForClusterMachineNodeRefs(ctx context.Context, input WaitForClusterMachineNodeRefsInput, ...)
- func WaitForClusterMachinesReady(ctx context.Context, input WaitForClusterMachinesReadyInput, ...)
- func WaitForClusterResourceSetToApplyResources(ctx context.Context, input WaitForClusterResourceSetToApplyResourcesInput, ...)
- func WaitForClusterToProvision(ctx context.Context, input WaitForClusterToProvisionInput, ...)
- func WaitForControlPlaneAndMachinesReady(ctx context.Context, input WaitForControlPlaneAndMachinesReadyInput, ...)
- func WaitForControlPlaneMachinesToBeUpgraded(ctx context.Context, input WaitForControlPlaneMachinesToBeUpgradedInput, ...)
- func WaitForControlPlaneToBeReady(ctx context.Context, input WaitForControlPlaneToBeReadyInput, ...)
- func WaitForControlPlaneToBeUpToDate(ctx context.Context, input WaitForControlPlaneToBeUpToDateInput, ...)
- func WaitForDNSUpgrade(ctx context.Context, input WaitForDNSUpgradeInput, intervals ...interface{})
- func WaitForDeploymentsAvailable(ctx context.Context, input WaitForDeploymentsAvailableInput, ...)
- func WaitForKubeProxyUpgrade(ctx context.Context, input WaitForKubeProxyUpgradeInput, ...)
- func WaitForKubeadmControlPlaneMachinesToExist(ctx context.Context, input WaitForKubeadmControlPlaneMachinesToExistInput, ...)
- 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 WaitForOneKubeadmControlPlaneMachineToExist(ctx context.Context, input WaitForOneKubeadmControlPlaneMachineToExistInput, ...)
- func WaitForPodListCondition(ctx context.Context, input WaitForPodListConditionInput, ...)
- func WaitForPodsReadyInNamespace(ctx context.Context, cluster Waiter, namespace string)
- func WatchDeploymentLogs(ctx context.Context, input WatchDeploymentLogsInput)
- func WatchNamespaceEvents(ctx context.Context, input WatchNamespaceEventsInput)
- func WatchPodMetrics(ctx context.Context, input WatchPodMetricsInput)
- func YAMLForComponentSource(ctx context.Context, source ComponentSource) ([]byte, error)
- type Applier
- type ApplyYAMLURLInput
- type AssertAllClusterAPIResourcesAreGoneInput
- type AssertControlPlaneFailureDomainsInput
- type ClusterLogCollector
- type ClusterProxy
- type ComponentConfig
- type ComponentGenerator
- type ComponentReplacement
- type ComponentSource
- type ComponentSourceType
- type ComponentWaiter
- type ComponentWaiterType
- type Config
- type ContainerImage
- type ControlplaneClusterInput
- type CreateClusterInput
- type CreateKubeadmControlPlaneInput
- type CreateMachineDeploymentInput
- type CreateNamespaceAndWatchEventsInput
- type CreateNamespaceInput
- type CreateRelatedResourcesInput
- type Creator
- type DeleteAllClustersAndWaitInput
- type DeleteClusterAndWaitInput
- type DeleteClusterInput
- type DeleteNamespaceInput
- type Deleter
- type DiscoverClusterResourceSetAndWaitForSuccessInput
- type DiscoverMachineHealthCheckAndWaitForRemediationInput
- type DiscoveryAndWaitForClusterInput
- type DiscoveryAndWaitForControlPlaneInitializedInput
- type DiscoveryAndWaitForMachineDeploymentsInput
- type DiscoveryAndWaitForMachinePoolsInput
- type DockerLogCollector
- type DumpAllResourcesInput
- type GetAllClustersByNamespaceInput
- type GetCAPIResourcesInput
- type GetClusterByNameInput
- type GetClusterResourceSetBindingByClusterInput
- type GetClusterResourceSetsInput
- type GetControlPlaneMachinesByClusterInput
- type GetControllerDeploymentsInput
- type GetKubeadmControlPlaneByClusterInput
- type GetLister
- type GetMachineDeploymentsByClusterInput
- type GetMachineHealthChecksForClusterInput
- type GetMachinePoolsByClusterInput
- type GetMachinesByMachineDeploymentsInput
- type GetMachinesByMachineHealthCheckInput
- type GetMachinesPoolInstancesInput
- type Getter
- type HTTPGetter
- type ImageLoader
- type InitManagementClusterInput
- type Lister
- type LoadImageBehavior
- type MachineDeployment
- type MachineStatusCheck
- type ManagementCluster
- type Node
- type Option
- type PatchClusterLabelInput
- type PatchNodeConditionInput
- type ScaleAndWaitMachineDeploymentInput
- type ScaleMachinePoolAndWaitInput
- type UpgradeControlPlaneAndWaitForUpgradeInput
- type UpgradeMachineDeploymentInfrastructureRefAndWaitInput
- type UpgradeMachineDeploymentsAndWaitInput
- type UpgradeMachinePoolAndWaitInput
- type WaitForClusterDeletedInput
- type WaitForClusterMachineNodeRefsInput
- type WaitForClusterMachinesReadyInput
- type WaitForClusterResourceSetToApplyResourcesInput
- type WaitForClusterToProvisionInput
- type WaitForControlPlaneAndMachinesReadyInput
- type WaitForControlPlaneMachinesToBeUpgradedInput
- type WaitForControlPlaneToBeReadyInput
- type WaitForControlPlaneToBeUpToDateInput
- type WaitForDNSUpgradeInput
- type WaitForDeploymentsAvailableInput
- type WaitForKubeProxyUpgradeInput
- type WaitForKubeadmControlPlaneMachinesToExistInput
- type WaitForMachineDeploymentMachinesToBeUpgradedInput
- type WaitForMachineDeploymentNodesToExistInput
- type WaitForMachineDeploymentRollingUpgradeToCompleteInput
- type WaitForMachineDeploymentRollingUpgradeToStartInput
- type WaitForMachineHealthCheckToRemediateUnhealthyNodeConditionInput
- type WaitForMachinePoolInstancesToBeUpgradedInput
- type WaitForMachinePoolNodesToExistInput
- type WaitForMachineStatusCheckInput
- type WaitForOneKubeadmControlPlaneMachineToExistInput
- type WaitForPodListConditionInput
- type Waiter
- type WatchDeploymentLogsInput
- type WatchNamespaceEventsInput
- type WatchPodMetricsInput
Constants ¶
const ( // DefaultManagementClusterName is the default name of the Kind cluster // used by the the e2e framework. DefaultManagementClusterName = "mgmt" // DefaultKubernetesVersion is the default version of Kubernetes to deploy // for testing. DefaultKubernetesVersion = "v1.16.2" )
Variables ¶
This section is empty.
Functions ¶
func ApplyYAMLURL ¶
func ApplyYAMLURL(ctx context.Context, input ApplyYAMLURLInput)
ApplyYAMLURL is essentially kubectl apply -f <url>. If the YAML in the URL contains Kinds not registered with the scheme this will fail. Deprecated. Getting yaml from an URL during a test it can introduce flakes.
func AssertAllClusterAPIResourcesAreGone ¶
func AssertAllClusterAPIResourcesAreGone(ctx context.Context, input AssertAllClusterAPIResourcesAreGoneInput)
AssertAllClusterAPIResourcesAreGone ensures that all known Cluster API resources have been remvoed. Deprecated. Please use GetCAPIResources instead
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 CompleteCommand ¶ added in v0.3.10
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 CreateJUnitReporterForProw ¶ added in v0.3.10
func CreateJUnitReporterForProw(artifactsDirectory string) *reporters.JUnitReporter
CreateJUnitReporterForProw sets up Ginkgo to create JUnit outputs compatible with Prow.
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 ¶ added in v0.3.4
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 ¶ added in v0.3.4
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 ¶ added in v0.3.4
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 and waits for everything the cluster owned to actually be gone.
func DeleteClusterAndWait ¶ added in v0.3.4
func DeleteClusterAndWait(ctx context.Context, input DeleteClusterAndWaitInput, intervals ...interface{})
DeleteClusterAndWait deletes a cluster object and waits for it to be gone.
func DeleteNamespace ¶ added in v0.3.4
func DeleteNamespace(ctx context.Context, input DeleteNamespaceInput, intervals ...interface{})
DeleteNamespace is used to delete namespace object.
func DescribeFailedDeployment ¶ added in v0.3.9
func DescribeFailedDeployment(input WaitForDeploymentsAvailableInput, deployment *appsv1.Deployment) string
DescribeFailedDeployment returns detailed output to help debug a deployment failure in e2e.
func DiscoverClusterResourceSetAndWaitForSuccess ¶ added in v0.3.7
func DiscoverClusterResourceSetAndWaitForSuccess(ctx context.Context, input DiscoverClusterResourceSetAndWaitForSuccessInput, intervals ...interface{})
DiscoverClusterResourceSetAndWaitForSuccessInput patches a ClusterResourceSet label to the cluster and waits for resources to be created in that cluster.
func DiscoverMachineHealthChecksAndWaitForRemediation ¶ added in v0.3.6
func DiscoverMachineHealthChecksAndWaitForRemediation(ctx context.Context, input DiscoverMachineHealthCheckAndWaitForRemediationInput)
DiscoverMachineHealthCheckAndWait patches an unhealthy node condition to one node observed by the Machine Health Check and then wait for remediation.
func DiscoveryAndWaitForCluster ¶ added in v0.3.4
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 ¶ added in v0.3.4
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 ¶ added in v0.3.4
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 ¶ added in v0.3.10
func DiscoveryAndWaitForMachinePools(ctx context.Context, input DiscoveryAndWaitForMachinePoolsInput, intervals ...interface{}) []*clusterv1exp.MachinePool
DiscoveryAndWaitForMachinePools discovers the MachinePools existing in a cluster and waits for them to be ready (all the machine provisioned).
func DumpAllResources ¶ added in v0.3.4
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 DumpProviderResources ¶
func DumpProviderResources(mgmt ManagementCluster, resources map[string]runtime.Object, resourcePath string, writer io.Writer) error
DumpProviderResources dump provider specific API related resources to YAML Deprecated. Please use DumpAllResources instead
func DumpResources ¶
func DumpResources(mgmt ManagementCluster, resourcePath string, writer io.Writer) error
DumpResources dump cluster API related resources to YAML Deprecated. Please use DumpAllResources instead
func EnsureNamespace ¶
EnsureNamespace verifies if a namespaces exists. If it doesn't it will create the namespace.
func EtcdImageTagCondition ¶ added in v0.3.3
EtcdImageTagCondition returns a podListCondition that ensures the pod image contains the specified image tag
func GatherJUnitReports ¶ added in v0.3.10
GatherJUnitReports will move JUnit files from one directory to another, renaming them in a format expected by Prow.
func GetAllClustersByNamespace ¶ added in v0.3.4
func GetAllClustersByNamespace(ctx context.Context, input GetAllClustersByNamespaceInput) []*clusterv1.Cluster
GetAllClustersByNamespace returns the list of Cluster object in a namespace
func GetCAPIResources ¶ added in v0.3.4
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 ¶ added in v0.3.4
func GetClusterByName(ctx context.Context, input GetClusterByNameInput) *clusterv1.Cluster
GetClusterByName returns a Cluster object given his name
func GetClusterResourceSetBindingByCluster ¶ added in v0.3.7
func GetClusterResourceSetBindingByCluster(ctx context.Context, input GetClusterResourceSetBindingByClusterInput) *addonsv1.ClusterResourceSetBinding
GetClusterResourceSetBindingByCluster returns the ClusterResourceBinding objects for a cluster.
func GetClusterResourceSets ¶ added in v0.3.7
func GetClusterResourceSets(ctx context.Context, input GetClusterResourceSetsInput) []*addonsv1.ClusterResourceSet
GetClusterResourceSets returns all ClusterResourceSet objects in a namespace.
func GetControlPlaneMachinesByCluster ¶ added in v0.3.4
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 ¶ added in v0.3.4
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 ¶ added in v0.3.4
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 ¶ added in v0.3.4
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 ¶ added in v0.3.6
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 GetMachinePoolInstanceVersions ¶ added in v0.3.10
func GetMachinePoolInstanceVersions(ctx context.Context, input GetMachinesPoolInstancesInput) []string
GetMachinePoolInstanceVersions returns the
func GetMachinePoolsByCluster ¶ added in v0.3.10
func GetMachinePoolsByCluster(ctx context.Context, input GetMachinePoolsByClusterInput) []*clusterv1exp.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 ¶ added in v0.3.6
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 ¶ added in v0.3.6
func GetMachinesByMachineHealthCheck(ctx context.Context, input GetMachinesByMachineHealthCheckInput) []clusterv1.Machine
GetMachinesByMachineHealthCheck returns Machine objects for a cluster that match with MachineHealthCheck selector.
func InstallComponents ¶
func InstallComponents(ctx context.Context, mgmt Applier, components ...ComponentGenerator)
InstallComponents is a helper function that applies components, generally to a management cluster.
func ObjectToKind ¶ added in v0.3.7
ObjectToKind returns the Kind without the package prefix. Pass in a pointer to a struct This will panic if used incorrectly.
func PatchClusterLabel ¶ added in v0.3.7
func PatchClusterLabel(ctx context.Context, input PatchClusterLabelInput)
PatchClusterLabel patches labels to a cluster.
func PatchNodeCondition ¶ added in v0.3.6
func PatchNodeCondition(ctx context.Context, input PatchNodeConditionInput)
PatchNodeCondition patches a node condition to any one of the machines with a node ref.
func PhasePodCondition ¶ added in v0.3.3
PhasePodCondition is a podListCondition ensuring that pods are in the expected pod phase
func PrettyPrint ¶ added in v0.3.9
func PrettyPrint(v interface{}) string
PrettyPrint returns a formatted JSON version of the object given.
func ResolveArtifactsDirectory ¶ added in v0.3.10
ResolveArtifactsDirectory attempts to resolve a directory to store test outputs, using either that provided by Prow, or defaulting to _artifacts
func ScaleAndWaitMachineDeployment ¶ added in v0.3.6
func ScaleAndWaitMachineDeployment(ctx context.Context, input ScaleAndWaitMachineDeploymentInput)
ScaleAndWaitMachineDeployment scales MachineDeployment and waits until all machines have node ref and equal to Replicas.
func ScaleMachinePoolAndWait ¶ added in v0.3.10
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
- Kubeadm Bootstrapper
- Kubeadm ControlPlane
Any error that occurs when trying to add the schemes is ignored.
func TypeToKind ¶
func TypeToKind(i interface{}) string
TypeToKind returns the Kind without the package prefix. Pass in a pointer to a struct This will panic if used incorrectly. Deprecated: use ObjectToKind for runtime.Objects for compile-time checking
func UpgradeControlPlaneAndWaitForUpgrade ¶ added in v0.3.4
func UpgradeControlPlaneAndWaitForUpgrade(ctx context.Context, input UpgradeControlPlaneAndWaitForUpgradeInput)
UpgradeControlPlaneAndWaitForUpgrade upgrades a KubeadmControlPlane and waits for it to be upgraded.
func UpgradeMachineDeploymentInfrastructureRefAndWait ¶ added in v0.3.6
func UpgradeMachineDeploymentInfrastructureRefAndWait(ctx context.Context, input UpgradeMachineDeploymentInfrastructureRefAndWaitInput)
UpgradeMachineDeploymentInfrastructureRefAndWait upgrades a machine deployment infrastructure ref and waits for its machines to be upgraded.
func UpgradeMachineDeploymentsAndWait ¶ added in v0.3.6
func UpgradeMachineDeploymentsAndWait(ctx context.Context, input UpgradeMachineDeploymentsAndWaitInput)
UpgradeMachineDeploymentsAndWait upgrades a machine deployment and waits for its machines to be upgraded.
func UpgradeMachinePoolAndWait ¶ added in v0.3.10
func UpgradeMachinePoolAndWait(ctx context.Context, input UpgradeMachinePoolAndWaitInput)
UpgradeMachinePoolAndWait upgrades a machine pool and waits for its instances to be upgraded.
func WaitForAPIServiceAvailable ¶
WaitForAPIServiceAvailable will wait for an an APIService to be available. For example, kubectl wait --for=condition=Available --timeout=300s apiservice v1beta1.webhook.cert-manager.io
func WaitForClusterDeleted ¶
func WaitForClusterDeleted(ctx context.Context, input WaitForClusterDeletedInput, intervals ...interface{})
WaitForClusterDeleted waits until the cluster object has been deleted.
func WaitForClusterMachineNodeRefs ¶ added in v0.3.7
func WaitForClusterMachineNodeRefs(ctx context.Context, input WaitForClusterMachineNodeRefsInput, intervals ...interface{})
WaitForClusterMachineNodesRefs waits until all nodes associated with a machine deployment exist.
func WaitForClusterMachinesReady ¶ added in v0.3.7
func WaitForClusterMachinesReady(ctx context.Context, input WaitForClusterMachinesReadyInput, intervals ...interface{})
func WaitForClusterResourceSetToApplyResources ¶ added in v0.3.7
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{})
WaitForClusterToProvision will wait for a cluster to have a phase status of provisioned.
func WaitForControlPlaneAndMachinesReady ¶ added in v0.3.4
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 ¶ added in v0.3.6
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 ¶ added in v0.3.7
func WaitForControlPlaneToBeUpToDate(ctx context.Context, input WaitForControlPlaneToBeUpToDateInput, intervals ...interface{})
WaitForControlPlaneToBeUpToDate will wait for a control plane to be fully up-to-date.
func WaitForDNSUpgrade ¶ added in v0.3.4
func WaitForDNSUpgrade(ctx context.Context, input WaitForDNSUpgradeInput, intervals ...interface{})
WaitForDNSUpgrade waits until CoreDNS version matches with the CoreDNS upgrade version. This is called during KCP upgrade.
func WaitForDeploymentsAvailable ¶ added in v0.3.4
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 ¶ added in v0.3.4
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 ¶ added in v0.3.6
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 ¶ added in v0.3.6
func WaitForMachineDeploymentRollingUpgradeToComplete(ctx context.Context, input WaitForMachineDeploymentRollingUpgradeToCompleteInput, intervals ...interface{})
WaitForMachineDeploymentNodesToExist waits until rolling upgrade is complete.
func WaitForMachineDeploymentRollingUpgradeToStart ¶ added in v0.3.6
func WaitForMachineDeploymentRollingUpgradeToStart(ctx context.Context, input WaitForMachineDeploymentRollingUpgradeToStartInput, intervals ...interface{})
WaitForMachineDeploymentRollingUpgradeToStart waits until rolling upgrade starts.
func WaitForMachineHealthCheckToRemediateUnhealthyNodeCondition ¶ added in v0.3.6
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 ¶ added in v0.3.10
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 ¶ added in v0.3.10
func WaitForMachinePoolNodesToExist(ctx context.Context, input WaitForMachinePoolNodesToExistInput, intervals ...interface{})
WaitForMachinePoolNodesToExist waits until all nodes associated with a machine pool exist.
func WaitForMachineStatusCheck ¶ added in v0.3.6
func WaitForMachineStatusCheck(ctx context.Context, input WaitForMachineStatusCheckInput, intervals ...interface{})
WaitForMachineStatusCheck waits for the specified status to be true for the machine.
func WaitForOneKubeadmControlPlaneMachineToExist ¶
func WaitForOneKubeadmControlPlaneMachineToExist(ctx context.Context, input WaitForOneKubeadmControlPlaneMachineToExistInput, intervals ...interface{})
WaitForKubeadmControlPlaneMachineToExist will wait until all control plane machines have node refs.
func WaitForPodListCondition ¶ added in v0.3.3
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 WaitForPodsReadyInNamespace ¶
WaitForPodsReadyInNamespace will wait for all pods to be Ready in the specified namespace. For example, kubectl wait --for=condition=Ready --timeout=300s --namespace capi-system pods --all
func WatchDeploymentLogs ¶ added in v0.3.4
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 ¶ added in v0.3.4
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 ¶ added in v0.3.7
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. Use replacements in an e2econfig to enable metrics scraping without kube-rbac-proxy, e.g:
- new: --metrics-addr=:8080 old: --metrics-addr=127.0.0.1:8080
func YAMLForComponentSource ¶
func YAMLForComponentSource(ctx context.Context, source ComponentSource) ([]byte, error)
YAMLForComponentSource returns the YAML for the provided component source.
Types ¶
type Applier ¶
type Applier interface { // Apply allows us to apply YAML to the cluster, `kubectl apply` Apply(context.Context, []byte) error }
Applier is an interface around applying YAML to a cluster Deprecated. Please use ClusterProxy
type ApplyYAMLURLInput ¶
type ApplyYAMLURLInput struct { Client client.Client HTTPGetter HTTPGetter NetworkingURL string Scheme *runtime.Scheme }
ApplyYAMLURLInput is the input for ApplyYAMLURL.
type AssertAllClusterAPIResourcesAreGoneInput ¶
AssertAllClusterAPIResourcesAreGoneInput is the input for AssertAllClusterAPIResourcesAreGone.
type AssertControlPlaneFailureDomainsInput ¶
type AssertControlPlaneFailureDomainsInput struct { GetLister GetLister ClusterKey client.ObjectKey // ExpectedFailureDomains is required because this function cannot (easily) infer what success looks like. // In theory this field is not strictly necessary and could be replaced with enough clever logic/math. ExpectedFailureDomains map[string]int }
AssertControlPlaneFailureDomainsInput is the input for AssertControlPlaneFailureDomains.
type ClusterLogCollector ¶ added in v0.3.10
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 }
ClusterLogCollector defines an object that can collect logs from a machine.
type ClusterProxy ¶ added in v0.3.4
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 // Apply to apply YAML to the Kubernetes cluster, `kubectl apply`. Apply(context.Context, []byte) 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 ¶ added in v0.3.4
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 ComponentConfig ¶
type ComponentConfig struct { // Name is the name of the component. // This field is primarily used for logging. Name string `json:"name"` // Sources is an optional list of component YAML to apply to the management // cluster. // This field may be omitted when wanting only to block progress via one or // more Waiters. Sources []ComponentSource `json:"sources,omitempty"` // Waiters is an optional list of checks to perform in order to determine // whether or not the installed components are ready. Waiters []ComponentWaiter `json:"waiters,omitempty"` }
ComponentConfig describes a component required by the e2e test environment.
type ComponentGenerator ¶
type ComponentGenerator interface { // GetName returns the name of the component. GetName() string // Manifests return the YAML bundle. Manifests(context.Context) ([]byte, error) }
ComponentGenerator is used to install components, generally any YAML bundle.
func ComponentGeneratorForComponentSource ¶
func ComponentGeneratorForComponentSource(source ComponentSource) ComponentGenerator
ComponentGeneratorForComponentSource returns a ComponentGenerator for the provided ComponentSource.
type ComponentReplacement ¶
type ComponentReplacement struct { // Old is the pattern to replace. // A regular expression may be used. Old string `json:"old"` // New is the string used to replace the old pattern. // An empty string is valid. New string `json:"new,omitempty"` }
ComponentReplacement is used to replace some of the generated YAML prior to application.
type ComponentSource ¶
type ComponentSource struct { // Name is used for logging when a component has multiple sources. Name string `json:"name,omitempty"` // Value is the source of the component's YAML. // May be a URL or a kustomization root (specified by Type). // If a Type=url then Value may begin with file://, http://, or https://. // If a Type=kustomize then Value may be any valid go-getter URL. For // more information please see https://github.com/hashicorp/go-getter#url-format. Value string `json:"value"` // Type describes how to process the source of the component's YAML. // // Defaults to "kustomize". Type ComponentSourceType `json:"type,omitempty"` // Replacements is a list of patterns to replace in the component YAML // prior to application. Replacements []ComponentReplacement `json:"replacements,omitempty"` }
ComponentSource describes how to obtain a component's YAML.
type ComponentSourceType ¶
type ComponentSourceType string
ComponentSourceType indicates how a component's source should be obtained.
const ( // URLSource is component YAML available directly via a URL. // The URL may begin with file://, http://, or https://. URLSource ComponentSourceType = "url" // KustomizeSource is a valid kustomization root that can be used to produce // the component YAML. KustomizeSource ComponentSourceType = "kustomize" )
type ComponentWaiter ¶
type ComponentWaiter struct { // Value varies depending on the specified Type. // Please see the documentation for the different WaiterType constants to // understand the valid values for this field. Value string `json:"value"` // Type describes the type of check to perform. // // Defaults to "pods". Type ComponentWaiterType `json:"type,omitempty"` }
ComponentWaiter contains information to help determine whether installed components are ready.
type ComponentWaiterType ¶
type ComponentWaiterType string
ComponentWaiterType indicates the type of check to use to determine if the installed components are ready.
const ( // ServiceWaiter indicates to wait until a service's condition is Available. // When ComponentWaiter.Value is set to "service", the ComponentWaiter.Value // should be set to the name of a Service resource. ServiceWaiter ComponentWaiterType = "service" // PodsWaiter indicates to wait until all the pods in a namespace have a // condition of Ready. // When ComponentWaiter.Value is set to "pods", the ComponentWaiter.Value // should be set to the name of a Namespace resource. PodsWaiter ComponentWaiterType = "pods" )
type Config ¶
type Config struct { // Name is the name of the Kind management cluster. // Defaults to DefaultManagementClusterName. ManagementClusterName string `json:"managementClusterName,omitempty"` // KubernetesVersion is the version of Kubernetes to deploy when testing. // Defaults to DefaultKubernetesVersion. KubernetesVersion string `json:"kubernetesVersion,omitempty"` // Images is a list of container images to load into the Kind cluster. Images []ContainerImage `json:"images,omitempty"` // Components is a list of component configurations applied to the // Kind cluster. // The components are applied serially, in the listed order. Components []ComponentConfig `json:"components,omitempty"` }
Config is the input used to configure the e2e test environment. Deprecated. Please use clusterctl.E2EConfig instead.
func DefaultConfig ¶
DefaultConfig returns a default Config object that loads cert-manager, CAPI core, the Kubeadm Bootstrapper, and the Kubeadm ControlPlane.
Callers may append their own images to the returne Config.Images and their own components to Config.Components in order to stand up a management cluster for testing infrastructure providers.
func LoadConfig ¶
LoadConfig loads a Config from the provided YAML data.
func MustDefaultConfig ¶
func MustDefaultConfig() Config
MustDefaultConfig panics if DefaultConfig returns an error.
type ContainerImage ¶
type ContainerImage struct { // Name is the fully qualified name of the image. Name string // LoadBehavior may be used to dictate whether a failed load operation // should fail the test run. This is useful when wanting to load images // *if* they exist locally, but not wanting to fail if they don't. // // Defaults to MustLoadImage. LoadBehavior LoadImageBehavior }
ContainerImage describes an image to load into a cluster and the behavior when loading the image.
type ControlplaneClusterInput ¶
type ControlplaneClusterInput struct { Management ManagementCluster Cluster *clusterv1.Cluster InfraCluster runtime.Object Nodes []Node MachineDeployment MachineDeployment RelatedResources []runtime.Object CreateTimeout time.Duration DeleteTimeout time.Duration ControlPlane *controlplanev1.KubeadmControlPlane MachineTemplate runtime.Object }
ControlplaneClusterInput defines the necessary dependencies to run a multi-node control plane cluster. Deprecated.
func (*ControlplaneClusterInput) CleanUpCoreArtifacts ¶
func (input *ControlplaneClusterInput) CleanUpCoreArtifacts()
CleanUpCoreArtifacts deletes the cluster and waits for everything to be gone. Assertions made on objects owned by the Cluster:
- All Machines are removed
- All MachineSets are removed
- All MachineDeployments are removed
- All KubeadmConfigs are removed
- All Secrets are removed
Deprecated
func (*ControlplaneClusterInput) ControlPlaneCluster ¶
func (input *ControlplaneClusterInput) ControlPlaneCluster()
ControlPlaneCluster creates an n node control plane cluster. Assertions:
- The number of nodes in the created cluster will equal the number of control plane nodes plus the number of replicas in the machine deployment.
Deprecated. Please use the supplied functions below to get the exact behavior desired.
func (*ControlplaneClusterInput) SetDefaults ¶
func (input *ControlplaneClusterInput) SetDefaults()
SetDefaults defaults the struct fields if necessary. Deprecated.
type CreateClusterInput ¶
type CreateClusterInput struct { Creator Creator Cluster *clusterv1.Cluster InfraCluster runtime.Object }
CreateClusterInput is the input for CreateCluster.
type CreateKubeadmControlPlaneInput ¶
type CreateKubeadmControlPlaneInput struct { Creator Creator ControlPlane *controlplanev1.KubeadmControlPlane MachineTemplate runtime.Object }
CreateKubeadmControlPlaneInput is the input for CreateKubeadmControlPlane.
type CreateMachineDeploymentInput ¶
type CreateMachineDeploymentInput struct { Creator Creator MachineDeployment *clusterv1.MachineDeployment BootstrapConfigTemplate runtime.Object InfraMachineTemplate runtime.Object }
CreateMachineDeploymentInput is the input for CreateMachineDeployment.
type CreateNamespaceAndWatchEventsInput ¶ added in v0.3.4
type CreateNamespaceAndWatchEventsInput struct { Creator Creator ClientSet *kubernetes.Clientset Name string LogFolder string }
CreateNamespaceAndWatchEventsInput is the input type for CreateNamespaceAndWatchEvents.
type CreateNamespaceInput ¶ added in v0.3.4
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 runtime.Object, opts ...client.CreateOption) error
}
Creator can creates resources.
type DeleteAllClustersAndWaitInput ¶ added in v0.3.4
DeleteAllClustersAndWaitInput is the input type for DeleteAllClustersAndWait.
type DeleteClusterAndWaitInput ¶ added in v0.3.4
DeleteClusterAndWaitInput is the input type for DeleteClusterAndWait.
type DeleteClusterInput ¶
DeleteClusterInput is the input for DeleteCluster.
type DeleteNamespaceInput ¶ added in v0.3.4
DeleteNamespaceInput is the input type for DeleteNamespace.
type Deleter ¶
type Deleter interface {
Delete(ctx context.Context, obj runtime.Object, opts ...client.DeleteOption) error
}
Deleter can delete resources.
type DiscoverClusterResourceSetAndWaitForSuccessInput ¶ added in v0.3.7
type DiscoverClusterResourceSetAndWaitForSuccessInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster }
DiscoverClusterResourceSetAndWaitForSuccessInput is the input for DiscoverClusterResourceSetAndWaitForSuccess.
type DiscoverMachineHealthCheckAndWaitForRemediationInput ¶ added in v0.3.6
type DiscoverMachineHealthCheckAndWaitForRemediationInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster WaitForMachineRemediation []interface{} }
DiscoverMachineHealthCheckAndWaitForRemediationInput is the input for DiscoverMachineHealthCheckAndWait.
type DiscoveryAndWaitForClusterInput ¶ added in v0.3.4
DiscoveryAndWaitForClusterInput is the input type for DiscoveryAndWaitForCluster.
type DiscoveryAndWaitForControlPlaneInitializedInput ¶ added in v0.3.4
type DiscoveryAndWaitForControlPlaneInitializedInput struct { Lister Lister Cluster *clusterv1.Cluster }
DiscoveryAndWaitForControlPlaneInitializedInput is the input type for DiscoveryAndWaitForControlPlaneInitialized.
type DiscoveryAndWaitForMachineDeploymentsInput ¶ added in v0.3.4
DiscoveryAndWaitForMachineDeploymentsInput is the input type for DiscoveryAndWaitForMachineDeployments.
type DiscoveryAndWaitForMachinePoolsInput ¶ added in v0.3.10
type DiscoveryAndWaitForMachinePoolsInput struct { Getter Getter Lister Lister Cluster *clusterv1.Cluster }
DiscoveryAndWaitForMachinePoolsInput is the input type for DiscoveryAndWaitForMachinePools.
type DockerLogCollector ¶ added in v0.3.10
type DockerLogCollector struct{}
DockerLogCollector collect logs from a CAPD workload cluster.
type DumpAllResourcesInput ¶ added in v0.3.4
DumpAllResourcesInput is the input for DumpAllResources.
type GetAllClustersByNamespaceInput ¶ added in v0.3.4
GetAllClustersByNamespaceInput is the input for GetAllClustersByNamespace.
type GetCAPIResourcesInput ¶ added in v0.3.4
GetCAPIResourcesInput is the input for GetCAPIResources.
type GetClusterByNameInput ¶ added in v0.3.4
GetClusterByNameInput is the input for GetClusterByName.
type GetClusterResourceSetBindingByClusterInput ¶ added in v0.3.7
type GetClusterResourceSetBindingByClusterInput struct { Getter Getter ClusterName string Namespace string }
GetClusterResourceSetBindingByClusterInput is the input for GetClusterResourceSetBindingByCluster.
type GetClusterResourceSetsInput ¶ added in v0.3.7
GetClusterResourceSetsInput is the input for GetClusterResourceSets.
type GetControlPlaneMachinesByClusterInput ¶ added in v0.3.6
type GetControlPlaneMachinesByClusterInput struct { Lister Lister ClusterName string Namespace string }
GetControlPlaneMachinesByClusterInput is the input for GetControlPlaneMachinesByCluster.
type GetControllerDeploymentsInput ¶ added in v0.3.4
type GetControllerDeploymentsInput struct {
Lister Lister
}
GetControllerDeploymentsInput is the input for GetControllerDeployments.
type GetKubeadmControlPlaneByClusterInput ¶ added in v0.3.4
type GetKubeadmControlPlaneByClusterInput struct { Lister Lister ClusterName string Namespace string }
GetKubeadmControlPlaneByClusterInput is the input for GetKubeadmControlPlaneByCluster.
type GetMachineDeploymentsByClusterInput ¶ added in v0.3.4
type GetMachineDeploymentsByClusterInput struct { Lister Lister ClusterName string Namespace string }
GetMachineDeploymentsByClusterInput is the input for GetMachineDeploymentsByCluster
type GetMachineHealthChecksForClusterInput ¶ added in v0.3.6
type GetMachineHealthChecksForClusterInput struct { Lister Lister ClusterName string Namespace string }
GetMachineHealthChecksForClusterInput is the input for GetMachineHealthChecksForCluster.
type GetMachinePoolsByClusterInput ¶ added in v0.3.10
GetMachinePoolsByClusterInput is the input for GetMachinePoolsByCluster
type GetMachinesByMachineDeploymentsInput ¶ added in v0.3.6
type GetMachinesByMachineDeploymentsInput struct { Lister Lister ClusterName string Namespace string MachineDeployment clusterv1.MachineDeployment }
GetMachinesByMachineDeploymentsInput is the input for GetMachinesByMachineDeployments.
type GetMachinesByMachineHealthCheckInput ¶ added in v0.3.6
type GetMachinesByMachineHealthCheckInput struct { Lister Lister ClusterName string MachineHealthCheck *clusterv1.MachineHealthCheck }
GetMachinesByMachineHealthCheckInput is the input for GetMachinesByMachineHealthCheck.
type GetMachinesPoolInstancesInput ¶ added in v0.3.10
type GetMachinesPoolInstancesInput struct { Getter Getter Namespace string MachinePool clusterv1exp.MachinePool }
GetMachinesPoolInstancesInput is the input for GetMachinesPoolInstances.
type HTTPGetter ¶
HTTPGetter wraps up the Get method exposed by the net/http.Client.
type ImageLoader ¶
type ImageLoader interface { // LoadImage will put a local image onto the cluster. LoadImage(context.Context, string) error }
ImageLoader is an interface around loading an image onto a cluster. Deprecated. Please use ClusterProxy
type InitManagementClusterInput ¶
type InitManagementClusterInput struct { Config // Scheme is used to initialize the scheme for the management cluster // client. // Defaults to a new runtime.Scheme. Scheme *runtime.Scheme // ComponentGenerators is a list objects that supply additional component // YAML to apply to the management cluster. // Please note this is meant to be used at runtime to add YAML to the // management cluster outside of what is provided by the Components field. // For example, a caller could use this field to apply a Secret required by // some component from the Components field. ComponentGenerators []ComponentGenerator // NewManagementClusterFn may be used to provide a custom function for // returning a new management cluster. Otherwise kind.NewCluster is used. NewManagementClusterFn func() (ManagementCluster, error) }
InitManagementClusterInput is the information required to initialize a new management cluster for e2e testing.
func (*InitManagementClusterInput) Defaults ¶
func (c *InitManagementClusterInput) Defaults(ctx context.Context)
Defaults assigns default values to the object.
type Lister ¶
type Lister interface {
List(ctx context.Context, list runtime.Object, opts ...client.ListOption) error
}
Lister can lists resources.
type LoadImageBehavior ¶
type LoadImageBehavior string
LoadImageBehavior indicates the behavior when loading an image.
const ( // MustLoadImage causes a load operation to fail if the image cannot be // loaded. MustLoadImage LoadImageBehavior = "mustLoad" // TryLoadImage causes any errors that occur when loading an image to be // ignored. TryLoadImage LoadImageBehavior = "tryLoad" )
type MachineDeployment ¶
type MachineDeployment struct { MachineDeployment *clusterv1.MachineDeployment BootstrapConfigTemplate runtime.Object InfraMachineTemplate runtime.Object }
MachineDeployment contains the objects needed to create a CAPI MachineDeployment resource and its associated template resources. Deprecated. Please use the individual create/assert methods.
type MachineStatusCheck ¶ added in v0.3.6
MachineStatusCheck is a type that operates a status check on a Machine
func MachineNodeRefCheck ¶ added in v0.3.6
func MachineNodeRefCheck() MachineStatusCheck
MachineNodeRefCheck is a MachineStatusCheck ensuring that a NodeRef is assigned to the machine
func MachinePhaseCheck ¶ added in v0.3.6
func MachinePhaseCheck(expectedPhase string) MachineStatusCheck
MachinePhaseCheck is a MachineStatusCheck ensuring that a machines is in the expected phase
type ManagementCluster ¶
type ManagementCluster interface { Applier Waiter // Teardown will completely clean up the ManagementCluster. // This should be implemented as a synchronous function. // Generally to be used in the AfterSuite function if a management cluster is shared between tests. // Should try to clean everything up and report any dangling artifacts that needs manual intervention. Teardown(context.Context) // GetName returns the name of the cluster. GetName() string // GetKubeconfigPath returns the path to the kubeconfig file for the cluster. GetKubeconfigPath() string // GetScheme returns the scheme defining the types hosted in the cluster. GetScheme() *runtime.Scheme // GetClient returns a client to the Management cluster. GetClient() (client.Client, error) // GetClientSet returns a clientset to the management cluster. GetClientSet() (*kubernetes.Clientset, error) // GetWorkdloadClient returns a client to the specified workload cluster. GetWorkloadClient(ctx context.Context, namespace, name string) (client.Client, error) // GetWorkerKubeconfigPath returns the path to the kubeconfig file for the specified workload cluster. GetWorkerKubeconfigPath(ctx context.Context, namespace, name string) (string, error) }
ManagementCluster are all the features we need out of a kubernetes cluster to qualify as a management cluster. Deprecated. Please use ClusterProxy
func InitManagementCluster ¶
func InitManagementCluster(ctx context.Context, input *InitManagementClusterInput) ManagementCluster
InitManagementCluster returns a new cluster initialized as a CAPI management cluster. Deprecated. Please use bootstrap.ClusterProvider and ClusterProxy
type Node ¶
type Node struct { Machine *clusterv1.Machine InfraMachine runtime.Object BootstrapConfig runtime.Object }
Node contains all the pieces necessary to make a single node Deprecated.
type Option ¶ added in v0.3.10
type Option func(*clusterProxy)
Option is a configuration option supplied to NewClusterProxy
func WithMachineLogCollector ¶ added in v0.3.10
func WithMachineLogCollector(logCollector ClusterLogCollector) Option
WithMachineLogCollector allows to define the machine log collector to be used with this Cluster.
type PatchClusterLabelInput ¶ added in v0.3.7
type PatchClusterLabelInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster Labels map[string]string }
PatchClusterLabelInput is the input for PatchClusterLabel.
type PatchNodeConditionInput ¶ added in v0.3.6
type PatchNodeConditionInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster NodeCondition corev1.NodeCondition Machine clusterv1.Machine }
PatchNodeConditionInput is the input for PatchNodeCondition.
type ScaleAndWaitMachineDeploymentInput ¶ added in v0.3.6
type ScaleAndWaitMachineDeploymentInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster MachineDeployment *clusterv1.MachineDeployment Replicas int32 WaitForMachineDeployments []interface{} }
ScaleAndWaitMachineDeploymentInput is the input for ScaleAndWaitMachineDeployment.
type ScaleMachinePoolAndWaitInput ¶ added in v0.3.10
type ScaleMachinePoolAndWaitInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster Replicas int32 MachinePools []*clusterv1exp.MachinePool WaitForMachinePoolToScale []interface{} }
type UpgradeControlPlaneAndWaitForUpgradeInput ¶ added in v0.3.4
type UpgradeControlPlaneAndWaitForUpgradeInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster ControlPlane *controlplanev1.KubeadmControlPlane KubernetesUpgradeVersion string EtcdImageTag string DNSImageTag string WaitForMachinesToBeUpgraded []interface{} WaitForDNSUpgrade []interface{} WaitForEtcdUpgrade []interface{} }
UpgradeControlPlaneAndWaitForUpgradeInput is the input type for UpgradeControlPlaneAndWaitForUpgrade.
type UpgradeMachineDeploymentInfrastructureRefAndWaitInput ¶ added in v0.3.6
type UpgradeMachineDeploymentInfrastructureRefAndWaitInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster MachineDeployments []*clusterv1.MachineDeployment WaitForMachinesToBeUpgraded []interface{} }
UpgradeMachineDeploymentInfrastructureRefAndWaitInput is the input type for UpgradeMachineDeploymentInfrastructureRefAndWait.
type UpgradeMachineDeploymentsAndWaitInput ¶ added in v0.3.6
type UpgradeMachineDeploymentsAndWaitInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster UpgradeVersion string MachineDeployments []*clusterv1.MachineDeployment WaitForMachinesToBeUpgraded []interface{} }
UpgradeMachineDeploymentsAndWaitInput is the input type for UpgradeMachineDeploymentsAndWait.
type UpgradeMachinePoolAndWaitInput ¶ added in v0.3.10
type UpgradeMachinePoolAndWaitInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster UpgradeVersion string MachinePools []*clusterv1exp.MachinePool WaitForMachinePoolToBeUpgraded []interface{} }
type WaitForClusterDeletedInput ¶
WaitForClusterDeletedInput is the input for WaitForClusterDeleted.
type WaitForClusterMachineNodeRefsInput ¶ added in v0.3.7
WaitForClusterMachineNodesRefsInput is the input for WaitForClusterMachineNodesRefs.
type WaitForClusterMachinesReadyInput ¶ added in v0.3.7
type WaitForClusterResourceSetToApplyResourcesInput ¶ added in v0.3.7
type WaitForClusterResourceSetToApplyResourcesInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster ClusterResourceSet *addonsv1.ClusterResourceSet }
WaitForClusterResourceSetToApplyResourcesInput is the input for WaitForClusterResourceSetToApplyResources.
type WaitForClusterToProvisionInput ¶
WaitForClusterToProvisionInput is the input for WaitForClusterToProvision.
type WaitForControlPlaneAndMachinesReadyInput ¶ added in v0.3.4
type WaitForControlPlaneAndMachinesReadyInput struct { GetLister GetLister Cluster *clusterv1.Cluster ControlPlane *controlplanev1.KubeadmControlPlane }
WaitForControlPlaneAndMachinesReadyInput is the input type for WaitForControlPlaneAndMachinesReady.
type WaitForControlPlaneMachinesToBeUpgradedInput ¶ added in v0.3.6
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 ¶ added in v0.3.7
type WaitForControlPlaneToBeUpToDateInput struct { Getter Getter ControlPlane *controlplanev1.KubeadmControlPlane }
WaitForControlPlaneToBeReadyInput is the input for WaitForControlPlaneToBeReady.
type WaitForDNSUpgradeInput ¶ added in v0.3.4
WaitForDNSUpgradeInput is the input for WaitForDNSUpgrade.
type WaitForDeploymentsAvailableInput ¶ added in v0.3.4
type WaitForDeploymentsAvailableInput struct { Getter Getter Deployment *appsv1.Deployment }
WaitForDeploymentsAvailableInput is the input for WaitForDeploymentsAvailable.
type WaitForKubeProxyUpgradeInput ¶ added in v0.3.4
WaitForKubeProxyUpgradeInput is the input for WaitForKubeProxyUpgradeInput.
type WaitForKubeadmControlPlaneMachinesToExistInput ¶
type WaitForKubeadmControlPlaneMachinesToExistInput struct { Lister Lister Cluster *clusterv1.Cluster ControlPlane *controlplanev1.KubeadmControlPlane }
WaitForKubeadmControlPlaneMachinesToExistInput is the input for WaitForKubeadmControlPlaneMachinesToExist.
type WaitForMachineDeploymentMachinesToBeUpgradedInput ¶ added in v0.3.6
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 ¶ added in v0.3.6
type WaitForMachineDeploymentRollingUpgradeToCompleteInput struct { Getter Getter MachineDeployment *clusterv1.MachineDeployment }
WaitForMachineDeploymentRollingUpgradeToCompleteInput is the input for WaitForMachineDeploymentRollingUpgradeToComplete.
type WaitForMachineDeploymentRollingUpgradeToStartInput ¶ added in v0.3.6
type WaitForMachineDeploymentRollingUpgradeToStartInput struct { Getter Getter MachineDeployment *clusterv1.MachineDeployment }
WaitForMachineDeploymentRollingUpgradeToStartInput is the input for WaitForMachineDeploymentRollingUpgradeToStart.
type WaitForMachineHealthCheckToRemediateUnhealthyNodeConditionInput ¶ added in v0.3.6
type WaitForMachineHealthCheckToRemediateUnhealthyNodeConditionInput struct { ClusterProxy ClusterProxy Cluster *clusterv1.Cluster MachineHealthChecks []*clusterv1.MachineHealthCheck }
WaitForMachineHealthCheckToRemediateUnhealthyNodeConditionInput is the input for WaitForMachineHealthCheckToRemediateUnhealthyNodeCondition.
type WaitForMachinePoolInstancesToBeUpgradedInput ¶ added in v0.3.10
type WaitForMachinePoolInstancesToBeUpgradedInput struct { Getter Getter Cluster *clusterv1.Cluster KubernetesUpgradeVersion string MachineCount int MachinePool clusterv1exp.MachinePool }
WaitForMachinePoolInstancesToBeUpgradedInput is the input for WaitForMachinePoolInstancesToBeUpgraded.
type WaitForMachinePoolNodesToExistInput ¶ added in v0.3.10
type WaitForMachinePoolNodesToExistInput struct { Getter Getter MachinePool *clusterv1exp.MachinePool }
WaitForMachinePoolNodesToExistInput is the input for WaitForMachinePoolNodesToExist.
type WaitForMachineStatusCheckInput ¶ added in v0.3.6
type WaitForMachineStatusCheckInput struct { Getter Getter Machine *clusterv1.Machine StatusChecks []MachineStatusCheck }
WaitForMachineStatusCheckInput is the input for WaitForMachineStatusCheck.
type WaitForOneKubeadmControlPlaneMachineToExistInput ¶
type WaitForOneKubeadmControlPlaneMachineToExistInput struct { Lister Lister Cluster *clusterv1.Cluster ControlPlane *controlplanev1.KubeadmControlPlane }
WaitForKubeadmControlPlaneMachinesToExistInput is the input for WaitForKubeadmControlPlaneMachinesToExist.
type WaitForPodListConditionInput ¶ added in v0.3.3
type WaitForPodListConditionInput struct { Lister Lister ListOptions *client.ListOptions Condition podListCondition }
WaitForPodListConditionInput is the input args for WaitForPodListCondition
type Waiter ¶
type Waiter interface { // Wait allows us to wait for something in the cluster, `kubectl wait` Wait(context.Context, ...string) error }
Waiter is an interface around waiting for something on a kubernetes cluster. Deprecated. Please use ClusterProxy
type WatchDeploymentLogsInput ¶ added in v0.3.4
type WatchDeploymentLogsInput struct { GetLister GetLister ClientSet *kubernetes.Clientset Deployment *appsv1.Deployment LogPath string }
WatchDeploymentLogsInput is the input for WatchDeploymentLogs.
type WatchNamespaceEventsInput ¶ added in v0.3.4
type WatchNamespaceEventsInput struct { ClientSet *kubernetes.Clientset Name string LogFolder string }
WatchNamespaceEventsInput is the input type for WatchNamespaceEvents.
type WatchPodMetricsInput ¶ added in v0.3.7
type WatchPodMetricsInput struct { GetLister GetLister ClientSet *kubernetes.Clientset Deployment *appsv1.Deployment MetricsPath string }
Source Files ¶
- alltypes_helpers.go
- cluster_helpers.go
- cluster_proxy.go
- clusterresourceset_helpers.go
- config.go
- config_constants.go
- control_plane.go
- controller_helpers.go
- controlplane_helpers.go
- convenience.go
- daemonset_helpers.go
- deployment_helpers.go
- deprecated.go
- docker_logcollector.go
- interfaces.go
- machine_helpers.go
- machinedeployment_helpers.go
- machinehealthcheck_helpers.go
- machinepool_helpers.go
- machines.go
- namespace_helpers.go
- pod_helpers.go
- suite_helpers.go
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
Code generated for package kubernetesversions by go-bindata DO NOT EDIT.
|
Code generated for package kubernetesversions by go-bindata DO NOT EDIT. |
management
|
|