Skip to content

Commit

Permalink
Provide first batch of scaler documentation (kedacore#4)
Browse files Browse the repository at this point in the history
* Provide first batch of scaler documentation

* Add caveat for Azure EH
  • Loading branch information
tomkerkhove authored and jeffhollan committed Nov 13, 2019
1 parent 36b42ae commit e465ff5
Show file tree
Hide file tree
Showing 13 changed files with 742 additions and 2 deletions.
54 changes: 54 additions & 0 deletions content/scalers/apache-kafka-topic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
+++
fragment = "content"
weight = 100
title = "Apache Kafka Topic"
background = "light"
+++

Scale applications based on Apache Kafka Topic.

**Availability:** v1.0+ | **Maintainer:** Community

<!--more-->

### Trigger Specification

This specification describes the `kafka` trigger for Apache Kafka Topic.

```yaml
triggers:
- type: kafka
metadata:
brokerList: kafka.svc:9092
consumerGroup: my-group
topic: test-topic
lagThreshold: '5' # Optional. How much the stream is lagging on the current consumer group
```
### Authentication Parameters
Not supported yet.
### Example
```yaml
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
name: kafka-scaledobject
namespace: default
labels:
deploymentName: azure-functions-deployment
spec:
scaleTargetRef:
deploymentName: azure-functions-deployment
pollingInterval: 30
triggers:
- type: kafka
metadata:
# Required
brokerList: localhost:9092
consumerGroup: my-group # Make sure that this consumer group name is the same one as the one that is consuming topics
topic: test-topic
lagThreshold: "50"
```
68 changes: 68 additions & 0 deletions content/scalers/aws-cloudwatch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
+++
fragment = "content"
weight = 100
title = "AWS Cloudwatch"
background = "light"
+++

Scale applications based on a AWS Cloudwatch.

**Availability:** v1.0+ | **Maintainer:** Community

<!--more-->

### Trigger Specification

This specification describes the `aws-cloudwatch` trigger that scales based on a AWS Cloudatch.

```yaml
triggers:
- type: aws-cloudwatch
metadata:
# Required: namespace
namespace: AWS/SQS
# Required: Dimension Name
dimensionName: QueueName
dimensionValue: keda
metricName: ApproximateNumberOfMessagesVisible
targetMetricValue: "2"
minMetricValue: "0"
# Required: region
awsRegion: "eu-west-1"
# Optional: AWS Access Key ID
awsAccessKeyID: AWS_ACCESS_KEY_ID # default AWS_ACCESS_KEY_ID
# Optional: AWS Secret Access Key
awsSecretAccessKey: AWS_SECRET_ACCESS_KEY # default AWS_SECRET_ACCESS_KEY
```
### Authentication Parameters
Not supported yet.
### Example
```yaml
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
name: aws-cloudwatch-queue-scaledobject
namespace: keda-test
labels:
deploymentName: nginx-deployment
test: nginx-deployment
spec:
scaleTargetRef:
deploymentName: nginx-deployment
triggers:
- type: aws-cloudwatch
metadata:
namespace: AWS/SQS
dimensionName: QueueName
dimensionValue: keda
metricName: ApproximateNumberOfMessagesVisible
targetMetricValue: "2"
minMetricValue: "0"
awsRegion: "eu-west-1"
awsAccessKeyID: AWS_ACCESS_KEY_ID
awsSecretAccessKey: AWS_SECRET_ACCESS_KEY
```
60 changes: 60 additions & 0 deletions content/scalers/aws-sqs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
+++
fragment = "content"
weight = 100
title = "AWS SQS Queue"
background = "light"
+++

Scale applications based on AWS SQS Queue.

**Availability:** v1.0+ | **Maintainer:** Community

<!--more-->

### Trigger Specification

This specification describes the `aws-sqs-queue` trigger for AWS SQS Queue.

```yaml
triggers:
- type: aws-sqs-queue
metadata:
# Required: queueURL
queueURL: https://sqs.eu-west-1.amazonaws.com/<acccount_id>/testQueue
# Optional: region
awsRegion: "eu-west-1"
# Optional: AWS Access Key ID
awsAccessKeyID: AWS_ACCESS_KEY_ID_ENV_VAR # default AWS_ACCESS_KEY_ID
# Optional: AWS Secret Access Key
awsSecretAccessKey: AWS_SECRET_ACCESS_KEY_ENV_VAR # default AWS_SECRET_ACCESS_KEY
# Optional
queueLength: "5" # default 5
```
### Authentication Parameters
Not supported yet.
### Example
```yaml
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
name: aws-sqs-queue-scaledobject
namespace: default
labels:
deploymentName: nginx-deployment
test: nginx-deployment
spec:
scaleTargetRef:
deploymentName: nginx-deployment
triggers:
- type: aws-sqs-queue
metadata:
queueURL: https://sqs.eu-west-1.amazonaws.com/<acccount_id>/testQueue
awsRegion: "eu-west-1"
awsAccessKeyID: AWS_ACCESS_KEY_ID_ENV_VAR
awsSecretAccessKey: AWS_SECRET_ACCESS_KEY_ENV_VAR
queueLength: "5"
```
60 changes: 60 additions & 0 deletions content/scalers/azure-event-hub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
+++
fragment = "content"
weight = 100
title = "Azure Event Hubs"
background = "light"
+++

Scale applications based on Azure Event Hubs†.

**Availability:** v1.0+ | **Maintainer:** Microsoft

<!--more-->

_†: As of now, the Event Hub scaler only supports reading from Blob Storage, as well as scaling only Event Hub applications written in C#, Python or created with Azure Functions._

### Trigger Specification

This specification describes the `azure-eventhub` trigger for Azure Event Hubs.

```yaml
triggers:
- type: azure-eventhub
metadata:
connection: EVENTHUB_CONNECTIONSTRING_ENV_NAME # Connection string for Event Hub namespace
storageConnection: STORAGE_CONNECTIONSTRING_ENV_NAME # Connection string for account used to store checkpoint. As of now the Event Hub scaler only reads from Azure Blob Storage.
consumerGroup: $Default # Optional. Consumer group of event hub consumer. Default: $Default
unprocessedEventThreshold: '64' # Optional. Target number of unprocessed events across all partitions in Event Hub for HPA. Default: 64 events.
```
The `connection` value is the name of the environment variable your deployment uses to get the Event Hub connection string. `storageConnection` is the name of the environment variable your deployment uses to get the Storage connection string.

Environment variables are usually resolved from a `Secret V1` or a `ConfigMap V1` collections. `env` and `envFrom` are both supported.

### Authentication Parameters

Not supported yet.

### Example

```yaml
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
name: azure-eventhub-scaledobject
namespace: default
labels:
deploymentName: azureeventhub-function
spec:
scaleTargetRef:
deploymentName: azureeventhub-function
triggers:
- type: azure-eventhub
metadata:
# Required
connection: EventHub
storageConnection: AzureWebJobsStorage
# Optional
consumerGroup: $Default # default: $Default
unprocessedEventThreshold: '64' # default 64 events.
```
57 changes: 55 additions & 2 deletions content/scalers/azure-service-bus.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,59 @@ background = "light"

Scale applications based on Azure Service Bus Queues or Topics.

**Availability:** v1.0 and above | **Maintainer:** Microsoft
**Availability:** v1.0+ | **Maintainer:** Microsoft

<!--more-->
<!--more-->

### Trigger Specification

This specification describes the `azure-servicebus` trigger for Azure Service Bus Queue or Topic.

```yaml
triggers:
- type: azure-servicebus
metadata:
# Required: queueName OR topicName and subscriptionName
queueName: functions-sbqueue
# or
topicName: functions-sbtopic
subscriptionName: sbtopic-sub1
# Required
connection: SERVICEBUS_CONNECTIONSTRING_ENV_NAME # This must be a connection string for a queue itself, and not a namespace level (e.g. RootAccessPolicy) connection string [#215](https://github.com/kedacore/keda/issues/215)
# Optional
queueLength: "5" # Optional. Subscription length target for HPA. Default: 5 messages
```
The `connection` value is the name of the environment variable your deployment uses to get the connection string. This is usually resolved from a `Secret V1` or a `ConfigMap V1` collections. `env` and `envFrom` are both supported.

### Authentication Parameters

To be documented.

### Example

```yaml
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
name: azure-servicebus-queue-scaledobject
namespace: default
labels:
deploymentName: azure-servicebus-queue-function
spec:
scaleTargetRef:
deploymentName: azure-servicebus-queue-function
triggers:
- type: azure-servicebus
metadata:
# Required: queueName OR topicName and subscriptionName
queueName: functions-sbqueue
# or
topicName: functions-sbtopic
subscriptionName: sbtopic-sub1
# Required
connection: SERVICEBUS_CONNECTIONSTRING_ENV_NAME
# Optional
queueLength: "5" # default 5
```
54 changes: 54 additions & 0 deletions content/scalers/azure-storage-queue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
+++
fragment = "content"
weight = 100
title = "Azure Storage Queue"
background = "light"
+++

Scale applications based on Azure Storage Queues.

**Availability:** v1.0+ | **Maintainer:** Microsoft

<!--more-->

### Trigger Specification

This specification describes the `azure-queue` trigger for Azure Storage Queue.

```yaml
triggers:
- type: azure-queue
metadata:
queueName: functionsqueue
queueLength: '5' # Optional. Queue length target for HPA. Default: 5 messages
connection: STORAGE_CONNECTIONSTRING_ENV_NAME
```
The `connection` value is the name of the environment variable your deployment uses to get the connection string. This is usually resolved from a `Secret V1` or a `ConfigMap V1` collections. `env` and `envFrom` are both supported.

### Authentication Parameters

Not supported yet.

### Example

```yaml
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
name: azure-queue-scaledobject
namespace: default
labels:
deploymentName: azurequeue-function
spec:
scaleTargetRef:
deploymentName: azurequeue-function
triggers:
- type: azure-queue
metadata:
# Required
queueName: functionsqueue
# Optional
connection: STORAGE_CONNECTIONSTRING_ENV_NAME # default AzureWebJobsStorage
queueLength: "5" # default 5
```
Loading

0 comments on commit e465ff5

Please sign in to comment.