diff --git a/content/scalers/apache-kafka-topic.md b/content/scalers/apache-kafka-topic.md new file mode 100644 index 00000000000..5f4c23247ed --- /dev/null +++ b/content/scalers/apache-kafka-topic.md @@ -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 + + + +### 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" +``` \ No newline at end of file diff --git a/content/scalers/aws-cloudwatch.md b/content/scalers/aws-cloudwatch.md new file mode 100644 index 00000000000..b072a0bd32e --- /dev/null +++ b/content/scalers/aws-cloudwatch.md @@ -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 + + + +### 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 +``` \ No newline at end of file diff --git a/content/scalers/aws-sqs.md b/content/scalers/aws-sqs.md new file mode 100644 index 00000000000..db195a9b856 --- /dev/null +++ b/content/scalers/aws-sqs.md @@ -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 + + + +### 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//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//testQueue + awsRegion: "eu-west-1" + awsAccessKeyID: AWS_ACCESS_KEY_ID_ENV_VAR + awsSecretAccessKey: AWS_SECRET_ACCESS_KEY_ENV_VAR + queueLength: "5" +``` \ No newline at end of file diff --git a/content/scalers/azure-event-hub.md b/content/scalers/azure-event-hub.md new file mode 100644 index 00000000000..379f85f65fb --- /dev/null +++ b/content/scalers/azure-event-hub.md @@ -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 + + + +_†: 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. +``` \ No newline at end of file diff --git a/content/scalers/azure-service-bus.md b/content/scalers/azure-service-bus.md index eae24f270d2..db90f839a8b 100644 --- a/content/scalers/azure-service-bus.md +++ b/content/scalers/azure-service-bus.md @@ -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 - \ No newline at end of file + + +### 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 + +``` \ No newline at end of file diff --git a/content/scalers/azure-storage-queue.md b/content/scalers/azure-storage-queue.md new file mode 100644 index 00000000000..1c34b438fa3 --- /dev/null +++ b/content/scalers/azure-storage-queue.md @@ -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 + + + +### 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 +``` \ No newline at end of file diff --git a/content/scalers/external.md b/content/scalers/external.md new file mode 100644 index 00000000000..b3d58b4cbf6 --- /dev/null +++ b/content/scalers/external.md @@ -0,0 +1,54 @@ ++++ +fragment = "content" +weight = 100 +title = "External" +background = "light" ++++ + +Scale applications based on an external scaler. + +**Availability:** v1.0+ | **Maintainer:** Community + + + +### Trigger Specification + +This specification describes the `external` trigger for an external scaler. + +```yaml +triggers: + - type: external + metadata: + scalerAddress: redis-external-scaler-service:8080 + address: REDIS_HOST # Required host:port format + password: REDIS_PASSWORD + listName: mylist # Required + listLength: "5" # Required +``` + +### Authentication Parameters + +Not supported yet. + +### Example + +```yaml +apiVersion: keda.k8s.io/v1alpha1 +kind: ScaledObject +metadata: + name: redis-scaledobject + namespace: keda-redis-test + labels: + deploymentName: keda-redis-node +spec: + scaleTargetRef: + deploymentName: keda-redis-node + triggers: + - type: external + metadata: + scalerAddress: redis-external-scaler-service:8080 + address: REDIS_HOST + password: REDIS_PASSWORD + listName: mylist + listLength: "5" +``` \ No newline at end of file diff --git a/content/scalers/gcp-pub-sub.md b/content/scalers/gcp-pub-sub.md new file mode 100644 index 00000000000..01af66a794e --- /dev/null +++ b/content/scalers/gcp-pub-sub.md @@ -0,0 +1,56 @@ ++++ +fragment = "content" +weight = 100 +title = "Google Cloud Platform‎ Pub/Sub" +background = "light" ++++ + +Scale applications based on Google Cloud Platform‎ Pub/Sub. + +**Availability:** v1.0+ | **Maintainer:** Community + + + +### Trigger Specification + +This specification describes the `gcp-pubsub` trigger for Google Cloud Platform‎ Pub/Sub. + +```yaml +triggers: +- type: gcp-pubsub + metadata: + subscriptionSize: "5" # Optional - Default is 5 + subscriptionName: "mysubscription" # Required + credentials: GOOGLE_APPLICATION_CREDENTIALS_JSON # Required +``` + +The Google Cloud Platform‎ (GCP) Pub/Sub trigger allows you to scale based on the number of messages in your Pub/Sub subscription. + +The `credentials` property maps to the name of an environment variable in the scale target (`scaleTargetRef`) that contains the service account credentials (JSON). KEDA will use those to connect to Google Cloud Platform and collect the required stack driver metrics in order to read the number of messages in the Pub/Sub subscription. + +`subscriptionName` defines the subscription that should be monitored. The `subscriptionSize` determines the target average which the deployment will be scaled on. The default `subscriptionSize` is 5. + +### Authentication Parameters + +Not supported yet. + +### Example + +```yaml +apiVersion: keda.k8s.io/v1alpha1 +kind: ScaledObject +metadata: + name: pubsub-scaledobject + namespace: keda-pubsub-test + labels: + deploymentName: keda-pubsub-go +spec: + scaleTargetRef: + deploymentName: keda-pubsub-go + triggers: + - type: gcp-pubsub + metadata: + subscriptionSize: "5" + subscriptionName: "mysubscription" # Required + credentials: GOOGLE_APPLICATION_CREDENTIALS_JSON # Required +``` \ No newline at end of file diff --git a/content/scalers/liiklus-topic.md b/content/scalers/liiklus-topic.md new file mode 100644 index 00000000000..231a939dd63 --- /dev/null +++ b/content/scalers/liiklus-topic.md @@ -0,0 +1,57 @@ ++++ +fragment = "content" +weight = 100 +title = "Liiklus Topic" +background = "light" ++++ + +Scale applications based on Liiklus Topic. + +**Availability:** v1.0+ | **Maintainer:** Community + + + +### Trigger Specification + +This specification describes the `liiklus` trigger for Liiklus Topic. + +```yaml + triggers: + - type: liiklus + metadata: + # Required + address: localhost:6565 # Address of the gRPC liiklus API endpoint + group: my-group # Make sure that this consumer group name is the same one as the one that is consuming topics + topic: test-topic + # Optional + lagThreshold: "50" # default 10, the target lag for HPA + groupVersion: 1 # default 0, the groupVersion to consider when looking at messages. See https://github.com/bsideup/liiklus/blob/22efb7049ebcdd0dcf6f7f5735cdb5af1ae014de/app/src/test/java/com/github/bsideup/liiklus/GroupVersionTest.java +``` + +### Authentication Parameters + +Not supported yet. + +### Example + +```yaml +apiVersion: keda.k8s.io/v1alpha1 +kind: ScaledObject +metadata: + name: liiklus-scaledobject + namespace: default + labels: + deploymentName: function-deployment +spec: + scaleTargetRef: + deploymentName: function-deployment + pollingInterval: 30 + triggers: + - type: liiklus + metadata: + # Required + address: localhost:6565 + group: 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" +``` \ No newline at end of file diff --git a/content/scalers/nats-streaming.md b/content/scalers/nats-streaming.md new file mode 100644 index 00000000000..b3025349243 --- /dev/null +++ b/content/scalers/nats-streaming.md @@ -0,0 +1,58 @@ ++++ +fragment = "content" +weight = 100 +title = "NATS Streaming" +background = "light" ++++ + +Scale applications based on NATS Streaming. + +**Availability:** v1.0+ | **Maintainer:** Community + + + +### Trigger Specification + +This specification describes the `stan` trigger for NATS Streaming. + +```yaml + triggers: + - type: stan + metadata: + natsServerMonitoringEndpoint: "stan-nats-ss.stan.svc.cluster.local:8222" # Location of the Nats Streaming monitoring endpoint + queueGroup: "grp1" # Queue group name of the subscribers + durableName: "ImDurable" # Must identify the durability name used by the subscribers + subject: "Test" # Name of channel + lagThreshold: "10" # Configures the TargetAverageValue on the Horizontal Pod Autoscaler (HPA)). +``` + +### Authentication Parameters + +Not supported yet. + +### Example + +```yaml +apiVersion: keda.k8s.io/v1alpha1 +kind: ScaledObject +metadata: + name: stan-scaledobject + namespace: gonuts + labels: + deploymentName: gonuts-sub +spec: + pollingInterval: 10 # Optional. Default: 30 seconds + cooldownPeriod: 30 # Optional. Default: 300 seconds + minReplicaCount: 0 # Optional. Default: 0 + maxReplicaCount: 30 # Optional. Default: 100 + scaleTargetRef: + deploymentName: gonuts-sub + triggers: + - type: stan + metadata: + natsServerMonitoringEndpoint: "stan-nats-ss.stan.svc.cluster.local:8222" + queueGroup: "grp1" + durableName: "ImDurable" + subject: "Test" + lagThreshold: "10" +``` \ No newline at end of file diff --git a/content/scalers/prometheus.md b/content/scalers/prometheus.md new file mode 100644 index 00000000000..98b4640e84f --- /dev/null +++ b/content/scalers/prometheus.md @@ -0,0 +1,55 @@ ++++ +fragment = "content" +weight = 100 +title = "Prometheus" +background = "light" ++++ + +Scale applications based on a Prometheus. + +**Availability:** v1.0+ | **Maintainer:** Community + + + +### Trigger Specification + +This specification describes the `prometheus` trigger that scales based on a Prometheus. + +```yaml +triggers: + - type: prometheus + metadata: + # Required + serverAddress: http://:9090 + metricName: http_requests_total + threshold: '100' + query: sum(rate(http_requests_total{deployment="my-deployment"}[2m])) # Note: query must return a vector/scalar single element response +``` + +The `serverAddress` indicates where Prometheus is running which contains the configured metric defined in `metricName` or `query`. + +### Authentication Parameters + +Not supported yet. + +### Example + +```yaml +apiVersion: keda.k8s.io/v1alpha1 +kind: ScaledObject +metadata: + name: prometheus-scaledobject + namespace: default + labels: + deploymentName: my-deployment +spec: + scaleTargetRef: + deploymentName: my-deployment + triggers: + - type: prometheus + metadata: + serverAddress: http://:9090 + metricName: http_requests_total + threshold: '100' + query: sum(rate(http_requests_total{deployment="my-deployment"}[2m])) +``` \ No newline at end of file diff --git a/content/scalers/rabbit-mq-queue.md b/content/scalers/rabbit-mq-queue.md new file mode 100644 index 00000000000..10ccbe50712 --- /dev/null +++ b/content/scalers/rabbit-mq-queue.md @@ -0,0 +1,53 @@ ++++ +fragment = "content" +weight = 100 +title = "Rabbit MQ Queue" +background = "light" ++++ + +Scale applications based on Rabbit MQ Queue. + +**Availability:** v1.0+ | **Maintainer:** Community + + + +### Trigger Specification + +This specification describes the `rabbitmq` trigger for Rabbit MQ Queue. + +```yaml + triggers: + - type: rabbitmq + metadata: + host: RabbitMqHost + queueLength: '20' # Optional. Queue length target for HPA. Default: 20 messages + queueName: testqueue +``` + +The `host` 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. The resolved host should follow a format like `amqp://guest:password@localhost:5672/` + +### Authentication Parameters + +Not supported yet. + +### Example + +```yaml +apiVersion: keda.k8s.io/v1alpha1 +kind: ScaledObject +metadata: + name: rabbitmq-scaledobject + namespace: default + labels: + deploymentName: rabbitmq-deployment +spec: + scaleTargetRef: + deploymentName: rabbitmq-deployment + triggers: + - type: rabbitmq + metadata: + # Required + host: RabbitMqHost # references a value of format amqp://guest:password@localhost:5672/ + queueName: testqueue + queueLength: "20" +``` \ No newline at end of file diff --git a/content/scalers/redis-lists.md b/content/scalers/redis-lists.md new file mode 100644 index 00000000000..cc8f9a05641 --- /dev/null +++ b/content/scalers/redis-lists.md @@ -0,0 +1,58 @@ ++++ +fragment = "content" +weight = 100 +title = "Redis Lists" +background = "light" ++++ + +Scale applications based on Redis Lists. + +**Availability:** v1.0+ | **Maintainer:** Community + + + +### Trigger Specification + +This specification describes the `redis` trigger that scales based on the length of a list in Redis. + +```yaml +triggers: +- type: redis + metadata: + address: REDIS_HOST # Required host:port format + password: REDIS_PASSWORD + listName: mylist # Required + listLength: "5" # Required +``` + +The `address` field in the spec holds the host and port of the redis server. This could be an external redis server or one running in the kubernetes cluster. + +Provide the `password` field if the redis server requires a password. Both the hostname and password fields need to be set to the names of the environment variables in the target deployment that contain the host name and password respectively. + +The `listName` parameter in the spec points to the Redis List that you want to monitor. The `listLength` parameter defines the average target value for the Horizontal Pod Autoscaler (HPA). + +### Authentication Parameters + +Not supported yet. + +### Example + +```yaml +apiVersion: keda.k8s.io/v1alpha1 +kind: ScaledObject +metadata: + name: redis-scaledobject + namespace: keda-redis-test + labels: + deploymentName: keda-redis-node +spec: + scaleTargetRef: + deploymentName: keda-redis-node + triggers: + - type: redis + metadata: + address: REDIS_HOST # Required host:port format + password: REDIS_PASSWORD + listName: mylist # Required + listLength: "5" # Required +``` \ No newline at end of file