Skip to content

Commit

Permalink
Add reference to the possibility to use the full link in subscription… (
Browse files Browse the repository at this point in the history
kedacore#585)

Signed-off-by: Jose Maria Alvarez <[email protected]>

Co-authored-by: Zbynek Roubalik <[email protected]>
  • Loading branch information
jmalvarezf-lmes and zroubalik authored Nov 23, 2021
1 parent ff4f662 commit cfe42d9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions content/docs/2.5/scalers/gcp-pub-sub.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ The Google Cloud Platform‎ (GCP) Pub/Sub trigger allows you to scale based on
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 required stack driver metrics in order to read the number of messages in the Pub/Sub subscription.

`subscriptionName` defines the subscription that should be monitored. You can use either `subscriptionSize` to define the target average which the deployment will be scaled on or `mode` and `value` fields. `subscriptionSize` field is deprecated, it is recommended to use `mode` and `value` fields instead. Scaler will not work if you define both `subscriptionSize` and at least one of `mode` or `value`.
`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`.

You can use either `subscriptionSize` to define the target average which the deployment will be scaled on or `mode` and `value` fields. `subscriptionSize` field is deprecated, it is recommended to use `mode` and `value` fields instead. Scaler will not work if you define both `subscriptionSize` and at least one of `mode` or `value`.
The mode chooses whether to scale using number of messages `SubscriptionSize` or using oldest unacked message age `OldestUnackedMessageAge`.
The `value` determines the target average which the deployment will be scaled on. The default value is 5 for `SubscriptionSize` and 10 for `OldestUnackedMessageAge`.


Here's an [example](https://github.com/kedacore/sample-go-gcppubsub).

### Authentication Parameters
Expand Down

0 comments on commit cfe42d9

Please sign in to comment.