Fix small typos
This commit is contained in:
parent
41c7901647
commit
44195b39a2
|
|
@ -57,10 +57,10 @@ type AutoscalingContext struct {
|
|||
type AutoscalingOptions struct {
|
||||
// MaxEmptyBulkDelete is a number of empty nodes that can be removed at the same time.
|
||||
MaxEmptyBulkDelete int
|
||||
// ScaleDownUtilizationThreshold sets threshould for nodes to be considered for scale down.
|
||||
// ScaleDownUtilizationThreshold sets threshold for nodes to be considered for scale down.
|
||||
// Well-utilized nodes are not touched.
|
||||
ScaleDownUtilizationThreshold float64
|
||||
// ScaleDownUnneededTime sets the duriation CA exepects a node to be unneded/eligible for removal
|
||||
// ScaleDownUnneededTime sets the duration CA expects a node to be unneeded/eligible for removal
|
||||
// before scaling down the node.
|
||||
ScaleDownUnneededTime time.Duration
|
||||
// ScaleDownUnreadyTime represents how long an unready node should be unneeded before it is eligible for scale down
|
||||
|
|
@ -75,7 +75,7 @@ type AutoscalingOptions struct {
|
|||
EstimatorName string
|
||||
// ExpanderName sets the type of node group expander to be used in scale up
|
||||
ExpanderName string
|
||||
// MaxGracefulTerminationSec is maximum number of seconds scale down waits for pods to terminante before
|
||||
// MaxGracefulTerminationSec is maximum number of seconds scale down waits for pods to terminate before
|
||||
// removing the node from cloud provider.
|
||||
MaxGracefulTerminationSec int
|
||||
// Maximum time CA waits for node to be provisioned
|
||||
|
|
@ -103,7 +103,7 @@ type AutoscalingOptions struct {
|
|||
WriteStatusConfigMap bool
|
||||
// BalanceSimilarNodeGroups enables logic that identifies node groups with similar machines and tries to balance node count between them.
|
||||
BalanceSimilarNodeGroups bool
|
||||
// ConfigNamespace is the namesapce cluster-autoscaler is running in and all related configmaps live in
|
||||
// ConfigNamespace is the namespace cluster-autoscaler is running in and all related configmaps live in
|
||||
ConfigNamespace string
|
||||
// ClusterName if available
|
||||
ClusterName string
|
||||
|
|
|
|||
|
|
@ -121,27 +121,27 @@ func (basicEstimator *BasicNodeEstimator) Estimate(node *apiv1.Node, comingNodes
|
|||
resources[apiv1.ResourcePods] = pods
|
||||
}
|
||||
|
||||
if cpuCapcaity, ok := node.Status.Capacity[apiv1.ResourceCPU]; ok {
|
||||
if cpuCapacity, ok := node.Status.Capacity[apiv1.ResourceCPU]; ok {
|
||||
comingCpu := resources[apiv1.ResourceCPU]
|
||||
prop := int(math.Ceil(float64(
|
||||
basicEstimator.cpuSum.MilliValue()-comingCpu.MilliValue()) /
|
||||
float64(cpuCapcaity.MilliValue())))
|
||||
float64(cpuCapacity.MilliValue())))
|
||||
|
||||
buffer.WriteString(fmt.Sprintf("CPU: %d\n", prop))
|
||||
result = maxInt(result, prop)
|
||||
}
|
||||
if memCapcaity, ok := node.Status.Capacity[apiv1.ResourceMemory]; ok {
|
||||
if memCapacity, ok := node.Status.Capacity[apiv1.ResourceMemory]; ok {
|
||||
comingMem := resources[apiv1.ResourceMemory]
|
||||
prop := int(math.Ceil(float64(
|
||||
basicEstimator.memorySum.Value()-comingMem.Value()) /
|
||||
float64(memCapcaity.Value())))
|
||||
float64(memCapacity.Value())))
|
||||
buffer.WriteString(fmt.Sprintf("Mem: %d\n", prop))
|
||||
result = maxInt(result, prop)
|
||||
}
|
||||
if podCapcaity, ok := node.Status.Capacity[apiv1.ResourcePods]; ok {
|
||||
if podCapacity, ok := node.Status.Capacity[apiv1.ResourcePods]; ok {
|
||||
comingPods := resources[apiv1.ResourcePods]
|
||||
prop := int(math.Ceil(float64(basicEstimator.GetCount()-int(comingPods.Value())) /
|
||||
float64(podCapcaity.Value())))
|
||||
float64(podCapacity.Value())))
|
||||
buffer.WriteString(fmt.Sprintf("Pods: %d\n", prop))
|
||||
result = maxInt(result, prop)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue