Help us shape the future of Go! Take the 2026 Go Developer Survey

gardenletdeployer

package
v1.151.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 39 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// GardenletDefaultKubeconfigSecretName is the default name for the field in the Gardenlet component configuration
	// .gardenClientConnection.KubeconfigSecret.Name
	GardenletDefaultKubeconfigSecretName = "gardenlet-kubeconfig" // #nosec G101 -- No credential.
	// GardenletDefaultKubeconfigBootstrapSecretName is the default name for the field in the Gardenlet component configuration
	// .gardenClientConnection.BootstrapKubeconfig.Name
	GardenletDefaultKubeconfigBootstrapSecretName = "gardenlet-kubeconfig-bootstrap" // #nosec G101 -- No credential.
)

Variables

This section is empty.

Functions

func GetSeed

func GetSeed(ctx context.Context, gardenClient client.Client, seedName string) (*gardencorev1beta1.Seed, error)

GetSeed returns the seed with the given name if found. If not, nil is returned.

func PrepareGardenletChartValues

func PrepareGardenletChartValues(
	ctx context.Context,
	log logr.Logger,
	gardenClient client.Client,
	gardenRESTConfig *rest.Config,
	targetClusterClient client.Client,
	recorder events.EventRecorder,
	obj client.Object,
	seed *gardencorev1beta1.Seed,
	vp ValuesHelper,
	bootstrap seedmanagementv1alpha1.Bootstrap,
	bootstrapToken string,
	gardenletDeployment *seedmanagementv1alpha1.GardenletDeployment,
	gardenletConfig *gardenletconfigv1alpha1.GardenletConfiguration,
	gardenletNamespaceTargetCluster string,
) (
	map[string]any,
	error,
)

PrepareGardenletChartValues prepares the gardenlet chart values based on the config.

Types

type Actuator

type Actuator struct {
	GardenConfig             *rest.Config
	GardenClient             client.Client
	GetTargetClientFunc      func(ctx context.Context) (kubernetes.Interface, error)
	CheckIfVPAAlreadyExists  func(ctx context.Context) (bool, error)
	GetTargetDomain          func() string
	ApplyGardenletChart      func(ctx context.Context, targetChartApplier kubernetes.ChartApplier, values map[string]any) error
	DeleteGardenletChart     func(ctx context.Context, targetChartApplier kubernetes.ChartApplier, values map[string]any) error
	Clock                    clock.Clock
	ValuesHelper             ValuesHelper
	Recorder                 events.EventRecorder
	GardenletNamespaceTarget string
	BootstrapToken           string
	SeedIsSelfHostedShoot    bool
}

Actuator is a concrete implementation of Interface.

func (*Actuator) Delete

func (a *Actuator) Delete(
	ctx context.Context,
	log logr.Logger,
	obj client.Object,
	conditions []gardencorev1beta1.Condition,
	gardenletDeployment *seedmanagementv1alpha1.GardenletDeployment,
	rawComponentConfig *runtime.RawExtension,
	bootstrap seedmanagementv1alpha1.Bootstrap,
	mergeWithParent bool,
) (
	[]gardencorev1beta1.Condition,
	bool,
	bool,
	error,
)

Delete deletes the gardenlet.

func (*Actuator) Reconcile

func (a *Actuator) Reconcile(
	ctx context.Context,
	log logr.Logger,
	obj client.Object,
	conditions []gardencorev1beta1.Condition,
	gardenletDeployment *seedmanagementv1alpha1.GardenletDeployment,
	rawComponentConfig *runtime.RawExtension,
	bootstrap seedmanagementv1alpha1.Bootstrap,
	mergeWithParent bool,
) (
	[]gardencorev1beta1.Condition,
	error,
)

Reconcile deploys or updates gardenlets.

type Interface

Interface deploys gardenlets into target clusters.

type ValuesHelper

type ValuesHelper interface {
	// MergeGardenletDeployment merges the given GardenletDeployment with the values from the parent gardenlet.
	MergeGardenletDeployment(*seedmanagementv1alpha1.GardenletDeployment) (*seedmanagementv1alpha1.GardenletDeployment, error)
	// MergeGardenletConfiguration merges the given GardenletConfiguration with the parent GardenletConfiguration.
	MergeGardenletConfiguration(config *gardenletconfigv1alpha1.GardenletConfiguration) (*gardenletconfigv1alpha1.GardenletConfiguration, error)
	// GetGardenletChartValues computes the values to be used when applying the gardenlet chart.
	GetGardenletChartValues(*seedmanagementv1alpha1.GardenletDeployment, *gardenletconfigv1alpha1.GardenletConfiguration, string) (map[string]any, error)
}

ValuesHelper provides methods for merging GardenletDeployment and GardenletConfiguration with parent, as well as computing the values to be used when applying the gardenlet chart.

func NewValuesHelper

NewValuesHelper creates a new ValuesHelper with the given parent GardenletConfiguration and image vector.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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