shared

package
v0.0.0-...-b25b198 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 75 Imported by: 0

Documentation

Overview

nolint:typecheck,goconst,gocritic,stylecheck,nolintlint

nolint:typecheck,goconst,gocritic,stylecheck,nolintlint

nolint:typecheck,goconst,gocritic,stylecheck,nolintlint

nolint:typecheck,goconst,gocritic,stylecheck,nolintlint

nolint:typecheck,goconst,gocritic,stylecheck,nolintlint

nolint:typecheck,goconst,gocritic,stylecheck,nolintlint

nolint:typecheck,goconst,gocritic,stylecheck,nolintlint

nolint:typecheck,goconst,gocritic,stylecheck,nolintlint

nolint:typecheck,goconst,gocritic,stylecheck,nolintlint

nolint:typecheck,goconst,gocritic,stylecheck,nolintlint

nolint:typecheck,goconst,gocritic,stylecheck,nolintlint

nolint:typecheck,goconst,gocritic,stylecheck,nolintlint

nolint:typecheck,goconst,gocritic,stylecheck,nolintlint

Index

Constants

View Source
const (
	AddonFinalizer                     = "tkg.tanzu.vmware.com/addon"
	PreTerminateAddonsAnnotationPrefix = clusterapiv1beta1.PreTerminateDeleteHookAnnotationPrefix + "/tkg.tanzu.vmware.com"
	PreTerminateAddonsAnnotationValue  = "tkg.tanzu.vmware.com/addons"
)

Variables

This section is empty.

Functions

func CheckClusterCB

func CheckClusterCB(ctx context.Context, mccl, wccl client.Client, mcClusterName, mcClusterNamespace, wcClusterName, wcClusterNamespace, infrastructureName string, isManagementCluster, isCustomCB bool) error

CheckClusterCB checks if clusterbootstrap resource is created correctly and packages are reconciled successfully on cluster

func CheckTKGSAddons

func CheckTKGSAddons(ctx context.Context, tkgctlClient tkgctl.TKGClient, svClusterName, clusterName, namespace, KubeconfigPath, InfrastructureName string, isCustomeCB bool) error

func E2EAddonSpec

func E2EAddonSpec(context context.Context, inputGetter func() E2EAddonSpecInput)

func E2EAutoscalerSpec

func E2EAutoscalerSpec(context context.Context, inputGetter func() E2EAutoscalerSpecInput)

func E2ECCMiscSpec

func E2ECCMiscSpec(context context.Context, inputGetter func() E2ECommonSpecInput)

func E2ECEIPSpec

func E2ECEIPSpec(context context.Context, inputGetter func() E2ECEIPSpecInput)

func E2ECommonCCSpec

func E2ECommonCCSpec(ctx context.Context, inputGetter func() E2ECommonCCSpecInput)

func E2ECommonSpec

func E2ECommonSpec(ctx context.Context, inputGetter func() E2ECommonSpecInput)

func E2ELegacyFallbackSpec

func E2ELegacyFallbackSpec(context context.Context, inputGetter func() E2ELegacyFallbackSpecInput)

func E2EMhcCCSpec

func E2EMhcCCSpec(context context.Context, inputGetter func() E2ECommonSpecInput)

func E2EMhcSpec

func E2EMhcSpec(context context.Context, inputGetter func() E2EMhcSpecInput)

func E2ENodePoolSpec

func E2ENodePoolSpec(context context.Context, inputGetter func() E2ENodePoolSpecInput)

func E2EScaleSpec

func E2EScaleSpec(context context.Context, inputGetter func() E2EScaleSpecInput)

func E2ETKRResolverValidationForClusterCRUDSpec

func E2ETKRResolverValidationForClusterCRUDSpec(context context.Context, inputGetter func() E2ETKRResolverValidationForClusterCRUDSpecInput)

func E2EUpgradeSpec

func E2EUpgradeSpec(context context.Context, inputGetter func() E2EUpgradeSpecInput)

func GenerateDataValueSecretName

func GenerateDataValueSecretName(clusterName, carvelPkgRefName string) string

GenerateDataValueSecretName generates data value secret name from the cluster and the package name

func GeneratePackageInstallName

func GeneratePackageInstallName(clusterName, addonName string) string

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 GeneratePackageSecretName

func GeneratePackageSecretName(clusterName, carvelPkgRefName string) string

GeneratePackageSecretName generates secret name for a package from the cluster and the package name

func GetClients

func GetClients(ctx context.Context, exportFile string) (k8sClient client.Client, dynamicClient dynamic.Interface, aggregatedAPIResourcesClient client.Client, discoveryClient discovery.DiscoveryInterface, admissionRegistrationClient admissionregistrationv1.AdmissionregistrationV1Interface, err error)

GetClients gets the various kubernetes clients

func GetPackageMetadata

func GetPackageMetadata(ctx context.Context, c client.Client, carvelPkgName, carvelPkgNamespace string) (string, string, error)

* The below functions are duplicated from addons/pkg/util in order to avoid circular dependency between tanzu-framework and addons modules.

func GetTKRRepoImagePathAndNamespaceFromSecret

func GetTKRRepoImagePathAndNamespaceFromSecret(ctx context.Context, crClient client.Client) (string, string, error)

func TKRCompatibilityValidationSpec

func TKRCompatibilityValidationSpec(ctx context.Context, inputGetter func() TKRCompatibilityValidationSpecInput)

func TKRNamesFromTags

func TKRNamesFromTags(tkrImageTags []string) []string

func TestClusterUpgrade

func TestClusterUpgrade(tkgctlClient tkgctl.TKGClient, clusterName, namespace string)

TestClusterUpgrade tests upgrading a workload cluster to next available tkr

