core

package
v1.9.0-preview5 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterBindings

func FilterBindings(bindings []*workv1alpha2.ResourceBinding) []*workv1alpha2.ResourceBinding

FilterBindings will filter ResourceBindings that could be descheduled based on their GVK and applied placement.

Types

type SchedulingResultHelper

type SchedulingResultHelper struct {
	*workv1alpha2.ResourceBinding
	TargetClusters []*TargetClusterWrapper
}

SchedulingResultHelper is a helper to wrap the ResourceBinding and its target cluster result.

func NewSchedulingResultHelper

func NewSchedulingResultHelper(binding *workv1alpha2.ResourceBinding) *SchedulingResultHelper

NewSchedulingResultHelper returns a new SchedulingResultHelper based on ResourceBinding.

func (*SchedulingResultHelper) FillUnschedulableReplicas

func (h *SchedulingResultHelper) FillUnschedulableReplicas(unschedulableThreshold time.Duration)

FillUnschedulableReplicas will detect the unschedulable replicas of member cluster by calling unschedulable replica estimators and fill the unschedulable field of TargetClusterWrapper.

func (*SchedulingResultHelper) GetUndesiredClusters

func (h *SchedulingResultHelper) GetUndesiredClusters() ([]*TargetClusterWrapper, []string)

GetUndesiredClusters returns the cluster which of ready replicas are not reach the ready ones.

type TargetClusterWrapper

type TargetClusterWrapper struct {
	ClusterName   string
	Spec          int32
	Ready         int32
	Unschedulable int32
}

TargetClusterWrapper is a wrapper to wrap the target cluster name, spec replicas, ready replicas and unschedulable replicas.

Jump to

Keyboard shortcuts

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