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

feat: Introduce activationThreshold/minMetricValue for MongoDB Scaler #826

Merged
merged 1 commit into from
Jul 20, 2022
Merged
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions content/docs/2.8/scalers/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ triggers:
query: '{"region":"eu-1","state":"running","plan":"planA"}'
# Required: according to the number of query result, to scale the TargetRef
queryValue: "1"
# Optional: according to the number of query result, the scaler is active
activationQueryValue: "1"
# Optional: The generated metric name would be mongodb-global-metric. Here mongodb- use as a prefix for metric name
metricName: "global-metric"
```
Expand All @@ -51,6 +53,8 @@ triggers:
query: '{"region":"eu-1","state":"running","plan":"planA"}'
# Required: according to the number of query result, to scale the TargetRef
queryValue: "1"
# Optional: according to the number of query result, the scaler is active
activationQueryValue: "1"
# Optional: The generated metric name would be mongodb-global-metric. Here mongodb- use as a prefix for metric name.
metricName: "global-metric"
```
Expand All @@ -65,6 +69,7 @@ The `mongodb` trigger always requires the following information:
- `collection` - Name of the collection.
- `query` - A MongoDB query that should return single numeric value.
- `queryValue` - A threshold that will define when scaling should occur.
- `activationQueryValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional)

To connect to the MongoDB server, you can provide either:

Expand Down