diff --git a/content/docs/2.3/scalers/graphite.md b/content/docs/2.3/scalers/graphite.md index 1e53d597a..0c4a87de8 100644 --- a/content/docs/2.3/scalers/graphite.md +++ b/content/docs/2.3/scalers/graphite.md @@ -30,6 +30,16 @@ triggers: - `threshold` - Value to start scaling for - `queryTime` - Query Time to from Seconds/Minutes +### Authentication Parameters + +Graphite Scaler currently only supports basic authentication. + +You can use `TriggerAuthentication` CRD to configure the authentication.`authModes: "basic"` Specify `authModes` and other trigger parameters along with secret credentials in `TriggerAuthentication` as mentioned below: + +**Basic authentication:** +- `authMode`: It must contain `basic` in case of Basic Authentication. Specify this in trigger configuration. +- `username`: Username to be used for basic authentication. (required) +- `password`: Password to be used for authentication. For convenience, this has been marked optional, because many applications implement basic auth with a username as apikey and password as empty. ### Example @@ -51,3 +61,52 @@ spec: query: stats.counters.http.hello-world.request.count.count queryTime: '-10Minutes' ``` + +Here is an example of scaling with the Graphite scaler with basic authentication by defining the `Secret` and `TriggerAuthentication` as follows: + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: keda-graphite-secret + namespace: default +data: + username: "username" + password: "password" +--- +apiVersion: keda.sh/v1alpha1 +kind: TriggerAuthentication +metadata: + name: keda-graphite-creds + namespace: default +spec: + secretTargetRef: + - parameter: username + name: keda-graphite-secret + key: username + - parameter: password + name: keda-graphite-secret + key: password +--- +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: graphite-scaledobject + namespace: keda + labels: + deploymentName: dummy +spec: + maxReplicaCount: 12 + scaleTargetRef: + name: dummy + triggers: + - type: graphite + metadata: + serverAddress: http://:9090 + metricName: request-count + threshold: '100' + query: stats.counters.http.hello-world.request.count.count + queryTime: '-10Minutes' + authenticationRef: + name: keda-graphite-creds +```