Skip to content

Commit

Permalink
Update CREATE-NEW-SCALER.md
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed ElSayed <ahmels@microsoft.com>
  • Loading branch information
ahmelsayed committed Oct 21, 2021
1 parent 62a7efe commit 6f884ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CREATE-NEW-SCALER.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The constructor should have the following parameters:

## Lifecycle of a scaler

The scaler is created and closed everytime KEDA or HPA wants to call `GetMetrics`, and everytime a new ScaledObject is created or updated that has a trigger for that scaler. Thus, a developer of a scaler should not assume that the scaler will maintain any state between these calls.
Scalers are created and cached until the ScaledObject is modified, or `.IsActive()`/`GetMetrics()` result in an error. The cached scaler is then invalidated and a new scaler is created. `Close()` is called on all scalers when disposed.

## Note
The scaler code is embedded into the two separate binaries comprising KEDA, the operator and the custom metrics server component. The metrics server must be occasionally rebuilt published and deployed to k8s for it to have the same code as your operator.
Expand Down

0 comments on commit 6f884ab

Please sign in to comment.