Skip to content

Commit 9ca46cf

Browse files
committed
change name flag from nodeLatencyTrackingEnabled to nodeRemovalLatencyTrackingEnabled
1 parent 16d259d commit 9ca46cf

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

cluster-autoscaler/config/autoscaling_options.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +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-
//CapacitybufferControllerEnabled tells if CA should run default capacity buffer as sub-process or not
349-
CapacitybufferControllerEnabled bool
350-
// CapacitybufferPodInjectionEnabled tells if CA should injects fake pods for capacity buffers that are ready for provisioning
351-
CapacitybufferPodInjectionEnabled bool
352-
// NodeLatencyTrackingEnabled is used to enable/disable node latency tracking.
353-
NodeLatencyTrackingEnabled bool
348+
// NodeRemovalLatencyTrackingEnabled is used to enable/disable node removal latency tracking.
349+
NodeRemovalLatencyTrackingEnabled bool
354350
}
355351

356352
// KubeClientOptions specify options for kube client

cluster-autoscaler/config/flags/flags.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +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-
capacitybufferControllerEnabled = flag.Bool("capacity-buffer-controller-enabled", false, "Whether to enable the default controller for capacity buffers or not")
232-
capacitybufferPodInjectionEnabled = flag.Bool("capacity-buffer-pod-injection-enabled", false, "Whether to enable pod list processor that processes ready capacity buffers and injects fake pods accordingly")
233-
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.")
234232

235233
// Deprecated flags
236234
ignoreTaintsFlag = multiStringFlag("ignore-taint", "Specifies a taint to ignore in node templates when considering to scale a node group (Deprecated, use startup-taints instead)")
@@ -413,9 +411,7 @@ func createAutoscalingOptions() config.AutoscalingOptions {
413411
ProactiveScaleupEnabled: *proactiveScaleupEnabled,
414412
PodInjectionLimit: *podInjectionLimit,
415413
NodeDeletionCandidateTTL: *nodeDeletionCandidateTTL,
416-
CapacitybufferControllerEnabled: *capacitybufferControllerEnabled,
417-
CapacitybufferPodInjectionEnabled: *capacitybufferPodInjectionEnabled,
418-
NodeLatencyTrackingEnabled: *nodeLatencyTrackingEnabled,
414+
NodeRemovalLatencyTrackingEnabled: *nodeRemovalLatencyTrackingEnabled,
419415
}
420416
}
421417

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)