You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cluster-autoscaler/FAQ.md
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -630,9 +630,17 @@ When using this class, Cluster Autoscaler performs following actions:
630
630
Adds a BookingExpired=True condition when the 10-minute reservation period expires.
631
631
632
632
Since Cluster Autoscaler version 1.33, it is possible to configure the autoscaler
633
-
to process only those check capacity ProvisioningRequests, that have a prefix matching the `--check-capacity-provisioning-class-prefix=<prefix>` flag.
634
-
This allows to run two Cluster Autoscalers in the cluster, but instance with the configured prefix
633
+
to process only subset of check capacity ProvisioningRequests and ignore the rest.
634
+
It should be done with caution by specifying `--check-capacity-processor-instance=<name>` flag.
635
+
Then, ProvReq Parameters map should contain a key "processorInstance" with a value equal to the configured instance name.
636
+
637
+
This allows to run two Cluster Autoscalers in the cluster, but the second instance (likely this with configured instance name)
635
638
**should only** handle check capacity ProvisioningRequests and not overlap node groups with the main instance.
639
+
It is responsibility of the user to ensure the capacity checks are not overlapping.
640
+
Best-effort atomic ProvisioningRequests processing is disabled in the instance that has this flag set.
641
+
642
+
For backwards compatibility, it is possible to differentiate the ProvReqs by prefixing provisioningClassName with the instance name,
643
+
but it is **not recommended** and will be removed in CA 1.35.
636
644
637
645
*`best-effort-atomic-scale-up.autoscaling.x-k8s.io` (supported from Cluster Autoscaler version 1.30.2 or later).
638
646
When using this class, Cluster Autoscaler performs following actions:
@@ -978,7 +986,7 @@ The following startup parameters are supported for cluster autoscaler:
978
986
| `bulk-mig-instances-listing-enabled` | Fetch GCE mig instances in bulk instead of per mig | |
979
987
| `bypassed-scheduler-names` | Names of schedulers to bypass. If set to non-empty value, CA will not wait for pods to reach a certain age before triggering a scale-up. | |
980
988
| `check-capacity-batch-processing` | Whether to enable batch processing for check capacity requests. | |
981
-
| `check-capacity-provisioning-class-prefix` | Prefix of provisioningClassName that will be filtered by processors. Only ProvisioningRequests with this prefix in their class will be processed by this CA. It refers only to check capacity ProvisioningRequests. | |
989
+
| `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. | |
982
990
| `check-capacity-provisioning-request-batch-timebox` | Maximum time to process a batch of provisioning requests. | 10s |
983
991
| `check-capacity-provisioning-request-max-batch-size` | Maximum number of provisioning requests to process in a single batch. | 10 |
984
992
| `cloud-config` | The path to the cloud provider configuration file. Empty string for no configuration file. | |
@@ -1022,7 +1030,13 @@ The following startup parameters are supported for cluster autoscaler:
1022
1030
| `kube-client-qps` | QPS value for kubernetes client. | 5 |
1023
1031
| `kubeconfig` | Path to kubeconfig file with authorization and master location information. | |
| `lease-resource-name` | The lease resource to use in leader election. | "cluster-autoscaler" |
1033
+
| `leader-elect` | Start a leader election client and gain leadership before executing the main loop. Enable this when running replicated components for high availability. | true |
1034
+
| `leader-elect-lease-duration` | The duration that non-leader candidates will wait after observing a leadership renewal until attempting to acquire leadership of a led but unrenewed leader slot. This is effectively the maximum duration that a leader can be stopped before it is replaced by another candidate. This is only applicable if leader election is enabled. | 15s |
1035
+
| `leader-elect-renew-deadline` | The interval between attempts by the acting master to renew a leadership slot before it stops leading. This must be less than the lease duration. This is only applicable if leader election is enabled. | 10s |
1036
+
| `leader-elect-resource-lock` | The type of resource object that is used for locking during leader election. Supported options are 'leases'. | "leases" |
1037
+
| `leader-elect-resource-name` | The name of resource object that is used for locking during leader election. | "cluster-autoscaler" |
1038
+
| `leader-elect-resource-namespace` | The namespace of resource object that is used for locking during leader election. | |
1039
+
| `leader-elect-retry-period` | The duration the clients should wait between attempting acquisition and renewal of a leadership. This is only applicable if leader election is enabled. | 2s |
1026
1040
| `log-backtrace-at` | when logging hits line file:N, emit a stack trace | :0 |
1027
1041
| `log-dir` | If non-empty, write log files in this directory (no effect when -logtostderr=true) | |
1028
1042
| `log-file` | If non-empty, use this log file (no effect when -logtostderr=true) | |
Copy file name to clipboardExpand all lines: cluster-autoscaler/config/autoscaling_options.go
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -313,10 +313,11 @@ type AutoscalingOptions struct {
313
313
DynamicResourceAllocationEnabledbool
314
314
// ClusterSnapshotParallelism is the maximum parallelism of cluster snapshot creation.
315
315
ClusterSnapshotParallelismint
316
-
// CheckCapacityProvisioningClassPrefix is the prefix of provisioningClassName that will be filtered by processors.
317
-
// Only ProvisioningRequests with this prefix in their class will be processed by this CA.
318
-
// It only refers to check capacity ProvisioningRequests.
319
-
CheckCapacityProvisioningClassPrefixstring
316
+
// CheckCapacityProcessorInstance is the name of the processor instance.
317
+
// Only ProvisioningRequests that define this name in their parameters with the key "processorInstance" will be processed by this CA instance.
318
+
// It only refers to check capacity ProvisioningRequests, but if not empty, best-effort atomic ProvisioningRequests processing is disabled in this instance.
319
+
// Not recommended: Until CA 1.35, ProvisioningRequests with this name as prefix in their class will be also processed.
320
+
CheckCapacityProcessorInstancestring
320
321
}
321
322
322
323
// KubeClientOptions specify options for kube client
Copy file name to clipboardExpand all lines: cluster-autoscaler/main.go
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -283,7 +283,7 @@ var (
283
283
forceDeleteLongUnregisteredNodes=flag.Bool("force-delete-unregistered-nodes", false, "Whether to enable force deletion of long unregistered nodes, regardless of the min size of the node group the belong to.")
284
284
enableDynamicResourceAllocation=flag.Bool("enable-dynamic-resource-allocation", false, "Whether logic for handling DRA (Dynamic Resource Allocation) objects is enabled.")
285
285
clusterSnapshotParallelism=flag.Int("cluster-snapshot-parallelism", 16, "Maximum parallelism of cluster snapshot creation.")
286
-
checkCapacityProvisioningClassPrefix=flag.String("check-capacity-provisioning-class-prefix", "", "Prefix of provisioningClassName that will be filtered by processors. Only ProvisioningRequests with this prefix in their class will be processed by this CA. It refers only to check capacity ProvisioningRequests.")
286
+
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.")
// GetPodsFromNextRequest picks one ProvisioningRequest meeting the condition passed using isSupportedClass function, marks it as accepted and returns pods from it.
@@ -145,10 +149,6 @@ type ProvisioningRequestWithPods struct {
0 commit comments