UNPKG

@kinvolk/headlamp-plugin

Version:

The needed infrastructure for building Headlamp plugins.

56 lines (55 loc) 1.71 kB
apiVersion: keda.sh/v1alpha1 kind: ScaledJob metadata: name: message-consumer-scaledjob namespace: default spec: jobTargetRef: template: spec: containers: - name: message-consumer image: some-registry/keda-message-consumer:latest imagePullPolicy: Always command: - consume env: - name: RABBITMQ_CONNECTION valueFrom: secretKeyRef: name: queue-connection-secrets key: RABBITMQ_CONNECTION_STRING - name: REDIS_CONNECTION valueFrom: secretKeyRef: name: queue-connection-secrets key: REDIS_CONNECTION_STRING args: - '-batch' # Enable batch mode - '-messages=20' # Consume 20 messages per job - '-timeout=120' # 2 minute timeout - '$(RABBITMQ_CONNECTION)' - '$(REDIS_CONNECTION)' restartPolicy: Never activeDeadlineSeconds: 150 pollingInterval: 10 successfulJobsHistoryLimit: 3 failedJobsHistoryLimit: 3 maxReplicaCount: 10 minReplicaCount: 0 triggers: - type: rabbitmq metadata: queueName: hello queueLength: '20' activationQueueLength: '5' # Scale from 0 when 5+ messages authenticationRef: name: rabbitmq-trigger-auth - type: redis metadata: address: redis-master.default.svc.cluster.local:6379 listName: tasks listLength: '20' activationListLength: '5' # Scale from 0 when 5+ messages authenticationRef: name: redis-trigger-auth