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
}
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 ¶
type Interface interface {
// Reconcile deploys or updates a gardenlet in a target cluster.
Reconcile(context.Context, logr.Logger, client.Object, []gardencorev1beta1.Condition, *seedmanagementv1alpha1.GardenletDeployment, *runtime.RawExtension, seedmanagementv1alpha1.Bootstrap, bool) ([]gardencorev1beta1.Condition, error)
// Delete deletes a gardenlet from a target cluster.
Delete(context.Context, logr.Logger, client.Object, []gardencorev1beta1.Condition, *seedmanagementv1alpha1.GardenletDeployment, *runtime.RawExtension, seedmanagementv1alpha1.Bootstrap, bool) ([]gardencorev1beta1.Condition, bool, bool, error)
}
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 ¶
func NewValuesHelper(config *gardenletconfigv1alpha1.GardenletConfiguration) ValuesHelper
NewValuesHelper creates a new ValuesHelper with the given parent GardenletConfiguration and image vector.
Click to show internal directories.
Click to hide internal directories.