Documentation ¶
Index ¶
- Constants
- type Reconciler
- func (r *Reconciler) AddToManager(ctx context.Context, mgr manager.Manager) error
- func (r *Reconciler) BackupBucketPredicate() predicate.Predicate
- func (r *Reconciler) BackupEntryPredicate() predicate.Predicate
- func (r *Reconciler) ControllerInstallationPredicate() predicate.Predicate
- func (r *Reconciler) MapBackupBucketToSeed(_ context.Context, _ logr.Logger, _ client.Reader, obj client.Object) []reconcile.Request
- func (r *Reconciler) MapBackupEntryToSeed(_ context.Context, _ logr.Logger, _ client.Reader, obj client.Object) []reconcile.Request
- func (r *Reconciler) MapControllerDeploymentToAllSeeds(ctx context.Context, log logr.Logger, reader client.Reader, obj client.Object) []reconcile.Request
- func (r *Reconciler) MapControllerInstallationToSeed(_ context.Context, _ logr.Logger, _ client.Reader, obj client.Object) []reconcile.Request
- func (r *Reconciler) MapShootToSeed(_ context.Context, _ logr.Logger, _ client.Reader, obj client.Object) []reconcile.Request
- func (r *Reconciler) MapToAllSeeds(ctx context.Context, log logr.Logger, reader client.Reader, _ client.Object) []reconcile.Request
- func (r *Reconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
- func (r *Reconciler) SeedPredicate() predicate.Predicate
- func (r *Reconciler) ShootPredicate() predicate.Predicate
Constants ¶
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" )
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 ¶
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.