shoot

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const MsgUnschedulable = "Failed to schedule shoot"

MsgUnschedulable is the Message for the Event on a Shoot that the Scheduler creates in case it cannot schedule the Shoot to any Seed

Variables

This section is empty.

Functions

func UpdateShootToBeScheduledOntoSeed

func UpdateShootToBeScheduledOntoSeed(ctx context.Context, shoot *gardencorev1beta1.Shoot, seed *gardencorev1beta1.Seed, executeSchedulingRequest executeSchedulingRequest) error

UpdateShootToBeScheduledOntoSeed sets the seed name where the shoot should be scheduled on. Then it executes the actual update call to the API server. The call is capsuled to allow for easier testing.

Types

type SchedulerController

type SchedulerController struct {
	// contains filtered or unexported fields
}

SchedulerController controls Seeds.

func NewGardenerScheduler

func NewGardenerScheduler(k8sGardenClient kubernetes.Interface, gardenCoreInformerFactory gardencoreinformers.SharedInformerFactory, config *config.SchedulerConfiguration, recorder record.EventRecorder) *SchedulerController

NewGardenerScheduler takes a Kubernetes client for the Garden clusters <k8sGardenClient>, a <sharedInformerFactory>, a struct containing the scheduler configuration and a <recorder> for event recording. It creates a new NewGardenerScheduler.

func (*SchedulerController) CollectMetrics

func (c *SchedulerController) CollectMetrics(ch chan<- prometheus.Metric)

CollectMetrics implements gardenmetrics.ControllerMetricsCollector interface

func (*SchedulerController) Run

func (c *SchedulerController) Run(ctx context.Context)

Run runs the SchedulerController until the given stop channel can be read from.

func (*SchedulerController) RunningWorkers

func (c *SchedulerController) RunningWorkers() int

RunningWorkers returns the number of running workers.

type SchedulerInterface

type SchedulerInterface interface {
	// ScheduleShoot implements the control logic for Shoot Scheduling (to a Seed).
	// If an implementation returns a non-nil error, the invocation will be retried respecting the RetrySyncPeriod with exponential backoff.
	ScheduleShoot(ctx context.Context, seed *gardencorev1beta1.Shoot, key string) error
}

SchedulerInterface implements the control logic for updating Seeds. It is implemented as an interface to allow for extensions that provide different semantics. Currently, there is only one implementation.

func NewDefaultControl

func NewDefaultControl(k8sGardenClient kubernetes.Interface, k8sGardenCoreInformers gardencoreinformers.SharedInformerFactory, recorder record.EventRecorder, config *config.SchedulerConfiguration, shootLister gardencorelisters.ShootLister, seedLister gardencorelisters.SeedLister, cloudProfileLister gardencorelisters.CloudProfileLister) SchedulerInterface

NewDefaultControl returns a new instance of the default implementation SchedulerInterface that implements the documented semantics for Scheduling.

Jump to

Keyboard shortcuts

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