Documentation ¶
Index ¶
Constants ¶
View Source
const (
AnnotationPodSpreadRate = "wao.bitmedia.co.jp/podspread-rate"
)
Variables ¶
View Source
var ( Name = "PodSpread" ReasonInvalidAnnotation = "invalid annotation" ReasonEmptyNodeName = "node not found" ReasonNotControlledByReplicaSet = "the pod is not controlled by any ReplicaSet" ReasonK8sClient = "skip this plugin as k8s client got error" ReasonSchedulingSession = "skip this plugin as SchedulingSession update failed" )
Functions ¶
Types ¶
type PodSpread ¶
type PodSpread struct {
// contains filtered or unexported fields
}
func (*PodSpread) PreFilter ¶
func (pl *PodSpread) PreFilter(ctx context.Context, cycleState *framework.CycleState, pod *corev1.Pod) (*framework.PreFilterResult, *framework.Status)
PreFilter invoked at the prefilter extension point.
func (*PodSpread) PreFilterExtensions ¶
func (pl *PodSpread) PreFilterExtensions() framework.PreFilterExtensions
PreFilterExtensions do not exist for this plugin.
type SchedulingSession ¶
type SchedulingSession struct { TotalReplicas int Redunduncy int DeployedNodes map[string]int TotalDeployed int SpreadMode SpreadMode SpreadInfo SpreadInfo }
type SpreadInfo ¶
SpreadInfo holds area info.
area1: # nodes has "area1" label (zone or region) node11: true # node11 is a control plane node node12: false # node12 is a worker node area2: node21: false
func (SpreadInfo) GetAreasOnlyControlPlane ¶
func (s SpreadInfo) GetAreasOnlyControlPlane() []string
GetAreasOnlyControlPlane returns areas no worker nodes. These areas should be excluded from scheduling.
func (SpreadInfo) GetNodeArea ¶
func (s SpreadInfo) GetNodeArea(node string) (area string, isControlPlane bool)
type SpreadMode ¶
type SpreadMode string
const ( SpreadModeRegion SpreadMode = "SpreadModeRegion" SpreadModeZone SpreadMode = "SpreadModeZone" SpreadModeNode SpreadMode = "SpreadModeNode" )
Click to show internal directories.
Click to hide internal directories.