-
Notifications
You must be signed in to change notification settings - Fork 5
/
scaled-object.yaml
25 lines (25 loc) · 1.09 KB
/
scaled-object.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: kafka-consumer-scaler
namespace: keda-demo
spec:
scaleTargetRef:
apiVersion: apps/v1 # Optional. Default: apps/v1
kind: Deployment # Optional. Default: Deployment
name: kafka-consumer # Mandatory. Must be in the same namespace as the ScaledObject
pollingInterval: 1 # Optional. Default: 30 seconds
cooldownPeriod: 10 # Optional. Default: 300 seconds
idleReplicaCount: 0 # Optional. Must be less than minReplicaCount
minReplicaCount: 1 # Optional. Default: 0
maxReplicaCount: 5 # Optional. Default: 100
triggers:
- type: kafka
metadata:
bootstrapServers: my-cluster-kafka-bootstrap.kafka.svc.cluster.local:9092
consumerGroup: g1
topic: keda-topic
lagThreshold: '1'
offsetResetPolicy: latest
allowIdleConsumers: "false"
version: 1.0.0