Skip to content

Commit

Permalink
Merge branch 'shubhusion' of https://github.com/shubhusion/keda-docs
Browse files Browse the repository at this point in the history
…into shubhusion
  • Loading branch information
shubhusion committed Aug 5, 2024
2 parents 34b0e4e + 5de1376 commit 965a94e
Show file tree
Hide file tree
Showing 118 changed files with 15,781 additions and 33 deletions.
9 changes: 8 additions & 1 deletion .htmltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ CheckExternal: false
IgnoreAltMissing: true
IgnoreEmptyHref: true
IgnoreInternalURLs:
- /docs/2.14/scalers/splunk/
# Temporal ignores

# Deprecated and removed resources
- /docs/2.15/authentication-providers/azure-ad-pod-identity/
- /docs/2.15/authentication-providers/aws-kiam/
# Renamed pages
- /docs/2.15/operate/events/
- /docs/2.15/faq/
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ alpine_js_version = "2.2.1"
favicon = "favicon.png"

[params.versions]
docs = ["2.14", "2.13", "2.12", "2.11", "2.10", "2.9", "2.8", "2.7", "2.6", "2.5", "2.4", "2.3", "2.2", "2.1", "2.0", "1.5", "1.4"]
docs = ["2.15", "2.14", "2.13", "2.12", "2.11", "2.10", "2.9", "2.8", "2.7", "2.6", "2.5", "2.4", "2.3", "2.2", "2.1", "2.0", "1.5", "1.4"]

# Site fonts. For more options see https://fonts.google.com.
[[params.fonts]]
Expand Down
2 changes: 1 addition & 1 deletion content/docs/2.12/scalers/aws-sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ triggers:
> For the purposes of scaling, the default formula for "actual messages" is equal to `ApproximateNumberOfMessages` + `ApproximateNumberOfMessagesNotVisible`, since `NotVisible` in SQS terms means the message is still in-flight/processing. If you wish to only scale on `ApproximateNumberOfMessages` set `scaleOnInFlight` to `false`. You can also include the number of delayed messages when calculating "actual messages" by setting `scaleOnDelayed` to `true`. With `scaleOnInFlight` and `scaleOnDelayed` set to `true` the formula for "actual messages" is equal to `ApproximateNumberOfMessages` + `ApproximateNumberOfMessagesNotVisible` + `ApproximateNumberOfMessagesDelayed`.

- `scaleOnInFlight` - Indication of whether or not to include in-flight messages when calculating the number of SQS messages. (default: true, Optional)
- `scaleOfDelayed` - Indication of whether or not to include delayed messages when calculating the number of SQS messages. (default: false, Optional)
- `scaleOnDelayed` - Indication of whether or not to include delayed messages when calculating the number of SQS messages. (default: false, Optional)
- `awsRegion` - AWS Region for the SQS Queue.
- `awsEndpoint` - Endpoint URL to override the default AWS endpoint. (Default: `""`, Optional)
- `identityOwner` - Receive permissions on the SQS Queue via Pod Identity or from the KEDA operator itself (see below). (Values: `pod`, `operator`, Default: `pod`, Optional)
Expand Down
2 changes: 1 addition & 1 deletion content/docs/2.13/scalers/aws-sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ triggers:
> For the purposes of scaling, the default formula for "actual messages" is equal to `ApproximateNumberOfMessages` + `ApproximateNumberOfMessagesNotVisible`, since `NotVisible` in SQS terms means the message is still in-flight/processing. If you wish to only scale on `ApproximateNumberOfMessages` set `scaleOnInFlight` to `false`. You can also include the number of delayed messages when calculating "actual messages" by setting `scaleOnDelayed` to `true`. With `scaleOnInFlight` and `scaleOnDelayed` set to `true` the formula for "actual messages" is equal to `ApproximateNumberOfMessages` + `ApproximateNumberOfMessagesNotVisible` + `ApproximateNumberOfMessagesDelayed`.

