forked from infinispan/infinispan-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for defining HorizontalPodAutoscaler infinispan#2133
- Loading branch information
1 parent
32d71f3
commit 09a4b50
Showing
5 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
ifdef::context[:parent-context: {context}] | ||
[id='auto-scaling'] | ||
:context: scaling | ||
= Auto Scaling | ||
|
||
[role="_abstract"] | ||
Kubernetes includes the `HorizontalPodAutoscaler` which allows StatefulSets or Deployments to be automatically scaled up or | ||
down based upon specified metrics. The Infinispan CR exposes the `.status.scale` sub-resource, which enables `HorizontalPodAutoscaler` | ||
resources to target the Infinispan CR. | ||
|
||
Before defining a `HorizontalPodAutoscaler` configuration, consider the types of {brandname} caches that you define. Distributed | ||
and Replicated caches have very different scaling requirement, so defining a `HorizontalPodAutoscaler` for server's running | ||
a combination of these cache types may not be advantageous. For example, defining a `HorizontalPodAutoscaler` that scales | ||
when memory usage reaches a certain percentage will allow overall cache capacity to be increased when defining Distributed | ||
caches as cache entries are spread across pods, however it will not work with replicated cache as every pod hosts all cache | ||
entries. Conversely, configuring a `HorizontalPodAutoscaler` based upon CPU usage will be more beneficial for clusters | ||
with replicated cache as every pod contains all cache entries and so distributing read requests across additional nodes | ||
will allow a greater number of requests to be processed simultaneously. | ||
|
||
include::{topics}/proc_configuring_auto_scaling.adoc[leveloffset=+1] | ||
|
||
IMPORTANT: HorizontalPodAutoscaler should be removed when upgrading a {brandname} cluster, as the automatic scaling will | ||
cause the upgrade process to enter unexpected state, as the Operator needs to scale the cluster down to 0 pods. | ||
|
||
// Restore the parent context. | ||
ifdef::parent-context[:context: {parent-context}] | ||
ifndef::parent-context[:!context:] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
documentation/asciidoc/topics/proc_configuring_auto_scaling.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[id='configuring_auto-scaling-{context}'] | ||
= Configuring HorizontalPodAutoscaler | ||
|
||
[role="_abstract"] | ||
Create a HorizontalPodAutoScaler resource that targets your Infinispan CR. | ||
|
||
.Procedure | ||
|
||
. Define a `HorizontalPodAutoscaler` resource in the same namespace as your `Infinispan` CR | ||
+ | ||
[source,options="nowrap",subs=attributes+] | ||
---- | ||
include::yaml/horizontal_pod_autoscaler.yaml[] | ||
---- | ||
+ | ||
<1> The name of your `Infinispan` CR |
17 changes: 17 additions & 0 deletions
17
documentation/asciidoc/topics/supported_operands/2_4_5.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
14.0.1 | ||
14.0.6 | ||
14.0.9 | ||
14.0.13 | ||
14.0.17 | ||
14.0.19 | ||
14.0.20 | ||
14.0.21 | ||
14.0.24 | ||
14.0.27 | ||
14.0.32 | ||
15.0.0 | ||
15.0.3 | ||
15.0.4 | ||
15.0.5 | ||
15.0.8 | ||
16.0.1 |
18 changes: 18 additions & 0 deletions
18
documentation/asciidoc/topics/yaml/horizontal_pod_autoscaler.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: infinispan-auto | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Infinispan | ||
name: example # <1> | ||
minReplicas: 1 | ||
maxReplicas: 10 | ||
metrics: | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: 50 |