Created
September 27, 2023 19:14
-
-
Save converge/e0c0b78cd879942c8b26fae026c3b3c4 to your computer and use it in GitHub Desktop.
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
apiVersion: keda.sh/v1alpha1 | |
kind: ScaledObject | |
metadata: | |
name: kafka-scaledobject | |
# namespace: my-events | |
annotations: | |
scaledobject.keda.sh/transfer-hpa-ownership: "true" # Optional. Use to transfer an existing HPA ownership to this ScaledObject | |
# autoscaling.keda.sh/paused-replicas: "0" | |
spec: | |
advanced: # Optional. Section to specify advanced options | |
restoreToOriginalReplicaCount: true | |
horizontalPodAutoscalerConfig: # Optional. Section to specify HPA related options | |
name: event-display-00001 | |
scaleTargetRef: | |
# apiVersion: serving.knative.dev/v1 | |
# kind: Service | |
# name: event-display | |
name: event-display-00001-deployment | |
pollingInterval: 10 | |
minReplicaCount: 1 | |
maxReplicaCount: 50 | |
# triggers: | |
# - type: kafka | |
# metadata: | |
# bootstrapServers: my-cluster-kafka-bootstrap.kafka:9092 # note the kafka namespace | |
# consumerGroup: knative-group # Make sure that this consumer group name is the same one as the one that is consuming topics | |
# topic: knative-demo-topic | |
triggers: | |
- type: kafka | |
metadata: | |
bootstrapServers: my-cluster-kafka-bootstrap.kafka:9092 # note the kafka namespace | |
consumerGroup: knative-group | |
topic: knative-demo-topic | |
# topic: my-topic | |
lagThreshold: '5' | |
offsetResetPolicy: earliest | |
# activationLagThreshold: '3' | |
# allowIdleConsumers: false | |
# scaleToZeroOnInvalidOffset: false | |
# excludePersistentLag: false | |
# version: 1.0.0 | |
# partitionLimitation: '1,2,10-20,31' | |
# tls: enable | |
# sasl: plaintext |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment