Documentation ¶
Index ¶
- Constants
- func Byf(format string, a ...interface{})
- func DumpSpecResourcesAndCleanup(ctx context.Context, input CleanupInput)
- func ExecOnHost(controlPlaneEndpoint, hostname, port string, f io.StringWriter, command string, ...) error
- func ExpectResourceGroupToBe404(ctx context.Context)
- func FileOnHost(path string) (*os.File, error)
- func GetClusterName(prefix, specName string) string
- func Log(message string)
- func LogCheckpoint(specTimes map[string]time.Time)
- func Logf(format string, args ...interface{})
- func SetupSpecNamespace(ctx context.Context, namespaceName string, clusterProxy framework.ClusterProxy, ...) (*corev1.Namespace, context.CancelFunc, error)
- type CleanupInput
Constants ¶
const ( AzureResourceGroup = "AZURE_RESOURCE_GROUP" AzureVNetName = "AZURE_VNET_NAME" ClusterIdentityName = "CLUSTER_IDENTITY_NAME" ClusterIdentityNamespace = "CLUSTER_IDENTITY_NAMESPACE" ClusterIdentitySecretName = "AZURE_CLUSTER_IDENTITY_SECRET_NAME" ClusterIdentitySecretNamespace = "AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE" AzureClientSecret = "AZURE_CLIENT_SECRET" SshPort = "22" RedactLogScriptPath = "REDACT_LOG_SCRIPT" AKSKubernetesVersion = "AKS_KUBERNETES_VERSION" AzureLocation = "AZURE_LOCATION" ManagedClustersResourceType = "managedClusters" )
Variables ¶
This section is empty.
Functions ¶
func DumpSpecResourcesAndCleanup ¶
func DumpSpecResourcesAndCleanup(ctx context.Context, input CleanupInput)
func ExecOnHost ¶
func ExecOnHost(controlPlaneEndpoint, hostname, port string, f io.StringWriter, command string, args ...string) error
ExecOnHost runs the specified command directly on a node's host, using an SSH connection proxied through a control plane host.
func ExpectResourceGroupToBe404 ¶
ExpectResourceGroupToBe404 performs a GET request to Azure to determine if the cluster resource group still exists. If it does still exist, it means the cluster was not deleted and is leaking Azure resources.
func FileOnHost ¶
FileOnHost creates the specified path, including parent directories if needed.
func GetClusterName ¶
GetClusterName gets the cluster name for the test cluster and sets the environment variables that depend on it.
func LogCheckpoint ¶
LogCheckpoint prints a message indicating the start or end of the current test spec, including which Ginkgo node it's running on.
Example output:
INFO: "With 1 worker node" started at Tue, 22 Sep 2020 13:19:08 PDT on Ginkgo node 2 of 3 INFO: "With 1 worker node" ran for 18m34s on Ginkgo node 2 of 3
func Logf ¶
func Logf(format string, args ...interface{})
Logf prints info logs with a timestamp and formatting.
func SetupSpecNamespace ¶
Types ¶
type CleanupInput ¶
type CleanupInput struct { SpecName string ClusterProxy framework.ClusterProxy ArtifactFolder string Namespace *corev1.Namespace CancelWatches context.CancelFunc Cluster *clusterv1.Cluster IntervalsGetter func(spec, key string) []interface{} SkipCleanup bool GetLogs bool AdditionalCleanup func() E2eConfig *clusterctl.E2EConfig }