Documentation ¶
Index ¶
- func CheckClusterResource(nodeList []*framework.NodeInfo, resourceRequest corev1.ResourceList, ...) error
- func GetNamespacedName(obj metav1.Object) string
- type Manager
- type PodGroupManager
- func (pgMgr *PodGroupManager) AddDeniedPodGroup(pgFullName string)
- func (pgMgr *PodGroupManager) CalculateAssignedPods(podGroupName, namespace string) int
- func (pgMgr *PodGroupManager) DeletePermittedPodGroup(pgFullName string)
- func (pgMgr *PodGroupManager) GetCreationTimestamp(pod *corev1.Pod, ts time.Time) time.Time
- func (pgMgr *PodGroupManager) GetPodGroup(pod *corev1.Pod) (string, *v1alpha1.PodGroup)
- func (pgMgr *PodGroupManager) PatchPodGroup(pgName string, namespace string, patch []byte) error
- func (pgMgr *PodGroupManager) Permit(ctx context.Context, pod *corev1.Pod, nodeName string) (bool, error)
- func (pgMgr *PodGroupManager) PostBind(ctx context.Context, pod *corev1.Pod, nodeName string)
- func (pgMgr *PodGroupManager) PreFilter(ctx context.Context, pod *corev1.Pod) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckClusterResource ¶
func CheckClusterResource(nodeList []*framework.NodeInfo, resourceRequest corev1.ResourceList, desiredPodGroupName string) error
CheckClusterResource checks if resource capacity of the cluster can satisfy <resourceRequest>. It returns an error detailing the resource gap if not satisfied; otherwise returns nil.
func GetNamespacedName ¶
GetNamespacedName returns the namespaced name
Types ¶
type Manager ¶
type Manager interface { PreFilter(context.Context, *corev1.Pod) error Permit(context.Context, *corev1.Pod, string) (bool, error) PostBind(context.Context, *corev1.Pod, string) GetPodGroup(*corev1.Pod) (string, *v1alpha1.PodGroup) GetCreationTimestamp(*corev1.Pod, time.Time) time.Time AddDeniedPodGroup(string) DeletePermittedPodGroup(string) CalculateAssignedPods(string, string) int }
Manager defines the interfaces for PodGroup management.
type PodGroupManager ¶
PodGroupManager defines the scheduling operation called
func NewPodGroupManager ¶
func NewPodGroupManager(pgClient pgclientset.Interface, snapshotSharedLister framework.SharedLister, scheduleTimeout, deniedPGExpirationTime *time.Duration, pgInformer pginformer.PodGroupInformer, podInformer informerv1.PodInformer) *PodGroupManager
NewPodGroupManager create a new operation object
func (*PodGroupManager) AddDeniedPodGroup ¶
func (pgMgr *PodGroupManager) AddDeniedPodGroup(pgFullName string)
AddDeniedPodGroup adds a podGroup that fails to be scheduled to a PodGroup cache with expriration.
func (*PodGroupManager) CalculateAssignedPods ¶
func (pgMgr *PodGroupManager) CalculateAssignedPods(podGroupName, namespace string) int
CalculateAssignedPods returns the number of pods that has been assigned a node: assumed or bound.
func (*PodGroupManager) DeletePermittedPodGroup ¶
func (pgMgr *PodGroupManager) DeletePermittedPodGroup(pgFullName string)
DeletePodGroup delete a podGroup that pass Pre-Filter but reach PostFilter.
func (*PodGroupManager) GetCreationTimestamp ¶
GetCreationTimestamp returns the creation time of a podGroup or a pod.
func (*PodGroupManager) GetPodGroup ¶
GetPodGroup returns the PodGroup that a Pod belongs to from cache.
func (*PodGroupManager) PatchPodGroup ¶
func (pgMgr *PodGroupManager) PatchPodGroup(pgName string, namespace string, patch []byte) error
PatchPodGroup patches a podGroup.
func (*PodGroupManager) Permit ¶
func (pgMgr *PodGroupManager) Permit(ctx context.Context, pod *corev1.Pod, nodeName string) (bool, error)
Permit permits a pod to run, if the minMember match, it would send a signal to chan.