Skip to content

Commit 448e415

Browse files
authored
specify float outputs insead of int (kedacore#1245)
Signed-off-by: gauron99 <[email protected]>
1 parent bd3da70 commit 448e415

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

content/docs/2.12/concepts/scaling-deployments.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ The annotation `autoscaling.keda.sh/paused` will pause scaling immediately and u
284284
285285
Typically, either one or the other is being used given they serve a different purpose/scenario. However, if both `paused` and `paused-replicas` are set, KEDA will scale your current workload to the number specified count in `paused-replicas` and then pause autoscaling.
286286

287-
To enable/unpause autoscaling again, simply remove all paused annotations from the `ScaledObject` definition.
287+
To enable/unpause autoscaling again, simply remove all paused annotations from the `ScaledObject` definition.
288288

289289

290290
### Scaling Modifiers (Experimental)
@@ -328,7 +328,7 @@ If the calculated value is <=2, the ScaledObject is not `Active` and it'll scale
328328
```yaml
329329
advanced:
330330
scalingModifiers:
331-
formula: "trig_one > 2 ? trig_one + trig_two : 1"
331+
formula: "trig_one > 2 ? trig_one + trig_two : 1.0"
332332
```
333333

334334
If metric value of trigger `trig_one` is more than 2, then return `trig_one` + `trig_two` otherwise return 1.
@@ -338,7 +338,7 @@ If metric value of trigger `trig_one` is more than 2, then return `trig_one` + `
338338
```yaml
339339
advanced:
340340
scalingModifiers:
341-
formula: "count([trig_one,trig_two,trig_three],{#>1}) > 1 ? 5 : 0"
341+
formula: "count([trig_one,trig_two,trig_three],{#>1}) > 1 ? 5.0 : 0.0"
342342
```
343343

344344
If atleast 2 metrics (from the list `trig_one`,`trig_two`,`trig_three`) have value of more than 1, then return 5, otherwise return 0
@@ -348,7 +348,7 @@ If atleast 2 metrics (from the list `trig_one`,`trig_two`,`trig_three`) have val
348348
```yaml
349349
advanced:
350350
scalingModifiers:
351-
formula: "trig_one < 2 ? trig_one+trig_two >= 2 ? 5 : 10 : 0"
351+
formula: "trig_one < 2 ? trig_one+trig_two >= 2 ? 5.0 : 10.0 : 0.0"
352352
```
353353

354354
Conditions can be used within another condition as well.

content/docs/2.13/concepts/scaling-deployments.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ The annotation `autoscaling.keda.sh/paused` will pause scaling immediately and u
284284
285285
Typically, either one or the other is being used given they serve a different purpose/scenario. However, if both `paused` and `paused-replicas` are set, KEDA will scale your current workload to the number specified count in `paused-replicas` and then pause autoscaling.
286286

287-
To enable/unpause autoscaling again, simply remove all paused annotations from the `ScaledObject` definition.
287+
To enable/unpause autoscaling again, simply remove all paused annotations from the `ScaledObject` definition.
288288

289289

290290
### Scaling Modifiers (Experimental)
@@ -328,7 +328,7 @@ If the calculated value is <=2, the ScaledObject is not `Active` and it'll scale
328328
```yaml
329329
advanced:
330330
scalingModifiers:
331-
formula: "trig_one > 2 ? trig_one + trig_two : 1"
331+
formula: "trig_one > 2 ? trig_one + trig_two : 1.0"
332332
```
333333

334334
If metric value of trigger `trig_one` is more than 2, then return `trig_one` + `trig_two` otherwise return 1.
@@ -338,7 +338,7 @@ If metric value of trigger `trig_one` is more than 2, then return `trig_one` + `
338338
```yaml
339339
advanced:
340340
scalingModifiers:
341-
formula: "count([trig_one,trig_two,trig_three],{#>1}) > 1 ? 5 : 0"
341+
formula: "count([trig_one,trig_two,trig_three],{#>1}) > 1 ? 5.0 : 0.0"
342342
```
343343

344344
If atleast 2 metrics (from the list `trig_one`,`trig_two`,`trig_three`) have value of more than 1, then return 5, otherwise return 0
@@ -348,7 +348,7 @@ If atleast 2 metrics (from the list `trig_one`,`trig_two`,`trig_three`) have val
348348
```yaml
349349
advanced:
350350
scalingModifiers:
351-
formula: "trig_one < 2 ? trig_one+trig_two >= 2 ? 5 : 10 : 0"
351+
formula: "trig_one < 2 ? trig_one+trig_two >= 2 ? 5.0 : 10.0 : 0.0"
352352
```
353353

354354
Conditions can be used within another condition as well.

0 commit comments

Comments
 (0)