Documentation ¶
Overview ¶
Package tkgctl placeholder package comment
Index ¶
- Variables
- type AddRegionOptions
- type CreateClusterOptions
- type DeleteClustersOptions
- type DeleteMachineHealthCheckOptions
- type DeleteRegionOptions
- type DescribeClusterResult
- type DescribeTKGClustersOptions
- type GetClusterPinnipedInfoOptions
- type GetMachineHealthCheckOptions
- type GetWorkloadClusterCredentialsOptions
- type InitRegionOptions
- type ListTKGClustersOptions
- type LoggingOptions
- type Options
- type ScaleClusterOptions
- type SetMachineHealthCheckOptions
- type SetRegionOptions
- type TKGClient
- type UpdateCredentialsClusterOptions
- type UpdateCredentialsRegionOptions
- type UpgradeClusterOptions
- type UpgradeRegionOptions
Constants ¶
This section is empty.
Variables ¶
var True = "true"
True string constant for the value "true"
var Warningvsphere7WithPacific string = `` /* 550-byte string literal not displayed */
Warningvsphere7WithPacific indicates that a vSphere7 environment has been detected with vSphere with Tanzu
var Warningvsphere7WithoutPacific string = `` /* 598-byte string literal not displayed */
Warningvsphere7WithoutPacific indicates that a vSphere7 environment has been detected without vSphere with Tanzu
Functions ¶
This section is empty.
Types ¶
type AddRegionOptions ¶
AddRegionOptions add region options
type CreateClusterOptions ¶
type CreateClusterOptions struct { IsWindowsWorkloadCluster bool GenerateOnly bool SkipPrompt bool ClusterConfigFile string ClusterName string Plan string InfrastructureProvider string Namespace string TkrVersion string Size string ControlPlaneSize string WorkerSize string CniType string EnableClusterOptions string VsphereControlPlaneEndpoint string ControlPlaneMachineCount int WorkerMachineCount int Timeout time.Duration // Tanzu edition (either tce or tkg) Edition string }
CreateClusterOptions options to create the cluster
type DeleteClustersOptions ¶
DeleteClustersOptions delete cluster options
type DeleteMachineHealthCheckOptions ¶
type DeleteMachineHealthCheckOptions struct { ClusterName string Namespace string MachinehealthCheckName string SkipPrompt bool MatchLabel string }
DeleteMachineHealthCheckOptions delete cluster options
type DeleteRegionOptions ¶
type DeleteRegionOptions struct { ClusterName string Force bool UseExistingCluster bool SkipPrompt bool Timeout time.Duration }
DeleteRegionOptions delete region options
type DescribeClusterResult ¶
type DescribeClusterResult struct { Objs *clusterctltree.ObjectTree Cluster *clusterv1.Cluster InstalledProviders *clusterctlv1.ProviderList ClusterInfo client.ClusterInfo }
DescribeClusterResult the result object for when the cluster's description is returned
type DescribeTKGClustersOptions ¶
type DescribeTKGClustersOptions struct { ClusterName string Namespace string ShowOtherConditions string ShowDetails bool ShowGroupMembers bool }
DescribeTKGClustersOptions options that can be passed while requesting to describe a cluster
type GetClusterPinnipedInfoOptions ¶
type GetClusterPinnipedInfoOptions struct { ClusterName string Namespace string IsManagementCluster bool }
GetClusterPinnipedInfoOptions options that can be passed while getting pinniped info
type GetMachineHealthCheckOptions ¶
type GetMachineHealthCheckOptions struct { ClusterName string MachineHealthCheckName string Namespace string MatchLabel string }
GetMachineHealthCheckOptions options that can be passed while getting the machine health check of a cluster
type GetWorkloadClusterCredentialsOptions ¶
type GetWorkloadClusterCredentialsOptions struct { ClusterName string Namespace string ExportFile string }
GetWorkloadClusterCredentialsOptions options that can be passed while getting workload cluster credentials
type InitRegionOptions ¶
type InitRegionOptions struct { ClusterConfigFile string Plan string ClusterName string CoreProvider string BootstrapProvider string InfrastructureProvider string ControlPlaneProvider string Namespace string WatchingNamespace string Size string ControlPlaneSize string WorkerSize string CeipOptIn string CniType string Bind string Browser string VsphereControlPlaneEndpoint string Edition string FeatureFlags map[string]string Timeout time.Duration UI bool UseExistingCluster bool EnableTKGSOnVsphere7 bool DeployTKGonVsphere7 bool SkipPrompt bool GenerateOnly bool }
InitRegionOptions init region options
type ListTKGClustersOptions ¶
ListTKGClustersOptions ptions passed while getting a list of TKG Clusters
type LoggingOptions ¶
type LoggingOptions struct { // File log file name where you want logs to be written File string // Quietly if set logs will not be written to stdout/stderr Quietly bool // Verbosity number for the log level verbosity Verbosity int32 // LogChannel if channel is set, writer will forward log messages to this log channel // The result of this will be in the format of 'LogData' struct mentioned in `pkg/log/type.go` LogChannel chan<- []byte }
LoggingOptions options to configure logging with tkgctl client
type Options ¶
type Options struct { // Management cluster kubeconfig KubeConfig string // Management cluster kubecontext KubeContext string // ConfigDir specifies the directory where tkg will store metadata ConfigDir string // LoggingOptions options to configure logging with tkgctl client LogOptions LoggingOptions // ProviderGetter provide provider getter interface if you want to use custom providers with tkg // if not set, default providers bundled with tkg library will be used ProviderGetter providerinterface.ProviderInterface // CustomizerOptions allows consumers to provider customizers for underlying client definitions CustomizerOptions types.CustomizerOptions // SettingsFile should only be provided if user want to override default TKG settings file path // by default `ConfigDir/config.yaml` file will be used to store tkg settings SettingsFile string // ForceUpdateTKGCompatibilityImage should only be provided if user want to explicitly force update // TKG compatibility image which would also update the tkg-bom and tkr-bom files ForceUpdateTKGCompatibilityImage bool }
Options options to create tkgctl client
type ScaleClusterOptions ¶
type ScaleClusterOptions struct { ClusterName string WorkerCount int32 ControlPlaneCount int32 Namespace string NodePoolName string }
ScaleClusterOptions options that can be passed while scaling a cluster
type SetMachineHealthCheckOptions ¶
type SetMachineHealthCheckOptions struct { ClusterName string MachineHealthCheckName string Namespace string MatchLabels string UnhealthyConditions string NodeStartupTimeout string }
SetMachineHealthCheckOptions options that can be passed while setting machine healthcheck of a cluster
type SetRegionOptions ¶
SetRegionOptions options for set active management cluster
type TKGClient ¶
type TKGClient interface { // AddRegion adds region AddRegion(options AddRegionOptions) error // ConfigCluster prints cluster template to stdout ConfigCluster(configClusterOption CreateClusterOptions) error // CreateAWSCloudFormationStack create aws cloud formation stack CreateAWSCloudFormationStack(clusterConfigFile string) error // CreateCluster create tkg cluster CreateCluster(cc CreateClusterOptions) error // DeleteCluster deletes workload cluster DeleteCluster(options DeleteClustersOptions) error // DeleteMachineHealthCheck deletes MHC on cluster DeleteMachineHealthCheck(options DeleteMachineHealthCheckOptions) error // DeleteRegion deletes management cluster DeleteRegion(options DeleteRegionOptions) error // GetCEIP returns CEIP status set on management cluster GetCEIP() (client.ClusterCeipInfo, error) // GetClusters returns list of cluster GetClusters(options ListTKGClustersOptions) ([]client.ClusterInfo, error) // DescribeCluster describes all the objects in the Cluster DescribeCluster(options DescribeTKGClustersOptions) (DescribeClusterResult, error) // DescribeProviders describes all the installed providers DescribeProviders() (*clusterctlv1.ProviderList, error) // GenerateAWSCloudFormationTemplate generates a YAML template for AWS CloudFormation GenerateAWSCloudFormationTemplate(clusterConfigFile string) (string, error) // GetCredentials saves cluster credentials to a file GetCredentials(options GetWorkloadClusterCredentialsOptions) error // GetKubernetesVersions returns supported k8s versions GetKubernetesVersions() (*client.KubernetesVersionsInfo, error) // GetMachineHealthCheck return machinehealthcheck configuration for the cluster GetMachineHealthCheck(options GetMachineHealthCheckOptions) ([]client.MachineHealthCheck, error) // GetRegions return list of management clusters GetRegions(managementClusterName string) ([]region.RegionContext, error) // Init initializes tkg management cluster Init(options InitRegionOptions) error // ScaleCluster scales cluster ScaleCluster(options ScaleClusterOptions) error // SetCeip sets CEIP to the management cluster SetCeip(ceipOptIn, isProd, labels string) error // SetMachineHealthCheck apply machine health check to the cluster SetMachineHealthCheck(options SetMachineHealthCheckOptions) error // GetMachineDeployments gets machine deployments from a cluster GetMachineDeployments(options client.GetMachineDeploymentOptions) ([]capi.MachineDeployment, error) // SetMachineDeployment applies a machine deployment to the cluster SetMachineDeployment(options *client.SetMachineDeploymentOptions) error // DeleteMachineDeployment deletes a machine deployment from the cluster DeleteMachineDeployment(options client.DeleteMachineDeploymentOptions) error // SetRegion sets active management cluster SetRegion(options SetRegionOptions) error // UpgradeCluster upgrade tkg workload cluster UpgradeCluster(options UpgradeClusterOptions) error // UpgradeRegion upgrades management cluster UpgradeRegion(options UpgradeRegionOptions) error // Updates management cluster UpdateCredentialsRegion(options UpdateCredentialsRegionOptions) error // Updates workload cluster UpdateCredentialsCluster(options UpdateCredentialsClusterOptions) error // GetClusterPinnipedInfo returns the cluster and pinniped info GetClusterPinnipedInfo(options GetClusterPinnipedInfoOptions) (*client.ClusterPinnipedInfo, error) // GetTanzuKubernetesReleases returns the available TanzuKubernetesReleases GetTanzuKubernetesReleases(tkrName string) ([]runv1alpha1.TanzuKubernetesRelease, error) // ActivateTanzuKubernetesReleases activates TanzuKubernetesRelease ActivateTanzuKubernetesReleases(tkrName string) error // DeactivateTanzuKubernetesReleases deactivates TanzuKubernetesRelease 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) // GetPacificMachineDeployments gets machine deployments from a Pacific cluster // Note: This would be soon deprecated after TKGS and TKGm adopt the clusterclass GetPacificMachineDeployments(options client.GetMachineDeploymentOptions) ([]capiv1alpha3.MachineDeployment, error) }
TKGClient implements TKG client
type UpdateCredentialsClusterOptions ¶
type UpdateCredentialsClusterOptions struct { ClusterName string Namespace string VSphereUsername string VSpherePassword string Timeout time.Duration }
UpdateCredentialsClusterOptions options that can be passed while updating cluster credentials
type UpdateCredentialsRegionOptions ¶
type UpdateCredentialsRegionOptions struct { ClusterName string VSphereUsername string VSpherePassword string IsCascading bool Timeout time.Duration }
UpdateCredentialsRegionOptions options that can passed while updating credentials of a management-cluster
type UpgradeClusterOptions ¶
type UpgradeClusterOptions struct { ClusterName string Namespace string TkrVersion string SkipPrompt bool Timeout time.Duration OSName string OSVersion string OSArch string // VSphereTemplateName deprecated please use // OSName, OSVersion and OSArch config variable // to filter vSphereTemplate VSphereTemplateName string // Tanzu edition (either tce or tkg) Edition string }
UpgradeClusterOptions options for upgrade cluster
type UpgradeRegionOptions ¶
type UpgradeRegionOptions struct { ClusterName string SkipPrompt bool Timeout time.Duration OSName string OSVersion string OSArch string // VSphereTemplateName (deprecated: please use OSName, OSVersion and OSArch // config variables to filter vSphereTemplate) VSphereTemplateName string // Tanzu edition (either tce or tkg) Edition string }
UpgradeRegionOptions upgrade management cluster options
Source Files ¶
- activate_deactivate_tkr.go
- add_region.go
- client.go
- config_cluster.go
- config_permission_aws.go
- constants.go
- create_cluster.go
- delete_cluster.go
- delete_machine_health_check.go
- delete_region.go
- describe_cluster.go
- get_ceip.go
- get_cluster.go
- get_cluster_pinniped_info.go
- get_credentials.go
- get_kubernetes_versions.go
- get_machine_health_check.go
- get_region.go
- get_tkrs.go
- helper_constants.go
- helpers.go
- init.go
- interface.go
- machine_deployment.go
- pacific_cluster.go
- scale_cluster.go
- set_ceip.go
- set_machine_health_check.go
- set_region.go
- update_credentials.go
- update_credentials_region.go
- upgrade_cluster.go
- upgrade_region.go