Documentation ¶
Index ¶
- Constants
- Variables
- func GetPluralName(name string) string
- func GetResourceKind(obj pkgruntime.Object) string
- func RegisterSchedulingType(kind string, factory SchedulerFactory)
- func SchedulingTypes() map[string]SchedulingType
- type Plugin
- 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(fedClient fedclientset.Interface, qualifiedName QualifiedName, kind string, ...) error
- func (s *ReplicaScheduler) Start(stopChan <-chan struct{})
- func (s *ReplicaScheduler) Stop()
- type Scheduler
- type SchedulerFactory
- type SchedulingType
Constants ¶
View Source
const (
RSPKind = "ReplicaSchedulingPreference"
)
Variables ¶
View Source
var ( FederatedDeployment = GetResourceKind(&fedv1a1.FederatedDeployment{}) Deployment = GetResourceKind(&appsv1.Deployment{}) FederatedReplicaSet = GetResourceKind(&fedv1a1.FederatedReplicaSet{}) ReplicaSet = GetResourceKind(&appsv1.ReplicaSet{}) 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, }
View Source
var ReplicaSechedulingResources = map[string]metav1.APIResource{ FederatedDeployment: { Name: GetPluralName(Deployment), Group: appsv1.SchemeGroupVersion.Group, Version: appsv1.SchemeGroupVersion.Version, Kind: Deployment, Namespaced: true, }, FederatedReplicaSet: { Name: GetPluralName(ReplicaSet), Group: appsv1.SchemeGroupVersion.Group, Version: appsv1.SchemeGroupVersion.Version, Kind: ReplicaSet, Namespaced: true, }, }
Functions ¶
func GetPluralName ¶
func GetResourceKind ¶
func GetResourceKind(obj pkgruntime.Object) string
func RegisterSchedulingType ¶
func RegisterSchedulingType(kind string, factory SchedulerFactory)
func SchedulingTypes ¶
func SchedulingTypes() map[string]SchedulingType
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func NewPlugin ¶
func NewPlugin(adapter adapters.Adapter, apiResource *metav1.APIResource, fedClient fedclientset.Interface, kubeClient kubeclientset.Interface, crClient crclientset.Interface, fedNamespace, clusterNamespace, targetNamespace string, federationEventHandler, clusterEventHandler func(pkgruntime.Object), handlers *util.ClusterLifecycleHandlerFuncs) *Plugin
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(fedClient fedclientset.Interface, qualifiedName QualifiedName, kind string, result map[string]int64) error
func (*ReplicaScheduler) Start ¶
func (s *ReplicaScheduler) Start(stopChan <-chan struct{})
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 }
func NewReplicaScheduler ¶
func NewReplicaScheduler(fedClient fedclientset.Interface, kubeClient kubeclientset.Interface, crClient crclientset.Interface, fedNamespace, clusterNamespace, targetNamespace string, federationEventHandler, clusterEventHandler func(pkgruntime.Object), handlers *ClusterLifecycleHandlerFuncs) Scheduler
type SchedulerFactory ¶
type SchedulerFactory func(fedClient fedclientset.Interface, kubeClient kubeclientset.Interface, crClient crclientset.Interface, fedNamespace, clusterNamespace, targetNamespace string, federationEventHandler, clusterEventHandler func(pkgruntime.Object), handlers *ClusterLifecycleHandlerFuncs) Scheduler
func GetSchedulerFactory ¶
func GetSchedulerFactory(typ string) SchedulerFactory
type SchedulingType ¶
type SchedulingType struct { Kind string SchedulerFactory SchedulerFactory }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.