Skip to content

Commit

Permalink
add examples for Prometheus auth
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-yavorovich committed Jan 26, 2022
1 parent 7e0c7c8 commit e6dca2c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion content/docs/2.6/scalers/predictkube.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ triggers:
### Authentication Parameters

Predictkube Scaler supports one type of authentication - authentication by API key.
Prometheus supports all authentication methods that are available in Prometheus Scaler.

**Auth gateway based authentication:**

Expand All @@ -59,6 +60,8 @@ metadata:
type: Opaque
data:
apiKey: # Required: base64 encoded value of PredictKube apiKey
bearerToken: "BEARER_TOKEN" # Optional: bearer authentication for Prometheus
ca: "CUSTOM_CA_CERT" # Optional: certificate authority file for TLS client authentication for Prometheus
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
Expand All @@ -71,6 +74,14 @@ spec:
- parameter: apiKey
name: predictkube-secrets
key: apiKey
# Optional: might be required if you're using bearer auth for Promethrus
- parameter: bearerToken
name: keda-prom-secret
key: bearerToken
# Optional: might be required if you're using a custom CA for Promethrus
- parameter: ca
name: keda-prom-secret
key: ca
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
Expand All @@ -93,7 +104,8 @@ spec:
prometheusAddress: http://<prometheus-host>:9090
query: sum(rate(http_requests_total{deployment="my-deployment"}[2m])) # Note: query must return a vector/scalar single element response
queryStep: "2m" # Note: query step duration for range prometheus queries
threshold: '100'
threshold: "100"
authModes: "bearer" # might be required if you're using bearer auth for Promethrus
authenticationRef:
name: keda-trigger-auth-predictkube-secret
```

0 comments on commit e6dca2c

Please sign in to comment.