testenv

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package testenv is used to setup a e2e test environment/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CAPIOperatorDeployProvider

func CAPIOperatorDeployProvider(ctx context.Context, input CAPIOperatorDeployProviderInput)

CAPIOperatorDeployProvider deploys the CAPI operator providers. It expects the required input parameters to be non-nil. It iterates over the CAPIProvidersSecretsYAML and applies them. Then, it applies the CAPI operator providers. If there are no deployments to wait for, the function returns. Otherwise, it waits for the provider deployments to be ready.

func CleanupTestCluster

func CleanupTestCluster(ctx context.Context, input CleanupTestClusterInput)

CleanupTestCluster is a function that cleans up the test cluster. It expects the required input parameters to be non-nil.

func CollectArtifacts

func CollectArtifacts(ctx context.Context, kubeconfigPath, name string, args ...string) error

CollectArtifacts collects artifacts using the provided kubeconfig path, name, and additional arguments. It returns an error if the kubeconfig path is empty or if there is an error running the kubectl command.

func CreateECRCreds

func CreateECRCreds(ctx context.Context, input CreateECRCredsInput)

CreateECRCreds is a function that creates ECR credentials for a given input. It expects the required input parameters to be non-nil.

func CreateEKSBootstrapClusterAndValidateImages

CreateEKSBootstrapClusterAndValidateImages is a function that creates an EKS bootstrap cluster and validates images. It expects the required input parameters to be non-nil.

func DeployChartMuseum

func DeployChartMuseum(ctx context.Context, input DeployChartMuseumInput)

DeployChartMuseum installs ChartMuseum to the Kubernetes cluster using the provided input parameters. It expects the required input parameters to be non-nil.

func DeployRancher

func DeployRancher(ctx context.Context, input DeployRancherInput)

DeployRancher deploys Rancher using the provided input parameters. It expects the required input parameters to be non-nil. If InstallCertManager is true, the function will install cert-manager. The function adds the cert-manager chart repository and the Rancher chart repository. It then updates the Rancher chart repository. The function generates the extra values file for Rancher and writes it to the Helm extra values path.// If RancherIngressConfig is provided, the function sets up the ingress for Rancher. If RancherServicePatch is provided, the function updates the Rancher service. The function waits for the Rancher webhook rollout and the fleet controller rollout.

func DeployRancherTurtles

func DeployRancherTurtles(ctx context.Context, input DeployRancherTurtlesInput)

DeployRancherTurtles deploys Rancher Turtles to the specified Kubernetes cluster. It expects the required input parameters to be non-nil. If the version is specified but the TurtlesChartUrl is empty, it adds an external rancher turtles chart repo for chartmuseum use-case. If the TurtlesChartUrl is specified, it adds the Rancher chart repo. After adding the necessary chart repos, the function installs the rancher-turtles chart. It sets the additional values for the chart based on the input parameters. If the image and tag are specified, it sets the corresponding values in the chart. If only the version is specified, it adds the version flag to the chart's additional flags. The function then adds the CAPI infrastructure providers and waits for the CAPI deployments to be available. It waits for the capi-controller-manager, capi-kubeadm-bootstrap-controller-manager, capi-kubeadm-control-plane-controller-manager, capd-controller-manager, rke2-bootstrap-controller-manager, and rke2-control-plane-controller-manager deployments to be available.

func EKSBootsrapCluster

func EKSBootsrapCluster(ctx context.Context, config *clusterctl.E2EConfig, clusterName, kubernetesVersion string) bootstrap.ClusterProvider

EKSBootsrapCluster is a function that creates a new EKS bootstrap cluster.

func NewEKSClusterProvider

func NewEKSClusterProvider(name, version, region string, numWorkers int) bootstrap.ClusterProvider

NewEKSClusterProvider creates a new instance of EKSClusterProvider. It expects the required input parameters to be non-nil.

func PreChartMuseumInstallHook added in v0.14.0

func PreChartMuseumInstallHook(chartMuseumInput *DeployChartMuseumInput, e2eConfig *clusterctl.E2EConfig)

PreChartMuseumInstallHook is a pre-install hook for ChartMuseum.

func PreGiteaInstallHook

func PreGiteaInstallHook(giteaInput *DeployGiteaInput, e2eConfig *clusterctl.E2EConfig)

