Skip to content

Commit d1528f5

Browse files
authored
Add HPA options to async samples (#65)
Signed-off-by: Benjamin Huo <benjamin@kubesphere.io>
1 parent 7826ba2 commit d1528f5

File tree

4 files changed

+42
-6
lines changed

4 files changed

+42
-6
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@
2020

2121
# node dependencies
2222
node_modules/
23-
package-lock.json
23+
package-lock.json
24+
25+
# vscode stuff
26+
functions/knative/hello-world-dotnet/obj/

functions/async/bindings/kafka-input/kafka-input.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,20 @@ spec:
2424
keda:
2525
scaledObject:
2626
pollingInterval: 15
27-
# minReplicaCount: 0
28-
# maxReplicaCount: 10
29-
cooldownPeriod: 45
27+
minReplicaCount: 0
28+
maxReplicaCount: 10
29+
cooldownPeriod: 60
30+
advanced:
31+
horizontalPodAutoscalerConfig:
32+
behavior:
33+
scaleDown:
34+
stabilizationWindowSeconds: 60
35+
policies:
36+
- type: Percent
37+
value: 50
38+
periodSeconds: 15
39+
scaleUp:
40+
stabilizationWindowSeconds: 0
3041
triggers:
3142
- type: kafka
3243
metadata:

functions/async/logs-handler-function/logs-handler-function.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,18 @@ spec:
2626
pollingInterval: 15
2727
minReplicaCount: 0
2828
maxReplicaCount: 10
29-
cooldownPeriod: 45
29+
cooldownPeriod: 60
30+
advanced:
31+
horizontalPodAutoscalerConfig:
32+
behavior:
33+
scaleDown:
34+
stabilizationWindowSeconds: 60
35+
policies:
36+
- type: Percent
37+
value: 50
38+
periodSeconds: 15
39+
scaleUp:
40+
stabilizationWindowSeconds: 0
3041
triggers:
3142
- type: kafka
3243
metadata:

functions/async/pubsub/subscriber/function-subscriber.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,18 @@ spec:
2626
pollingInterval: 15
2727
minReplicaCount: 0
2828
maxReplicaCount: 10
29-
cooldownPeriod: 45
29+
cooldownPeriod: 60
30+
advanced:
31+
horizontalPodAutoscalerConfig:
32+
behavior:
33+
scaleDown:
34+
stabilizationWindowSeconds: 60
35+
policies:
36+
- type: Percent
37+
value: 50
38+
periodSeconds: 15
39+
scaleUp:
40+
stabilizationWindowSeconds: 0
3041
triggers:
3142
- type: kafka
3243
metadata:

0 commit comments

Comments
 (0)