Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultAcceptableReplicasKey = "default" // DefaultSchedulerName is the default scheduler name DefaultSchedulerName = "default" )
View Source
const ( // RootPathReplicas specifies the root path for predictor replica server RootPathReplicas = "/replicas" // SubPathPredict specifies the sub path for predicting replicas SubPathPredict = "/predict" // SubPathUnscheduled specifies the sub path for listing unscheduled replicas SubPathUnscheduled = "/unscheduled" )
View Source
const (
// ClusterIDHeader is the HTTP header name used by replicas predictor
ClusterIDHeader = "Cluster-ID"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PredictorProvider ¶
type PredictorProvider interface { // MaxAcceptableReplicas indicates the maximum acceptable replicas that the cluster could admit. // It returns a map of label to maximum acceptable replicas with this constraint. Here the label constraint // could be topology constraints, such as // { // "topology.kubernetes.io/zone=zone1,topology.kubernetes.io/region=region1": 3, // "topology.kubernetes.io/zone=zone2,topology.kubernetes.io/region=region1": 5, // }. MaxAcceptableReplicas(ctx context.Context, requirements v1alpha1.ReplicaRequirements) (PredictorResults, error) // UnschedulableReplicas returns current unschedulable replicas. UnschedulableReplicas(ctx context.Context, gvk metav1.GroupVersionKind, namespacedName string, labelSelector map[string]string) (int32, error) }
PredictorProvider is an interface that provides replicas predictions.
type PredictorReplicas ¶ added in v0.11.0
PredictorReplicas indicates a map of label to replicas with this constraint. Here the label constraint could be topology constraints, such as
{ "topology.kubernetes.io/zone=zone1,topology.kubernetes.io/region=region1": 3, "topology.kubernetes.io/zone=zone2,topology.kubernetes.io/region=region1": 5, }.
type PredictorResults ¶ added in v0.11.0
type PredictorResults struct { // Replicas records the max acceptable replicas in this cluster Replicas PredictorReplicas `json:"replicas,omitempty"` }
PredictorResults specify
Click to show internal directories.
Click to hide internal directories.