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

Add docs for GCP custom timeHorizon field #1387

Merged
merged 3 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions content/docs/2.15/scalers/gcp-cloud-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ triggers:
metadata:
value: "5" # Optional - Default is 100
activationValue: "10.5" # Optional - Default is 0
filterDuration: '1' # Optional - Default is 2
queueName: "myqueue" # Required
projectID: "myproject" # Required, the project where the queue resides
credentialsFromEnv: GOOGLE_APPLICATION_CREDENTIALS_JSON # Required
Expand All @@ -29,6 +30,7 @@ The `credentialsFromEnv` property maps to the name of an environment variable in
- `activationValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds). (Default: `0`, Optional, This value can be a float)
- `queueName` defines the queue that should be monitored.
- `projectID` defines the GCP project where the queue that should be monitored resides.
- `filterDuration` - Duration (in minutes) for filtering metrics. (Default: `2`)

### Authentication Parameters
You can use `TriggerAuthentication` CRD to configure the authenticate by providing the service account credentials in JSON.
Expand Down
3 changes: 3 additions & 0 deletions content/docs/2.15/scalers/gcp-pub-sub.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ triggers:
aggregation: "sum" # Optional - Only meaningful for distribution-valued metrics
value: "5.5" # Optional - Default is 10
activationValue: "10.5" # Optional - Default is 0
timeHorizon: "1m" # Optional - Default is 2m and with aggregation 5m
# Exactly one of the subscription or topic name options is required
subscriptionName: "mysubscription"
subscriptionNameFromEnv: "MY_SUBSCRIPTION_FROM_ENV"
Expand All @@ -38,6 +39,8 @@ The Google Cloud Platform‎ (GCP) Pub/Sub trigger allows you to scale based on

- `activationValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)

- `timeHorizon` - Time range for which you want to retrieve the matrics. (Default: `2m` and Default with aggregation field: `5m`)

- `subscriptionName` defines the subscription that should be monitored. You can use different formulas:
- Just the subscription name, in which case you will reference a subscription from the current project or the one specified in the credentials file used.
- Use the full link provided by Google, so that you can reference a subscription that is hosted in another project Eg: `projects/myproject/subscriptions/mysubscription`.
Expand Down
2 changes: 2 additions & 0 deletions content/docs/2.15/scalers/gcp-stackdriver.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ triggers:
filter: 'metric.type="storage.googleapis.com/network/received_bytes_count" AND resource.type="gcs_bucket" AND metric.label.method="WriteObject" AND resource.label.bucket_name="my-gcp-bucket"'
targetValue: '100.50'
valueIfNull: '0.0' #Optional - Default is ""
filterDuration: '1' # Optional - Default is 2
activationTargetValue: "10.5" # Optional - Default is 0
credentialsFromEnv: GOOGLE_APPLICATION_CREDENTIALS_JSON
alignmentPeriodSeconds: '60'
Expand All @@ -32,6 +33,7 @@ triggers:
- `targetValue` - Average target value to trigger scaling actions. (Default: `5`, Optional, This value can be a float)
- `activationTargetValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional, This value can be a float)
- `valueIfNull` - Value return if request return no timeseries.(Default: `""`, Optional, This value can be a float)
- `filterDuration` - Duration (in minutes) for filtering metrics. (Default: `2`)

The `credentialsFromEnv` property maps to the name of an environment variable in the scale target (`scaleTargetRef`) that contains the service account credentials (JSON). KEDA will use those to connect to Google Cloud Platform and collect the configured stack driver metrics.

Expand Down