PreGiteaInstallHook is a function that sets the service type for the Gitea input based on the management cluster environment type. It expects the required input parameters to be non-nil.

func PreRancherTurtlesInstallHook

func PreRancherTurtlesInstallHook(rtInput *DeployRancherTurtlesInput, e2eConfig *clusterctl.E2EConfig)

PreRancherTurtlesInstallHook is a function that sets additional values for the Rancher Turtles installation based on the management cluster environment type. If the infrastructure type is e2e.ManagementClusterEnvironmentEKS, the image pull secrets are set to "{regcred}" and the image pull policy is set to "IfNotPresent". If the infrastructure type is e2e.ManagementClusterEnvironmentIsolatedKind or e2e.ManagementClusterEnvironmentKind, the image pull policy is set to "Never". If the infrastructure type is not recognized, the function fails with an error message indicating the invalid infrastructure type.

func PreRancherTurtlesUpgradelHook

func PreRancherTurtlesUpgradelHook(rtUpgradeInput *UpgradeRancherTurtlesInput, e2eConfig *clusterctl.E2EConfig)

PreRancherTurtlesUpgradelHook is a function that handles the pre-upgrade hook for Rancher Turtles. If the infrastructure type is e2e.ManagementClusterEnvironmentEKS, it sets the imagePullSecrets and imagePullPolicy values in rtUpgradeInput. If the infrastructure type is e2e.ManagementClusterEnvironmentIsolatedKind, it sets the imagePullPolicy value in rtUpgradeInput to "Never". If the infrastructure type is e2e.ManagementClusterEnvironmentKind, it sets the imagePullPolicy value in rtUpgradeInput to "Never". If the infrastructure type is not recognized, it fails with an error message indicating the invalid infrastructure type.

func RancherDeployIngress

func RancherDeployIngress(ctx context.Context, input RancherDeployIngressInput)

RancherDeployIngress deploys an ingress based on the provided input. It expects the required input parameters to be non-nil. - If the IngressType is CustomIngress:

  • CustomIngress, CustomIngressNamespace, CustomIngressDeployment, and IngressWaitInterval must not be empty.
  • deployIsolatedModeIngress is called with the provided context and input.

- If the IngressType is NgrokIngress:

  • NgrokApiKey, NgrokAuthToken, NgrokPath, NgrokRepoName, NgrokRepoURL, and HelmExtraValuesPath must not be empty.
  • deployNgrokIngress is called with the provided context and input.

- If the IngressType is EKSNginxIngress:

  • IngressWaitInterval must not be nil.
  • deployEKSIngress is called with the provided input.

func RestartRancher

func RestartRancher(ctx context.Context, input RestartRancherInput)

RestartRancher restarts the Rancher application by killing its pods. It expects the required input parameters to be non-nil.

func UninstallGitea

func UninstallGitea(ctx context.Context, input UninstallGiteaInput)

UninstallGitea uninstalls Gitea by removing the Gitea Helm Chart. It expects the required input parameters to be non-nil.

func UninstallRancherTurtles

func UninstallRancherTurtles(ctx context.Context, input UninstallRancherTurtlesInput)

UninstallRancherTurtles uninstalls the Rancher Turtles chart. It expects the required input parameters to be non-nil.

func UpgradeRancherTurtles

func UpgradeRancherTurtles(ctx context.Context, input UpgradeRancherTurtlesInput)

UpgradeRancherTurtles upgrades the rancher-turtles chart. It expects the required input parameters to be non-nil. The function performs the following steps: 1. Validates the input parameters to ensure they are not empty or nil. 2. Upgrades the rancher-turtles chart by executing the necessary helm commands. 3. Executes any post-upgrade steps provided in the input.

func WaitForServiceIngressHostname

func WaitForServiceIngressHostname(ctx context.Context, input WaitForServiceIngressHostnameInput, result *WaitForServiceIngressHostnameResult)

WaitForServiceIngressHostname waits for a service to have an external IP and retrieves its hostname. It expects the required input parameters to be non-nil.

Types

type CAPIOperatorDeployProviderInput

type CAPIOperatorDeployProviderInput struct {
	// E2EConfig is the configuration for end-to-end testing.
	E2EConfig *clusterctl.E2EConfig

	// BootstrapClusterProxy is the proxy for the bootstrap cluster.
	BootstrapClusterProxy framework.ClusterProxy

	// CAPIProvidersSecretsYAML is the YAML representation of the secrets for the CAPI providers.
	CAPIProvidersSecretsYAML [][]byte

	// CAPIProvidersYAML is the YAML representation of the CAPI providers.
	CAPIProvidersYAML []byte

	// TemplateData is the data used for templating.
	TemplateData map[string]string

	// WaitDeploymentsReadyInterval is the interval for waiting for deployments to be ready.
	WaitDeploymentsReadyInterval []interface{}

	// WaitForDeployments is the list of deployments to wait for.
	WaitForDeployments []NamespaceName
}

CAPIOperatorDeployProviderInput represents the input parameters for deploying a CAPI operator provider.

type CleanupTestClusterInput

type CleanupTestClusterInput struct {
	// SetupTestClusterResult contains the result of setting up the test cluster.
	SetupTestClusterResult

	// SkipCleanup indicates whether to skip the cleanup process.
	SkipCleanup bool

	// ArtifactFolder specifies the folder where artifacts are stored.
	ArtifactFolder string
}

CleanupTestClusterInput represents the input parameters for cleaning up a test cluster.

type CreateECRCredsInput

type CreateECRCredsInput struct {
	// BootstrapClusterProxy is the cluster proxy used for bootstrapping.
	BootstrapClusterProxy framework.ClusterProxy

	// Name is the name of the ECR credentials.
	Name string

	// Account is the AWS account associated with the ECR credentials.
	Account string

	// Region is the AWS region where the ECR credentials are created.
	Region string

	// Namespace is the Kubernetes namespace where the ECR credentials are stored.
	Namespace string
}

CreateECRCredsInput represents the input parameters for creating ECR credentials.

type CreateEKSBootstrapClusterAndValidateImagesInput

type CreateEKSBootstrapClusterAndValidateImagesInput struct {
	// Name is the name of the bootstrap cluster.
	Name string
	// Version is the version of the bootstrap cluster.
	Version string
	// Region is the AWS region where the bootstrap cluster will be created.
	Region string
	// NumWorkers is the number of worker nodes in the bootstrap cluster.
	NumWorkers int
	// Images is a list of container images to be validated.
	Images []clusterctl.ContainerImage
}

CreateEKSBootstrapClusterAndValidateImagesInput represents the input parameters for creating an EKS bootstrap cluster and validating images.

type CreateEKSBootstrapClusterAndValidateImagesInputResult

type CreateEKSBootstrapClusterAndValidateImagesInputResult struct {
	// BootstrapClusterProvider manages provisioning of the the bootstrap cluster to be used for the e2e tests.
	BootstrapClusterProvider bootstrap.ClusterProvider
}

type CustomClusterProvider

type CustomClusterProvider func(ctx context.Context, config *clusterctl.E2EConfig, clusterName, kubernetesVersion string) bootstrap.ClusterProvider

CustomClusterProvider is a function type that represents a custom cluster provider. It takes in a context, an E2EConfig, a cluster name, and a Kubernetes version as parameters. It returns a bootstrap.ClusterProvider.

type DeployChartMuseumInput

type DeployChartMuseumInput struct {
	// HelmBinaryPath is the path to the Helm binary.
	HelmBinaryPath string

	// BootstrapClusterProxy is the cluster proxy for the bootstrap cluster.
	BootstrapClusterProxy framework.ClusterProxy

	// ChartsPath is the path to the charts.
	ChartsPath string

	// ChartVersion is the version of the chart.
	ChartVersion string

	// WaitInterval is the interval to wait for.
	WaitInterval []interface{}

	// CustomIngressConfig is the custom ingress configuration.
	CustomIngressConfig []byte

	// Variables is the collection of variables.
	Variables turtlesframework.VariableCollection
}

DeployChartMuseumInput represents the input parameters for deploying ChartMuseum.

type DeployGiteaInput

