Documentation
¶
Index ¶
- Constants
- func AddRKE2K3SCustomClusterNodes(client *rancher.Client, cluster *v1.SteveAPIObject, nodes []*nodes.Node, ...) error
- func CallSSHTestByName(testCase provisioninginput.SSHTestCase, node *nodes.Node, ...) error
- func CreateProvisioningAKSHostedCluster(client *rancher.Client, aksClusterConfig aks.ClusterConfig) (*management.Cluster, error)
- func CreateProvisioningAirgapCustomCluster(client *rancher.Client, clustersConfig *clusters.ClusterConfig, ...) (*v1.SteveAPIObject, error)
- func CreateProvisioningCluster(client *rancher.Client, provider Provider, ...) (*v1.SteveAPIObject, error)
- func CreateProvisioningCustomCluster(client *rancher.Client, externalNodeProvider *ExternalNodeProvider, ...) (*v1.SteveAPIObject, error)
- func CreateProvisioningEKSHostedCluster(client *rancher.Client, eksClusterConfig eks.ClusterConfig) (*management.Cluster, error)
- func CreateProvisioningGKEHostedCluster(client *rancher.Client, gkeClusterConfig gke.ClusterConfig) (*management.Cluster, error)
- func DeleteRKE2K3SCustomClusterNodes(client *rancher.Client, clusterID string, cluster *v1.SteveAPIObject, ...) error
- func GetAWSOSNames(client *rancher.Client, customConfig rancherEc2.AWSEC2Configs) ([]string, error)
- func GetCustomSchemaParams(client *rancher.Client, cattleConfig map[string]any) []upstream.TestCaseParameterCreate
- func GetProvisioningSchemaParams(client *rancher.Client, cattleConfig map[string]any) []upstream.TestCaseParameterCreate
- func GetWindowsPools(client *rancher.Client, customConfig rancherEc2.AWSEC2Configs) []rancherEc2.AWSEC2Config
- func UpgradeClusterK8sVersion(client *rancher.Client, clusterName *string, upgradeVersion *string) (*bundledclusters.BundledCluster, error)
- func VerifyACE(t *testing.T, client *rancher.Client, cluster *steveV1.SteveAPIObject)
- func VerifyACEAirgap(t *testing.T, client *rancher.Client, cluster *steveV1.SteveAPIObject)
- func VerifyACELocalUnavailable(t *testing.T, rancherClient *rancher.Client, cluster *steveV1.SteveAPIObject, ...)
- func VerifyAllNodesDeleted(client *rancher.Client, clusterID string) error
- func VerifyClusterReady(client *rancher.Client, cluster *steveV1.SteveAPIObject) error
- func VerifyClusterReadyV3(client *rancher.Client, clusterID string) error
- func VerifyDataDirectories(t *testing.T, client *rancher.Client, cluster *steveV1.SteveAPIObject)
- func VerifyDeleteRKE2K3SCluster(t *testing.T, client *rancher.Client, clusterID string)
- func VerifyDynamicCluster(t *testing.T, client *rancher.Client, cluster *steveV1.SteveAPIObject)
- func VerifyHostedCluster(t *testing.T, client *rancher.Client, cluster *management.Cluster)
- func VerifyHostnameLength(t *testing.T, client *rancher.Client, clusterObject *steveV1.SteveAPIObject)
- func VerifyPSACT(t *testing.T, client *rancher.Client, cluster *steveV1.SteveAPIObject)
- func VerifyUpgrade(t *testing.T, updatedCluster *bundledclusters.BundledCluster, ...)
- type AirgapNodeCreationFunc
- type CloudCredFunc
- type CustomClusterConfig
- type CustomOSNamesFunc
- type ExternalNodeProvider
- type GetCustomWindowsPools
- type LoadMachineConfigFunc
- type MachinePoolFunc
- type MachineRolesFunc
- type NodeCreationFunc
- type NodeDeletionFunc
- type OSNamesFunc
- type Provider
- type ProviderName
- type VerifyCloudProviderFunc
Constants ¶
const ( AWSProvider = "aws" AzureProvider = "azure" DOProvider = "do" HarvesterProvider = "harvester" LinodeProvider = "linode" GoogleProvider = "google" VsphereProvider = "vsphere" VsphereCloudProvider = "rancher-vsphere" )
const (
DefaultRancherDataDir = "/var/lib/rancher"
)
Variables ¶
This section is empty.
Functions ¶
func AddRKE2K3SCustomClusterNodes ¶
func AddRKE2K3SCustomClusterNodes(client *rancher.Client, cluster *v1.SteveAPIObject, nodes []*nodes.Node, rolesPerNode []string, clustersConfig *clusters.ClusterConfig) error
AddRKE2K3SCustomClusterNodes is a helper method that will add nodes to the custom RKE2/K3S custom cluster.
func CallSSHTestByName ¶
func CallSSHTestByName(testCase provisioninginput.SSHTestCase, node *nodes.Node, client *rancher.Client, clusterID string, machineName string) error
CallSSHTestByName tests the ssh tests specified in the provisioninginput config clusterSSHTests field. For example CheckCPU checks the cpu usage of the cluster agent. If the usage is too high the func will return a warning.
func CreateProvisioningAKSHostedCluster ¶
func CreateProvisioningAKSHostedCluster(client *rancher.Client, aksClusterConfig aks.ClusterConfig) (*management.Cluster, error)
CreateProvisioningAKSHostedCluster provisions an AKS cluster, then runs verify checks
func CreateProvisioningAirgapCustomCluster ¶
func CreateProvisioningAirgapCustomCluster(client *rancher.Client, clustersConfig *clusters.ClusterConfig, externalNodeProvider *ExternalNodeProvider, ec2Configs *ec2.AWSEC2Configs, airgapBastion string) (*v1.SteveAPIObject, error)
CreateProvisioningAirgapCustomCluster provisions a rke2/k3s cluster, then runs verify checks
func CreateProvisioningCluster ¶
func CreateProvisioningCluster(client *rancher.Client, provider Provider, credentialSpec cloudcredentials.CloudCredential, clustersConfig *clusters.ClusterConfig, machineConfigSpec machinepools.MachineConfigs, hostnameTruncation []machinepools.HostnameTruncation) (*v1.SteveAPIObject, error)
CreateProvisioningCluster provisions a non-rke1 cluster, then runs verify checks
func CreateProvisioningCustomCluster ¶
func CreateProvisioningCustomCluster(client *rancher.Client, externalNodeProvider *ExternalNodeProvider, clustersConfig *clusters.ClusterConfig, ec2Configs *ec2.AWSEC2Configs) (*v1.SteveAPIObject, error)
CreateProvisioningCustomCluster provisions a non-rke1 cluster using a 3rd party client for its nodes, then runs verify checks
func CreateProvisioningEKSHostedCluster ¶
func CreateProvisioningEKSHostedCluster(client *rancher.Client, eksClusterConfig eks.ClusterConfig) (*management.Cluster, error)
CreateProvisioningEKSHostedCluster provisions an EKS cluster, then runs verify checks
func CreateProvisioningGKEHostedCluster ¶
func CreateProvisioningGKEHostedCluster(client *rancher.Client, gkeClusterConfig gke.ClusterConfig) (*management.Cluster, error)
CreateProvisioningGKEHostedCluster provisions an GKE cluster, then runs verify checks
func DeleteRKE2K3SCustomClusterNodes ¶
func DeleteRKE2K3SCustomClusterNodes(client *rancher.Client, clusterID string, cluster *v1.SteveAPIObject, nodesToDelete []*nodes.Node) error
DeleteRKE2K3SCustomClusterNodes is a method that will delete nodes from the custom RKE2/K3S custom cluster.
func GetAWSOSNames ¶
func GetAWSOSNames(client *rancher.Client, customConfig rancherEc2.AWSEC2Configs) ([]string, error)
GetAWSOSNames connects to aws and converts each ami in the machineConfigs into the associated aws name
func GetCustomSchemaParams ¶
func GetCustomSchemaParams(client *rancher.Client, cattleConfig map[string]any) []upstream.TestCaseParameterCreate
GetCustomSchemaParams gets a set of params from the cattle config and returns a qase params object
func GetProvisioningSchemaParams ¶
func GetProvisioningSchemaParams(client *rancher.Client, cattleConfig map[string]any) []upstream.TestCaseParameterCreate
GetProvisioningSchemaParams gets a set of params from the cattle config and returns a qase params object
func GetWindowsPools ¶
func GetWindowsPools(client *rancher.Client, customConfig rancherEc2.AWSEC2Configs) []rancherEc2.AWSEC2Config
GetWindowsPools gets a list of the windows machine configs
func UpgradeClusterK8sVersion ¶
func UpgradeClusterK8sVersion(client *rancher.Client, clusterName *string, upgradeVersion *string) (*bundledclusters.BundledCluster, error)
UpgradeClusterK8sVersion upgrades the cluster to the specified version
func VerifyACEAirgap ¶
VerifyACEAirgap validates that the ACE resources are healthy in a given airgap cluster
func VerifyACELocalUnavailable ¶
func VerifyACELocalUnavailable(t *testing.T, rancherClient *rancher.Client, cluster *steveV1.SteveAPIObject, clusterStatus *provv1.ClusterStatus, pemFilePath string, sshUser string)
VerifyACELocalUnavailable validates that the ACE resources are healthy in a given cluster when the local cluster is unavailable.
func VerifyAllNodesDeleted ¶
VerifyAllNodesDeleted validates that a non-rke1 cluster's nodes have been successfully deleted.
func VerifyClusterReady ¶
func VerifyClusterReady(client *rancher.Client, cluster *steveV1.SteveAPIObject) error
VerifyClusterReady validates that a non-rke1 cluster and its resources are in a good state, matching a given config.
func VerifyClusterReadyV3 ¶
VerifyClusterReadyV3 validates that a non-rke1 cluster and its resources are in a good state, matching a given config, using Norman.
func VerifyDataDirectories ¶
VerifyDataDirectories validates that data is being distributed properly across data directories.
func VerifyDeleteRKE2K3SCluster ¶
VerifyDeleteRKE2K3SCluster validates that a non-rke1 cluster and its resources are deleted.
func VerifyDynamicCluster ¶
VerifyCluster validates that a non-rke1 cluster and its resources are in a good state, matching a given config.
func VerifyHostedCluster ¶
VerifyHostedCluster validates that the hosted cluster and its resources are in a good state, matching a given config.
func VerifyHostnameLength ¶
func VerifyHostnameLength(t *testing.T, client *rancher.Client, clusterObject *steveV1.SteveAPIObject)
VerifyHostnameLength validates that the hostnames of the nodes in a cluster are of the correct length
func VerifyPSACT ¶
func VerifyUpgrade ¶
func VerifyUpgrade(t *testing.T, updatedCluster *bundledclusters.BundledCluster, upgradedVersion string)
VerifyUpgrade validates that a cluster has been upgraded to a given version
Types ¶
type AirgapNodeCreationFunc ¶
type AirgapNodeCreationFunc func(client *rancher.Client, rolesPerPool []string, quantityPerPool []int32, ec2Configs *rancherEc2.AWSEC2Configs) (nodes []*nodes.Node, err error)
type CloudCredFunc ¶
type CloudCredFunc func(rancherClient *rancher.Client, credentials cloudcredentials.CloudCredential) (*v1.SteveAPIObject, error)
type CustomClusterConfig ¶
type CustomClusterConfig struct {
ExternalNodeProvider ExternalNodeProvider `json:"externalNodeProvider" yaml:"externalNodeProvider"`
NodeLabels map[string]string `json:"nodeLabels" yaml:"nodeLabels"`
NodeTaints []corev1.Taint `json:"nodeTaints" yaml:"nodeTaints"`
SpecifyPrivateIP bool `json:"specifyPrivateIP" yaml:"specifyPrivateIP"`
SpecifyPublicIP bool `json:"specifyPublicIP" yaml:"specifyPublicIP"`
NodeNamePrefix string `json:"nodeNamePrefix" yaml:"nodeNamePrefix"`
}
type CustomOSNamesFunc ¶
type CustomOSNamesFunc func(client *rancher.Client, customConfig rancherEc2.AWSEC2Configs) ([]string, error)
type ExternalNodeProvider ¶
type ExternalNodeProvider struct {
Name string
AirgapNodeCreationFunc AirgapNodeCreationFunc
NodeCreationFunc NodeCreationFunc
NodeDeletionFunc NodeDeletionFunc
GetOSNamesFunc CustomOSNamesFunc
GetWindowsPoolsFunc GetCustomWindowsPools
}
func ExternalNodeProviderSetup ¶
func ExternalNodeProviderSetup(providerType string) ExternalNodeProvider
ExternalNodeProviderSetup is a helper function that setups an ExternalNodeProvider object is a wrapper for the specific outside node provider node creator function
type GetCustomWindowsPools ¶
type GetCustomWindowsPools func(client *rancher.Client, customConfig rancherEc2.AWSEC2Configs) []rancherEc2.AWSEC2Config
type LoadMachineConfigFunc ¶
type LoadMachineConfigFunc func(cattleConfig map[string]any) machinepools.MachineConfigs
type MachinePoolFunc ¶
type MachinePoolFunc func(machineConfig machinepools.MachineConfigs, generatedPoolName, namespace string) []unstructured.Unstructured
type MachineRolesFunc ¶
type MachineRolesFunc func(machineConfig machinepools.MachineConfigs) []machinepools.Roles
type NodeCreationFunc ¶
type NodeCreationFunc func(client *rancher.Client, rolesPerPool []string, quantityPerPool []int32, ec2Configs *rancherEc2.AWSEC2Configs, ipv6Cluster bool) (nodes []*nodes.Node, err error)
type NodeDeletionFunc ¶
type OSNamesFunc ¶
type OSNamesFunc func(client *rancher.Client, cloudCredential cloudcredentials.CloudCredential, machineConfigs machinepools.MachineConfigs) ([]string, error)
type Provider ¶
type Provider struct {
Name provisioninginput.ProviderName
CloudProviderName string
MachineConfigPoolResourceSteveType string
LoadMachineConfigFunc LoadMachineConfigFunc
MachinePoolFunc MachinePoolFunc
CloudCredFunc CloudCredFunc
VerifyCloudProviderFunc VerifyCloudProviderFunc
GetMachineRolesFunc MachineRolesFunc
GetOSNamesFunc OSNamesFunc
}
func CreateProvider ¶
CreateProvider returns all machine and cloud credential configs in the form of a Provider struct. Accepts a string of the name of the provider.
type ProviderName ¶
type ProviderName string