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
+24-3Lines changed: 24 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -629,6 +629,19 @@ When using this class, Cluster Autoscaler performs following actions:
629
629
Adds a Provisioned=True condition to the ProvReq if capacity is available.
630
630
Adds a BookingExpired=True condition when the 10-minute reservation period expires.
631
631
632
+
Since Cluster Autoscaler version 1.33, it is possible to configure the autoscaler
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)
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.
644
+
632
645
*`best-effort-atomic-scale-up.autoscaling.x-k8s.io` (supported from Cluster Autoscaler version 1.30.2 or later).
633
646
When using this class, Cluster Autoscaler performs following actions:
634
647
@@ -735,12 +748,12 @@ setting the following flag in your Cluster Autoscaler configuration:
735
748
3. **Batch Size**: Set the maximum number of CheckCapacity ProvisioningRequests
736
749
to process in a single iteration by setting the following flag in your Cluster
737
750
Autoscaler configuration:
738
-
`--max-batch-size=<batch-size>`. The default value is 10.
751
+
`--check-capacity-provisioning-request-max-batch-size=<batch-size>`. The default value is 10.
739
752
740
753
4. **Batch Timebox**: Set the maximum time in seconds that Cluster Autoscaler will
741
754
spend processing CheckCapacity ProvisioningRequests in a single iteration by
742
755
setting the following flag in your Cluster Autoscaler configuration:
743
-
`--batch-timebox=<timebox>`. The default value is 10s.
756
+
`--check-capacity-provisioning-request-batch-timebox=<timebox>`. The default value is 10s.
744
757
745
758
****************
746
759
@@ -973,13 +986,15 @@ The following startup parameters are supported for cluster autoscaler:
973
986
| `bulk-mig-instances-listing-enabled` | Fetch GCE mig instances in bulk instead of per mig | |
974
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. | |
975
988
| `check-capacity-batch-processing` | Whether to enable batch processing for check capacity requests. | |
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. | |
976
990
| `check-capacity-provisioning-request-batch-timebox` | Maximum time to process a batch of provisioning requests. | 10s |
977
991
| `check-capacity-provisioning-request-max-batch-size` | Maximum number of provisioning requests to process in a single batch. | 10 |
978
992
| `cloud-config` | The path to the cloud provider configuration file. Empty string for no configuration file. | |
| `cloud-provider-gce-l7lb-src-cidrs` | CIDRs opened in GCE firewall for L7 LB traffic proxy & health checks | 130.211.0.0/22,35.191.0.0/16 |
981
995
| `cloud-provider-gce-lb-src-cidrs` | CIDRs opened in GCE firewall for L4 LB traffic proxy & health checks | 130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16 |
982
996
| `cluster-name` | Autoscaled cluster name, if available | |
997
+
| `cluster-snapshot-parallelism` | Maximum parallelism of cluster snapshot creation. | 16 |
983
998
| `clusterapi-cloud-config-authoritative` | Treat the cloud-config flag authoritatively (do not fallback to using kubeconfig flag). ClusterAPI only | |
984
999
| `cordon-node-before-terminating` | Should CA cordon nodes before terminating during downscale process | |
985
1000
| `cores-total` | Minimum and maximum number of cores in cluster, in the format <min>:<max>. Cluster autoscaler will not scale the cluster beyond these numbers. | "0:320000" |
@@ -1015,7 +1030,13 @@ The following startup parameters are supported for cluster autoscaler:
1015
1030
| `kube-client-qps` | QPS value for kubernetes client. | 5 |
1016
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 |
1019
1040
| `log-backtrace-at` | when logging hits line file:N, emit a stack trace | :0 |
1020
1041
| `log-dir` | If non-empty, write log files in this directory (no effect when -logtostderr=true) | |
1021
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
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -313,6 +313,11 @@ type AutoscalingOptions struct {
313
313
DynamicResourceAllocationEnabledbool
314
314
// ClusterSnapshotParallelism is the maximum parallelism of cluster snapshot creation.
315
315
ClusterSnapshotParallelismint
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
316
321
}
317
322
318
323
// KubeClientOptions specify options for kube client
Copy file name to clipboardExpand all lines: cluster-autoscaler/main.go
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -283,6 +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
+
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.
0 commit comments