Skip to content

Commit fbc212a

Browse files
committed
change name flag from nodeLatencyTrackingEnabled to nodeRemovalLatencyTrackingEnabled
1 parent d02660b commit fbc212a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

cluster-autoscaler/config/autoscaling_options.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,8 @@ type AutoscalingOptions struct {
345345
// NodeDeletionCandidateTTL is the maximum time a node can be marked as removable without being deleted.
346346
// This is used to prevent nodes from being stuck in the removable state during if the CA deployment becomes inactive.
347347
NodeDeletionCandidateTTL time.Duration
348-
// NodeLatencyTrackingEnabled is used to enable/disable node latency tracking.
349-
NodeLatencyTrackingEnabled bool
348+
// NodeRemovalLatencyTrackingEnabled is used to enable/disable node removal latency tracking.
349+
NodeRemovalLatencyTrackingEnabled bool
350350
}
351351

352352
// KubeClientOptions specify options for kube client

cluster-autoscaler/config/flags/flags.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ var (
228228
clusterSnapshotParallelism = flag.Int("cluster-snapshot-parallelism", 16, "Maximum parallelism of cluster snapshot creation.")
229229
checkCapacityProcessorInstance = flag.String("check-capacity-processor-instance", "", "Name of the processor instance. Only ProvisioningRequests that define this name in their parameters with the key \"processorInstance\" will be processed by this CA instance. It only refers to check capacity ProvisioningRequests, but if not empty, best-effort atomic ProvisioningRequests processing is disabled in this instance. Not recommended: Until CA 1.35, ProvisioningRequests with this name as prefix in their class will be also processed.")
230230
nodeDeletionCandidateTTL = flag.Duration("node-deletion-candidate-ttl", time.Duration(0), "Maximum time a node can be marked as removable before the marking becomes stale. This sets the TTL of Cluster-Autoscaler's state if the Cluste-Autoscaler deployment becomes inactive")
231-
nodeLatencyTrackingEnabled = flag.Bool("enable-node-latency-tracking", false, "Whether logic for monitoring of node latency is enabled.")
231+
nodeRemovalLatencyTrackingEnabled = flag.Bool("enable-node-removal-latency-tracking", false, "Whether to track latency from when a node is marked unneeded until it is removed or needed again.")
232232

233233
// Deprecated flags
234234
ignoreTaintsFlag = multiStringFlag("ignore-taint", "Specifies a taint to ignore in node templates when considering to scale a node group (Deprecated, use startup-taints instead)")
@@ -411,7 +411,7 @@ func createAutoscalingOptions() config.AutoscalingOptions {
411411
ProactiveScaleupEnabled: *proactiveScaleupEnabled,
412412
PodInjectionLimit: *podInjectionLimit,
413413
NodeDeletionCandidateTTL: *nodeDeletionCandidateTTL,
414-
NodeLatencyTrackingEnabled: *nodeLatencyTrackingEnabled,
414+
NodeRemovalLatencyTrackingEnabled: *nodeRemovalLatencyTrackingEnabled,
415415
}
416416
}
417417

cluster-autoscaler/core/static_autoscaler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func NewStaticAutoscaler(
177177
// TODO: Populate the ScaleDownActuator/Planner fields in AutoscalingContext
178178
// during the struct creation rather than here.
179179
var nldt *latencytracker.NodeLatencyTracker
180-
if autoscalingContext.AutoscalingOptions.NodeLatencyTrackingEnabled {
180+
if autoscalingContext.AutoscalingOptions.NodeRemovalLatencyTrackingEnabled {
181181
nldt = latencytracker.NewNodeLatencyTracker()
182182
}
183183
scaleDownPlanner := planner.New(autoscalingContext, processors, deleteOptions, drainabilityRules, nldt)

0 commit comments

Comments
 (0)