Documentation ¶
Index ¶
- Constants
- Variables
- func ExpirationDateExpired(timestamp *metav1.Time) bool
- func FilterSeedForShootConditions(obj, oldObj, _ client.Object, _ bool) bool
- func ForceMachineImageUpdateRequired(shootCurrentImage *gardencorev1beta1.ShootMachineImage, ...) bool
- func MaintainMachineImages(log logr.Logger, shoot *gardencorev1beta1.Shoot, ...) ([]string, error)
- func NewShootConditionsReconciler(gardenClient client.Client) reconcile.Reconciler
- func NewShootHibernationReconciler(gardenClient client.Client, ...) reconcile.Reconciler
- func NewShootMaintenanceReconciler(gardenClient client.Client, ...) reconcile.Reconciler
- func NewShootQuotaReconciler(gardenClient client.Client, cfg config.ShootQuotaControllerConfiguration) reconcile.Reconciler
- func NewShootReferenceReconciler(gardenClient client.Client) reconcile.Reconciler
- func NewShootRetryReconciler(gardenClient client.Client, config *config.ShootRetryControllerConfiguration) reconcile.Reconciler
- func NewShootStatusLabelReconciler(gardenClient client.Client) reconcile.Reconciler
- type Controller
Constants ¶
const ControllerName = "shoot"
ControllerName is the name of this controller.
const FinalizerName = "gardener.cloud/reference-protection"
FinalizerName is the name of the finalizer used for the reference protection.
Variables ¶
var ( // UserManagedSelector is a selector for objects which are managed by users and not created by Gardener. UserManagedSelector = client.MatchingLabelsSelector{Selector: labels.NewSelector().Add(noGardenRole)} )
Functions ¶
func ExpirationDateExpired ¶
ExpirationDateExpired returns if now is equal or after the given expirationDate
func FilterSeedForShootConditions ¶ added in v1.37.6
FilterSeedForShootConditions is used as a ControllerPredicateFactoryFunc to ensure that Shoots are only enqueued when Seed conditions changed.
func ForceMachineImageUpdateRequired ¶
func ForceMachineImageUpdateRequired(shootCurrentImage *gardencorev1beta1.ShootMachineImage, imageCloudProvider gardencorev1beta1.MachineImage) bool
ForceMachineImageUpdateRequired checks if the shoots current machine image has to be forcefully updated
func MaintainMachineImages ¶
func MaintainMachineImages(log logr.Logger, shoot *gardencorev1beta1.Shoot, cloudProfile *gardencorev1beta1.CloudProfile) ([]string, error)
MaintainMachineImages updates the machine images of a Shoot's worker pools if necessary
func NewShootConditionsReconciler ¶ added in v1.37.0
func NewShootConditionsReconciler(gardenClient client.Client) reconcile.Reconciler
NewShootConditionsReconciler creates a reconcile.Reconciler that updates the conditions of a shoot that is registered as seed.
func NewShootHibernationReconciler ¶ added in v1.19.0
func NewShootHibernationReconciler( gardenClient client.Client, config config.ShootHibernationControllerConfiguration, recorder record.EventRecorder, clock clock.Clock, ) reconcile.Reconciler
NewShootHibernationReconciler creates a new instance of a reconciler which hibernates shoots or wakes them up.
func NewShootMaintenanceReconciler ¶ added in v1.19.0
func NewShootMaintenanceReconciler(gardenClient client.Client, config config.ShootMaintenanceControllerConfiguration, recorder record.EventRecorder) reconcile.Reconciler
NewShootMaintenanceReconciler creates a new instance of a reconciler which maintains Shoots.
func NewShootQuotaReconciler ¶ added in v1.19.0
func NewShootQuotaReconciler(gardenClient client.Client, cfg config.ShootQuotaControllerConfiguration) reconcile.Reconciler
NewShootQuotaReconciler creates a new instance of a reconciler which checks handles Shoots using SecretBindings that references Quotas.
func NewShootReferenceReconciler ¶ added in v1.12.0
func NewShootReferenceReconciler(gardenClient client.Client) reconcile.Reconciler
NewShootReferenceReconciler creates a new instance of a reconciler which checks object references from shoot objects.
func NewShootRetryReconciler ¶ added in v1.22.0
func NewShootRetryReconciler(gardenClient client.Client, config *config.ShootRetryControllerConfiguration) reconcile.Reconciler
NewShootRetryReconciler creates a new instance of a reconciler which retries certain failed Shoots.
func NewShootStatusLabelReconciler ¶ added in v1.37.0
func NewShootStatusLabelReconciler(gardenClient client.Client) reconcile.Reconciler
NewShootStatusLabelReconciler creates a reconcile.Reconciler that updates a shoot's status label.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller controls Shoots.
func NewShootController ¶
func NewShootController( ctx context.Context, log logr.Logger, mgr manager.Manager, config *config.ControllerManagerConfiguration, ) ( *Controller, error, )
NewShootController takes a ClientMap, a GardenerInformerFactory, a KubernetesInformerFactory, a ControllerManagerConfig struct and an EventRecorder to create a new Shoot controller.
func (*Controller) Run ¶
func (c *Controller) Run( ctx context.Context, shootMaintenanceWorkers, shootQuotaWorkers, shootHibernationWorkers, shootReferenceWorkers, shootRetryWorkers, shootConditionsWorkers, shootStatusLabelWorkers int, )
Run runs the Controller until the given stop channel can be read from.