Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Azure Log Analytics scaler documentation #244

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4f6ebc6
[v2] Update scaled job (#220)
TsuyoshiUshio Aug 18, 2020
32af02e
Provide 404 Not Found page (#229)
tomkerkhove Aug 18, 2020
4a54dbd
Provide redirects for dead links (#230)
tomkerkhove Aug 18, 2020
8ee8a7b
Remove localhost that is not used on ScaledJob (#232)
TsuyoshiUshio Aug 19, 2020
bc37b71
modify YAML deploy instructions for v2 (#233)
zroubalik Aug 19, 2020
e81f8b4
specify VERSION with make deploy (#234)
zroubalik Aug 19, 2020
4c45412
Fix links to ScaledObject and ScaledJob api (#236)
zroubalik Aug 24, 2020
f32dd3e
Provide "Give KEDA 2.0 (Beta) a test drive" blog post (#226)
tomkerkhove Aug 25, 2020
67cb894
Add documentation for known GKE issue detailed in issue 515 (#237)
thefirstofthe300 Aug 25, 2020
134d589
Added Azure Log Analytics scaler documentation
spoplavskiy Sep 4, 2020
2ad0d7c
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
31ce036
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
f894f2d
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
4ca142d
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
87c7857
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
a5f817d
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
b0b9129
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
b74ae4b
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
9831164
Changed Authentication section to be more fluent, added query result …
spoplavskiy Sep 4, 2020
5079f52
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 7, 2020
91b97d2
Added Azure Log Analytics scaler in blog post
spoplavskiy Sep 7, 2020
fe481ed
Changed metadata parameters according to changes in a scaler
spoplavskiy Sep 9, 2020
f5a266a
Added 'FromEnv' description
spoplavskiy Sep 10, 2020
ed1ca6e
Changed query parameter to multiline in yaml examples
spoplavskiy Sep 10, 2020
5a8413f
Revert "Add documentation for known GKE issue detailed in issue 515 (…
spoplavskiy Sep 10, 2020
7cdde03
Revert changes, caused by incorrent signoff
spoplavskiy Sep 10, 2020
c4b3308
Revert "Add documentation for known GKE issue detailed in issue 515 (…
spoplavskiy Sep 10, 2020
1bd5fc2
Revert changes, caused by incorrent signoff
spoplavskiy Sep 10, 2020
7af3fa5
Merge branch 'master' of https://github.com/spoplavskiy/keda-docs
spoplavskiy Sep 10, 2020
bcd128a
reverting to commit ed1ca6ec575b25e99a7e29d104a462f169601ce5
spoplavskiy Sep 10, 2020
b4ac2cc
Added Azure Log Analytics scaler documentation
spoplavskiy Sep 4, 2020
64f752d
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
0e4bfc9
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
07b9af8
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
32348cd
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
bd8c905
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
6d51b57
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
4e7a5c4
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
f5bd61b
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 4, 2020
718524b
Changed Authentication section to be more fluent, added query result …
spoplavskiy Sep 4, 2020
013fd80
Update content/docs/2.0/scalers/azure-log-analytics.md
spoplavskiy Sep 7, 2020
de77d84
Added Azure Log Analytics scaler in blog post
spoplavskiy Sep 7, 2020
90fe529
Changed metadata parameters according to changes in a scaler
spoplavskiy Sep 9, 2020
f25937a
Added 'FromEnv' description
spoplavskiy Sep 10, 2020
ab573e0
Changed query parameter to multiline in yaml examples
spoplavskiy Sep 10, 2020
b599bb8
Rebase branch
spoplavskiy Sep 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* /404.html 404
74 changes: 74 additions & 0 deletions content/blog/keda-2.0-beta.md.draft
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
+++
title = "Give KEDA 2.0 (Beta) a test drive"
date = 2021-12-12
author = "KEDA Maintainers"
+++

Today, we are happy to share that our first **beta version of KEDA 2.0 is available**! 🎊

# Highlights

With this release, we are shipping majority of our planned features.

Here are some highlights:

- **Making scaling more powerful**
- Introduction of `ScaledJob` ([docs](https://keda.sh/docs/2.0/concepts/scaling-jobs/))
- Introduction of Azure Log Analytics scaler ([docs](https://keda.sh/docs/2.0/scalers/azure-log-analytics/))
- Support for scaling Deployments, Stateful Sets and/or any Custom Resources ([docs](https://keda.sh/docs/2.0/concepts/scaling-deployments/))
- Support for scaling on standard resource metrics (CPU/Memory)
- Support for multiple triggers in a single `ScaledObject` ([docs](https://keda.sh/docs/2.0/concepts/scaling-deployments/))
- Support for scaling to original replica count after deleting `ScaledObject` ([docs](https://keda.sh/docs/2.0/concepts/scaling-deployments/))
- Support for controling scaling behavior of underlying HPA
- **Easier to operate KEDA**
- Introduction of readiness and liveness probes
- Introduction of Prometheus metrics for Metrics Server ([docs](https://keda.sh/docs/2.0/operate/))
- Provide more information when quering KEDA resources with `kubectl`
- **Extensibility**
- Introduction of External Push scaler ([docs](https://keda.sh/docs/2.0/scalers/external-push/))
- Provide KEDA client-go library

For a full list of changes, we highly recommend going through [our changelog](https://github.com/kedacore/keda/blob/v2/CHANGELOG.md#v200)! With our stable release, we'll provide a full overview of what's released in a new blog post.

# Getting started

Get started now, and install our beta with Helm:

>$ helm install keda kedacore/keda --namespace keda --version 2.0.0-beta

As an alternative, you can use our deployment YAML:

>$ kubectl apply -f https://github.com/kedacore/keda/releases/download/v2.0.0-beta/keda-2.0.0-beta.yaml

# Migrating to KEDA 2.0

We want it to be super simple to use 2.0 as an existing customer! But what has changed?

- API namespace for KEDA Custom Resources Definitions (CRD) has changed from `keda.k8s.io` to `keda.sh`
- Scaling jobs is now done throught `ScaledJob` CRD, instead of `ScaledObject` CRD
- `ScaledObject` is now using `spec.scaleTargetRef.name`, instead of `spec.scaleTargetRef.deploymentName`
- `ScaledObject` no longer requires `deploymentName` label _(last couple of v1 releases were already ignoring it)_

Learn more on how to migrate by using our [migration guide](https://keda.sh/docs/2.0/migration/)!

With our official release we will provide [migration scripts](https://github.com/kedacore/keda/issues/946) allowing you to migrate your KEDA resources automatically.

> **⚠ Running KEDA 1.x & 2.0 Beta side-by-side is not supported.**
>
> KEDA comes with a metrics server and Kubernetes only allows you to run one of them in a cluster.
>
>_Learn more about how KEDA is architected in [our docs](http://keda.sh/docs/latest/concepts/#architecture)._

# Conclusion

We are looking forward to hearing your feedback:

- What do you like and/or what could be improved?
- What issues did you find?
- How can the migration be smoother?

While we are eagerly waiting for feedback, we plan to release KEDA 2.0 stable around early September, 2020!

Thanks for reading, and happy scaling!

KEDA Maintainers.
2 changes: 1 addition & 1 deletion content/docs/2.0/concepts/scaling-deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The only constraint is that the target `Custom Resource` must define `/scale` [s

This specification describes the `ScaledObject` Custom Resource definition which is used to define how KEDA should scale your application and what the triggers are. The `.spec.ScaleTargetRef` section holds the reference to the target resource, ie. `Deployment`, `StatefulSet` or `Custom Resource`.

[`scaledobject_types.go`](https://github.com/kedacore/keda/blob/master/pkg/apis/keda/v1alpha1/scaledobject_types.go)
[`scaledobject_types.go`](https://github.com/kedacore/keda/blob/master/api/v1alpha1/scaledobject_types.go)

```yaml
apiVersion: keda.sh/v1alpha1
Expand Down
98 changes: 95 additions & 3 deletions content/docs/2.0/concepts/scaling-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ For example, if you wanted to use KEDA to run a job for each message that lands
1. When a message arrives on the queue, KEDA creates a job.
1. When the job starts running, it pulls *a single* message and processes it to completion.
1. As additional messages arrive, additional jobs are created. Each job processes a single message to completion.
1. Periodically remove completed/failed job by the `SuccessfulJobsHistoryLimit` and `FailedJobsHistoryLimit.`

## ScaledJob spec

This specification describes the `ScaledJob` custom resource definition which is used to define how KEDA should scale your application and what the triggers are.

[`scaledobject_types.go`](https://github.com/kedacore/keda/blob/master/pkg/apis/keda/v1alpha1/scaledobject_types.go)
[`scaledjob_types.go`](https://github.com/kedacore/keda/blob/master/api/v1alpha1/scaledjob_types.go)

```yaml
apiVersion: keda.sh/v1alpha1
Expand All @@ -35,11 +36,102 @@ spec:
template:
# describes the [job template](https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/)
pollingInterval: 30 # Optional. Default: 30 seconds
cooldownPeriod: 300 # Optional. Default: 300 seconds
minReplicaCount: 0 # Optional. Default: 0
successfulJobsHistoryLimit: 5 # Optional. Default: 100. How many completed jobs should be kept.
failedJobsHistoryLimit: 5 # Optional. Default: 100. How many failed jobs should be kept.
maxReplicaCount: 100 # Optional. Default: 100
triggers:
# {list of triggers to create jobs}
```

You can find all supported triggers [here](../scalers).

## Details

```yaml
jobTargetRef:
parallelism: 1 # Max number of desired instances ([docs](https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#controlling-parallelism))
completions: 1 # Desired number of successfully finished instances ([docs](https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#controlling-parallelism))
activeDeadlineSeconds: 600 # Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer
backoffLimit: 6 # Specifies the number of retries before marking this job failed. Defaults to 6
```

The optional configuration parameter. Currently not implemented. It is going to be supported.

```yaml
pollingInterval: 30 # Optional. Default: 30 seconds
```

This is the interval to check each trigger on. By default, KEDA will check each trigger source on every ScaledJob every 30 seconds.


```yaml
successfulJobsHistoryLimit: 5 # Optional. Default: 100. How many completed jobs should be kept.
failedJobsHistoryLimit: 5 # Optional. Default: 100. How many failed jobs should be kept.
```

The `successfulJobsHistoryLimit` and `failedJobsHistoryLimit` fields are optional. These fields specify how many completed and failed jobs should be kept. By default, they are set to 100.

This concept is similar to [Jobs History Limits](https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#jobs-history-limits) allowing you to learn what the outcome of your jobs are.

The actual number of jobs could exceed the limit in a short time. However, it is going to resolve in the cleanup period. Currently, the cleanup period is the same as the Polling interval.

```yaml
maxReplicaCount: 100 # Optional. Default: 100
```

The max number of pods that is created within a single polling period. If there are running jobs, the number of running jobs will be deducted. This table is an example of the scaling logic.

| Queue Length | Max Replica Count | Target Average Value | Running Job Count | Number of the Scale |
| ------- | ------ | ------- | ------ | ----- |
| 10 | 3 | 1 | 0 | 3 |
| 10 | 3 | 2 | 0 | 3 |
| 10 | 3 | 1 | 1 | 2 |
| 10 | 100 | 1 | 0 | 10 |
| 4 | 3 | 5 | 0 | 1 |

* **Queue Length:** The number of the length of the queue.
* **Target Average Value:** How many pods do they have in a Job.
* **Running Job Count:** How many jobs are running.
* **Number of the Scale:** The number of the job that is created.

# Sample


```yaml
apiVersion: v1
kind: Secret
metadata:
name: rabbitmq-consumer
data:
RabbitMqHost: <omitted>
---
apiVersion: keda.sh/v1alpha1
kind: ScaledJob
metadata:
name: rabbitmq-consumer
namespace: default
spec:
jobTargetRef:
template:
spec:
containers:
- name: rabbitmq-client
image: tsuyoshiushio/rabbitmq-client:dev3
imagePullPolicy: Always
command: ["receive", "amqp://user:PASSWORD@rabbitmq.default.svc.cluster.local:5672", "job"]
envFrom:
- secretRef:
name: rabbitmq-consumer
restartPolicy: Never
backoffLimit: 4
pollingInterval: 10 # Optional. Default: 30 seconds
maxReplicaCount: 30 # Optional. Default: 100
successfulJobsHistoryLimit: 3 # Optional. Default: 100. How many completed jobs should be kept.
failedJobsHistoryLimit: 2 # Optional. Default: 100. How many failed jobs should be kept.
triggers:
- type: rabbitmq
metadata:
queueName: hello
host: RabbitMqHost
queueLength : '5'
```
37 changes: 20 additions & 17 deletions content/docs/2.0/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,39 +85,42 @@ Locate installed KEDA Operator in `keda` namespace, then remove created `KedaCon

If you want to try KEDA on [Minikube](https://minikube.sigs.k8s.io) or a different Kubernetes deployment without using Helm you can still deploy it with `kubectl`.

We provide sample YAML declarations which includes our CRD in the released zip and tar.gz package files which are available on the [GitHub releases](https://github.com/kedacore/keda/releases) page.
Download the zip or tar.gz file, unpack it, enter the unpacked folder and just run the following commands.
- We provide sample YAML declaration which includes our CRDs and all other resources in a file which is available on the [GitHub releases](https://github.com/kedacore/keda/releases) page.
Run the following command (if needed, replace the version, in this case `2.0.0`, with the one you are using):

```sh
kubectl apply -f ./crds
kubectl apply -f ./
kubectl apply -f https://github.com/kedacore/keda/releases/download/v2.0.0/keda-2.0.0.yaml
```

You can also find the same YAML declarations in our `/deploy` directory on our [GitHub repo](https://github.com/kedacore/keda) if you prefer to clone it.
- Alternatively you can download the file and deploy it from the local path:
```sh
kubectl apply -f keda-2.0.0.yaml
```

- You can also find the same YAML declarations in our `/config` directory on our [GitHub repo](https://github.com/kedacore/keda) if you prefer to clone it.

```sh
git clone https://github.com/kedacore/keda && cd keda

kubectl apply -f deploy/crds/keda.sh_scaledobjects_crd.yaml
kubectl apply -f deploy/crds/keda.sh_scaledjobs_crd.yaml
kubectl apply -f deploy/crds/keda.sh_triggerauthentications_crd.yaml
kubectl apply -f deploy/
VERSION=2.0.0 make deploy
```

### Uninstall

You would need to run these commands from within the directory of the cloned [GitHub repo](https://github.com/kedacore/keda):
- In case of installing from released YAML file just run the following command (if needed, replace the version, in this case `2.0.0`, with the one you are using):

```sh
kubectl delete -f https://github.com/kedacore/keda/releases/download/v2.0.0/keda-2.0.0.yaml
```

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

```sh
kubectl delete -f deploy/
kubectl delete -f deploy/crds/keda.sh_scaledobjects_crd.yaml
kubectl delete -f deploy/crds/keda.sh_scaledjobs_crd.yaml
kubectl delete -f deploy/crds/keda.sh_triggerauthentications_crd.yaml
kubectl delete -f keda-2.0.0.yaml
```

In case of installing from released .zip or .tar package, enter the unpacked folder and just run the following commands:
- You would need to run these commands from within the directory of the cloned [GitHub repo](https://github.com/kedacore/keda):

```sh
kubectl delete -f ./
kubectl delete -f ./crds
VERSION=2.0.0 make undeploy
```
Loading