Documentation ¶
Overview ¶
Package managementcomponents implements management component installation helpers
Index ¶
- Constants
- Variables
- func AddonSecretExists(clusterClient clusterclient.Client, addonSecretName, namespace string) (bool, error)
- func DeleteAddonSecret(clusterClient clusterclient.Client, addonSecretName, namespace string) error
- func DeleteLegacyAkoOperatorPackageInstall(clusterClient clusterclient.Client, akoOperatorAddonName string) error
- func GetTKGPackageConfigValuesFileFromUserConfig(managementPackageVersion, addonsManagerPackageVersion string, ...) (string, error)
- func InstallKappController(clusterClient clusterclient.Client, ...) error
- func InstallManagementComponents(clusterClient clusterclient.Client, pkgClient packageclient.PackageClient, ...) error
- func InstallManagementPackages(pkgClient packageclient.PackageClient, mpro ManagementPackageRepositoryOptions, ...) error
- func InstallManagementPackagesRepo(pkgClient packageclient.PackageClient, mpro ManagementPackageRepositoryOptions, ...) error
- func IsReconciliationError(err error) bool
- func NoopDeletePackageInstall(clusterClient clusterclient.Client, pkgiName, namespace string) error
- func PauseAddonLifecycleManagement(clusterClient clusterclient.Client, clusterName, addonName, namespace string) error
- func WaitForManagementPackages(clusterClient clusterclient.Client, packageInstallTimeout time.Duration) error
- type AddonsFeatureGates
- type AddonsManagerPackageValues
- type AkoOperatorConfig
- type AkoOperatorPackage
- type AkoOperatorPackageValues
- type CLIPluginsPackageValues
- type ClusterClassInfraPackageValues
- type ClusterClassPackage
- type ClusterOptions
- type CoreManagementPluginsPackage
- type FeaturegatePackageValues
- type FrameworkPackage
- type KappControllerOptions
- type ManagementComponentsInstallOptions
- type ManagementPackageRepositoryOptions
- type Metadata
- type NodeNetwork
- type TKGPackageConfig
- type TKRServicePackageValues
- type TKRServicePackageValuesDeployment
- type TKRSourceControllerPackage
- type TKRSourceControllerPackageValues
- type TKRSourceControllerPackageValuesDeployment
- type TanzuAddonsManager
- type TanzuAuthPackageValues
Constants ¶
const ( ErrReconciliationFailed = "resource reconciliation failed" ErrReconciliationTimeout = "resource reconciliation timeout" )
Variables ¶
var DefaultRetry = wait.Backoff{ Steps: 10, Duration: 10 * time.Second, Factor: 1.0, Jitter: 0, }
Functions ¶
func AddonSecretExists ¶
func AddonSecretExists(clusterClient clusterclient.Client, addonSecretName, namespace string) (bool, error)
AddonSecretExists returns true if given addon is present and was installed from core repository.
func DeleteAddonSecret ¶
func DeleteAddonSecret(clusterClient clusterclient.Client, addonSecretName, namespace string) error
DeleteAddonSecret deletes the secrete associated with the addon if present. Return no error if secret not found.
func DeleteLegacyAkoOperatorPackageInstall ¶
func DeleteLegacyAkoOperatorPackageInstall(clusterClient clusterclient.Client, akoOperatorAddonName string) error
DeleteLegacyAkoOperatorPackageInstall removes legacy management cluster ako operator packageInstall
func GetTKGPackageConfigValuesFileFromUserConfig ¶
func GetTKGPackageConfigValuesFileFromUserConfig(managementPackageVersion, addonsManagerPackageVersion string, userProviderConfigValues map[string]interface{}, tkgBomConfig *tkgconfigbom.BOMConfiguration, readerWriter tkgconfigreaderwriter.TKGConfigReaderWriter, onBootstrapCluster bool) (string, error)
GetTKGPackageConfigValuesFileFromUserConfig returns values file from user configuration
func InstallKappController ¶
func InstallKappController(clusterClient clusterclient.Client, kappControllerOptions KappControllerOptions, operationType constants.OperationType) error
InstallKappController installs kapp-controller to the cluster
func InstallManagementComponents ¶
func InstallManagementComponents(clusterClient clusterclient.Client, pkgClient packageclient.PackageClient, mcip *ManagementComponentsInstallOptions) error
InstallManagementComponents installs the management component to cluster
func InstallManagementPackages ¶
func InstallManagementPackages(pkgClient packageclient.PackageClient, mpro ManagementPackageRepositoryOptions, backoff wait.Backoff) error
InstallManagementPackages installs TKG management packages to the cluster
func InstallManagementPackagesRepo ¶
func InstallManagementPackagesRepo(pkgClient packageclient.PackageClient, mpro ManagementPackageRepositoryOptions, backoff wait.Backoff) error
InstallManagementPackagesRepo installs TKG management packages repository to the cluster
func IsReconciliationError ¶
func NoopDeletePackageInstall ¶
func NoopDeletePackageInstall(clusterClient clusterclient.Client, pkgiName, namespace string) error
NoopDeletePackageInstall sets spec.noopdelete = true before deleting the package install
func PauseAddonLifecycleManagement ¶
func PauseAddonLifecycleManagement(clusterClient clusterclient.Client, clusterName, addonName, namespace string) error
PauseAddonLifecycleManagement pauses/unpauses the lifecycle management of addon package with given name and namespace
func WaitForManagementPackages ¶
func WaitForManagementPackages(clusterClient clusterclient.Client, packageInstallTimeout time.Duration) error
Types ¶
type AddonsFeatureGates ¶
type AddonsManagerPackageValues ¶
type AddonsManagerPackageValues struct { VersionConstraints string `yaml:"versionConstraints,omitempty"` TanzuAddonsManager TanzuAddonsManager `yaml:"tanzuAddonsManager,omitempty"` }
type AkoOperatorConfig ¶
type AkoOperatorConfig struct { AviControllerAddress string `yaml:"avi_controller,omitempty"` AviControllerVersion string `yaml:"avi_controller_version,omitempty"` AviControllerUsername string `yaml:"avi_username,omitempty"` AviControllerPassword string `yaml:"avi_password,omitempty"` AviControllerCA string `yaml:"avi_ca_data_b64,omitempty"` AviCloudName string `yaml:"avi_cloud_name,omitempty"` AviServiceEngineGroup string `yaml:"avi_service_engine_group,omitempty"` AviManagementClusterServiceEngineGroup string `yaml:"avi_management_cluster_service_engine_group,omitempty"` AviDataPlaneNetworkName string `yaml:"avi_data_network,omitempty"` AviDataPlaneNetworkCIDR string `yaml:"avi_data_network_cidr,omitempty"` AviControlPlaneNetworkName string `yaml:"avi_control_plane_network,omitempty"` AviControlPlaneNetworkCIDR string `yaml:"avi_control_plane_network_cidr,omitempty"` AviManagementClusterDataPlaneNetworkName string `yaml:"avi_management_cluster_vip_network_name,omitempty"` AviManagementClusterDataPlaneNetworkCIDR string `yaml:"avi_management_cluster_vip_network_cidr,omitempty"` AviManagementClusterControlPlaneVipNetworkName string `yaml:"avi_management_cluster_control_plane_vip_network_name,omitempty"` AviManagementClusterControlPlaneVipNetworkCIDR string `yaml:"avi_management_cluster_control_plane_vip_network_cidr,omitempty"` AviLabels string `yaml:"avi_labels,omitempty"` AviNSXTT1Router string `yaml:"avi_nsxt_t1_lr,omitempty"` AviControlPlaneHaProvider bool `yaml:"avi_control_plane_ha_provider,omitempty"` AviIngressNodeNetworkList string `yaml:"avi_ingress_node_network_list,omitempty"` }
AkoOperatorConfig
type AkoOperatorPackage ¶
type AkoOperatorPackage struct {
AkoOperatorPackageValues AkoOperatorPackageValues `yaml:"akoOperator,omitempty"`
}
type AkoOperatorPackageValues ¶
type AkoOperatorPackageValues struct { AviEnable bool `yaml:"avi_enable,omitempty"` ClusterName string `yaml:"cluster_name,omitempty"` OnBootstrapCluster bool `yaml:"on_bootstrap_cluster,omitempty"` AkoOperatorConfig AkoOperatorConfig `yaml:"config,omitempty"` }
AkoOperatorPackageValues
type CLIPluginsPackageValues ¶
type ClusterClassPackage ¶
type ClusterClassPackage struct { NamespaceForPackageInstallation string `yaml:"namespaceForPackageInstallation,omitempty"` VersionConstraints string `yaml:"versionConstraints,omitempty"` ClusterClassInfraPackageValues ClusterClassInfraPackageValues `yaml:"clusterclassInfraPackageValues,omitempty"` }
type ClusterOptions ¶
ClusterOptions specifies cluster configuration
type FrameworkPackage ¶
type FrameworkPackage struct { NamespaceForPackageInstallation string `yaml:"namespaceForPackageInstallation,omitempty"` VersionConstraints string `yaml:"versionConstraints,omitempty"` FeaturegatePackageValues FeaturegatePackageValues `yaml:"featureGatesPackageValues,omitempty"` TKRServicePackageValues TKRServicePackageValues `yaml:"tkrServicePackageValues,omitempty"` CLIPluginsPackageValues CLIPluginsPackageValues `yaml:"clipluginsPackageValues,omitempty"` AddonsManagerPackageValues AddonsManagerPackageValues `yaml:"addonsManagerPackageValues,omitempty"` TanzuAuthPackageValues TanzuAuthPackageValues `yaml:"tanzuAuthPackageValues,omitempty"` }
type KappControllerOptions ¶
type KappControllerOptions struct { KappControllerConfigFile string KappControllerInstallNamespace string }
KappControllerOptions specifies kapp-controller deployment options
type ManagementComponentsInstallOptions ¶
type ManagementComponentsInstallOptions struct { ClusterOptions ClusterOptions ManagementPackageRepositoryOptions ManagementPackageRepositoryOptions }
ManagementComponentsInstallOptions specifies install options for management components
type ManagementPackageRepositoryOptions ¶
type ManagementPackageRepositoryOptions struct { ManagementPackageRepoImage string TKGPackageValuesFile string PackageVersion string PackageInstallTimeout time.Duration }
ManagementPackageRepositoryOptions specifies management package repository deployment options
type Metadata ¶
type Metadata struct {
InfraProvider string `yaml:"infraProvider"`
}
Metadata specifies metadata as part of TKG package config
type NodeNetwork ¶
type NodeNetwork struct { NetworkName string `yaml:"networkName,omitempty" json:"networkName,omitempty"` Cidrs []string `yaml:"cidrs,omitempty" json:"cidrs,omitempty"` }
NodeNetwork
type TKGPackageConfig ¶
type TKGPackageConfig struct { Metadata Metadata `yaml:"metadata"` ConfigValues map[string]interface{} `yaml:"configvalues"` FrameworkPackage FrameworkPackage `yaml:"frameworkPackage"` ClusterClassPackage ClusterClassPackage `yaml:"clusterclassPackage"` TKRSourceControllerPackage TKRSourceControllerPackage `yaml:"tkrSourceControllerPackage"` CoreManagementPluginsPackage CoreManagementPluginsPackage `yaml:"coreManagementPluginsPackage"` AkoOperatorPackage AkoOperatorPackage `yaml:"akoOperatorPackage"` }
TKGPackageConfig defines TKG package configuration
func GetTKGPackageConfigFromUserConfig ¶
func GetTKGPackageConfigFromUserConfig(managementPackageVersion, addonsManagerPackageVersion string, userProviderConfigValues map[string]interface{}, tkgBomConfig *tkgconfigbom.BOMConfiguration, readerWriter tkgconfigreaderwriter.TKGConfigReaderWriter, onBootstrapCluster bool) (*TKGPackageConfig, error)
GetTKGPackageConfigValuesFileFromUserConfig returns values file from user configuration
type TKRServicePackageValues ¶
type TKRServicePackageValues struct { Namespace string `yaml:"namespace,omitempty"` CreateNamespace string `yaml:"createNamespace,omitempty"` VersionConstraints string `yaml:"versionConstraints,omitempty"` Deployment TKRServicePackageValuesDeployment `yaml:"deployment,omitempty"` }
type TKRSourceControllerPackage ¶
type TKRSourceControllerPackage struct { NamespaceForPackageInstallation string `yaml:"namespaceForPackageInstallation,omitempty"` VersionConstraints string `yaml:"versionConstraints,omitempty"` TKRSourceControllerPackageValues TKRSourceControllerPackageValues `yaml:"tkrSourceControllerPackageValues,omitempty"` }
type TKRSourceControllerPackageValues ¶
type TKRSourceControllerPackageValues struct { Namespace string `yaml:"namespace,omitempty"` CreateNamespace string `yaml:"createNamespace,omitempty"` VersionConstraints string `yaml:"versionConstraints,omitempty"` BomImagePath string `yaml:"bomImagePath,omitempty"` BomMetadataImagePath string `yaml:"bomMetadataImagePath,omitempty"` TKRRepoImagePath string `yaml:"tkrRepoImagePath,omitempty"` DefaultCompatibleTKR string `yaml:"defaultCompatibleTKR,omitempty"` CaCerts string `yaml:"caCerts,omitempty"` SkipVerifyCert bool `yaml:"skipVerifyRegistryCert,omitempty"` ImageRepo string `yaml:"imageRepository,omitempty"` Deployment TKRSourceControllerPackageValuesDeployment `yaml:"deployment,omitempty"` }
type TanzuAddonsManager ¶
type TanzuAddonsManager struct {
FeatureGates AddonsFeatureGates `yaml:"featureGates,omitempty"`
}