Documentation ¶
Overview ¶
Package client implements core functionality of the tkg client
Index ¶
- Constants
- Variables
- func CheckClusterNameFormat(clusterName, infrastructureProvider string) error
- func DeleteContextFromKubeConfig(kubeconfigPath, context string) error
- func DoDeleteMachineDeployment(clusterClient clusterclient.Client, options *DeleteMachineDeploymentOptions) error
- func DoDeleteMachineDeploymentCC(clusterClient clusterclient.Client, cluster *capi.Cluster, ...) error
- func DoGetMachineDeployments(clusterClient clusterclient.Client, options *GetMachineDeploymentOptions) ([]capi.MachineDeployment, error)
- func DoGetMachineDeploymentsCC(clusterClient clusterclient.Client, cluster *capi.Cluster, ...) ([]capi.MachineDeployment, error)
- func DoScaleCCCluster(clusterClient clusterclient.Client, cluster *capi.Cluster, ...) error
- func DoSetMachineDeployment(clusterClient clusterclient.Client, options *SetMachineDeploymentOptions) error
- func DoSetMachineDeploymentCC(clusterClient clusterclient.Client, cluster *capi.Cluster, ...) error
- func GeneratePackageInstallName(clusterName, addonName string) string
- func GetAKOOAddonSecretValues(clusterClient clusterclient.Client, clusterName string, ...) ([]byte, bool, error)
- func GetClusterBootstrap(managementClusterClient clusterclient.Client, clusterName, namespace string) (*runtanzuv1alpha3.ClusterBootstrap, error)
- func GetConfigVariableListFromYamlData(bytes []byte) ([]string, error)
- func GetCorePackagesFromClusterBootstrap(regionalClusterClient clusterclient.Client, ...) ([]kapppkgv1alpha1.Package, error)
- func GetCurrentClusterKubeConfigFromFile(kubeConfigPath string) ([]byte, error)
- func GetKappControllerConfigValuesFile(userConfigValuesFile, kappControllerValuesDir string) (string, error)
- func IsProdPlan(plan string) bool
- func MergeKubeConfigAndSwitchContext(kubeConfig []byte, mergeFile string) (string, error)
- func MergeKubeConfigWithoutSwitchContext(kubeConfig []byte, mergeFile string) error
- func ModifyKubeVipAndSerialize(currentKubeVipPod *corev1.Pod, ...) (string, error)
- func MonitorAddonsCorePackageInstallation(regionalClusterClient clusterclient.Client, ...) error
- func NormalizeNodePoolName(workers []capi.MachineDeployment, clusterName string) ([]capi.MachineDeployment, error)
- func ParseProviderName(provider string) (name, providerVersion string, err error)
- func ProcessAKOPackageInstallFile(akoPackageInstallTemplateDir, userConfigValuesFile string) (string, error)
- func ProcessKappControllerPackage(...) (string, error)
- func RemoveObsoleteManagementComponents(clusterClient clusterclient.Client) error
- func RetrieveAKOOVariablesFromAddonSecretValues(clusterName string, configValues map[string]interface{}, secretValues []byte) error
- func SetClusterClass(rw tkgconfigreaderwriter.TKGConfigReaderWriter)
- func TimedExecution(command func() error) (time.Duration, error)
- func WaitForPackagesInstallation(clusterClient clusterclient.Client, packages []kapppkgv1alpha1.Package, ...) error
- type ApplyProvidersUpgradeOptions
- type AzureUpdateClusterOptions
- type Client
- type ClusterCeipInfo
- type ClusterClassSelector
- type ClusterConfigOptions
- type ClusterIPFamily
- type ClusterInfo
- type ClusterPinnipedInfo
- type ClusterUpgradeInfo
- type ComponentInfo
- type Components
- type CreateClusterOptions
- type DeleteMachineDeploymentOptions
- type DeleteRegionOptions
- type DeleteWorkloadClusterOptions
- type DescribeTKGClustersOptions
- type FeatureFlagClient
- type GetClusterPinnipedInfoOptions
- type GetMachineDeploymentOptions
- type GetWorkloadClusterCredentialsOptions
- type GivenClusterClassSelector
- type InitRegionOptions
- type KubernetesVersionsInfo
- type ListTKGClustersOptions
- type MachineHealthCheck
- type MachineHealthCheckOptions
- type NodePool
- type NodeSizeOptions
- type Options
- type Provider
- type ProviderBasedClusterClassSelector
- type ScaleClusterOptions
- type SetMachineDeploymentOptions
- type SetMachineHealthCheckOptions
- type TKGClusterPhase
- type TKGClusterType
- type TkgClient
- func (c *TkgClient) ActivateTanzuKubernetesReleases(tkrName string) error
- func (c *TkgClient) AddRegionContext(r region.RegionContext, overwrite, useDirectReference bool) error
- func (c *TkgClient) ApplyClusterBootstrapObjects(fromClusterClient, toClusterClient clusterclient.Client) error
- func (c *TkgClient) BuildRegionalClusterConfiguration(options *InitRegionOptions) ([]byte, string, string, error)
- func (c *TkgClient) CleanupCorePackageRepo(clusterClient clusterclient.Client) error
- func (c *TkgClient) ConfigureAMIID(options *UpgradeClusterOptions, regionalClusterClient clusterclient.Client) error
- func (c *TkgClient) ConfigureAndValidateAWSConfig(tkrVersion string, nodeSizes NodeSizeOptions, ...) error
- func (c *TkgClient) ConfigureAndValidateAviConfiguration(clusterName string) error
- func (c *TkgClient) ConfigureAndValidateAwsConfig(tkrVersion string, workerMachineCount int64, useExistingVPC bool) error
- func (c *TkgClient) ConfigureAndValidateAzureConfig(tkrVersion string, nodeSizes NodeSizeOptions, skipValidation bool, ...) error
- func (c *TkgClient) ConfigureAndValidateCNIType(cniType string) error
- func (c *TkgClient) ConfigureAndValidateDockerConfig(tkrVersion string, nodeSizes NodeSizeOptions, skipValidation bool) error
- func (c *TkgClient) ConfigureAndValidateHTTPProxyConfiguration(infrastructureName string) error
- func (c *TkgClient) ConfigureAndValidateManagementClusterConfiguration(options *InitRegionOptions, skipValidation bool) *ValidationError
- func (c *TkgClient) ConfigureAndValidateNameserverConfiguration(clusterRole string) error
- func (c *TkgClient) ConfigureAndValidateOracleConfig(tkrVersion string, nodeSizes NodeSizeOptions, skipValidation bool) error
- func (c *TkgClient) ConfigureAndValidateTkrVersion(tkrVersion string) (string, string, error)
- func (c *TkgClient) ConfigureAndValidateVSphereTemplate(vcClient vc.Client, tkrVersion, dc string) error
- func (c *TkgClient) ConfigureAndValidateVsphereConfig(tkrVersion string, nodeSizes NodeSizeOptions, vip string, skipValidation bool, ...) *ValidationError
- func (c *TkgClient) ConfigureAndValidateWorkloadClusterConfiguration(options *CreateClusterOptions, clusterClient clusterclient.Client, ...) error
- func (c *TkgClient) ConfigureAzureVMImage(tkrVersion string) error
- func (c *TkgClient) ConfigureTimeout(timeout time.Duration)
- func (c *TkgClient) CopyNeededTKRAndOSImages(fromClusterClient, toClusterClient clusterclient.Client) error
- func (c *TkgClient) CreateAWSCloudFormationStack() error
- func (c *TkgClient) CreateCluster(options *CreateClusterOptions, waitForCluster bool) (bool, error)
- func (c *TkgClient) CreateMachineHealthCheck(clusterClient clusterclient.Client, options *SetMachineHealthCheckOptions) error
- func (c *TkgClient) CreateOrUpdateVerisionedTKGBom(regionalClusterClient clusterclient.Client) error
- func (c *TkgClient) DeactivateTanzuKubernetesReleases(tkrName string) error
- func (c *TkgClient) DecodeKubevipPodManifestFromKCP(kcp *capikubeadmv1beta1.KubeadmControlPlane) (*corev1.Pod, error)
- func (c *TkgClient) DeleteMachineDeployment(options DeleteMachineDeploymentOptions) error
- func (c *TkgClient) DeleteMachineHealthCheck(options MachineHealthCheckOptions) error
- func (c *TkgClient) DeleteMachineHealthCheckWithClusterClient(clusterClient clusterclient.Client, options MachineHealthCheckOptions) error
- func (c *TkgClient) DeleteNodePoolForPacificCluster(clusterClient clusterclient.Client, options DeleteMachineDeploymentOptions) error
- func (c *TkgClient) DeleteRegion(options DeleteRegionOptions) error
- func (c *TkgClient) DeleteWorkloadCluster(options DeleteWorkloadClusterOptions) error
- func (c *TkgClient) DescribeCluster(options DescribeTKGClustersOptions) (*clusterctltree.ObjectTree, *clusterv1.Cluster, *clusterctlv1.ProviderList, ...)
- func (c *TkgClient) DescribeProvider() (*clusterctlv1.ProviderList, error)
- func (c *TkgClient) DistributeMachineDeploymentWorkers(workerMachineCount int64, isProdConfig, isManagementCluster bool, ...) ([]int, error)
- func (c *TkgClient) DoClassyClusterUpgrade(regionalClusterClient clusterclient.Client, ...) error
- func (c *TkgClient) DoClusterUpgrade(regionalClusterClient clusterclient.Client, ...) error
- func (c *TkgClient) DoCreateCluster(clusterClient clusterclient.Client, name, namespace, manifest string) error
- func (c *TkgClient) DoGetCEIPParticipation(clusterClient clusterclient.Client, clusterName string) (ClusterCeipInfo, error)
- func (c *TkgClient) DoGetTanzuKubernetesReleases(regionalClusterClient clusterclient.Client) (*KubernetesVersionsInfo, error)
- func (c *TkgClient) DoLegacyClusterUpgrade(regionalClusterClient, currentClusterClient clusterclient.Client, ...) error
- func (c *TkgClient) DoPacificClusterUpgrade(regionalClusterClient clusterclient.Client, options *UpgradeClusterOptions) error
- func (c *TkgClient) DoProvidersUpgrade(regionalClusterClient clusterclient.Client, ctx string, ...) error
- func (c *TkgClient) DoScaleCluster(clusterClient clusterclient.Client, options *ScaleClusterOptions) error
- func (c *TkgClient) DoSetCEIPParticipation(clusterClient clusterclient.Client, context region.RegionContext, ...) error
- func (c *TkgClient) DoUpgradeAddon(regionalClusterClient clusterclient.Client, ...) error
- func (c *TkgClient) DownloadBomFile(tkrName string) error
- func (c *TkgClient) EncodeAWSCredentialsAndGetClient(clusterClient clusterclient.Client) (aws.Client, error)
- func (c *TkgClient) EncodeAzureCredentialsAndGetClient(clusterClient clusterclient.Client) (azure.Client, error)
- func (c *TkgClient) GenerateAWSCloudFormationTemplate() (string, error)
- func (c *TkgClient) GenerateProvidersUpgradeOptions(pUpgradeInfo *providersUpgradeInfo) (*clusterctl.ApplyUpgradeOptions, error)
- func (c *TkgClient) GetAWSCreds() (*credentials.AWSCredentials, error)
- func (c *TkgClient) GetAddonsManagerPackageversion(managementPackageVersion string) (string, error)
- func (c *TkgClient) GetCEIPParticipation() (ClusterCeipInfo, error)
- func (c *TkgClient) GetClusterConfiguration(options *CreateClusterOptions) ([]byte, error)
- func (c *TkgClient) GetClusterObjects(clusterClient clusterclient.Client, listOptions *crtclient.ListOptions, ...) ([]ClusterInfo, error)
- func (c *TkgClient) GetClusterObjectsForPacific(clusterClient clusterclient.Client, apiVersion string, ...) ([]ClusterInfo, error)
- func (c *TkgClient) GetClusterPinnipedInfo(options GetClusterPinnipedInfoOptions) (*ClusterPinnipedInfo, error)
- func (c *TkgClient) GetCurrentRegionContext() (region.RegionContext, error)
- func (c *TkgClient) GetKubernetesVersions() (*KubernetesVersionsInfo, error)
- func (c *TkgClient) GetKubevipImageAndTag(kcp *capikubeadmv1beta1.KubeadmControlPlane) (string, string, error)
- func (c *TkgClient) GetMCClusterPinnipedInfo(regionalClusterClient clusterclient.Client, curRegion region.RegionContext, ...) (*ClusterPinnipedInfo, error)
- func (c *TkgClient) GetMachineDeployments(options GetMachineDeploymentOptions) ([]capi.MachineDeployment, error)
- func (c *TkgClient) GetMachineHealthChecks(options MachineHealthCheckOptions) ([]MachineHealthCheck, error)
- func (c *TkgClient) GetMachineHealthChecksWithClusterClient(clusterClient clusterclient.Client, options MachineHealthCheckOptions) ([]MachineHealthCheck, error)
- func (c *TkgClient) GetPacificClusterObject(clusterName, namespace string) (*tkgsv1alpha2.TanzuKubernetesCluster, error)
- func (c *TkgClient) GetPacificMachineDeployments(options GetMachineDeploymentOptions) ([]capiv1alpha3.MachineDeployment, error)
- func (c *TkgClient) GetRegionContexts(clusterName string) ([]region.RegionContext, error)
- func (c *TkgClient) GetTanzuKubernetesReleases(tkrName string) ([]runv1alpha1.TanzuKubernetesRelease, error)
- func (c *TkgClient) GetUserConfigVariableValueMap(configDefaultFilePath string, rw tkgconfigreaderwriter.TKGConfigReaderWriter) (map[string]interface{}, error)
- func (c *TkgClient) GetVSphereEndpoint(clusterClient clusterclient.Client) (vc.Client, error)
- func (c *TkgClient) GetWCClusterPinnipedInfo(regionalClusterClient clusterclient.Client, _ region.RegionContext, ...) (*ClusterPinnipedInfo, error)
- func (c *TkgClient) GetWorkloadClusterCredentials(options GetWorkloadClusterCredentialsOptions) (string, string, error)
- func (c *TkgClient) HandleKappControllerUpgrade(regionalClusterClient, currentClusterClient clusterclient.Client, ...) error
- func (c *TkgClient) InitRegion(options *InitRegionOptions) error
- func (c *TkgClient) InitRegionDryRun(options *InitRegionOptions) ([]byte, error)
- func (c *TkgClient) InitializeProviders(options *InitRegionOptions, clusterClient clusterclient.Client, ...) error
- func (c *TkgClient) InstallAKO(mcClient clusterclient.Client) error
- func (c *TkgClient) InstallOrUpgradeKappController(clusterClient clusterclient.Client, operationType constants.OperationType, ...) error
- func (c *TkgClient) InstallOrUpgradeManagementComponents(mcClient clusterclient.Client, pkgClient packageclient.PackageClient, ...) error
- func (c *TkgClient) IsFeatureActivated(feature string) bool
- func (c *TkgClient) IsKubevipManifestInKCP(kcp *capikubeadmv1beta1.KubeadmControlPlane) bool
- func (c *TkgClient) IsManagementClusterAKindCluster(clusterName string) (bool, error)
- func (c *TkgClient) IsPacificManagementCluster() (bool, error)
- func (c *TkgClient) IsPacificRegionalCluster() (bool, error)
- func (c *TkgClient) ListTKGClusters(options ListTKGClustersOptions) ([]ClusterInfo, error)
- func (c *TkgClient) MoveObjects(fromKubeconfigPath, toKubeconfigPath, namespace string) error
- func (c *TkgClient) OverrideAWSNodeSizeWithOptions(options NodeSizeOptions, awsClient aws.Client, skipValidation bool) error
- func (c *TkgClient) OverrideAzureNodeSizeWithOptions(client azure.Client, options NodeSizeOptions, skipValidation bool) error
- func (c *TkgClient) OverrideVsphereNodeSizeWithOptions(options NodeSizeOptions) error
- func (c *TkgClient) ParseHiddenArgsAsFeatureFlags(options *InitRegionOptions)
- func (c *TkgClient) PatchClusterInitOperations(regionalClusterClient clusterclient.Client, options *InitRegionOptions, ...) error
- func (c *TkgClient) PatchKubernetesVersionToKubeadmControlPlane(regionalClusterClient clusterclient.Client, ...) error
- func (c *TkgClient) PrepareAddonsManagerUpgrade(regionalClusterClient clusterclient.Client, ...) error
- func (c *TkgClient) RestartCAPZControllerManagerPod(clusterClient clusterclient.Client) error
- func (c *TkgClient) RetrieveRegionalClusterConfiguration(regionalClusterClient clusterclient.Client) error
- func (c *TkgClient) RetrieveWorkloadClusterConfiguration(regionalClusterClient, workloadClusterClient clusterclient.Client, ...) error
- func (c *TkgClient) SaveFeatureFlags(featureFlags map[string]string) error
- func (c *TkgClient) ScaleCluster(options ScaleClusterOptions) error
- func (c *TkgClient) ScalePacificCluster(options *ScaleClusterOptions, clusterClient clusterclient.Client) error
- func (c *TkgClient) SetAllowLegacyClusterConfiguration() string
- func (c *TkgClient) SetAndValidateDefaultAWSVPCConfiguration(isProdConfig bool, awsClient aws.Client, skipValidation bool) (bool, error)
- func (c *TkgClient) SetBuildEdition(buildEdition string)
- func (c *TkgClient) SetCEIPParticipation(ceipOptIn bool, isProd, labels string) error
- func (c *TkgClient) SetDefaultProxySettings()
- func (c *TkgClient) SetMachineDeployment(options *SetMachineDeploymentOptions) error
- func (c *TkgClient) SetMachineDeploymentWorkerCounts(workerCounts []int, totalWorkerMachineCount int64, isProdConfig bool)
- func (c *TkgClient) SetMachineHealthCheck(options *SetMachineHealthCheckOptions) error
- func (c *TkgClient) SetNodePoolsForPacificCluster(clusterClient clusterclient.Client, options *SetMachineDeploymentOptions) error
- func (c *TkgClient) SetPinnipedConfigForWorkloadCluster(issuerURL, issuerCA string)
- func (c *TkgClient) SetPlan(planName string)
- func (c *TkgClient) SetProviderType(providerType string)
- func (c *TkgClient) SetRegionContext(clusterName, contextName string) error
- func (c *TkgClient) SetTKGClusterRole(clusterType TKGClusterType)
- func (c *TkgClient) SetTKGVersion()
- func (c *TkgClient) SetVsphereNodeSize()
- func (c *TkgClient) SetVsphereVersion(vsphereVersion string)
- func (c *TkgClient) ShouldDeployClusterClassBasedCluster(isManagementCluster bool) (bool, error)
- func (c *TkgClient) ShouldManageCEIP(clusterClient clusterclient.Client, ctx region.RegionContext) (bool, error)
- func (c *TkgClient) TKGConfigReaderWriter() tkgconfigreaderwriter.TKGConfigReaderWriter
- func (c *TkgClient) TrimVsphereSSHKey()
- func (c *TkgClient) UpdateAzureClusterCredentials(clusterClient clusterclient.Client, options *UpdateCredentialsOptions) error
- func (c *TkgClient) UpdateAzureCredentialsForCluster(clusterClient clusterclient.Client, options *UpdateCredentialsOptions, ...) error
- func (c *TkgClient) UpdateCredentialsCluster(options *UpdateCredentialsOptions) error
- func (c *TkgClient) UpdateCredentialsRegion(options *UpdateCredentialsOptions) error
- func (c *TkgClient) UpdateKubeVipConfigInKCP(currentKCP *capikubeadmv1beta1.KubeadmControlPlane, ...) (*capikubeadmv1beta1.KubeadmControlPlane, error)
- func (c *TkgClient) UpdateMachineHealthCheck(candidate *capi.MachineHealthCheck, clusterClient clusterclient.Client, ...) error
- func (c *TkgClient) UpdateVSphereClusterCredentials(clusterClient clusterclient.Client, options *UpdateCredentialsOptions) error
- func (c *TkgClient) UpgradeAddon(options *UpgradeAddonOptions) error
- func (c *TkgClient) UpgradeCluster(options *UpgradeClusterOptions) error
- func (c *TkgClient) UpgradeManagementCluster(options *UpgradeClusterOptions) error
- func (c *TkgClient) ValidateAndConfigureClusterOptions(options *CreateClusterOptions) error
- func (c *TkgClient) ValidateAviCloud(aviClient avi.Client) error
- func (c *TkgClient) ValidateAviControlPlaneNetwork(aviClient avi.Client) error
- func (c *TkgClient) ValidateAviControllerAccount(aviClient avi.Client) error
- func (c *TkgClient) ValidateAviDataPlaneNetwork(aviClient avi.Client) error
- func (c *TkgClient) ValidateAviManagementClusterControlPlaneNetwork(aviClient avi.Client) error
- func (c *TkgClient) ValidateAviManagementClusterDataPlaneNetwork(aviClient avi.Client) error
- func (c *TkgClient) ValidateAviManagementClusterServiceEngineGroup(aviClient avi.Client) error
- func (c *TkgClient) ValidateAviMaxAllowedClusterNameLength(clusterRole, clusterName string, regionalClusterClient clusterclient.Client, ...) error
- func (c *TkgClient) ValidateAviNetwork(networkName, networkCIDR string, aviClient avi.Client) error
- func (c *TkgClient) ValidateAviServiceEngineGroup(aviClient avi.Client) error
- func (c *TkgClient) ValidateAzurePublicSSHKey() error
- func (c *TkgClient) ValidateDockerResourcePrerequisites() error
- func (c *TkgClient) ValidateEnvVariables(iaas string) error
- func (c *TkgClient) ValidateExtraArgs() error
- func (c *TkgClient) ValidateKubeVipLBConfiguration(clusterRole string) error
- func (c *TkgClient) ValidateManagementClusterUpgradeVersionCompatibility(options *UpgradeClusterOptions, regionalClusterClient clusterclient.Client) error
- func (c *TkgClient) ValidateManagementClusterVersionWithCLI(regionalClusterClient clusterclient.Client) error
- func (c *TkgClient) ValidatePrerequisites(validateDocker, validateKubectl bool) error
- func (c *TkgClient) ValidateSupportOfK8sVersionForManagmentCluster(regionalClusterClient clusterclient.Client, kubernetesVersion string, ...) error
- func (c *TkgClient) ValidateVsphereControlPlaneEndpointIP(endpointIP string) *ValidationError
- func (c *TkgClient) ValidateVsphereNodeSize() error
- func (c *TkgClient) ValidateVsphereResources(vcClient vc.Client, dcPath string) error
- func (c *TkgClient) ValidateVsphereVipWorkloadCluster(clusterClient clusterclient.Client, vip string, skipValidation bool) error
- func (c *TkgClient) VerifyRegion(kubeConfigPath string) (region.RegionContext, error)
- func (c *TkgClient) WaitForAddons(options waitForAddonsOptions) error
- func (c *TkgClient) WaitForAddonsCorePackagesInstallation(options waitForAddonsOptions) error
- func (c *TkgClient) WaitForAddonsDeployments(clusterClient clusterclient.Client) error
- func (c *TkgClient) WaitForAutoscalerDeployment(regionalClusterClient clusterclient.Client, ...)
- func (c *TkgClient) WaitForClusterInitializedAndGetKubeConfig(clusterClient clusterclient.Client, name, targetNamespace string) ([]byte, error)
- func (c *TkgClient) WaitForClusterReadyAfterCreate(clusterClient clusterclient.Client, name, targetNamespace string) error
- func (c *TkgClient) WaitForClusterReadyAfterReverseMove(clusterClient clusterclient.Client, name, targetNamespace string) error
- func (c *TkgClient) WaitForClusterReadyForMove(clusterClient clusterclient.Client, name, targetNamespace string) error
- func (c *TkgClient) WaitForPackages(regionalClusterClient, currentClusterClient clusterclient.Client, ...) error
- func (c *TkgClient) WaitForProviders(clusterClient clusterclient.Client, options waitForProvidersOptions) error
- type UpdateCredentialsOptions
- type UpgradeAddonOptions
- type UpgradeClusterOptions
- type UpgradeManagementClusterOptions
- type VSphereNodePool
- type VSphereUpdateClusterOptions
- type ValidationError
Constants ¶
const ( CeipOptInStatus = "Opt-in" CeipOptOutStatus = "Opt-out" CeipPacificCluster = "N/A" )
CeipOptOutStatus and CeipOptInStatus are constants for the CEIP opt-in/out verbiage
const ( // PacificProviderName tkgs provider name PacificProviderName = "tkg-service-vsphere" // VSphereProviderName vsphere provider name VSphereProviderName = "vsphere" // AWSProviderName aws provider name AWSProviderName = "aws" // AzureProviderName azure provider name AzureProviderName = "azure" // DockerProviderName docker provider name DockerProviderName = "docker" // OracleProviderName oracle infrastructure cloud provider name OracleProviderName = "oci" )
const ( // TkgLabelClusterRolePrefix cluster-role label prefix TkgLabelClusterRolePrefix = "cluster-role.tkg.tanzu.vmware.com/" // TkgLabelClusterRoleManagement cluster-role management label TkgLabelClusterRoleManagement = "management" // TkgLabelClusterRoleWorkload cluster-role workload label TkgLabelClusterRoleWorkload = "workload" )
const ( ErrorMissingRegionalClusterObject = "management cluster object is not present in given management cluster" ErrorNoClusterObject = "no Cluster object present in the given management cluster" ErrorGettingClusterObjects = "unable to get cluster resources, %s. Are you sure the cluster you are using is a management cluster?" ErrorDeleteAbort = `` /* 359-byte string literal not displayed */ )
Error message constants
const ( // TKGPlanAnnotation plan annotation TKGPlanAnnotation = "tkg/plan" LegacyClusterTKRLabel = "tanzuKubernetesRelease" )
const ( StepConfigPrerequisite = "Configure prerequisite" StepValidateConfiguration = "Validate configuration" StepGenerateClusterConfiguration = "Generate cluster configuration" StepSetupBootstrapCluster = "Setup bootstrap cluster" StepInstallProvidersOnBootstrapCluster = "Install providers on bootstrap cluster" StepCreateManagementCluster = "Create management cluster" StepInstallProvidersOnRegionalCluster = "Install providers on management cluster" StepMoveClusterAPIObjects = "Move cluster-api objects from bootstrap cluster to management cluster" )
management cluster init step constants
const ( NodePoolLabelsName string = "nodePoolLabels" NodePoolTaintsName string = "nodePoolTaints" )
const ( DefaulUnhealthyConditionTimeout = "5m" DefaultNodeStartupTimeout = "20m" DefaultNodePoolSuffix = "worker-pool" NodePoolKey = "node-pool" )
machinehealthcheck related default and constants
const ( // TKGClusterPhaseCreating means the cluster control plane is under creation, // or that infrastructure has been created and configured but not yet with // an initialized control plane. TKGClusterPhaseCreating = TKGClusterPhase("creating") // TKGClusterPhaseCreationStalled indicates that the cluster is in the // process of creating control plane and the process is possibly // stalled and user intervention is required. TKGClusterPhaseCreationStalled = TKGClusterPhase("createStalled") // TKGClusterPhaseRunning means that the infrastructure has been created // and configured, and that the control plane has been fully initialized. TKGClusterPhaseRunning = TKGClusterPhase("running") // TKGClusterPhaseDeleting means that the cluster is being deleted. TKGClusterPhaseDeleting = TKGClusterPhase("deleting") // TKGClusterPhaseFailed means that cluster control plane // creation failed. Possible user intervention required. // This Phase to be used for TKC(pacific cluster). TKGClusterPhaseFailed = TKGClusterPhase("failed") // TKGClusterPhaseUpdating indicates that the cluster is in the // process of rolling out an update or scaling nodes TKGClusterPhaseUpdating = TKGClusterPhase("updating") // TKGClusterPhaseUpdateFailed indicates that the cluster's // rolling update failed and likely requires user intervention. // This Phase to be used for TKC(pacific cluster). TKGClusterPhaseUpdateFailed = TKGClusterPhase("updateFailed") // TKGClusterPhaseUpdateStalled indicates that the cluster is in the // process of rolling out an update and the update process is possibly // stalled and user intervention is required. TKGClusterPhaseUpdateStalled = TKGClusterPhase("updateStalled") // TKGClusterPhaseEmpty is useful for the initial reconcile, // before we even state the phase as creating. TKGClusterPhaseEmpty = TKGClusterPhase("") )
const ( DefaultKappControllerHostPort = 10100 DefaultAddonsManagerHostPort = 9865 )
const ( ValidationErrorCode = 1 PacificInVC7ErrorCode = 2 PacificNotInVC7ErrorCode = 3 )
error code constants
const ErrorBlockUpgradeTMCIncompatible = "" /* 178-byte string literal not displayed */
ErrorBlockUpgradeTMCIncompatible defines the error message to display during upgrade when cluster is registred to TMC and TMC does not support latest version of TKG
const (
TKGsystemNamespace = "tkg-system"
)
TKGsystemNamespace and DefaultNamespace are constants for setting the namespaces
Variables ¶
var ( AWSNewVPCConfigVariables = []string{constants.ConfigVariableAWSPublicNodeCIDR, constants.ConfigVariableAWSPrivateNodeCIDR, constants.ConfigVariableAWSVPCCIDR} AWSProdNewVPCConfigVariables = []string{constants.ConfigVariableAWSPublicNodeCIDR1, constants.ConfigVariableAWSPrivateNodeCIDR1, constants.ConfigVariableAWSPublicNodeCIDR2, constants.ConfigVariableAWSPrivateNodeCIDR2} AWSSubnetIDConfigVariables = []string{constants.ConfigVariableAWSPrivateSubnetID, constants.ConfigVariableAWSPublicSubnetID} AWSProdSubnetIDConfigVariables = []string{constants.ConfigVariableAWSPrivateSubnetID1, constants.ConfigVariableAWSPublicSubnetID1, constants.ConfigVariableAWSPrivateSubnetID2, constants.ConfigVariableAWSPublicSubnetID2} VsphereNodeCPUVarName = []string{constants.ConfigVariableVsphereCPNumCpus, constants.ConfigVariableVsphereWorkerNumCpus} VsphereNodeMemVarName = []string{constants.ConfigVariableVsphereCPMemMib, constants.ConfigVariableVsphereWorkerMemMib} VsphereNodeDiskVarName = []string{constants.ConfigVariableVsphereCPDiskGib, constants.ConfigVariableVsphereWorkerDiskGib} AWSPrivateSubnetIDConfigVariables = []string{constants.ConfigVariableAWSPrivateSubnetID, constants.ConfigVariableAWSPrivateSubnetID1, constants.ConfigVariableAWSPrivateSubnetID2} AWSPublicSubnetIDConfigVariables = []string{constants.ConfigVariableAWSPublicSubnetID, constants.ConfigVariableAWSPublicSubnetID1, constants.ConfigVariableAWSPublicSubnetID2} )
AWS config variables
CNITypes supported CNI types
var ConditionStatus = map[string]bool{ string(corev1.ConditionTrue): true, string(corev1.ConditionFalse): true, string(corev1.ConditionUnknown): true, }
ConditionStatus condition status map
var (
ErrUnableToFindKubeVipPodManifest = errors.New("unable to find the kube-vip pod manifest from kcp")
)
var InitRegionSteps = []string{ StepConfigPrerequisite, StepValidateConfiguration, StepGenerateClusterConfiguration, StepSetupBootstrapCluster, StepInstallProvidersOnBootstrapCluster, StepCreateManagementCluster, StepInstallProvidersOnRegionalCluster, StepMoveClusterAPIObjects, }
InitRegionSteps management cluster init step sequence
var Scheme = runtime.NewScheme()
Scheme runtime scheme
var TKGSupportedClusterOptions string
TKGSupportedClusterOptions is the comma separated list of cluster options that could be enabled by user !!!NOTE this is set during the build time. Only the cluster options mentioned in "AllowedEnableOptions" could be enabled by user through command line option("enable-cluster-options"), if TKGSupportedClusterOptions is set to ""(for development purpose) the check would be deactivated
var UnhealthyConditions = map[string]bool{ string(corev1.NodeReady): true, string(corev1.NodeMemoryPressure): true, string(corev1.NodeDiskPressure): true, string(corev1.NodePIDPressure): true, string(corev1.NodeNetworkUnavailable): true, }
UnhealthyConditions unhealthy condition map
var VsphereResourceConfigKeys = []string{constants.ConfigVariableVsphereDatacenter, constants.ConfigVariableVsphereNetwork, constants.ConfigVariableVsphereResourcePool, constants.ConfigVariableVsphereDatastore, constants.ConfigVariableVsphereFolder}
VsphereResourceConfigKeys vsphere resource types
Functions ¶
func CheckClusterNameFormat ¶
CheckClusterNameFormat ensures that the cluster name is valid for the given provider
func DeleteContextFromKubeConfig ¶
DeleteContextFromKubeConfig deletes the context and the cluster information from give kubeconfigPath
func DoDeleteMachineDeployment ¶
func DoDeleteMachineDeployment(clusterClient clusterclient.Client, options *DeleteMachineDeploymentOptions) error
DoDeleteMachineDeployment deletes a machine deployment
func DoDeleteMachineDeploymentCC ¶
func DoDeleteMachineDeploymentCC(clusterClient clusterclient.Client, cluster *capi.Cluster, options *DeleteMachineDeploymentOptions) error
func DoGetMachineDeployments ¶
func DoGetMachineDeployments(clusterClient clusterclient.Client, options *GetMachineDeploymentOptions) ([]capi.MachineDeployment, error)
DoGetMachineDeployments retrieves machine deployments for a cluster given a regional cluster client
func DoGetMachineDeploymentsCC ¶
func DoGetMachineDeploymentsCC(clusterClient clusterclient.Client, cluster *capi.Cluster, options *GetMachineDeploymentOptions) ([]capi.MachineDeployment, error)
func DoScaleCCCluster ¶
func DoScaleCCCluster(clusterClient clusterclient.Client, cluster *capi.Cluster, options *ScaleClusterOptions) error
func DoSetMachineDeployment ¶
func DoSetMachineDeployment(clusterClient clusterclient.Client, options *SetMachineDeploymentOptions) error
DoSetMachineDeployment sets a MachineDeployment on a cluster given a regional cluster client
func DoSetMachineDeploymentCC ¶
func DoSetMachineDeploymentCC(clusterClient clusterclient.Client, cluster *capi.Cluster, options *SetMachineDeploymentOptions) error
func GeneratePackageInstallName ¶
GeneratePackageInstallName is the util function to generate the PackageInstall CR name in a consistent manner. clusterName is the name of cluster within which all resources associated with this PackageInstall CR is installed. It does not necessarily mean the PackageInstall CR will be installed in that cluster. I.e., the kapp-controller PackageInstall CR is installed in the management cluster but is named after "<workload-cluster-name>-kapp-controller". It indicates that this kapp-controller PackageInstall is for reconciling resources in a cluster named "<workload-cluster-name>". addonName is the short name of a Tanzu addon with which the PackageInstall CR is associated.
func GetClusterBootstrap ¶
func GetClusterBootstrap(managementClusterClient clusterclient.Client, clusterName, namespace string) (*runtanzuv1alpha3.ClusterBootstrap, error)
GetClusterBootstrap returns ClusterBootstrap object for the given clusterName in the management cluster
func GetCorePackagesFromClusterBootstrap ¶
func GetCorePackagesFromClusterBootstrap(regionalClusterClient clusterclient.Client, workloadClusterClient clusterclient.Client, clusterBootstrap *runtanzuv1alpha3.ClusterBootstrap, corePackagesNamespace, clusterName string) ([]kapppkgv1alpha1.Package, error)
GetCorePackagesFromClusterBootstrap returns addon's core packages details from the given ClusterBootstrap object
func GetCurrentClusterKubeConfigFromFile ¶
GetCurrentClusterKubeConfigFromFile gets current cluster kubeconfig from kubeconfig file
func IsProdPlan ¶
func MergeKubeConfigAndSwitchContext ¶
MergeKubeConfigAndSwitchContext merges kubeconfig and switches the kube-context
func MergeKubeConfigWithoutSwitchContext ¶
MergeKubeConfigWithoutSwitchContext merges kubeconfig without updating kubecontext
func ModifyKubeVipAndSerialize ¶
func ModifyKubeVipAndSerialize(currentKubeVipPod *corev1.Pod, newLeaseDuration, newRenewDeadline, newRetryPeriod, fullImagePath, imageTag string) (string, error)
ModifyKubeVipAndSerialize modifies the time-out and lease duration parameters and serializes it to a string that can be patched
func MonitorAddonsCorePackageInstallation ¶
func MonitorAddonsCorePackageInstallation(regionalClusterClient clusterclient.Client, workloadClusterClient clusterclient.Client, packages []kapppkgv1alpha1.Package, packageInstallTimeout time.Duration) error
MonitorAddonsCorePackageInstallation monitors addon's core packages (kapp, cni, csi and cpi) and returns error if any while monitoring packages or any packages are not installed successfully. First it monitors kapp package in management cluster then it monitors other core packages in workload cluster.
func NormalizeNodePoolName ¶
func NormalizeNodePoolName(workers []capi.MachineDeployment, clusterName string) ([]capi.MachineDeployment, error)
NormalizeNodePoolName takes a list of machine deployments and strips the cluster name prepend from the name if present
func ParseProviderName ¶
ParseProviderName defines a utility function that parses the abbreviated syntax for name[:version]
func RemoveObsoleteManagementComponents ¶
func RemoveObsoleteManagementComponents(clusterClient clusterclient.Client) error
RemoveObsoleteManagementComponents lists and removes management cluster components that are obsoleted by new management packages, e.g. the tkr-controller-manager deployment in tkr-system namespace.
func SetClusterClass ¶
func SetClusterClass(rw tkgconfigreaderwriter.TKGConfigReaderWriter)
SetClusterClass sets the value of CLUSTER_CLASS based on an array of selectors. Uses the first non empty name provided by a selector.
func TimedExecution ¶
TimedExecution returns time taken to execure a command
func WaitForPackagesInstallation ¶
func WaitForPackagesInstallation(clusterClient clusterclient.Client, packages []kapppkgv1alpha1.Package, packageInstallTimeout time.Duration) error
Types ¶
type ApplyProvidersUpgradeOptions ¶
type ApplyProvidersUpgradeOptions struct { // Kubeconfig file to use for accessing the management cluster. If empty, default discovery rules apply. Kubeconfig clusterctl.Kubeconfig // Contract defines the API Version of Cluster API (contract e.g. v1alpha3) the management group should upgrade to. // When upgrading by contract, the latest versions available will be used for all the providers; if you want // a more granular control on upgrade, use CoreProvider, BootstrapProviders, ControlPlaneProviders, InfrastructureProviders. // Note: For tkg we will ignore this option as tkg management cluster is opinionated and it controls version of the providers to be upgraded Contract string // CoreProvider instance and version (e.g. capi-system/cluster-api:v0.3.0) to upgrade to. This field can be used as alternative to Contract. CoreProvider string // BootstrapProviders instance and versions (e.g. capi-kubeadm-bootstrap-system/kubeadm:v0.3.0) to upgrade to. This field can be used as alternative to Contract. BootstrapProviders []string // ControlPlaneProviders instance and versions (e.g. capi-kubeadm-control-plane-system/kubeadm:v0.3.0) to upgrade to. This field can be used as alternative to Contract. ControlPlaneProviders []string // InfrastructureProviders instance and versions (e.g. capa-system/aws:v0.5.0) to upgrade to. This field can be used as alternative to Contract. InfrastructureProviders []string }
ApplyProvidersUpgradeOptions carries the options supported by upgrade apply.
type AzureUpdateClusterOptions ¶
type AzureUpdateClusterOptions struct { AzureTenantID string AzureClientID string AzureClientSecret string }
AzureUpdateClusterOptions azure credential options
type Client ¶
type Client interface { // InitRegion creates and initializes a management cluster via a // self-provisioned bootstrap cluster if necessary InitRegion(options *InitRegionOptions) error // InitRegionDryRun generates the management cluster manifest that would be // used by InitRegion to provision a new cluster InitRegionDryRun(options *InitRegionOptions) ([]byte, error) // GetClusterConfiguration returns a cluster configuration generated with // parameters provided in the set of provided template options GetClusterConfiguration(options *CreateClusterOptions) ([]byte, error) // ConfigureAndValidateTkrVersion takes tkrVersion, if empty fetches default tkr & k8s version from config // and validates k8s version format is valid semantic version ConfigureAndValidateTkrVersion(tkrVersion string) (string, string, error) // CreateCluster creates a workload cluster based on a cluster template // generated from the provided options. Returns whether cluster creation was attempted // information along with error information CreateCluster(options *CreateClusterOptions, waitForCluster bool) (attempedClusterCreation bool, err error) // CreateAWSCloudFormationStack create aws cloud formation stack CreateAWSCloudFormationStack() error // DeleteRegion deletes management cluster via a self-provisioned kind cluster DeleteRegion(options DeleteRegionOptions) error // VerifyRegion checks if the kube context points to a management clusters, VerifyRegion(kubeConfigPath string) (region.RegionContext, error) // AddRegionContext adds a management cluster context to tkg config file AddRegionContext(region region.RegionContext, overwrite bool, useDirectReference bool) error // GetRegionContexts gets all tkg managed management cluster context context GetRegionContexts(clusterName string) ([]region.RegionContext, error) // SetRegionContext sets a management cluster context to be current context SetRegionContext(clusterName string, contextName string) error // GenerateAWSCloudFormationTemplate generates a CloudFormation YAML template GenerateAWSCloudFormationTemplate() (string, error) // GetCurrentRegionContext() gets the current management cluster context GetCurrentRegionContext() (region.RegionContext, error) // GetWorkloadClusterCredentials merges workload cluster credentials into kubeconfig path GetWorkloadClusterCredentials(options GetWorkloadClusterCredentialsOptions) (string, string, error) // ListTKGClusters lists workload clusters managed by the management cluster ListTKGClusters(options ListTKGClustersOptions) ([]ClusterInfo, error) // DeleteWorkloadCluster deletes a workload cluster managed by the management cluster DeleteWorkloadCluster(options DeleteWorkloadClusterOptions) error // ScaleCluster scales the cluster ScaleCluster(options ScaleClusterOptions) error // UpgradeCluster upgrades tkg cluster to specific kubernetes version UpgradeCluster(options *UpgradeClusterOptions) error // ConfigureAndValidateManagementClusterConfiguration validates the management cluster configuration // User is expected to validate the configuration before creating management cluster using init operation ConfigureAndValidateManagementClusterConfiguration(options *InitRegionOptions, skipValidation bool) *ValidationError // UpgradeManagementCluster upgrades tkg cluster to specific kubernetes version UpgradeManagementCluster(options *UpgradeClusterOptions) error // Opt-in/out to CEIP on Management Cluster SetCEIPParticipation(ceipOptIn bool, isProd string, labels string) error // Get opt-in/out status for CEIP on all Management Clusters GetCEIPParticipation() (ClusterCeipInfo, error) // DeleteMachineHealthCheck deletes MachineHealthCheck for the given cluster DeleteMachineHealthCheck(options MachineHealthCheckOptions) error // ListMachineHealthChecks lists all the machine health check GetMachineHealthChecks(options MachineHealthCheckOptions) ([]MachineHealthCheck, error) // IsPacificManagementCluster checks if the cluster pointed to by kubeconfig is Pacific management cluster(supervisor) IsPacificManagementCluster() (bool, error) // SetMachineHealthCheck create or update a machine health check object SetMachineHealthCheck(options *SetMachineHealthCheckOptions) error // GetMachineDeployments gets a list of MachineDeployments for a cluster GetMachineDeployments(options GetMachineDeploymentOptions) ([]capi.MachineDeployment, error) // GetPacificMachineDeployments gets machine deployments from a Pacific cluster // Note: This would be soon deprecated after TKGS and TKGm adopt the clusterclass GetPacificMachineDeployments(options GetMachineDeploymentOptions) ([]capiv1alpha3.MachineDeployment, error) // SetMachineDeployment create machine deployment in a cluster SetMachineDeployment(options *SetMachineDeploymentOptions) error // DeleteMachineDeployment deletes a machine deployment in a cluster DeleteMachineDeployment(options DeleteMachineDeploymentOptions) error // GetKubernetesVersions returns the supported k8s versions for workload cluster GetKubernetesVersions() (*KubernetesVersionsInfo, error) // ParseHiddenArgsAsFeatureFlags adds the hidden flags from InitRegionOptions as enabled feature flags ParseHiddenArgsAsFeatureFlags(options *InitRegionOptions) // SaveFeatureFlags saves the feature flags to the config file via featuresClient SaveFeatureFlags(featureFlags map[string]string) error // ValidatePrerequisites validates prerequisites for init command ValidatePrerequisites(validateDocker, validateKubectl bool) error // ValidateDockerResourcePrerequisites validates resource prerequisites for docker ValidateDockerResourcePrerequisites() error // GetVSphereEndpoint creates the vSphere client using the credentials from the management cluster if cluster client is provided, // otherwise, the vSphere client will be created from the credentials set in the user's environment. GetVSphereEndpoint(client clusterclient.Client) (vc.Client, error) // ConfigureTimeout updates/configures timeout already set in the tkgClient ConfigureTimeout(timeout time.Duration) // TKGConfigReaderWriter returns tkgConfigReaderWriter client TKGConfigReaderWriter() tkgconfigreaderwriter.TKGConfigReaderWriter // UpdateManagementCluster updates a management cluster UpdateCredentialsRegion(options *UpdateCredentialsOptions) error // UpdateCredentialsCluster updates a workload cluster UpdateCredentialsCluster(options *UpdateCredentialsOptions) error // GetClusterPinnipedInfo returns the cluster and pinniped info GetClusterPinnipedInfo(options GetClusterPinnipedInfoOptions) (*ClusterPinnipedInfo, error) // DescribeCluster describes all the objects in the Cluster DescribeCluster(options DescribeTKGClustersOptions) (*clusterctltree.ObjectTree, *capi.Cluster, *clusterctlv1.ProviderList, error) // DescribeProvider describes all the installed providers DescribeProvider() (*clusterctlv1.ProviderList, error) // DownloadBomFile downloads BomFile from management cluster's config map DownloadBomFile(tkrName string) error // IsManagementClusterAKindCluster determines if the creation of management cluster is successful IsManagementClusterAKindCluster(clusterName string) (bool, error) // GetTanzuKubernetesReleases returns the available TanzuKubernetesReleases // Deprecated: This would not be supported from TKR API version v1alpha3, // user can use go client to get TKR GetTanzuKubernetesReleases(tkrName string) ([]runv1alpha1.TanzuKubernetesRelease, error) // ActivateTanzuKubernetesReleases activates TanzuKubernetesRelease // Deprecated: This would not be supported from TKR API version v1alpha3, // user can use go client to set the labels to activate/deactivate the TKR ActivateTanzuKubernetesReleases(tkrName string) error // DeactivateTanzuKubernetesReleases deactivates TanzuKubernetesRelease // Deprecated: This would not be supported from TKR API version v1alpha3, // user can use go client to set the labels to activate/deactivate the TKR DeactivateTanzuKubernetesReleases(tkrName string) error // IsPacificRegionalCluster checks if the cluster pointed to by kubeconfig is Pacific management cluster(supervisor) IsPacificRegionalCluster() (bool, error) // GetPacificClusterObject gets Pacific cluster object GetPacificClusterObject(clusterName, namespace string) (*tkgsv1alpha2.TanzuKubernetesCluster, error) // IsFeatureActivated checks if a given feature flag is active IsFeatureActivated(feature string) bool }
Client is used to interact with the tkg client library
type ClusterCeipInfo ¶
type ClusterCeipInfo struct { ClusterName string `json:"name" yaml:"name"` CeipStatus string `json:"ceipOptIn" yaml:"ceipOptIn"` }
ClusterCeipInfo is the cmd object for outputting the CEIP status of a clsuter
type ClusterClassSelector ¶
type ClusterClassSelector interface {
Select(config tkgconfigreaderwriter.TKGConfigReaderWriter) string
}
type ClusterConfigOptions ¶
type ClusterConfigOptions clusterctl.GetClusterTemplateOptions
ClusterConfigOptions contains options required to generate a cluster configuration
type ClusterIPFamily ¶
type ClusterIPFamily int
ClusterIPFamily defines the types of supported IP families.
const ( InvalidIPFamily ClusterIPFamily = iota IPv4IPFamily IPv6IPFamily DualStackIPFamily )
Define the ClusterIPFamily constants.
func GetIPFamily ¶
func GetIPFamily(c *capi.Cluster) (ClusterIPFamily, error)
GetIPFamily returns a ClusterIPFamily from the configuration provided.
func (ClusterIPFamily) String ¶
func (f ClusterIPFamily) String() string
type ClusterInfo ¶
type ClusterInfo struct { Name string `json:"name" yaml:"name"` Namespace string `json:"namespace" yaml:"namespace"` Status string `json:"status" yaml:"status"` Plan string `json:"plan" yaml:"plan"` ControlPlaneCount string `json:"controlplane" yaml:"controlplane"` WorkerCount string `json:"workers" yaml:"workers"` K8sVersion string `json:"kubernetes" yaml:"kubernetes"` Roles []string `json:"roles" yaml:"roles"` TKR string `json:"tkr" yaml:"tkr"` Labels map[string]string `json:"labels" yaml:"labels"` }
ClusterInfo defines the fields of get cluster output
type ClusterPinnipedInfo ¶
type ClusterPinnipedInfo struct { ClusterName string ClusterInfo *clientcmdapi.Cluster ClusterAudience *string PinnipedInfo *pinnipedinfo.PinnipedInfo }
ClusterPinnipedInfo defines the fields of cluster pinniped info
type ClusterUpgradeInfo ¶
type ClusterUpgradeInfo struct { UpgradeComponentInfo ComponentInfo ActualComponentInfo ComponentInfo KCPObjectName string KCPObjectNamespace string MDObjects []capi.MachineDeployment ClusterName string ClusterNamespace string UpgradeState upgradeStatus }
ClusterUpgradeInfo defines cluster upgrade metadata used during upgrade process
type ComponentInfo ¶
type ComponentInfo struct { TkrVersion string KubernetesVersion string ImageRepository string CoreDNSImageRepository string CoreDNSImageTag string EtcdDataDir string EtcdImageRepository string EtcdImageTag string EtcdExtraArgs map[string]string KCPInfrastructureTemplateName string KCPInfrastructureTemplateNamespace string MDInfastructureTemplates map[string]mdInfastructureTemplateInfo VSphereVMTemplateName string VSphereVMTemplateMOID string AwsAMIID string CAPDImageName string CAPDImageRepo string AwsRegionToAMIMap map[string][]tkgconfigbom.AMIInfo AzureImage tkgconfigbom.AzureInfo OsInfo tkgconfigbom.OSInfo KubeVipFullImagePath string KubeVipTag string }
ComponentInfo defines cluster component related metadata used for upgrade
type Components ¶
type Components repository.Components
Components CAPI repostory components interface
type CreateClusterOptions ¶
type CreateClusterOptions struct { ClusterConfigOptions TKRVersion string NodeSizeOptions NodeSizeOptions CniType string ClusterOptionsEnableList []string VsphereControlPlaneEndpoint string SkipValidation bool IsWindowsWorkloadCluster bool ClusterType TKGClusterType Edition string IsInputFileClusterClassBased bool ClusterConfigFile string }
CreateClusterOptions contains options required to create a cluster
type DeleteMachineDeploymentOptions ¶
DeleteMachineDeploymentOptions a struct describing options for DeleteMachineDeployments
type DeleteRegionOptions ¶
type DeleteRegionOptions struct { Kubeconfig string ClusterName string Force bool UseExistingCluster bool }
DeleteRegionOptions contains options supported by DeleteRegion
type DeleteWorkloadClusterOptions ¶
DeleteWorkloadClusterOptions contains options supported by DeleteWorkloadCluster
type DescribeTKGClustersOptions ¶
type DescribeTKGClustersOptions struct { ClusterName string Namespace string ShowOtherConditions string ShowDetails bool ShowGroupMembers bool IsManagementCluster bool }
DescribeTKGClustersOptions contains options supported by DescribeCluster
type FeatureFlagClient ¶
FeatureFlagClient is used to check if a feature is active
type GetClusterPinnipedInfoOptions ¶
type GetClusterPinnipedInfoOptions struct { ClusterName string Namespace string IsManagementCluster bool }
GetClusterPinnipedInfoOptions contains options supported by GetClusterPinnipedInfo
type GetMachineDeploymentOptions ¶
GetMachineDeploymentOptions a struct describing options for retrieving MachineDeployments
type GetWorkloadClusterCredentialsOptions ¶
type GetWorkloadClusterCredentialsOptions struct { ClusterName string Namespace string ExportFile string }
GetWorkloadClusterCredentialsOptions contains options supported by GetWorkloadClusterCredntials
type GivenClusterClassSelector ¶
type GivenClusterClassSelector struct{}
func (GivenClusterClassSelector) Select ¶
func (GivenClusterClassSelector) Select(rw tkgconfigreaderwriter.TKGConfigReaderWriter) string
type InitRegionOptions ¶
type InitRegionOptions struct { NodeSizeOptions NodeSizeOptions ClusterConfigFile string Kubeconfig string Plan string ClusterName string CoreProvider string BootstrapProvider string InfrastructureProvider string ControlPlaneProvider string IPAMProvider string Namespace string CniType string VsphereControlPlaneEndpoint string Edition string AdditionalTKGManifests string Annotations map[string]string Labels map[string]string FeatureFlags map[string]string LaunchUI bool CeipOptIn bool UseExistingCluster bool IsInputFileClusterClassBased bool GenerateOnly bool }
InitRegionOptions contains options supported by InitRegion
type KubernetesVersionsInfo ¶
type KubernetesVersionsInfo struct {
Versions []string `json:"versions" yaml:"versions"`
}
KubernetesVersionsInfo kubernetes version info struct
type ListTKGClustersOptions ¶
type ListTKGClustersOptions struct { Namespace string IncludeMC bool IsTKGSClusterClassFeatureActivated bool }
ListTKGClustersOptions contains options supported by ListClusters
type MachineHealthCheck ¶
type MachineHealthCheck struct { Name string `json:"name"` Namespace string `json:"namespace"` Spec capi.MachineHealthCheckSpec `json:"spec"` Status capi.MachineHealthCheckStatus `json:"status"` }
MachineHealthCheck object
type MachineHealthCheckOptions ¶
type MachineHealthCheckOptions struct { ClusterName string MachineHealthCheckName string Namespace string MatchLabel string }
MachineHealthCheckOptions machinehealthcheck options
type NodePool ¶
type NodePool struct { Name string `yaml:"name"` Replicas *int32 `yaml:"replicas,omitempty"` AZ string `yaml:"az,omitempty"` NodeMachineType string `yaml:"nodeMachineType,omitempty"` WorkerClass string `yaml:"workerClass,omitempty"` Labels *map[string]string `yaml:"labels,omitempty"` VSphere VSphereNodePool `yaml:"vsphere,omitempty"` Taints *[]corev1.Taint `yaml:"taints,omitempty"` VMClass string `yaml:"vmClass,omitempty"` StorageClass string `yaml:"storageClass,omitempty"` TKRResolver string `yaml:"tkrResolver,omitempty"` Volumes *[]tkgsv1alpha2.Volume `yaml:"volumes,omitempty"` TKR tkgsv1alpha2.TKRReference `yaml:"tkr,omitempty"` NodeDrainTimeout *metav1.Duration `yaml:"nodeDrainTimeout,omitempty"` BaseMachineDeployment string `yaml:"baseMachineDeployment,omitempty"` }
NodePool a struct describing a node pool
type NodeSizeOptions ¶
NodeSizeOptions contains node size options specified by user
type Options ¶
type Options struct { ClusterCtlClient clusterctl.Client ReaderWriterConfigClient tkgconfigreaderwriter.Client RegionManager region.Manager TKGConfigDir string Timeout time.Duration FeaturesClient features.Client TKGConfigProvidersClient tkgconfigproviders.Client TKGBomClient tkgconfigbom.Client TKGConfigUpdater tkgconfigupdater.Client TKGPathsClient tkgconfigpaths.Client ClusterKubeConfig *types.ClusterKubeConfig ClusterClientFactory clusterclient.ClusterClientFactory VcClientFactory vc.VcClientFactory FeatureFlagClient FeatureFlagClient }
Options new client options
type ProviderBasedClusterClassSelector ¶
type ProviderBasedClusterClassSelector struct{}
func (ProviderBasedClusterClassSelector) Select ¶
func (ProviderBasedClusterClassSelector) Select(rw tkgconfigreaderwriter.TKGConfigReaderWriter) string
type ScaleClusterOptions ¶
type ScaleClusterOptions struct { Kubeconfig string ClusterName string Namespace string NodePoolName string WorkerCount int32 ControlPlaneCount int32 }
ScaleClusterOptions defines options to scale tkg cluster
type SetMachineDeploymentOptions ¶
SetMachineDeploymentOptions a struct describing options for creating/updating MachineDeployments
type SetMachineHealthCheckOptions ¶
type SetMachineHealthCheckOptions struct { ClusterName string Namespace string MachineHealthCheckName string MatchLables []string UnhealthyConditions []string NodeStartupTimeout string }
SetMachineHealthCheckOptions machinehealthcheck setter options
type TKGClusterPhase ¶
type TKGClusterPhase string
TKGClusterPhase is used to type the constants describing possible cluster status.
type TKGClusterType ¶
type TKGClusterType string
TKGClusterType specifies cluster type
const ( ManagementCluster TKGClusterType = "Management" WorkloadCluster TKGClusterType = "Workload" )
cluster types
type TkgClient ¶
type TkgClient struct {
// contains filtered or unexported fields
}
TkgClient implements Client.
func (*TkgClient) ActivateTanzuKubernetesReleases ¶
ActivateTanzuKubernetesReleases activates TKr
func (*TkgClient) AddRegionContext ¶
func (c *TkgClient) AddRegionContext(r region.RegionContext, overwrite, useDirectReference bool) error
AddRegionContext adds management cluster context
func (*TkgClient) ApplyClusterBootstrapObjects ¶
func (c *TkgClient) ApplyClusterBootstrapObjects(fromClusterClient, toClusterClient clusterclient.Client) error
ApplyClusterBootstrapObjects renders the ClusterBootstrap and its associated objects from templates and applies them to a target management cluster.
func (*TkgClient) BuildRegionalClusterConfiguration ¶
func (c *TkgClient) BuildRegionalClusterConfiguration(options *InitRegionOptions) ([]byte, string, string, error)
BuildRegionalClusterConfiguration build management cluster configuration returns cluster-configuration bytes, clustername, configFilePath, error if present
func (*TkgClient) CleanupCorePackageRepo ¶
func (c *TkgClient) CleanupCorePackageRepo(clusterClient clusterclient.Client) error
func (*TkgClient) ConfigureAMIID ¶
func (c *TkgClient) ConfigureAMIID(options *UpgradeClusterOptions, regionalClusterClient clusterclient.Client) error
func (*TkgClient) ConfigureAndValidateAWSConfig ¶
func (c *TkgClient) ConfigureAndValidateAWSConfig(tkrVersion string, nodeSizes NodeSizeOptions, skipValidation, isProdConfig bool, workerMachineCount int64, clusterClient clusterclient.Client, isManagementCluster bool) error
ConfigureAndValidateAWSConfig configures and validates aws configuration
func (*TkgClient) ConfigureAndValidateAviConfiguration ¶
ConfigureAndValidateAviConfiguration validates the configuration inputs of Avi aka. NSX Advanced Load Balancer
func (*TkgClient) ConfigureAndValidateAwsConfig ¶
func (c *TkgClient) ConfigureAndValidateAwsConfig(tkrVersion string, workerMachineCount int64, useExistingVPC bool) error
ConfigureAndValidateAwsConfig configures and validates aws configuration
func (*TkgClient) ConfigureAndValidateAzureConfig ¶
func (c *TkgClient) ConfigureAndValidateAzureConfig(tkrVersion string, nodeSizes NodeSizeOptions, skipValidation bool, clusterClient clusterclient.Client) error
ConfigureAndValidateAzureConfig configures and validates azure configurationn
func (*TkgClient) ConfigureAndValidateCNIType ¶
ConfigureAndValidateCNIType configures and validates cni
func (*TkgClient) ConfigureAndValidateDockerConfig ¶
func (c *TkgClient) ConfigureAndValidateDockerConfig(tkrVersion string, nodeSizes NodeSizeOptions, skipValidation bool) error
ConfigureAndValidateDockerConfig configures and validates docker configuration
func (*TkgClient) ConfigureAndValidateHTTPProxyConfiguration ¶
ConfigureAndValidateHTTPProxyConfiguration configures and validates http proxy configuration
func (*TkgClient) ConfigureAndValidateManagementClusterConfiguration ¶
func (c *TkgClient) ConfigureAndValidateManagementClusterConfiguration(options *InitRegionOptions, skipValidation bool) *ValidationError
ConfigureAndValidateManagementClusterConfiguration configure and validate management cluster configuration
func (*TkgClient) ConfigureAndValidateNameserverConfiguration ¶
ConfigureAndValidateNameserverConfiguration validates the configuration of the control plane node and workload node nameservers
func (*TkgClient) ConfigureAndValidateOracleConfig ¶
func (c *TkgClient) ConfigureAndValidateOracleConfig(tkrVersion string, nodeSizes NodeSizeOptions, skipValidation bool) error
ConfigureAndValidateOracleConfig configures and validates oracle configurationn
func (*TkgClient) ConfigureAndValidateTkrVersion ¶
ConfigureAndValidateTkrVersion takes tkrVersion, if empty fetches default tkr & k8s version from config and validates k8s version format is valid semantic version
func (*TkgClient) ConfigureAndValidateVSphereTemplate ¶
func (c *TkgClient) ConfigureAndValidateVSphereTemplate(vcClient vc.Client, tkrVersion, dc string) error
ConfigureAndValidateVSphereTemplate validate the k8s version provided matches with VM template's k8s version
func (*TkgClient) ConfigureAndValidateVsphereConfig ¶
func (c *TkgClient) ConfigureAndValidateVsphereConfig(tkrVersion string, nodeSizes NodeSizeOptions, vip string, skipValidation bool, clusterClient clusterclient.Client) *ValidationError
ConfigureAndValidateVsphereConfig configures and validates vsphere configuration
func (*TkgClient) ConfigureAndValidateWorkloadClusterConfiguration ¶
func (c *TkgClient) ConfigureAndValidateWorkloadClusterConfiguration(options *CreateClusterOptions, clusterClient clusterclient.Client, skipValidation bool) error
ConfigureAndValidateWorkloadClusterConfiguration configures and validates workload cluster configuration
func (*TkgClient) ConfigureAzureVMImage ¶
ConfigureAzureVMImage configures azure image from BoM or user config file
func (*TkgClient) ConfigureTimeout ¶
ConfigureTimeout updates/configures timeout already set in the tkgClient
func (*TkgClient) CopyNeededTKRAndOSImages ¶
func (c *TkgClient) CopyNeededTKRAndOSImages(fromClusterClient, toClusterClient clusterclient.Client) error
CopyNeededTKRAndOSImages moves the resolved TKR and associated OSImage CR for a Cluster resource from namespaceto a target management
func (*TkgClient) CreateAWSCloudFormationStack ¶
CreateAWSCloudFormationStack create aws cloud formation stack
func (*TkgClient) CreateCluster ¶
func (c *TkgClient) CreateCluster(options *CreateClusterOptions, waitForCluster bool) (bool, error)
CreateCluster creates a workload cluster based on a cluster template generated from the provided options. Returns whether cluster creation was attempted information along with error information
func (*TkgClient) CreateMachineHealthCheck ¶
func (c *TkgClient) CreateMachineHealthCheck(clusterClient clusterclient.Client, options *SetMachineHealthCheckOptions) error
CreateMachineHealthCheck creates machinehealthchecks
func (*TkgClient) CreateOrUpdateVerisionedTKGBom ¶
func (c *TkgClient) CreateOrUpdateVerisionedTKGBom(regionalClusterClient clusterclient.Client) error
CreateOrUpdateVerisionedTKGBom will create or update the tkg-bom-<tkg-version> ConfigMap. This is required for destributing tkg-bom information to workload clusters.
func (*TkgClient) DeactivateTanzuKubernetesReleases ¶
DeactivateTanzuKubernetesReleases deactivates TKR
func (*TkgClient) DecodeKubevipPodManifestFromKCP ¶
func (c *TkgClient) DecodeKubevipPodManifestFromKCP(kcp *capikubeadmv1beta1.KubeadmControlPlane) (*corev1.Pod, error)
func (*TkgClient) DeleteMachineDeployment ¶
func (c *TkgClient) DeleteMachineDeployment(options DeleteMachineDeploymentOptions) error
DeleteMachineDeployment deletes a machine deployment
func (*TkgClient) DeleteMachineHealthCheck ¶
func (c *TkgClient) DeleteMachineHealthCheck(options MachineHealthCheckOptions) error
DeleteMachineHealthCheck delete machinehealthcheck
func (*TkgClient) DeleteMachineHealthCheckWithClusterClient ¶
func (c *TkgClient) DeleteMachineHealthCheckWithClusterClient(clusterClient clusterclient.Client, options MachineHealthCheckOptions) error
DeleteMachineHealthCheckWithClusterClient delete machinehealthcheck with client
func (*TkgClient) DeleteNodePoolForPacificCluster ¶
func (c *TkgClient) DeleteNodePoolForPacificCluster(clusterClient clusterclient.Client, options DeleteMachineDeploymentOptions) error
DeleteNodePoolForPacificCluster deletes a machine deployment
func (*TkgClient) DeleteRegion ¶
func (c *TkgClient) DeleteRegion(options DeleteRegionOptions) error
DeleteRegion delete management cluster
func (*TkgClient) DeleteWorkloadCluster ¶
func (c *TkgClient) DeleteWorkloadCluster(options DeleteWorkloadClusterOptions) error
DeleteWorkloadCluster deletes workload cluster
func (*TkgClient) DescribeCluster ¶
func (c *TkgClient) DescribeCluster(options DescribeTKGClustersOptions) (*clusterctltree.ObjectTree, *clusterv1.Cluster, *clusterctlv1.ProviderList, error)
DescribeCluster describes cluster details and status
func (*TkgClient) DescribeProvider ¶
func (c *TkgClient) DescribeProvider() (*clusterctlv1.ProviderList, error)
DescribeProvider describes provider information
func (*TkgClient) DistributeMachineDeploymentWorkers ¶
func (c *TkgClient) DistributeMachineDeploymentWorkers(workerMachineCount int64, isProdConfig, isManagementCluster bool, infraProviderName string) ([]int, error)
DistributeMachineDeploymentWorkers distributes machine deployment for worker nodes
func (*TkgClient) DoClassyClusterUpgrade ¶
func (c *TkgClient) DoClassyClusterUpgrade(regionalClusterClient clusterclient.Client, currentClusterClient clusterclient.Client, options *UpgradeClusterOptions) error
func (*TkgClient) DoClusterUpgrade ¶
func (c *TkgClient) DoClusterUpgrade(regionalClusterClient clusterclient.Client, currentClusterClient clusterclient.Client, options *UpgradeClusterOptions) error
DoClusterUpgrade upgrades cluster
func (*TkgClient) DoCreateCluster ¶
func (c *TkgClient) DoCreateCluster(clusterClient clusterclient.Client, name, namespace, manifest string) error
DoCreateCluster performs steps to create cluster
func (*TkgClient) DoGetCEIPParticipation ¶
func (c *TkgClient) DoGetCEIPParticipation(clusterClient clusterclient.Client, clusterName string) (ClusterCeipInfo, error)
DoGetCEIPParticipation get CEIP participation details
func (*TkgClient) DoGetTanzuKubernetesReleases ¶
func (c *TkgClient) DoGetTanzuKubernetesReleases(regionalClusterClient clusterclient.Client) (*KubernetesVersionsInfo, error)
DoGetTanzuKubernetesReleases gets TKr
func (*TkgClient) DoLegacyClusterUpgrade ¶
func (c *TkgClient) DoLegacyClusterUpgrade(regionalClusterClient, currentClusterClient clusterclient.Client, options *UpgradeClusterOptions) error
func (*TkgClient) DoPacificClusterUpgrade ¶
func (c *TkgClient) DoPacificClusterUpgrade(regionalClusterClient clusterclient.Client, options *UpgradeClusterOptions) error
DoPacificClusterUpgrade perform TKGS cluster upgrade
func (*TkgClient) DoProvidersUpgrade ¶
func (c *TkgClient) DoProvidersUpgrade(regionalClusterClient clusterclient.Client, ctx string, providersUpgradeClient providersupgradeclient.Client, options *UpgradeClusterOptions) error
DoProvidersUpgrade upgrades the providers of the management cluster
func (*TkgClient) DoScaleCluster ¶
func (c *TkgClient) DoScaleCluster(clusterClient clusterclient.Client, options *ScaleClusterOptions) error
DoScaleCluster performs the scale operation using the given clusterclient.Client
func (*TkgClient) DoSetCEIPParticipation ¶
func (c *TkgClient) DoSetCEIPParticipation(clusterClient clusterclient.Client, context region.RegionContext, ceipOptIn bool, isProd, labels string) error
DoSetCEIPParticipation performs steps to set CEIP participation
func (*TkgClient) DoUpgradeAddon ¶
func (c *TkgClient) DoUpgradeAddon(regionalClusterClient clusterclient.Client, currentClusterClient clusterclient.Client, options *UpgradeAddonOptions, clusterConfigurationGetter func(*CreateClusterOptions) ([]byte, error)) error
DoUpgradeAddon performs steps for addons upgrade
func (*TkgClient) DownloadBomFile ¶
DownloadBomFile downloads BoM file
func (*TkgClient) EncodeAWSCredentialsAndGetClient ¶
func (c *TkgClient) EncodeAWSCredentialsAndGetClient(clusterClient clusterclient.Client) (aws.Client, error)
EncodeAWSCredentialsAndGetClient encodes aws credentials and returns aws client
func (*TkgClient) EncodeAzureCredentialsAndGetClient ¶
func (c *TkgClient) EncodeAzureCredentialsAndGetClient(clusterClient clusterclient.Client) (azure.Client, error)
EncodeAzureCredentialsAndGetClient encodes azure credentials and returns azure client
func (*TkgClient) GenerateAWSCloudFormationTemplate ¶
GenerateAWSCloudFormationTemplate produces the CloudFormation template YAML
func (*TkgClient) GenerateProvidersUpgradeOptions ¶
func (c *TkgClient) GenerateProvidersUpgradeOptions(pUpgradeInfo *providersUpgradeInfo) (*clusterctl.ApplyUpgradeOptions, error)
GenerateProvidersUpgradeOptions generates provider upgrade options
func (*TkgClient) GetAWSCreds ¶
func (c *TkgClient) GetAWSCreds() (*credentials.AWSCredentials, error)
GetAWSCreds get aws credentials
func (*TkgClient) GetAddonsManagerPackageversion ¶
GetAddonsManagerPackageversion returns a addons manager package version
func (*TkgClient) GetCEIPParticipation ¶
func (c *TkgClient) GetCEIPParticipation() (ClusterCeipInfo, error)
GetCEIPParticipation get CEIP participation details
func (*TkgClient) GetClusterConfiguration ¶
func (c *TkgClient) GetClusterConfiguration(options *CreateClusterOptions) ([]byte, error)
GetClusterConfiguration gets cluster configuration
func (*TkgClient) GetClusterObjects ¶
func (c *TkgClient) GetClusterObjects(clusterClient clusterclient.Client, listOptions *crtclient.ListOptions, managementClusterName string, includeMC bool) ([]ClusterInfo, error)
GetClusterObjects gets cluster objects
func (*TkgClient) GetClusterObjectsForPacific ¶
func (c *TkgClient) GetClusterObjectsForPacific(clusterClient clusterclient.Client, apiVersion string, listOptions *crtclient.ListOptions) ([]ClusterInfo, error)
GetClusterObjectsForPacific get cluster objects for TKGS clusters
func (*TkgClient) GetClusterPinnipedInfo ¶
func (c *TkgClient) GetClusterPinnipedInfo(options GetClusterPinnipedInfoOptions) (*ClusterPinnipedInfo, error)
GetClusterPinnipedInfo gets pinniped information from cluster
func (*TkgClient) GetCurrentRegionContext ¶
func (c *TkgClient) GetCurrentRegionContext() (region.RegionContext, error)
GetCurrentRegionContext gets current management cluster contexts
func (*TkgClient) GetKubernetesVersions ¶
func (c *TkgClient) GetKubernetesVersions() (*KubernetesVersionsInfo, error)
GetKubernetesVersions get kubernetes version info
func (*TkgClient) GetKubevipImageAndTag ¶
func (c *TkgClient) GetKubevipImageAndTag(kcp *capikubeadmv1beta1.KubeadmControlPlane) (string, string, error)
func (*TkgClient) GetMCClusterPinnipedInfo ¶
func (c *TkgClient) GetMCClusterPinnipedInfo(regionalClusterClient clusterclient.Client, curRegion region.RegionContext, options GetClusterPinnipedInfoOptions) (*ClusterPinnipedInfo, error)
GetMCClusterPinnipedInfo get pinniped information for management cluster
func (*TkgClient) GetMachineDeployments ¶
func (c *TkgClient) GetMachineDeployments(options GetMachineDeploymentOptions) ([]capi.MachineDeployment, error)
GetMachineDeployments retrieves machine deployments for a cluster
func (*TkgClient) GetMachineHealthChecks ¶
func (c *TkgClient) GetMachineHealthChecks(options MachineHealthCheckOptions) ([]MachineHealthCheck, error)
GetMachineHealthChecks gets machinehealthcheck
func (*TkgClient) GetMachineHealthChecksWithClusterClient ¶
func (c *TkgClient) GetMachineHealthChecksWithClusterClient(clusterClient clusterclient.Client, options MachineHealthCheckOptions) ([]MachineHealthCheck, error)
GetMachineHealthChecksWithClusterClient gets machinehealthcheck with client
func (*TkgClient) GetPacificClusterObject ¶
func (c *TkgClient) GetPacificClusterObject(clusterName, namespace string) (*tkgsv1alpha2.TanzuKubernetesCluster, error)
GetPacificClusterObject return Pacific cluster object
func (*TkgClient) GetPacificMachineDeployments ¶
func (c *TkgClient) GetPacificMachineDeployments(options GetMachineDeploymentOptions) ([]capiv1alpha3.MachineDeployment, error)
GetPacificMachineDeployments retrieves machine deployments for a Pacific(TKGS) cluster This is defined separately for Pacific (TKGS) provider because the TKGS and TKGm CAPI versions could be different and this should be deprecated after clusterclass is adopted by both TKGm and TKGS
func (*TkgClient) GetRegionContexts ¶
func (c *TkgClient) GetRegionContexts(clusterName string) ([]region.RegionContext, error)
GetRegionContexts returns mangement cluster contexts
func (*TkgClient) GetTanzuKubernetesReleases ¶
func (c *TkgClient) GetTanzuKubernetesReleases(tkrName string) ([]runv1alpha1.TanzuKubernetesRelease, error)
GetTanzuKubernetesReleases returns TKr list
func (*TkgClient) GetUserConfigVariableValueMap ¶
func (c *TkgClient) GetUserConfigVariableValueMap(configDefaultFilePath string, rw tkgconfigreaderwriter.TKGConfigReaderWriter) (map[string]interface{}, error)
GetUserConfigVariableValueMap is a specific implementation expecting to use a flat key-value file to provide a source of keys to filter for the valid user provided values. For example, this function uses config_default.yaml filepath to find relevant config variables and returns the config map of user provided variable among all applicable config variables
func (*TkgClient) GetVSphereEndpoint ¶
GetVSphereEndpoint gets vsphere client based on credentials set in config variables
func (*TkgClient) GetWCClusterPinnipedInfo ¶
func (c *TkgClient) GetWCClusterPinnipedInfo( regionalClusterClient clusterclient.Client, _ region.RegionContext, options GetClusterPinnipedInfoOptions, isPacific bool, isClusterClassBased bool) (*ClusterPinnipedInfo, error)
GetWCClusterPinnipedInfo gets pinniped information for workload cluster
func (*TkgClient) GetWorkloadClusterCredentials ¶
func (c *TkgClient) GetWorkloadClusterCredentials(options GetWorkloadClusterCredentialsOptions) (string, string, error)
GetWorkloadClusterCredentials gets and saves workload cluster credentials
func (*TkgClient) HandleKappControllerUpgrade ¶
func (c *TkgClient) HandleKappControllerUpgrade(regionalClusterClient, currentClusterClient clusterclient.Client, upgradeClusterConfig *ClusterUpgradeInfo) error
HandleKappControllerUpgrade is only meant for testing handleKappControllerUpgrade
func (*TkgClient) InitRegion ¶
func (c *TkgClient) InitRegion(options *InitRegionOptions) error
InitRegion create management cluster
func (*TkgClient) InitRegionDryRun ¶
func (c *TkgClient) InitRegionDryRun(options *InitRegionOptions) ([]byte, error)
InitRegionDryRun run management cluster dry-run
func (*TkgClient) InitializeProviders ¶
func (c *TkgClient) InitializeProviders(options *InitRegionOptions, clusterClient clusterclient.Client, kubeconfigPath string) error
InitializeProviders initializes providers
func (*TkgClient) InstallAKO ¶
func (c *TkgClient) InstallAKO(mcClient clusterclient.Client) error
InstallAKO install AKO to the cluster
func (*TkgClient) InstallOrUpgradeKappController ¶
func (c *TkgClient) InstallOrUpgradeKappController(clusterClient clusterclient.Client, operationType constants.OperationType, upgrade bool) error
func (*TkgClient) InstallOrUpgradeManagementComponents ¶
func (c *TkgClient) InstallOrUpgradeManagementComponents(mcClient clusterclient.Client, pkgClient packageclient.PackageClient, kubecontext string, upgrade bool) error
InstallOrUpgradeManagementComponents install management components to the cluster
func (*TkgClient) IsFeatureActivated ¶
IsFeatureActivated checkes if a feature flag is set to "true"
func (*TkgClient) IsKubevipManifestInKCP ¶
func (c *TkgClient) IsKubevipManifestInKCP(kcp *capikubeadmv1beta1.KubeadmControlPlane) bool
func (*TkgClient) IsManagementClusterAKindCluster ¶
IsManagementClusterAKindCluster Determining if the management cluster creation is successful based on the presence of Annotation 'TKGVERSION: <version>'.
Management clusters are annotated with the TKG version if they are successful. If the annotation is not present, the cluster is determined to be failed management cluster (kind cluster) with some un-deleted infrastructure resources
func (*TkgClient) IsPacificManagementCluster ¶
IsPacificManagementCluster check if management cluster is TKGS cluster
func (*TkgClient) IsPacificRegionalCluster ¶
IsPacificRegionalCluster checks if the cluster pointed to by kubeconfig is Pacific management cluster(supervisor)
func (*TkgClient) ListTKGClusters ¶
func (c *TkgClient) ListTKGClusters(options ListTKGClustersOptions) ([]ClusterInfo, error)
ListTKGClusters lists tkg cluster information
func (*TkgClient) MoveObjects ¶
MoveObjects moves all the Cluster API objects from all the namespaces to a target management cluster.
func (*TkgClient) OverrideAWSNodeSizeWithOptions ¶
func (c *TkgClient) OverrideAWSNodeSizeWithOptions(options NodeSizeOptions, awsClient aws.Client, skipValidation bool) error
OverrideAWSNodeSizeWithOptions overrides aws node size with options
func (*TkgClient) OverrideAzureNodeSizeWithOptions ¶
func (c *TkgClient) OverrideAzureNodeSizeWithOptions(client azure.Client, options NodeSizeOptions, skipValidation bool) error
OverrideAzureNodeSizeWithOptions overrides azure node size with options
func (*TkgClient) OverrideVsphereNodeSizeWithOptions ¶
func (c *TkgClient) OverrideVsphereNodeSizeWithOptions(options NodeSizeOptions) error
OverrideVsphereNodeSizeWithOptions overrides vsphere node size with options
func (*TkgClient) ParseHiddenArgsAsFeatureFlags ¶
func (c *TkgClient) ParseHiddenArgsAsFeatureFlags(options *InitRegionOptions)
ParseHiddenArgsAsFeatureFlags adds the hidden flags from InitRegionOptions as enabled feature flags
func (*TkgClient) PatchClusterInitOperations ¶
func (c *TkgClient) PatchClusterInitOperations(regionalClusterClient clusterclient.Client, options *InitRegionOptions, targetClusterNamespace string) error
PatchClusterInitOperations Patches cluster
func (*TkgClient) PatchKubernetesVersionToKubeadmControlPlane ¶
func (c *TkgClient) PatchKubernetesVersionToKubeadmControlPlane(regionalClusterClient clusterclient.Client, clusterUpgradeConfig *ClusterUpgradeInfo) error
func (*TkgClient) PrepareAddonsManagerUpgrade ¶
func (c *TkgClient) PrepareAddonsManagerUpgrade(regionalClusterClient clusterclient.Client, upgradeClusterConfig *ClusterUpgradeInfo) error
PrepareAddonsManagerUpgrade is only meant for testing prepareAddonsManagerUpgrade
func (*TkgClient) RestartCAPZControllerManagerPod ¶
func (c *TkgClient) RestartCAPZControllerManagerPod(clusterClient clusterclient.Client) error
func (*TkgClient) RetrieveRegionalClusterConfiguration ¶
func (c *TkgClient) RetrieveRegionalClusterConfiguration(regionalClusterClient clusterclient.Client) error
RetrieveRegionalClusterConfiguration gets TKG configurations from regional cluster and updates the in-memory config. this is required when we want to mutate the existing regional cluster.
func (*TkgClient) RetrieveWorkloadClusterConfiguration ¶
func (c *TkgClient) RetrieveWorkloadClusterConfiguration(regionalClusterClient, workloadClusterClient clusterclient.Client, clusterName, clusterNamespace string) error
RetrieveWorkloadClusterConfiguration gets TKG configurations from regional cluster as well as workload cluster and updates the in-memory config. This is required when we want to mutate the existing workload cluster.
func (*TkgClient) SaveFeatureFlags ¶
SaveFeatureFlags saves the feature flags to the config file via featuresClient
func (*TkgClient) ScaleCluster ¶
func (c *TkgClient) ScaleCluster(options ScaleClusterOptions) error
ScaleCluster scales cluster vertically
func (*TkgClient) ScalePacificCluster ¶
func (c *TkgClient) ScalePacificCluster(options *ScaleClusterOptions, clusterClient clusterclient.Client) error
ScalePacificCluster scale TKGS cluster
func (*TkgClient) SetAllowLegacyClusterConfiguration ¶
Sets the appropriate AllowLegacyCluster configuration unless it has been explicitly overridden
func (*TkgClient) SetAndValidateDefaultAWSVPCConfiguration ¶
func (c *TkgClient) SetAndValidateDefaultAWSVPCConfiguration(isProdConfig bool, awsClient aws.Client, skipValidation bool) (bool, error)
SetAndValidateDefaultAWSVPCConfiguration sets default value for AWS configuration variables Depending on whether AWS_VPC_ID is set/unset in the tkgconfig, values pertaining to configuring for existing/new VPC needs to be initialized to "" It returns whether creating cluster within existing vpc.
func (*TkgClient) SetBuildEdition ¶
SetBuildEdition saves the build edition
func (*TkgClient) SetCEIPParticipation ¶
SetCEIPParticipation sets CEIP participation
func (*TkgClient) SetDefaultProxySettings ¶
func (c *TkgClient) SetDefaultProxySettings()
SetDefaultProxySettings is used to configure default proxy settings. The TKG proxy variables are required for cloud-api component templates rendering. Need to set them to "" if the proxy variables are not available.
func (*TkgClient) SetMachineDeployment ¶
func (c *TkgClient) SetMachineDeployment(options *SetMachineDeploymentOptions) error
SetMachineDeployment sets a MachineDeployment on a cluster.
func (*TkgClient) SetMachineDeploymentWorkerCounts ¶
func (c *TkgClient) SetMachineDeploymentWorkerCounts(workerCounts []int, totalWorkerMachineCount int64, isProdConfig bool)
SetMachineDeploymentWorkerCounts sets machine deployment counts
func (*TkgClient) SetMachineHealthCheck ¶
func (c *TkgClient) SetMachineHealthCheck(options *SetMachineHealthCheckOptions) error
SetMachineHealthCheck sets machinehealthcheck
func (*TkgClient) SetNodePoolsForPacificCluster ¶
func (c *TkgClient) SetNodePoolsForPacificCluster(clusterClient clusterclient.Client, options *SetMachineDeploymentOptions) error
SetNodePoolsForPacificCluster sets nodepool for Pacific cluster
func (*TkgClient) SetPinnipedConfigForWorkloadCluster ¶
SetPinnipedConfigForWorkloadCluster sets the pinniped configuration(concierge) for workload cluster
func (*TkgClient) SetProviderType ¶
SetProviderType saves the provider type
func (*TkgClient) SetRegionContext ¶
SetRegionContext sets management cluster contexts
func (*TkgClient) SetTKGClusterRole ¶
func (c *TkgClient) SetTKGClusterRole(clusterType TKGClusterType)
SetTKGClusterRole sets the value of label tkg.tanzu.vmware.com/cluster-role for CAPI Cluster object.
func (*TkgClient) SetTKGVersion ¶
func (c *TkgClient) SetTKGVersion()
SetTKGVersion saves the tkg version based on Default BoM file
func (*TkgClient) SetVsphereNodeSize ¶
func (c *TkgClient) SetVsphereNodeSize()
SetVsphereNodeSize sets vsphere node size
func (*TkgClient) SetVsphereVersion ¶
SetVsphereVersion saves the vsphere version
func (*TkgClient) ShouldDeployClusterClassBasedCluster ¶
func (*TkgClient) ShouldManageCEIP ¶
func (c *TkgClient) ShouldManageCEIP(clusterClient clusterclient.Client, ctx region.RegionContext) (bool, error)
ShouldManageCEIP determines if TKG should be managing CEIP starting in TKG v1.6.0, the telemetry cron job will be configured by the tanzu telemetry plugin, and not the CEIP command the telemetry cron job will now also actively check CEIP participation status, and must always be installed the CEIP command will still be used to fix clusters v1.6.0+ that are in a bad state and are missing the cron job
func (*TkgClient) TKGConfigReaderWriter ¶
func (c *TkgClient) TKGConfigReaderWriter() tkgconfigreaderwriter.TKGConfigReaderWriter
TKGConfigReaderWriter returns tkgConfigReaderWriter client
func (*TkgClient) TrimVsphereSSHKey ¶
func (c *TkgClient) TrimVsphereSSHKey()
TrimVsphereSSHKey trim the comment part of the vsphere ssh key
func (*TkgClient) UpdateAzureClusterCredentials ¶
func (c *TkgClient) UpdateAzureClusterCredentials(clusterClient clusterclient.Client, options *UpdateCredentialsOptions) error
UpdateAzureClusterCredentials update azure cluster credentials
func (*TkgClient) UpdateAzureCredentialsForCluster ¶
func (c *TkgClient) UpdateAzureCredentialsForCluster(clusterClient clusterclient.Client, options *UpdateCredentialsOptions, unifiedIdentity bool) error
func (*TkgClient) UpdateCredentialsCluster ¶
func (c *TkgClient) UpdateCredentialsCluster(options *UpdateCredentialsOptions) error
UpdateCredentialsCluster update cluster credentials
func (*TkgClient) UpdateCredentialsRegion ¶
func (c *TkgClient) UpdateCredentialsRegion(options *UpdateCredentialsOptions) error
UpdateCredentialsRegion update management cluster credentials
func (*TkgClient) UpdateKubeVipConfigInKCP ¶
func (c *TkgClient) UpdateKubeVipConfigInKCP(currentKCP *capikubeadmv1beta1.KubeadmControlPlane, upgradeComponentInfo ComponentInfo) (*capikubeadmv1beta1.KubeadmControlPlane, error)
UpdateKubeVipConfigInKCP updates the kube-vip parameters and image tag within the contents of the file inside the KCP
func (*TkgClient) UpdateMachineHealthCheck ¶
func (c *TkgClient) UpdateMachineHealthCheck(candidate *capi.MachineHealthCheck, clusterClient clusterclient.Client, options *SetMachineHealthCheckOptions) error
UpdateMachineHealthCheck updates machinehealthcheck
func (*TkgClient) UpdateVSphereClusterCredentials ¶
func (c *TkgClient) UpdateVSphereClusterCredentials(clusterClient clusterclient.Client, options *UpdateCredentialsOptions) error
UpdateVSphereClusterCredentials update vsphere cluster credentials
func (*TkgClient) UpgradeAddon ¶
func (c *TkgClient) UpgradeAddon(options *UpgradeAddonOptions) error
UpgradeAddon upgrades addons
func (*TkgClient) UpgradeCluster ¶
func (c *TkgClient) UpgradeCluster(options *UpgradeClusterOptions) error
UpgradeCluster upgrades workload and management clusters k8s version Steps:
- Verify k8s version
- Get the Upgrade configuration by reading BOM file to get the ImageTag and ImageRepository information for CoreDNS and Etcd, Read AWS_AMI_ID map from BOM for AWS upgrade scenario. Also use command line argument options to fill the upgrade configuration
- Create InfrastructureMachineTemplates(VSphereMachineTemplate, AWSMachineTemplate, AzureMachineTemplate) required for upgrade
- Patch KCP object to upgrade control-plane nodes
- Wait for k8s version to be updated for the cluster
- Patch MachineDeployment object to upgrade worker nodes
- Wait for k8s version to be updated for all worker nodes
func (*TkgClient) UpgradeManagementCluster ¶
func (c *TkgClient) UpgradeManagementCluster(options *UpgradeClusterOptions) error
UpgradeManagementCluster upgrades management clusters providers and k8s version Steps:
- Upgrade providers a) Get the Upgrade configuration by reading BOM file to get the providers versions b) Get the providers information from the management cluster c) Prepare the providers upgrade information d) Call the clusterctl ApplyUpgrade() to upgrade providers e) Wait for providers to be up and running
- call the UpgradeCluster() for upgrading the k8s version of the Management cluster
func (*TkgClient) ValidateAndConfigureClusterOptions ¶
func (c *TkgClient) ValidateAndConfigureClusterOptions(options *CreateClusterOptions) error
ValidateAndConfigureClusterOptions validates and configures the cluster options user want to enable through command line options
func (*TkgClient) ValidateAviCloud ¶
ValidateAviCloud validates if configured cloud exists or not
func (*TkgClient) ValidateAviControlPlaneNetwork ¶
ValidateAviControlPlaneNetwork validates if workload clusters' control plane vip network is valid or not
func (*TkgClient) ValidateAviControllerAccount ¶
ValidateAviControllerAccount validates if provide avi credentials are able to connect to avi controller or not
func (*TkgClient) ValidateAviDataPlaneNetwork ¶
ValidateAviDataPlaneNetwork validates if workload clusters' data plane vip network is valid or not
func (*TkgClient) ValidateAviManagementClusterControlPlaneNetwork ¶
ValidateAviManagementClusterControlPlaneNetwork checks if configured management cluster control plane vip network is valid or not
func (*TkgClient) ValidateAviManagementClusterDataPlaneNetwork ¶
ValidateAviManagementClusterDataPlaneNetwork checks if configured management cluster data plane vip network is valid or not
func (*TkgClient) ValidateAviManagementClusterServiceEngineGroup ¶
ValidateAviManagementClusterServiceEngineGroup validates if configured management cluster service engine group exists or not
func (*TkgClient) ValidateAviMaxAllowedClusterNameLength ¶
func (c *TkgClient) ValidateAviMaxAllowedClusterNameLength(clusterRole, clusterName string, regionalClusterClient clusterclient.Client, skipValidation bool) error
ValidateAviMaxAllowedClusterNameLength validates if AVI enabled cluster's name has no more than 25 characters
func (*TkgClient) ValidateAviNetwork ¶
ValidateAviNetwork validates if the network can be found in AVI controller or not and the subnet CIDR format is correct or not
func (*TkgClient) ValidateAviServiceEngineGroup ¶
ValidateAviServiceEngineGroup validates if configured service engine group exists or not
func (*TkgClient) ValidateAzurePublicSSHKey ¶
ValidateAzurePublicSSHKey validates AZURE_SSH_PUBLIC_KEY_B64 exists and is base64 encoded
func (*TkgClient) ValidateDockerResourcePrerequisites ¶
ValidateDockerResourcePrerequisites validates docker number CPU and memory resource settings
func (*TkgClient) ValidateEnvVariables ¶
ValidateEnvVariables validates the presence of required environment variables for a given IaaS
func (*TkgClient) ValidateExtraArgs ¶
func (*TkgClient) ValidateKubeVipLBConfiguration ¶
ValidateKubeVipLBConfiguration validates the configuration inputs of Kubevip Loadbalancer related variables
func (*TkgClient) ValidateManagementClusterUpgradeVersionCompatibility ¶
func (c *TkgClient) ValidateManagementClusterUpgradeVersionCompatibility(options *UpgradeClusterOptions, regionalClusterClient clusterclient.Client) error
ValidateManagementClusterUpgradeVersionCompatibility validates the upgrade version compatibility for a management cluster
func (*TkgClient) ValidateManagementClusterVersionWithCLI ¶
func (c *TkgClient) ValidateManagementClusterVersionWithCLI(regionalClusterClient clusterclient.Client) error
ValidateManagementClusterVersionWithCLI validate management cluster version with cli version
func (*TkgClient) ValidatePrerequisites ¶
ValidatePrerequisites validate docker and kubectl commands
func (*TkgClient) ValidateSupportOfK8sVersionForManagmentCluster ¶
func (c *TkgClient) ValidateSupportOfK8sVersionForManagmentCluster(regionalClusterClient clusterclient.Client, kubernetesVersion string, skipValidation bool) error
ValidateSupportOfK8sVersionForManagmentCluster validate k8s version support for management cluster
func (*TkgClient) ValidateVsphereControlPlaneEndpointIP ¶
func (c *TkgClient) ValidateVsphereControlPlaneEndpointIP(endpointIP string) *ValidationError
ValidateVsphereControlPlaneEndpointIP validates if the control plane endpoint has been used by another cluster in the same network
func (*TkgClient) ValidateVsphereNodeSize ¶
ValidateVsphereNodeSize validates vsphere node size
func (*TkgClient) ValidateVsphereResources ¶
ValidateVsphereResources validates vsphere resource path specified in tkgconfig
func (*TkgClient) ValidateVsphereVipWorkloadCluster ¶
func (c *TkgClient) ValidateVsphereVipWorkloadCluster(clusterClient clusterclient.Client, vip string, skipValidation bool) error
ValidateVsphereVipWorkloadCluster validates that the control plane endpoint is unique
func (*TkgClient) VerifyRegion ¶
func (c *TkgClient) VerifyRegion(kubeConfigPath string) (region.RegionContext, error)
VerifyRegion verifies management cluster
func (*TkgClient) WaitForAddons ¶
WaitForAddons wait for addons to be installed
func (*TkgClient) WaitForAddonsCorePackagesInstallation ¶
WaitForAddonsCorePackagesInstallation gets ClusterBootstrap and collects list of addons core packages, and monitors the kapp controller package installation in management cluster and rest of core packages installation in workload cluster
func (*TkgClient) WaitForAddonsDeployments ¶
func (c *TkgClient) WaitForAddonsDeployments(clusterClient clusterclient.Client) error
WaitForAddonsDeployments wait for addons deployments
func (*TkgClient) WaitForAutoscalerDeployment ¶
func (c *TkgClient) WaitForAutoscalerDeployment(regionalClusterClient clusterclient.Client, clusterName, targetNamespace string, isClusterClassBased bool)
WaitForAutoscalerDeployment waits for autoscaler deployment if enabled
func (*TkgClient) WaitForClusterInitializedAndGetKubeConfig ¶
func (c *TkgClient) WaitForClusterInitializedAndGetKubeConfig(clusterClient clusterclient.Client, name, targetNamespace string) ([]byte, error)
WaitForClusterInitializedAndGetKubeConfig wait for cluster initialization and once initialized get kubeconfig
func (*TkgClient) WaitForClusterReadyAfterCreate ¶
func (c *TkgClient) WaitForClusterReadyAfterCreate(clusterClient clusterclient.Client, name, targetNamespace string) error
WaitForClusterReadyAfterCreate wait for cluster to be ready after creation
func (*TkgClient) WaitForClusterReadyAfterReverseMove ¶
func (c *TkgClient) WaitForClusterReadyAfterReverseMove(clusterClient clusterclient.Client, name, targetNamespace string) error
WaitForClusterReadyAfterReverseMove Called when relocating cluster-api objects out from the management cluster to the cleanup cluster.
func (*TkgClient) WaitForClusterReadyForMove ¶
func (c *TkgClient) WaitForClusterReadyForMove(clusterClient clusterclient.Client, name, targetNamespace string) error
WaitForClusterReadyForMove wait for cluster to be ready for move operation
func (*TkgClient) WaitForPackages ¶
func (c *TkgClient) WaitForPackages(regionalClusterClient, currentClusterClient clusterclient.Client, clusterName, namespace string, isRegionalCluster bool) error
WaitForPackages wait for packages to be up and running
func (*TkgClient) WaitForProviders ¶
func (c *TkgClient) WaitForProviders(clusterClient clusterclient.Client, options waitForProvidersOptions) error
WaitForProviders checks and waits for each provider components to be up and running
type UpdateCredentialsOptions ¶
type UpdateCredentialsOptions struct { ClusterName string Namespace string Kubeconfig string VSphereUpdateClusterOptions *VSphereUpdateClusterOptions AzureUpdateClusterOptions *AzureUpdateClusterOptions IsRegionalCluster bool IsCascading bool }
UpdateCredentialsOptions update credential options
type UpgradeAddonOptions ¶
type UpgradeAddonOptions struct { AddonNames []string ClusterName string Namespace string Kubeconfig string IsRegionalCluster bool Edition string }
UpgradeAddonOptions upgrade addon options
type UpgradeClusterOptions ¶
type UpgradeClusterOptions struct { ClusterName string Namespace string KubernetesVersion string TkrVersion string Kubeconfig string VSphereTemplateName string OSName string OSVersion string OSArch string IsRegionalCluster bool SkipAddonUpgrade bool SkipPrompt bool IsTKGSCluster bool // Tanzu edition (either tce or tkg) Edition string }
UpgradeClusterOptions upgrade cluster options
type UpgradeManagementClusterOptions ¶
type UpgradeManagementClusterOptions struct { ClusterName string Namespace string KubernetesVersion string Kubeconfig string IsRegionalCluster bool VSphereTemplateName string BOMFilePath string }
UpgradeManagementClusterOptions upgrade management cluster options
type VSphereNodePool ¶
type VSphereNodePool struct { CloneMode string `yaml:"cloneMode,omitempty"` Datacenter string `yaml:"datacenter,omitempty"` Datastore string `yaml:"datastore,omitempty"` StoragePolicyName string `yaml:"storagePolicyName,omitempty"` Folder string `yaml:"folder,omitempty"` Network string `yaml:"network,omitempty"` Nameservers []string `yaml:"nameservers,omitempty"` TKGIPFamily string `yaml:"tkgIPFamily,omitempty"` ResourcePool string `yaml:"resourcePool,omitempty"` VCIP string `yaml:"vcIP,omitempty"` Template string `yaml:"template,omitempty"` MemoryMiB int64 `yaml:"memoryMiB,omitempty"` DiskGiB int32 `yaml:"diskGiB,omitempty"` NumCPUs int32 `yaml:"numCPUs,omitempty"` }
VSphereNodePool a struct describing properties necessary for a node pool on vSphere
type VSphereUpdateClusterOptions ¶
VSphereUpdateClusterOptions vsphere credential options
type ValidationError ¶
ValidationError defines error during config validation
func NewValidationError ¶
func NewValidationError(code int, text string) *ValidationError
NewValidationError creates new validation error object
func ValidateVSphereVersion ¶
func ValidateVSphereVersion(vcClient vc.Client) *ValidationError
ValidateVSphereVersion validates vsphere version
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error returns error message from validation error
Source Files ¶
- activate_deactivate_tkr.go
- admission_upgrade_helper.go
- audit_upgrade_helper.go
- ceip.go
- cleanup_core_repo.go
- client.go
- cluster.go
- common.go
- config.go
- config_permission.go
- delete_region.go
- describe_cluster.go
- get_cluster.go
- get_cluster_helper.go
- get_cluster_pinniped_info.go
- get_kubernetes_versions.go
- get_tkrs.go
- init.go
- kubevip_update_helper.go
- machine_deployment.go
- machine_deployment_cc.go
- machine_health_check.go
- management_components.go
- pacific_cluster.go
- package_helper.go
- region.go
- scale.go
- test_utils.go
- types.go
- update_cluster_versioned_bom.go
- update_credentials.go
- upgrade_addon.go
- upgrade_cluster.go
- upgrade_cluster_clusterclass.go
- upgrade_region.go
- utils.go
- validate.go
- validate_upgrade.go
- workload_cluster.go