test

package
v1.97.2-0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeExpectedGardenletConfiguration

func ComputeExpectedGardenletConfiguration(
	hasGardenClientConnectionKubeconfig, hasSeedClientConnectionKubeconfig bool,
	bootstrapKubeconfig *corev1.SecretReference,
	kubeconfigSecret *corev1.SecretReference,
	seedConfig *gardenletv1alpha1.SeedConfig,
	featureGates map[string]bool,
) gardenletv1alpha1.GardenletConfiguration

ComputeExpectedGardenletConfiguration computes the expected Gardenlet configuration based on input parameters.

func ComputeExpectedGardenletDeploymentSpec

func ComputeExpectedGardenletDeploymentSpec(
	deploymentConfiguration *seedmanagement.GardenletDeployment,
	image seedmanagement.Image,
	gardenClientConnectionKubeconfig, seedClientConnectionKubeconfig *string,
	expectedLabels map[string]string,
	imageVectorOverwrite, componentImageVectorOverwrites *string,
	uniqueName map[string]string,
	seedConfig *gardenletv1alpha1.SeedConfig,
) (
	appsv1.DeploymentSpec,
	error,
)

ComputeExpectedGardenletDeploymentSpec computes the expected Gardenlet deployment spec based on input parameters needs to equal exactly what is deployed via the helm chart (including defaults set in the helm chart) as a consequence, if non-optional changes to the helm chart are made, these tests will fail by design

func NewGardenletChartApplier

func NewGardenletChartApplier(applier kubernetes.ChartApplier, values map[string]any) component.Deployer

NewGardenletChartApplier can be used to deploy the Gardenlet chart.

func ValidateGardenletChartPodDisruptionBudget

func ValidateGardenletChartPodDisruptionBudget(ctx context.Context, c client.Client, expectedLabels map[string]string, replicaCount *int32, k8sGreaterEquals126 bool)

ValidateGardenletChartPodDisruptionBudget validates the PodDisruptionBudget of the Gardenlet chart.

func ValidateGardenletChartPriorityClass

func ValidateGardenletChartPriorityClass(ctx context.Context, c client.Client)

ValidateGardenletChartPriorityClass validates the priority class of the Gardenlet chart.

func ValidateGardenletChartRBAC

func ValidateGardenletChartRBAC(ctx context.Context, c client.Client, expectedLabels map[string]string, serviceAccountName string)

ValidateGardenletChartRBAC validates the RBAC resources of the Gardenlet chart.

func ValidateGardenletChartServiceAccount

func ValidateGardenletChartServiceAccount(ctx context.Context, c client.Client, hasSeedClientConnectionKubeconfig bool, expectedLabels map[string]string, serviceAccountName string)

ValidateGardenletChartServiceAccount validates the Service Account of the Gardenlet chart.

func ValidateGardenletChartVPA

func ValidateGardenletChartVPA(ctx context.Context, c client.Client)

ValidateGardenletChartVPA validates the vpa of the Gardenlet chart.

func VerifyGardenletComponentConfigConfigMap

func VerifyGardenletComponentConfigConfigMap(
	ctx context.Context,
	c client.Client,
	universalDecoder runtime.Decoder,
	expectedGardenletConfig gardenletv1alpha1.GardenletConfiguration,
	expectedLabels map[string]string,
	uniqueName string,
)

VerifyGardenletComponentConfigConfigMap verifies that the actual Gardenlet component config config map equals the expected config map.

func VerifyGardenletDeployment

func VerifyGardenletDeployment(ctx context.Context,
	c client.Client,
	expectedDeploymentSpec appsv1.DeploymentSpec,
	deploymentConfiguration *seedmanagement.GardenletDeployment,
	hasGardenClientConnectionKubeconfig,
	hasSeedClientConnectionKubeconfig,
	usesTLSBootstrapping bool,
	expectedLabels map[string]string,
	imageVectorOverwrite,
	componentImageVectorOverwrites *string,
	uniqueName map[string]string)

VerifyGardenletDeployment verifies that the actual Gardenlet deployment equals the expected deployment

Types

This section is empty.

Jump to

Keyboard shortcuts

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