gardener: github.com/gardener/gardener/pkg/scheduler/controller/shoot Index | Files

package shoot

import "github.com/gardener/gardener/pkg/scheduler/controller/shoot"

Index

Package Files

scheduler.go scheduler_control.go

Constants

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

func UpdateShootToBeScheduledOntoSeed Uses

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.

type SchedulerController Uses

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

SchedulerController controls Seeds.

func NewGardenerScheduler Uses

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 Uses

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

CollectMetrics implements gardenmetrics.ControllerMetricsCollector interface

func (*SchedulerController) Run Uses

func (c *SchedulerController) Run(ctx context.Context, k8sGardenCoreInformers gardencoreinformers.SharedInformerFactory)

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

func (*SchedulerController) RunningWorkers Uses

func (c *SchedulerController) RunningWorkers() int

RunningWorkers returns the number of running workers.

type SchedulerInterface Uses

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 Uses

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.

Package shoot imports 27 packages (graph) and is imported by 1 packages. Updated 2020-03-30. Refresh now. Tools for package owners.