Skip to content

Commit d74092f

Browse files
authored
Merge pull request #113175 from lahinson/osdocs-19525-hcp-azure-autoscaling
[OSDOCS-19525]: Autoscaling docs for self-managed hosted clusters on Azure
2 parents ca8a476 + 080fe7b commit d74092f

2 files changed

Lines changed: 73 additions & 5 deletions

File tree

hosted_control_planes/hcp-deploy/hcp-deploy-azure.adoc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,7 @@ include::modules/hcp-azure-private-access.adoc[leveloffset=+2]
9999
100100
include::modules/hcp-azure-private-ts.adoc[leveloffset=+2]
101101

102-
// include::modules/hcp-azure-autoscaling.adoc[leveloffset=+1]
103-
104-
// include::modules/hcp-azure-hc-config-params.adoc[leveloffset=+1]
105-
106-
// include::modules/hcp-azure-nodepool-config-params.adoc[leveloffset=+2]
102+
include::modules/hcp-azure-autoscaling.adoc[leveloffset=+1]
107103

108104
include::modules/hcp-azure-delete.adoc[leveloffset=+1]
109105

modules/hcp-azure-autoscaling.adoc

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
//Module included in the following assemblies:
2+
// hosted_control_planes/hcp-deploy/hcp-deploy-azure.adoc
3+
4+
:_mod-docs-content-type: REFERENCE
5+
[id="hcp-azure-autoscaling_{context}"]
6+
= Example: Autoscaling a hosted cluster on {azure-short}
7+
8+
[role="_abstract"]
9+
To balance node pools on your {azure-short} hosted cluster, you can configure autoscaling for the cluster.
10+
11+
When you scale up `NodePool` objects, the Cluster API Provider for {azure-short} provisions individual {azure-short} virtual machines.
12+
13+
To configure autoscaling for a hosted cluster on {azure-short}, you edit the `spec.autoscaling` parameters in the `HostedCluster` resource. The following example shows a `HostedCluster` resource with 2 {azure-short} node pools.
14+
15+
[NOTE]
16+
====
17+
This example shows only the autoscaling-related fields.
18+
====
19+
20+
[source,yaml]
21+
----
22+
apiVersion: hypershift.openshift.io/v1beta1
23+
kind: HostedCluster
24+
metadata:
25+
name: my-cluster
26+
namespace: my-cluster-namespace
27+
spec:
28+
autoscaling:
29+
scaling: ScaleUpAndScaleDown
30+
maxNodesTotal: 12
31+
expanders:
32+
- Random
33+
scaleDown:
34+
delayAfterAddSeconds: 300
35+
unneededDurationSeconds: 600
36+
utilizationThresholdPercent: 40
37+
balancingIgnoredLabels:
38+
- "custom.label/environment"
39+
maxFreeDifferenceRatioPercent: 70
40+
---
41+
apiVersion: hypershift.openshift.io/v1beta1
42+
kind: NodePool
43+
metadata:
44+
name: my-cluster-nodepool-1
45+
namespace: my-cluster-namespace
46+
spec:
47+
clusterName: my-cluster
48+
autoScaling:
49+
min: 1
50+
max: 6
51+
platform:
52+
azure:
53+
vmSize: Standard_D4s_v3
54+
# ...
55+
---
56+
apiVersion: hypershift.openshift.io/v1beta1
57+
kind: NodePool
58+
metadata:
59+
name: my-cluster-nodepool-2
60+
namespace: my-cluster-namespace
61+
spec:
62+
clusterName: my-cluster
63+
autoScaling:
64+
min: 1
65+
max: 6
66+
platform:
67+
azure:
68+
vmSize: Standard_D4s_v3
69+
# ...
70+
----
71+
72+
* `spec.autoScaling.min` must be greater than or equal to `1`. Scaling from zero (`autoScaling.min: 0`) is not supported on {azure-short}.

0 commit comments

Comments
 (0)