func ValidateClusterClassConfigFile

func ValidateClusterClassConfigFile(clusterclassConfigFilePath string) (string, string)

func ValidateOSImagesOfTKR

func ValidateOSImagesOfTKR(ctx context.Context, mcProxy *framework.ClusterProxy, tkr *runv1.TanzuKubernetesRelease)

func ValidatePackagesOfTKR

func ValidatePackagesOfTKR(ctx context.Context, mcProxy *framework.ClusterProxy, tkr *runv1.TanzuKubernetesRelease, namespace string)

func ValidateTKRsRelatedObjectsAvailability

func ValidateTKRsRelatedObjectsAvailability(ctx context.Context, mcProxy *framework.ClusterProxy, expectedTKRs []string, resourceNS string)

func VerifyOSImagesAreAvailable

func VerifyOSImagesAreAvailable(expectedOSImages []v1.LocalObjectReference, osImages []*runv1.OSImage) error

func VerifyPackagesAreAvailable

func VerifyPackagesAreAvailable(expectedPackages []v1.LocalObjectReference, packages []*kappcontrollerv1alpha1.Package) error

func VerifyTKRsAreAvailable

func VerifyTKRsAreAvailable(expectedTKRs []string, tkrs []*runv1.TanzuKubernetesRelease) error

func WaitForNodeRemediation

func WaitForNodeRemediation(ctx context.Context, clusterName string, namespace string, mcProxy *framework.ClusterProxy, wcProxy *framework.ClusterProxy)

Types

type Cluster

type Cluster struct {
	Name               string         `json:"name" yaml:"name"`
	Type               string         `json:"type" yaml:"type"`
	Plan               string         `json:"plan" yaml:"plan"`
	KubernetesProvider string         `json:"kubernetesProvider" yaml:"kubernetesProvider"`
	TkgVersion         string         `json:"tkgVersion" yaml:"tkgVersion"`
	Infrastructure     Infrastructure `json:"infrastructure" yaml:"infrastructure"`
}

type ClusterMetadata

type ClusterMetadata struct {
	Cluster Cluster `json:"cluster" yaml:"cluster"`
}

type ClusterResource

type ClusterResource struct {
	// contains filtered or unexported fields
}

func GetManagementClusterResources

func GetManagementClusterResources(ctx context.Context, mccl client.Client, dynamicClient dynamic.Interface, aggregatedAPIResourcesClient client.Client, discoveryClient discovery.DiscoveryInterface, clusterNamespace, clusterName, infrastructureName string) ([]ClusterResource, error)

GetManagementClusterResources gets all the resources thats created by addons-manager plus * all the resources on which finalizer is added by addons-manager during a cluster creation.

type E2EAddonSpecInput

type E2EAddonSpecInput struct {
	E2EConfig       *framework.E2EConfig
	ArtifactsFolder string
	Cni             string
}

type E2EAutoscalerSpecInput

type E2EAutoscalerSpecInput struct {
	E2EConfig       *framework.E2EConfig
	ArtifactsFolder string
	Cni             string
}

type E2ECEIPSpecInput

type E2ECEIPSpecInput struct {
	E2EConfig       *framework.E2EConfig
	ArtifactsFolder string
	Cni             string
}

type E2ECommonCCSpecInput

type E2ECommonCCSpecInput struct {
	E2EConfig             *framework.E2EConfig
	ArtifactsFolder       string
	Cni                   string
	Plan                  string
	Namespace             string
	IsCustomCB            bool
	DoUpgrade             bool
	CheckAdmissionWebhook bool
	Timeout               time.Duration
	OtherConfig           map[string]string
}

type E2ECommonSpecInput

type E2ECommonSpecInput struct {
	E2EConfig       *framework.E2EConfig
	ArtifactsFolder string
	Cni             string
	Plan            string
	Namespace       string
	OtherConfigs    map[string]string
}

type E2ELegacyFallbackSpecInput

type E2ELegacyFallbackSpecInput struct {
	E2EConfig       *framework.E2EConfig
	ArtifactsFolder string
	Cni             string
	Plan            string
	Namespace       string
	OtherConfigs    map[string]string
}

type E2EMhcSpecInput

type E2EMhcSpecInput struct {
	E2EConfig       *framework.E2EConfig
	ArtifactsFolder string
	Cni             string
}

type E2ENodePoolSpecInput

type E2ENodePoolSpecInput struct {
	E2ECommonSpecInput
	NodePool client.NodePool
}

type E2EScaleSpecInput

type E2EScaleSpecInput struct {
	E2EConfig       *framework.E2EConfig
	ArtifactsFolder string
	Cni             string
}

type E2ETKRResolverValidationForClusterCRUDSpecInput

type E2ETKRResolverValidationForClusterCRUDSpecInput struct {
	E2EConfig       *framework.E2EConfig
	ArtifactsFolder string
	Cni             string
	Plan            string
	Namespace       string
}

type E2EUpgradeSpecInput

type E2EUpgradeSpecInput struct {
	E2EConfig       *framework.E2EConfig
	ArtifactsFolder string
	Cni             string
}

type Infrastructure

type Infrastructure struct {
	Provider string `json:"provider" yaml:"provider"`
}

type TKRCompatibilityValidationSpecInput

type TKRCompatibilityValidationSpecInput struct {
	E2EConfig    *framework.E2EConfig
	OtherConfigs map[string]string
}

type VerifyClusterMetadataInput

type VerifyClusterMetadataInput struct {
	ClusterName          string
	ClusterType          string
	Namespace            string
	Plan                 string
	InfraProvider        string
	TkrVersion           string
	TkgConfigDir         string
	TkgClusterConfigPath string
}

Jump to

Keyboard shortcuts

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