type DeployGiteaInput struct {
	// BootstrapClusterProxy is the cluster proxy for bootstrapping.
	BootstrapClusterProxy framework.ClusterProxy

	// HelmBinaryPath is the path to the Helm binary.
	HelmBinaryPath string

	// ChartRepoName is the name of the chart repository.
	ChartRepoName string

	// ChartRepoURL is the URL of the chart repository.
	ChartRepoURL string

	// ChartName is the name of the chart.
	ChartName string

	// ChartVersion is the version of the chart.
	ChartVersion string

	// ValuesFilePath is the path to the values file.
	ValuesFilePath string

	// Values are the values for the chart.
	Values map[string]string

	// RolloutWaitInterval is the interval to wait between rollouts.
	RolloutWaitInterval []interface{}

	// ServiceWaitInterval is the interval to wait for the service.
	ServiceWaitInterval []interface{}

	// Username is the username for authentication.
	Username string

	// Password is the password for authentication.
	Password string

	// AuthSecretName is the name of the authentication secret.
	AuthSecretName string

	// CustomIngressConfig is the custom ingress configuration.
	CustomIngressConfig []byte

	// ServiceType is the type of the service.
	ServiceType corev1.ServiceType

	// Variables is the collection of variables.
	Variables turtlesframework.VariableCollection
}

DeployGiteaInput represents the input parameters for deploying Gitea.

type DeployGiteaResult

type DeployGiteaResult struct {
	// GitAddress is the address of the deployed Gitea instance.
	GitAddress string
}

DeployGiteaResult represents the result of deploying Gitea.

func DeployGitea

func DeployGitea(ctx context.Context, input DeployGiteaInput) *DeployGiteaResult

DeployGitea deploys Gitea using the provided input parameters. It expects the required input parameters to be non-nil. If the service type is ClusterIP, it checks that the custom ingress config is not empty. The function then proceeds to install the Gitea chart using Helm. It adds the chart repository, updates the chart, and installs the chart with the specified version and flags. After the installation, it waits for the Gitea deployment to be available. Depending on the service type, it retrieves the Git server address using the node port, load balancer, or custom ingress. If a username is provided, it waits for the Gitea endpoint to be available and creates a Gitea secret with the username and password.

type DeployRancherInput

type DeployRancherInput struct {
	// BootstrapClusterProxy is the cluster proxy for bootstrapping.
	BootstrapClusterProxy framework.ClusterProxy

	// HelmBinaryPath is the path to the Helm binary.
	HelmBinaryPath string

	// HelmExtraValuesPath is the path to the Helm extra values file.
	HelmExtraValuesPath string

	// InstallCertManager is the flag indicating whether to install Cert Manager.
	InstallCertManager bool

	// CertManagerChartPath is the path to the Cert Manager chart.
	CertManagerChartPath string

	// CertManagerUrl is the URL for Cert Manager.
	CertManagerUrl string

	// CertManagerRepoName is the repository name for Cert Manager.
	CertManagerRepoName string

	// RancherChartRepoName is the repository name for Rancher chart.
	RancherChartRepoName string

	// RancherChartURL is the URL for Rancher chart.
	RancherChartURL string

	// RancherChartPath is the path to the Rancher chart.
	RancherChartPath string

	// RancherVersion is the version of Rancher.
	RancherVersion string

	// RancherImageTag is the image tag for Rancher.
	RancherImageTag string

	// RancherNamespace is the namespace for Rancher.
	RancherNamespace string

	// RancherHost is the host for Rancher.
	RancherHost string

	// RancherPassword is the password for Rancher.
	RancherPassword string

	// RancherFeatures are the features for Rancher.
	RancherFeatures string

	// RancherPatches are the patches for Rancher.
	RancherPatches [][]byte

	// RancherWaitInterval is the wait interval for Rancher.
	RancherWaitInterval []interface{}

	// ControllerWaitInterval is the wait interval for the controller.
	ControllerWaitInterval []interface{}

	// RancherIngressConfig is the ingress configuration for Rancher.
	RancherIngressConfig []byte

	// RancherServicePatch is the service patch for Rancher.
	RancherServicePatch []byte

	// RancherIngressClassName is the ingress class name for Rancher.
	RancherIngressClassName string

	// Development is the flag indicating whether it is a development environment.
	Development bool

	// Variables is the collection of variables.
	Variables turtlesframework.VariableCollection
}

DeployRancherInput represents the input parameters for deploying Rancher.

