Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScaleDownOrderedByDescendingCost ¶
func ScaleDownOrderedByDescendingCost(ctx context.Context, vca scalesim.VirtualClusterAccess, w http.ResponseWriter, nodes []corev1.Node) ([]string, error)
ScaleDownOrderedByDescendingCost scales down the nodes in the cluster ordered by descending cost. It does the following
- Order all existing nodes by their cost.
- Iterate over all existing ordered nodes, for each node: 1.1 Taint the node with NoSchedule. 1.2 Get the pods on the node and deploy a copy of the pods with new names in the cluster. 1.3 Check whether there are un-scheduled pods. If len(unscheduledPods) == 0 { then delete the node from virtual cluster and record as recommendation else { mark as essential (not to be removed). Delete the newly deployed pods. Un-taint the node if this node is essential. }
Types ¶
type Recommendation ¶
type Recommendation struct {
// contains filtered or unexported fields
}
type Recommender ¶
type Recommender struct {
// contains filtered or unexported fields
}
func NewRecommender ¶
func NewRecommender(engine scalesim.Engine, scenarioName, podOrder string, shoot *v1beta1.Shoot, instanceTypeCostRatios map[string]float64, strategyWeights StrategyWeights, logWriter http.ResponseWriter) *Recommender
func (*Recommender) Run ¶
func (r *Recommender) Run(ctx context.Context, unscheduledPods []corev1.Pod) ([]Recommendation, error)
type StrategyWeights ¶
Click to show internal directories.
Click to hide internal directories.