seed

package
v1.72.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SeedSpecHash is a constant for a label on `ControllerInstallation`s (similar to `pod-template-hash` on `Pod`s).
	SeedSpecHash = "seed-spec-hash"
	// ControllerDeploymentHash is a constant for a label on `ControllerInstallation`s (similar to `pod-template-hash` on `Pod`s).
	ControllerDeploymentHash = "deployment-hash"
	// RegistrationSpecHash is a constant for a label on `ControllerInstallation`s (similar to `pod-template-hash` on `Pod`s).
	RegistrationSpecHash = "registration-spec-hash"
)
View Source
const ControllerName = "controllerregistration-seed"

ControllerName is the name of this controller.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reconciler

type Reconciler struct {
	Client    client.Client
	APIReader client.Reader
	Config    config.ControllerRegistrationControllerConfiguration
}

Reconciler determines which ControllerRegistrations are required for a given Seed by checking all objects in the garden cluster, that need to be considered for that Seed (e.g. because they reference the Seed). It then deploys wanted and deletes unneeded ControllerInstallations accordingly. Seeds get enqueued by updates to relevant (referencing) objects, e.g. Shoots, BackupBuckets, etc. This is the main reconciler of this controller, that does the actual work.

func (*Reconciler) AddToManager

func (r *Reconciler) AddToManager(mgr manager.Manager) error

AddToManager adds Reconciler to the given manager.

func (*Reconciler) BackupBucketPredicate

func (r *Reconciler) BackupBucketPredicate() predicate.Predicate

BackupBucketPredicate returns true for all BackupBucket events when there is a non-nil .spec.seedName. For updates, it only returns true when there is a change in the .spec.seedName or .spec.provider.type fields.

func (*Reconciler) BackupEntryPredicate

func (r *Reconciler) BackupEntryPredicate() predicate.Predicate

BackupEntryPredicate returns true for all BackupEntry events when there is a non-nil .spec.seedName. For updates, it only returns true when there is a change in the .spec.seedName or .spec.bucketName fields.

func (*Reconciler) ControllerInstallationPredicate

func (r *Reconciler) ControllerInstallationPredicate() predicate.Predicate

ControllerInstallationPredicate returns true for all ControllerInstallation 'create' events. For updates, it only returns true when the Required condition's status has changed. For other events, false is returned.

func (*Reconciler) MapBackupBucketToSeed

func (r *Reconciler) MapBackupBucketToSeed(_ context.Context, _ logr.Logger, _ client.Reader, obj client.Object) []reconcile.Request

MapBackupBucketToSeed returns a reconcile.Request object for the seed specified in the .spec.seedName field.

func (*Reconciler) MapBackupEntryToSeed

func (r *Reconciler) MapBackupEntryToSeed(_ context.Context, _ logr.Logger, _ client.Reader, obj client.Object) []reconcile.Request

MapBackupEntryToSeed returns a reconcile.Request object for the seed specified in the .spec.seedName field.

func (*Reconciler) MapControllerDeploymentToAllSeeds

func (r *Reconciler) MapControllerDeploymentToAllSeeds(ctx context.Context, log logr.Logger, reader client.Reader, obj client.Object) []reconcile.Request

MapControllerDeploymentToAllSeeds returns reconcile.Request objects for all seeds in case there is at least one ControllerRegistration which references the ControllerDeployment.

func (*Reconciler) MapControllerInstallationToSeed

func (r *Reconciler) MapControllerInstallationToSeed(_ context.Context, _ logr.Logger, _ client.Reader, obj client.Object) []reconcile.Request

MapControllerInstallationToSeed returns a reconcile.Request object for the seed specified in the .spec.seedRef.name field.

func (*Reconciler) MapShootToSeed

func (r *Reconciler) MapShootToSeed(_ context.Context, _ logr.Logger, _ client.Reader, obj client.Object) []reconcile.Request

MapShootToSeed returns a reconcile.Request object for the seed specified in the .spec.seedName field.

func (*Reconciler) MapToAllSeeds

func (r *Reconciler) MapToAllSeeds(ctx context.Context, log logr.Logger, reader client.Reader, _ client.Object) []reconcile.Request

MapToAllSeeds returns reconcile.Request objects for all existing seeds in the system.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Reconcile performs the main reconciliation logic.

func (*Reconciler) SeedPredicate

func (r *Reconciler) SeedPredicate() predicate.Predicate

SeedPredicate returns true for all Seed events except for updates. Here, it only returns true when there is a change in the .spec.dns.provider field or when the deletion timestamp is set.

func (*Reconciler) ShootPredicate

func (r *Reconciler) ShootPredicate() predicate.Predicate

ShootPredicate returns true for all Shoot events when there is a non-nil .spec.seedName. For updates, it only returns true when there is a change in the .spec.seedName or .spec.provider.workers or .spec.extensions or .spec.dns or .spec.networking.type or .spec.provider.type fields.

Jump to

Keyboard shortcuts

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