type DeployRancherTurtlesInput

type DeployRancherTurtlesInput struct {
	// BootstrapClusterProxy is the cluster proxy for the bootstrap cluster.
	BootstrapClusterProxy framework.ClusterProxy

	// HelmBinaryPath is the path to the Helm binary.
	HelmBinaryPath string

	// TurtlesChartUrl is the URL of the Turtles chart.
	TurtlesChartUrl string

	// TurtlesChartPath is the path to the Turtles chart.
	TurtlesChartPath string

	// TurtlesChartRepoName is the name of the Turtles chart repository.
	TurtlesChartRepoName string

	// CAPIProvidersSecretYAML is the YAML content of the CAPI providers secret.
	CAPIProvidersSecretYAML []byte

	// CAPIProvidersYAML is the YAML content of the CAPI providers.
	CAPIProvidersYAML []byte

	// Namespace is the namespace for deploying Rancher Turtles.
	Namespace string

	// Image is the image for Rancher Turtles.
	Image string

	// Tag is the tag for Rancher Turtles.
	Tag string

	// Version is the version of Rancher Turtles.
	Version string

	// WaitDeploymentsReadyInterval is the interval for waiting for deployments to be ready.
	WaitDeploymentsReadyInterval []interface{}

	// AdditionalValues are the additional values for Rancher Turtles.
	AdditionalValues map[string]string
}

DeployRancherTurtlesInput represents the input parameters for deploying Rancher Turtles.

type EKSClusterProvider

type EKSClusterProvider struct {
	// contains filtered or unexported fields
}

EKSClusterProvider represents a provider for managing EKS clusters. EKSClusterProvider represents a provider for managing EKS clusters.

func (*EKSClusterProvider) Create

func (k *EKSClusterProvider) Create(ctx context.Context)

Create creates an EKS cluster using eksctl. It creates a temporary file for kubeconfig and writes the EKS kubeconfig to it. The cluster is created with the specified name, version, number of worker nodes, region, and tags. The kubeconfig path is set to the path of the temporary file.

func (*EKSClusterProvider) Dispose

func (k *EKSClusterProvider) Dispose(ctx context.Context)

Dispose the EKS cluster and its kubeconfig file.

func (*EKSClusterProvider) GetKubeconfigPath

func (k *EKSClusterProvider) GetKubeconfigPath() string

GetKubeconfigPath returns the path to the kubeconfig file for the cluster.

type IngressType

type IngressType string
const (
	// CustomIngress represents a custom ingress type.
	CustomIngress IngressType = "custom"

	// NgrokIngress represents an ngrok ingress type.
	NgrokIngress IngressType = "ngrok"

	// EKSNginxIngress represents an EKS nginx ingress type.
	EKSNginxIngress IngressType = "eks"
)

type NamespaceName

type NamespaceName struct {
	Name      string
	Namespace string
}

type PreManagementClusterSetupResult

type PreManagementClusterSetupResult struct {
	// IngressType specifies the type of ingress for the cluster.
	IngressType IngressType

	// DockerUsername is the username for accessing the Docker registry.
	DockerUsername string

	// DockerPassword is the password for accessing the Docker registry.
	DockerPassword string

	// CustomClusterProvider represents the custom cluster provider for the cluster.
	CustomClusterProvider CustomClusterProvider
}

PreManagementClusterSetupResult represents the result of pre-management cluster setup.

func PreManagementClusterSetupHook

func PreManagementClusterSetupHook(e2eConfig *clusterctl.E2EConfig) PreManagementClusterSetupResult

PreManagementClusterSetupHook is a function that performs pre-setup tasks for the management cluster. It expects the required input parameters to be non-nil. It checks the environment type and sets the Docker username, Docker password, custom cluster provider, and ingress type accordingly. If the environment type is e2e.ManagementClusterEnvironmentEKS, it expects the GITHUB_USERNAME and GITHUB_TOKEN environment variables to be set. If the environment type is e2e.ManagementClusterEnvironmentIsolatedKind, it sets the ingress type to CustomIngress. If the environment type is e2e.ManagementClusterEnvironmentKind, it sets the ingress type to NgrokIngress. If the environment type is not recognized, it fails with an error message indicating the invalid infrastructure type.

type PreRancherInstallHookInput

