Documentation ¶
Index ¶
- Constants
- Variables
- func GetPluralName(name string) string
- func GetResourceKind(obj pkgruntime.Object) string
- func OverrideUpdateNeeded(overridesMap util.OverridesMap, result map[string]int64) bool
- func PlacementUpdateNeeded(names, newNames []string) bool
- func RegisterSchedulingType(kind string, schedulingType SchedulingType)
- func SchedulingTypes() map[string]SchedulingType
- type Plugin
- func (p *Plugin) HasSynced() bool
- func (p *Plugin) ReconcileOverride(qualifiedName util.QualifiedName, result map[string]int64) error
- func (p *Plugin) ReconcilePlacement(qualifiedName util.QualifiedName, newClusterNames []string) error
- func (p *Plugin) Start(stopChan <-chan struct{})
- func (p *Plugin) Stop()
- func (p *Plugin) TemplateExists(key string) bool
- type ReplicaScheduler
- func (s *ReplicaScheduler) FedList(namespace string, options metav1.ListOptions) (pkgruntime.Object, error)
- func (s *ReplicaScheduler) FedWatch(namespace string, options metav1.ListOptions) (watch.Interface, error)
- func (s *ReplicaScheduler) GetSchedulingResult(rsp *fedschedulingv1a1.ReplicaSchedulingPreference, ...) (map[string]int64, error)
- func (s *ReplicaScheduler) HasSynced() bool
- func (s *ReplicaScheduler) Kind() string
- func (s *ReplicaScheduler) ObjectType() pkgruntime.Object
- func (s *ReplicaScheduler) Reconcile(obj pkgruntime.Object, qualifiedName QualifiedName) ReconciliationStatus
- func (s *ReplicaScheduler) ReconcileFederationTargets(qualifiedName QualifiedName, kind string, result map[string]int64) error
- func (s *ReplicaScheduler) Start(stopChan <-chan struct{})
- func (s *ReplicaScheduler) StartPlugin(typeConfig typeconfig.Interface, stopChan <-chan struct{}) error
- func (s *ReplicaScheduler) Stop()
- type Scheduler
- type SchedulerEventHandlers
- type SchedulerFactory
- type SchedulingType
Constants ¶
View Source
const (
RSPKind = "ReplicaSchedulingPreference"
)
Variables ¶
View Source
var (
Pod = GetResourceKind(&corev1.Pod{})
)
View Source
var PodResource = &metav1.APIResource{ Name: GetPluralName(Pod), Group: corev1.SchemeGroupVersion.Group, Version: corev1.SchemeGroupVersion.Version, Kind: Pod, Namespaced: true, }
Functions ¶
func GetPluralName ¶
func GetResourceKind ¶
func GetResourceKind(obj pkgruntime.Object) string
func OverrideUpdateNeeded ¶ added in v0.0.4
func OverrideUpdateNeeded(overridesMap util.OverridesMap, result map[string]int64) bool
func PlacementUpdateNeeded ¶ added in v0.0.4
These assume that there would be no duplicate clusternames
func RegisterSchedulingType ¶
func RegisterSchedulingType(kind string, schedulingType SchedulingType)
func SchedulingTypes ¶
func SchedulingTypes() map[string]SchedulingType
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func NewPlugin ¶
func NewPlugin(controllerConfig *util.ControllerConfig, eventHandlers SchedulerEventHandlers, typeConfig typeconfig.Interface) (*Plugin, error)
func (*Plugin) ReconcileOverride ¶ added in v0.0.4
func (*Plugin) ReconcilePlacement ¶ added in v0.0.4
func (p *Plugin) ReconcilePlacement(qualifiedName util.QualifiedName, newClusterNames []string) error
func (*Plugin) TemplateExists ¶
type ReplicaScheduler ¶
type ReplicaScheduler struct {
// contains filtered or unexported fields
}
func (*ReplicaScheduler) FedList ¶
func (s *ReplicaScheduler) FedList(namespace string, options metav1.ListOptions) (pkgruntime.Object, error)
func (*ReplicaScheduler) FedWatch ¶
func (s *ReplicaScheduler) FedWatch(namespace string, options metav1.ListOptions) (watch.Interface, error)
func (*ReplicaScheduler) GetSchedulingResult ¶
func (s *ReplicaScheduler) GetSchedulingResult(rsp *fedschedulingv1a1.ReplicaSchedulingPreference, qualifiedName QualifiedName, clusterNames []string) (map[string]int64, error)
func (*ReplicaScheduler) HasSynced ¶
func (s *ReplicaScheduler) HasSynced() bool
func (*ReplicaScheduler) Kind ¶
func (s *ReplicaScheduler) Kind() string
func (*ReplicaScheduler) ObjectType ¶
func (s *ReplicaScheduler) ObjectType() pkgruntime.Object
func (*ReplicaScheduler) Reconcile ¶
func (s *ReplicaScheduler) Reconcile(obj pkgruntime.Object, qualifiedName QualifiedName) ReconciliationStatus
func (*ReplicaScheduler) ReconcileFederationTargets ¶
func (s *ReplicaScheduler) ReconcileFederationTargets(qualifiedName QualifiedName, kind string, result map[string]int64) error
func (*ReplicaScheduler) Start ¶
func (s *ReplicaScheduler) Start(stopChan <-chan struct{})
func (*ReplicaScheduler) StartPlugin ¶ added in v0.0.3
func (s *ReplicaScheduler) StartPlugin(typeConfig typeconfig.Interface, stopChan <-chan struct{}) error
func (*ReplicaScheduler) Stop ¶
func (s *ReplicaScheduler) Stop()
type Scheduler ¶
type Scheduler interface { Kind() string ObjectType() pkgruntime.Object FedList(namespace string, options metav1.ListOptions) (pkgruntime.Object, error) FedWatch(namespace string, options metav1.ListOptions) (watch.Interface, error) Start(stopChan <-chan struct{}) HasSynced() bool Stop() Reconcile(obj pkgruntime.Object, qualifiedName QualifiedName) ReconciliationStatus StartPlugin(typeConfig typeconfig.Interface, stopChan <-chan struct{}) error }
func NewReplicaScheduler ¶
func NewReplicaScheduler(controllerConfig *ControllerConfig, eventHandlers SchedulerEventHandlers) (Scheduler, error)
type SchedulerEventHandlers ¶ added in v0.0.4
type SchedulerEventHandlers struct { FederationEventHandler func(pkgruntime.Object) ClusterEventHandler func(pkgruntime.Object) ClusterLifecycleHandlers *ClusterLifecycleHandlerFuncs }
type SchedulerFactory ¶
type SchedulerFactory func(controllerConfig *ControllerConfig, eventHandlers SchedulerEventHandlers) (Scheduler, error)
type SchedulingType ¶
type SchedulingType struct { Kind string SchedulerFactory SchedulerFactory }
func GetSchedulingType ¶ added in v0.0.4
func GetSchedulingType(kind string) *SchedulingType
Click to show internal directories.
Click to hide internal directories.