This is a KEDA external scaler to scale to a constant number of replicas.
But.. why? Indeed, a scaler that does not automatically scale is not very useful. This repository acts as an example on how to build external scalers before going to more complex ones.
If you want to build the container image, you can use the
Look at the Makefile for details.
First, create the namespace
kubectl create namespace keda-constant-scaler
Then, we deploy the keda-constant-scaler using
git clone https://git.sr.ht/~tomleb/keda-constant-scaler cd keda-constant-scaler/ kustomize build deployment/ | oc apply -n keda-constant-scaler -f -
You can find an example in the examples directory.
keda-constant-scaler is deploy, you can run the example with the
kubectl create namespace example kustomize build examples/ | oc apply -n example -f -
You should then see 3 replicas running after a few seconds.