type PreRancherInstallHookInput struct {
	// Ctx is the context for the hook execution.
	Ctx context.Context

	// RancherInput is the input parameters for deploying Rancher.
	RancherInput *DeployRancherInput

	// PreSetupOutput is the output of the pre-management cluster setup.
	PreSetupOutput PreManagementClusterSetupResult

	// SetupClusterResult is the result of setting up the test cluster.
	SetupClusterResult *SetupTestClusterResult

	// E2EConfig is the E2E configuration for the cluster.
	E2EConfig *clusterctl.E2EConfig
}

PreRancherInstallHookInput represents the input parameters for the pre-Rancher install hook.

type PreRancherInstallHookResult

type PreRancherInstallHookResult struct {
	// HostName is the hostname of the Rancher installation.
	HostName string
}

PreRancherInstallHookResult represents the result of a pre-Rancher install hook.

func PreRancherInstallHook

func PreRancherInstallHook(input *PreRancherInstallHookInput) PreRancherInstallHookResult

PreRancherInstallHook is a function that performs pre-installation tasks for Rancher. The function retrieves the infrastructure type from the input and performs different actions based on the type. If the infrastructure type is e2e.ManagementClusterEnvironmentEKS, it retrieves the ingress hostname and sets it as the Rancher host. It also deploys ghcr details by creating a Docker registry secret. If the infrastructure type is e2e.ManagementClusterEnvironmentIsolatedKind, it sets the isolated host name as the Rancher host. If the infrastructure type is e2e.ManagementClusterEnvironmentKind, it sets the Rancher ingress config and service patch based on the provided values. The function returns the host name as part of the PreRancherInstallHookResult.

type RancherDeployIngressInput

type RancherDeployIngressInput struct {
	// BootstrapClusterProxy is the cluster proxy for the bootstrap cluster.
	BootstrapClusterProxy framework.ClusterProxy

	// HelmBinaryPath is the path to the Helm binary.
	HelmBinaryPath string

	// HelmExtraValuesPath is the path to the Helm extra values file.
	HelmExtraValuesPath string

	// CustomIngress is the custom ingress to be deployed.
	CustomIngress []byte

	// CustomIngressNamespace is the namespace for the custom ingress.
	CustomIngressNamespace string

	// CustomIngressDeployment is the deployment name for the custom ingress.
	CustomIngressDeployment string

	// IngressWaitInterval is the wait interval for the ingress deployment.
	IngressWaitInterval []interface{}

	// DefaultIngressClassPatch is the default ingress class patch.
	DefaultIngressClassPatch []byte

	// IngressType is the type of ingress to be deployed.
	IngressType IngressType

	// NgrokApiKey is the API key for Ngrok.
	NgrokApiKey string

	// NgrokAuthToken is the authentication token for Ngrok.
	NgrokAuthToken string

	// NgrokPath is the path to the Ngrok binary.
	NgrokPath string

	// NgrokRepoName is the name of the Ngrok repository.
	NgrokRepoName string

	// NgrokRepoURL is the URL of the Ngrok repository.
	NgrokRepoURL string
}

RancherDeployIngressInput represents the input parameters for deploying an ingress in Rancher.

type RestartRancherInput

type RestartRancherInput struct {
	// BootstrapClusterProxy is the cluster proxy for the bootstrap cluster.
	BootstrapClusterProxy framework.ClusterProxy

	// RancherNamespace is the namespace where Rancher is deployed.
	RancherNamespace string

	// RancherWaitInterval is the wait interval for Rancher restart.
	RancherWaitInterval []interface{}
}

RestartRancherInput represents the input parameters for restarting Rancher.

type SetupTestClusterInput

type SetupTestClusterInput struct {
	// UseExistingCluster specifies whether to use an existing cluster or create a new one.
	UseExistingCluster bool

	// E2EConfig is the configuration for end-to-end testing.
	E2EConfig *clusterctl.E2EConfig

	// ClusterctlConfigPath is the path to the clusterctl configuration file.
	ClusterctlConfigPath string

	// Scheme is the runtime scheme.
	Scheme *runtime.Scheme

	// ArtifactFolder is the folder where artifacts are stored.
	ArtifactFolder string

	// KubernetesVersion is the version of Kubernetes to use.
	KubernetesVersion string

	// HelmBinaryPath is the path to the Helm binary.
	HelmBinaryPath string

	// CustomClusterProvider is a custom cluster provider.
	CustomClusterProvider CustomClusterProvider
}

