tanzuekubernetesclustertests

package
v1.4.6-rc4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TKGMClusterResourceName = "test_tkgm_cluster"
	TKGSClusterResourceName = "test_tkgs_cluster"
)

Variables

View Source
var (
	TKGMClusterResourceFullName = fmt.Sprintf("%s.%s", tanzukubernetesclusteres.ResourceName, TKGMClusterResourceName)
	TKGSClusterResourceFullName = fmt.Sprintf("%s.%s", tanzukubernetesclusteres.ResourceName, TKGSClusterResourceName)
	TKGMClusterName             = acctest.RandomWithPrefix("test-tkgm-cls")
	TKGSClusterName             = acctest.RandomWithPrefix("test-tkgs-cls")
)

Functions

func ReadClusterEnvironmentVariables

func ReadClusterEnvironmentVariables() (envVars map[ClusterType]map[ClusterEnvVar]string, errs []error)

Types

type ClusterEnvVar

type ClusterEnvVar string
const (
	// TKGM Env Vars.
	TKGMManagementClusterNameEnv ClusterEnvVar = "TKGM_MANAGEMENT_CLUSTER_NAME"
	TKGMProvisionerNameEnv       ClusterEnvVar = "TKGM_PROVISIONER_NAME"
	TKGMClusterVersionEnv        ClusterEnvVar = "TKGM_CLUSTER_VERSION"
	TKGMClusterClassEnv          ClusterEnvVar = "TKGM_CLUSTER_CLASS"
	TKGMClusterVariablesEnv      ClusterEnvVar = "TKGM_CLUSTER_VARIABLES"
	TKGMOSImageNameEnv           ClusterEnvVar = "TKGM_OS_IMAGE_NAME"
	TKGMOSImageVersionEnv        ClusterEnvVar = "TKGM_OS_IMAGE_VERSION"
	TKGMOSImageArchEnv           ClusterEnvVar = "TKGM_OS_IMAGE_ARCH"
	TKGMWorkerClassEnv           ClusterEnvVar = "TKGM_WORKER_CLASS"
	TKGMNodePoolOverridesEnv     ClusterEnvVar = "TKGM_NODE_POOL_OVERRIDES"

	// TKGS Env Vars.
	TKGSManagementClusterNameEnv ClusterEnvVar = "TKGS_MANAGEMENT_CLUSTER_NAME"
	TKGSProvisionerNameEnv       ClusterEnvVar = "TKGS_PROVISIONER_NAME"
	TKGSClusterVersionEnv        ClusterEnvVar = "TKGS_CLUSTER_VERSION"
	TKGSClusterClassEnv          ClusterEnvVar = "TKGS_CLUSTER_CLASS"
	TKGSClusterVariablesEnv      ClusterEnvVar = "TKGS_CLUSTER_VARIABLES"
	TKGSOSImageNameEnv           ClusterEnvVar = "TKGS_OS_IMAGE_NAME"
	TKGSOSImageVersionEnv        ClusterEnvVar = "TKGS_OS_IMAGE_VERSION"
	TKGSOSImageArchEnv           ClusterEnvVar = "TKGS_OS_IMAGE_ARCH"
	TKGSWorkerClassEnv           ClusterEnvVar = "TKGS_WORKER_CLASS"
	TKGSNodePoolOverridesEnv     ClusterEnvVar = "TKGS_NODE_POOL_OVERRIDES"
)

type ClusterType

type ClusterType string
const (
	TKGMClusterType ClusterType = "TKGM"
	TKGSClusterType ClusterType = "TKGS"
)

type EnvVarRestriction

type EnvVarRestriction string
const (
	RequiredEnvVar EnvVarRestriction = "Required"
	OptionalEnvVar EnvVarRestriction = "Optional"
)

type ResourceTFConfigBuilder

type ResourceTFConfigBuilder struct {
	NodePoolDefinition string
}

func InitResourceTFConfigBuilder

func InitResourceTFConfigBuilder() *ResourceTFConfigBuilder

func (*ResourceTFConfigBuilder) BuildNodePools

func (builder *ResourceTFConfigBuilder) BuildNodePools(workerClass string, overrides string, osImageName string,
	osImageVersion string, osImageArch string, nodePoolsNum int) string

func (*ResourceTFConfigBuilder) GetTKGMClusterConfig

func (builder *ResourceTFConfigBuilder) GetTKGMClusterConfig(tkgmEnvVars map[ClusterEnvVar]string, nodePoolsNum int) string

func (*ResourceTFConfigBuilder) GetTKGSClusterConfig

func (builder *ResourceTFConfigBuilder) GetTKGSClusterConfig(tkgsEnvVars map[ClusterEnvVar]string, nodePoolsNum int) string

Jump to

Keyboard shortcuts

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