- `scaleOnInFlight` - Indication of whether or not to include in-flight messages when calculating the number of SQS messages. (default: true, Optional)
- `scaleOfDelayed` - Indication of whether or not to include delayed messages when calculating the number of SQS messages. (default: false, Optional)
- `scaleOnDelayed` - Indication of whether or not to include delayed messages when calculating the number of SQS messages. (default: false, Optional)
- `awsRegion` - AWS Region for the SQS Queue.
- `awsEndpoint` - Endpoint URL to override the default AWS endpoint. (Default: `""`, Optional)
- `identityOwner` - Receive permissions on the SQS Queue via Pod Identity or from the KEDA operator itself (see below). (DEPRECATED: This parameter is deprecated as of KEDA v2.13 and will be removed in version `3`, Values: `pod`, `operator`, Default: `pod`, Optional, This field only applies for `aws-eks` and `aws-kiam` authentications)
Expand Down
24 changes: 12 additions & 12 deletions content/docs/2.14/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,21 @@ If you want to try KEDA on [Minikube](https://minikube.sigs.k8s.io) or a differe
- Use `keda-2.xx.x.yaml` that includes all features, including [admission webhooks](./concepts/admission-webhooks.md) (recommended)
- Use `keda-2.xx.x-core.yaml` that installs the minimal required KEDA components, without admission webhooks

Run the following command (if needed, replace the version, in this case `2.14.0`, with the one you are using):
Run the following command (if needed, replace the version, in this case `2.14.1`, with the one you are using):

```sh
# Including admission webhooks
kubectl apply --server-side -f https://github.com/kedacore/keda/releases/download/v2.14.0/keda-2.14.0.yaml
kubectl apply --server-side -f https://github.com/kedacore/keda/releases/download/v2.14.1/keda-2.14.1.yaml
# Without admission webhooks
kubectl apply --server-side -f https://github.com/kedacore/keda/releases/download/v2.14.0/keda-2.14.0-core.yaml
kubectl apply --server-side -f https://github.com/kedacore/keda/releases/download/v2.14.1/keda-2.14.1-core.yaml
```

- Alternatively you can download the file and deploy it from the local path:
```sh
# Including admission webhooks
kubectl apply --server-side -f keda-2.14.0.yaml
kubectl apply --server-side -f keda-2.14.1.yaml
# Without admission webhooks
kubectl apply --server-side -f keda-2.14.0-core.yaml
kubectl apply --server-side -f keda-2.14.1-core.yaml
```

> 💡 **NOTE:** `--server-side` option is needed because the ScaledJob CRD is too long to process, see [this issue](https://github.com/kedacore/keda/issues/4740) for details.
Expand All @@ -114,33 +114,33 @@ kubectl apply --server-side -f keda-2.14.0-core.yaml
```sh
git clone https://github.com/kedacore/keda && cd keda
VERSION=2.14.0 make deploy
VERSION=2.14.1 make deploy
```

### Uninstall

- In case of installing from released YAML file just run the following command (if needed, replace the version, in this case `2.14.0`, with the one you are using):
- In case of installing from released YAML file just run the following command (if needed, replace the version, in this case `2.14.1`, with the one you are using):

```sh
# Including admission webhooks
kubectl delete -f https://github.com/kedacore/keda/releases/download/v2.14.0/keda-2.14.0.yaml
kubectl delete -f https://github.com/kedacore/keda/releases/download/v2.14.1/keda-2.14.1.yaml
# Without admission webhooks
kubectl delete -f https://github.com/kedacore/keda/releases/download/v2.14.0/keda-2.14.0-core.yaml
kubectl delete -f https://github.com/kedacore/keda/releases/download/v2.14.1/keda-2.14.1-core.yaml
```

- If you have downloaded the file locally, you can run:

```sh
# Including admission webhooks
kubectl delete -f keda-2.14.0.yaml
kubectl delete -f keda-2.14.1.yaml
# Without admission webhooks
kubectl delete -f keda-2.14.0-core.yaml
kubectl delete -f keda-2.14.1-core.yaml
```

- You would need to run these commands from within the directory of the cloned [GitHub repo](https://github.com/kedacore/keda):

```sh
VERSION=2.14.0 make undeploy
VERSION=2.14.1 make undeploy
```

## Deploying KEDA on MicroK8s {#microk8s}
Expand Down
6 changes: 3 additions & 3 deletions content/docs/2.14/operate/setupscaler.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Setupscaler"
title = "Setup Autoscaling with KEDA"
weight = 500
description = "Procedure to Setup a Scaler in KEDA"
description = "Procedure to Setup a Autoscaling with KEDA"
+++

## Prerequisites
Expand All @@ -26,7 +26,7 @@ KEDA supports various scalers that correspond to different event sources or trig

1. Visit the [KEDA Scalers documentation](https://keda.sh/docs/2.14/scalers/) and browse through the list of available scalers.
2. Identify the scaler that matches the event source you want to use for scaling your application. For example:
- If you want to scale based on incoming HTTP traffic, you would need the **HTTP Add-on**.
- If you want to scale based on incoming HTTP traffic, you would need the [HTTP Add-on](https://kedacore.github.io/http-add-on/).

> **Note:**
> The HTTP Add-on is still in beta stage and may not provide the full functionality or stability expected in a production environment.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/2.14/scalers/aws-sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ triggers:
> For the purposes of scaling, the default formula for "actual messages" is equal to `ApproximateNumberOfMessages` + `ApproximateNumberOfMessagesNotVisible`, since `NotVisible` in SQS terms means the message is still in-flight/processing. If you wish to only scale on `ApproximateNumberOfMessages` set `scaleOnInFlight` to `false`. You can also include the number of delayed messages when calculating "actual messages" by setting `scaleOnDelayed` to `true`. With `scaleOnInFlight` and `scaleOnDelayed` set to `true` the formula for "actual messages" is equal to `ApproximateNumberOfMessages` + `ApproximateNumberOfMessagesNotVisible` + `ApproximateNumberOfMessagesDelayed`.

- `scaleOnInFlight` - Indication of whether or not to include in-flight messages when calculating the number of SQS messages. (default: true, Optional)
- `scaleOfDelayed` - Indication of whether or not to include delayed messages when calculating the number of SQS messages. (default: false, Optional)
- `scaleOnDelayed` - Indication of whether or not to include delayed messages when calculating the number of SQS messages. (default: false, Optional)
- `awsRegion` - AWS Region for the SQS Queue.
- `awsEndpoint` - Endpoint URL to override the default AWS endpoint. (Default: `""`, Optional)
- `identityOwner` - Receive permissions on the SQS Queue via Pod Identity or from the KEDA operator itself (see below). (DEPRECATED: This parameter is deprecated as of KEDA v2.13 and will be removed in version `3`, Values: `pod`, `operator`, Default: `pod`, Optional, This field only applies for `aws-eks` and `aws-kiam` authentications)
Expand Down
5 changes: 1 addition & 4 deletions content/docs/2.15/operate/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ To modify this properties you can set environment variables on both KEDA Operato

## Configure Leader Election

Like reconciliation, KEDA also uses the [controller-runtime project](https://github.com/kubernetes-sigs/controller-runtime) for electing the leader replica. The following properties can be configured for either the Operator and Metrics Server Deployment:
Like reconciliation, KEDA Operator also uses the [controller-runtime project](https://github.com/kubernetes-sigs/controller-runtime) for electing the leader replica. The following properties can be configured for the Operator Deployment:

- [`LeaseDuration`](https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/manager#Options.LeaseDuration)
- [`RenewDeadline`](https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/manager#Options.RenewDeadline)
Expand All @@ -171,9 +171,6 @@ To specify values other than their defaults, you can set the following environme
| KEDA_OPERATOR_LEADER_ELECTION_LEASE_DURATION | Operator | 15s | LeaseDuration |
| KEDA_OPERATOR_LEADER_ELECTION_RENEW_DEADLINE | Operator | 10s | RenewDeadline |
| KEDA_OPERATOR_LEADER_ELECTION_RETRY_PERIOD | Operator | 2s | RetryPeriod |
| KEDA_METRICS_LEADER_ELECTION_LEASE_DURATION | Metrics Server | 15s | LeaseDuration |
| KEDA_METRICS_LEADER_ELECTION_RENEW_DEADLINE | Metrics Server | 10s | RenewDeadline |
| KEDA_METRICS_LEADER_ELECTION_RETRY_PERIOD | Metrics Server | 2s | RetryPeriod |

## Restrict the Namespaces KEDA is Watching

Expand Down
2 changes: 1 addition & 1 deletion content/docs/2.15/scalers/aws-sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ triggers:
> For the purposes of scaling, the default formula for "actual messages" is equal to `ApproximateNumberOfMessages` + `ApproximateNumberOfMessagesNotVisible`, since `NotVisible` in SQS terms means the message is still in-flight/processing. If you wish to only scale on `ApproximateNumberOfMessages` set `scaleOnInFlight` to `false`. You can also include the number of delayed messages when calculating "actual messages" by setting `scaleOnDelayed` to `true`. With `scaleOnInFlight` and `scaleOnDelayed` set to `true` the formula for "actual messages" is equal to `ApproximateNumberOfMessages` + `ApproximateNumberOfMessagesNotVisible` + `ApproximateNumberOfMessagesDelayed`.

- `scaleOnInFlight` - Indication of whether or not to include in-flight messages when calculating the number of SQS messages. (default: true, Optional)
- `scaleOfDelayed` - Indication of whether or not to include delayed messages when calculating the number of SQS messages. (default: false, Optional)
- `scaleOnDelayed` - Indication of whether or not to include delayed messages when calculating the number of SQS messages. (default: false, Optional)
- `awsRegion` - AWS Region for the SQS Queue.
- `awsEndpoint` - Endpoint URL to override the default AWS endpoint. (Default: `""`, Optional)
- `identityOwner` - Receive permissions on the SQS Queue via Pod Identity or from the KEDA operator itself (see below). (DEPRECATED: This parameter is deprecated as of KEDA v2.13 and will be removed in version `3`, Values: `pod`, `operator`, Default: `pod`, Optional, This field only applies for `aws-eks` authentication)
Expand Down
8 changes: 2 additions & 6 deletions content/docs/2.15/scalers/azure-event-hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ triggers:
endpointSuffix: servicebus.airgap.example
# Required when cloud = Private
storageEndpointSuffix: airgap.example
# Required when cloud = Private.
activeDirectoryEndpoint: https://login.airgap.example/
# Required when cloud = Private.
eventHubResourceURL: https://eventhubs.airgap.example/
# Required when using pod identity authentication with blob storage
storageAccountName: 'name_of_account'
```
Expand Down Expand Up @@ -59,8 +55,8 @@ triggers:
- `cloud` - Name of the cloud environment that the Event Hub belongs to. (Values: `AzurePublicCloud`, `AzureUSGovernmentCloud`, `AzureChinaCloud`, `AzureGermanCloud`, `Private`, Default: `AzurePublicCloud`, Optional)
- `endpointSuffix` - Service Bus endpoint suffix of the cloud environment. (Required when `cloud` is set to `Private`, e.g. `servicebus.cloudapi.de` for `AzureGermanCloud`).
- `storageEndpointSuffix` - Blob Storage endpoint of the cloud environment. (Required when `cloud` is set to `Private`, e.g. `airgap.example`. Do not include the `blob` part of the endpoint.)
- `activeDirectoryEndpoint` - Active Directory endpoint of the cloud environment. (Required when `cloud` is set to `Private`, e.g. `https://login.microsoftonline.de/` for `AzureGermanCloud`).
- `eventHubResourceURL` - Event Hub resource URL of the cloud environment. (Required when `cloud` is set to `Private`, e.g. `https://eventhubs.azure.net/` for known Azure Clouds).

> When using [pod identity](../authentication-providers/azure-ad-workload-identity.md), Microsoft Entra ID endpoint is recovered via `AZURE_AUTHORITY_HOST` env var provided by https://azure.github.io/azure-workload-identity/docs/installation/mutating-admission-webhook.html

> 💡 Learn more about the checkpointing behaviour in this [section](#checkpointing-behaviour).

Expand Down
93 changes: 93 additions & 0 deletions content/docs/2.15/scalers/dynatrace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
+++
title = "Dynatrace"
availability = "2.15+"
maintainer = "Community"
category = "Metrics"
description = "Scale applications based on Dynatrace metric data points"
go_file = "dynatrace_scaler"
+++

### Trigger Specification

This specification describes the `dynatrace` trigger that scales based on Dynatrace metric data points.

```yaml
triggers:
- type: dynatrace
metadata:
host: https://dummy-instance.live.dynatrace.com/
metricSelector: 'MyCustomEvent:filter(eq("someProperty","someValue")):count:splitBy("dt.entity.process_group"):fold'
# Optional
from: now-2d
threshold: "10"
# Optional
activationThreshold: "5"
```
**Parameter list:**
- `host` - The Dynatrace instance to query against
- `metricSelector` - The metric selector query and any transformations that should be applied to it ([transformations docs](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/metric-selector)).

Some relevant aspects:
- The selector should focus on a **single metric and dimension**: if multiple are found, a warning is issued and only the first one is considered
- The metric data points should be aggregated to produce a single output value (e.g., using the [fold transformation](https://docs.dynatrace.com/docs/shortlink/api-metrics-v2-selector#fold)): if multiple values are found, only the first one is considered
- If you need to use the entity selector, do it through the `:filter` transformation in the metric selector
- `from` - How far back the metric selector should consider when fetching data points. [syntax supported](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/metric-v2/get-data-points#parameters). (Optional, default `now-2h`, i.e., the last 2 hours)
- `threshold` - A threshold that is used as the `targetValue` or `targetAverageValue` (depending on the trigger metric type) in the HPA configuration. (This value can be a float)
- `activationThreshold` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds). (Optional, default `0`, can be a float)

### Authentication Parameters

You can use `TriggerAuthentication` CRD to configure authentication the `host` and `token` parameters.

**Authentication:**

- `host` - The Dynatrace instance to query against
- `token` - The API key that will be leveraged to connect to Dynatrace and make requests ([official documentation](https://docs.dynatrace.com/docs/dynatrace-api/basics/dynatrace-api-authentication)). Requires the `metrics.read` scope

### Example

```yaml
apiVersion: v1
kind: Secret
metadata:
name: dynatrace-secret
namespace: my-project
type: Opaque
data:
host: aHR0cHM6Ly9kdW1teS1pbnN0YW5jZS5saXZlLmR5bmF0cmFjZS5jb20vCg== # base64 encoding of https://dummy-instance.live.dynatrace.com/
token: ZHQwczAxLlNUMkVZNzJLUUlOTUg1NzRXTU5WSTdZTi5HM0RGUEJFSllNT0RJREFFWDQ1NE03WVdCVVZFRk9XS1BSVk1XRkFTUzY0TkZINTJQWDZCTkRWRkZNNTcyUlpNCg== # base64 encoding of the dynatrace example api key dt0s01.ST2EY72KQINMH574WMNVI7YN.G3DFPBEJYMODIDAEX454M7YWBUVEFOWKPRVMWFASS64NFH52PX6BNDVFFM572RZM
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth-dynatrace
namespace: my-project
spec:
secretTargetRef:
- parameter: token
name: dynatrace-secret
key: token
- parameter: host
name: dynatrace-secret
key: host
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: dynatrace-scaledobject
namespace: keda
spec:
maxReplicaCount: 12
scaleTargetRef:
name: dummy
triggers:
- type: dynatrace
metadata:
metricSelector: 'MyCustomEvent:filter(eq("someProperty","someValue")):count:splitBy("dt.entity.process_group"):fold'
from: 'now-30m'
threshold: '1000'
authenticationRef:
name: keda-trigger-auth-dynatrace
```
Loading

0 comments on commit 965a94e

Please sign in to comment.