SetupTestClusterInput represents the input parameters for setting up a test cluster.

type SetupTestClusterResult

type SetupTestClusterResult struct {
	// BootstrapClusterProvider manages provisioning of the the bootstrap cluster to be used for the e2e tests.
	// Please note that provisioning will be skipped if e2e.use-existing-cluster is provided.
	BootstrapClusterProvider bootstrap.ClusterProvider

	// BootstrapClusterProxy allows to interact with the bootstrap cluster to be used for the e2e tests.
	BootstrapClusterProxy framework.ClusterProxy

	// BootstrapClusterLogFolder is the log folder for the cluster
	BootstrapClusterLogFolder string

	// IsolatedHostName is the hostname to use for Rancher in isolated mode
	IsolatedHostName string
}

func SetupTestCluster

func SetupTestCluster(ctx context.Context, input SetupTestClusterInput) *SetupTestClusterResult

SetupTestCluster sets up a test cluster for running tests. It expects the required input parameters to be non-nil.

type UninstallGiteaInput

type UninstallGiteaInput struct {
	// BootstrapClusterProxy is the cluster proxy for the bootstrap cluster.
	BootstrapClusterProxy framework.ClusterProxy

	// HelmBinaryPath is the path to the Helm binary.
	HelmBinaryPath string

	// DeleteWaitInterval is the interval to wait between deleting resources.
	DeleteWaitInterval []interface{}
}

UninstallGiteaInput represents the input parameters for uninstalling Gitea.

type UninstallRancherTurtlesInput

type UninstallRancherTurtlesInput struct {
	// BootstrapClusterProxy is the cluster proxy for the bootstrap cluster.
	BootstrapClusterProxy framework.ClusterProxy

	// HelmBinaryPath is the path to the Helm binary.
	HelmBinaryPath string

	// Namespace is the namespace where Rancher Turtles are installed.
	Namespace string

	// DeleteWaitInterval is the wait interval for deleting resources.
	DeleteWaitInterval []interface{}
}

UninstallRancherTurtlesInput represents the input parameters for uninstalling Rancher Turtles.

type UpgradeRancherTurtlesInput

type UpgradeRancherTurtlesInput struct {
	// BootstrapClusterProxy is the cluster proxy for the bootstrap cluster.
	BootstrapClusterProxy framework.ClusterProxy

	// HelmBinaryPath is the path to the Helm binary.
	HelmBinaryPath string

	// Namespace is the namespace for the deployment.
	Namespace string

	// WaitDeploymentsReadyInterval is the interval for waiting until deployments are ready.
	WaitDeploymentsReadyInterval []interface{}

	// AdditionalValues are the additional values for the Helm chart.
	AdditionalValues map[string]string

	// Image is the image for the deployment.
	Image string

	// Tag is the tag for the deployment.
	Tag string

	// PostUpgradeSteps are the post-upgrade steps to be executed.
	PostUpgradeSteps []func()

	// SkipCleanup indicates whether to skip the cleanup after the upgrade.
	SkipCleanup bool
}

UpgradeRancherTurtlesInput represents the input parameters for upgrading Rancher Turtles.

type WaitForServiceIngressHostnameInput

type WaitForServiceIngressHostnameInput struct {
	// BootstrapClusterProxy is the cluster proxy for the bootstrap cluster.
	BootstrapClusterProxy framework.ClusterProxy

	// ServiceName is the name of the service.
	ServiceName string

	// ServiceNamespace is the namespace of the service.
	ServiceNamespace string

	// IngressWaitInterval is the interval to wait between ingress checks.
	IngressWaitInterval []interface{}
}

WaitForServiceIngressHostnameInput represents the input parameters for waiting for a service ingress hostname.

type WaitForServiceIngressHostnameResult

type WaitForServiceIngressHostnameResult struct {
	// Hostname is the hostname of the service ingress.
	Hostname string
}

WaitForServiceIngressHostnameResult represents the result of waiting for the service ingress hostname.

Jump to

Keyboard shortcuts

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