WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-17Lines changed: 26 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ The external scaler calls Cosmos DB APIs to estimate the amount of changes pendi
55
55
56
56
Create `ScaledObject` resource that contains the information about your application (the scale target), the external scaler service, Cosmos DB containers, and other scaling configuration values. Check [`ScaledObject` specification](https://keda.sh/docs/concepts/scaling-deployments/) and [`External` trigger specification](https://keda.sh/docs/scalers/external/) for information on different properties supported for`ScaledObject` and their allowed values.
57
57
58
-
You can use file `deploy/deploy-scaledobject.yaml`as a template forcreating the `ScaledObject`. The trigger metadata properties required to use the external scaler for Cosmos DB are describedin [Trigger Specification](#trigger-specification) section below.
58
+
You can use the files in the `deploy` folder as templates forcreating `ScaledObject`s. The trigger metadata properties required to use the external scaler for Cosmos DB are describedin [Trigger Specification](#trigger-specification) section below.
59
59
60
60
>**Note:** If you are having trouble setting up the external scaler or the listener application, the step-by-step instructions for [deploying the sample application](./src/Scaler.Demo/README.md) might help.
61
61
@@ -68,31 +68,40 @@ The specification below describes the `trigger` metadata in `ScaledObject` resou
68
68
- type: external
69
69
metadata:
70
70
scalerAddress: external-scaler-azure-cosmos-db.keda:4050 # Mandatory. Address of the external scaler service.
71
-
connectionFromEnv: <env-variable-for-connection> # Mandatory. Environment variable for the connection string of Cosmos DB account with monitored container.
71
+
72
+
# Database & Container properties
72
73
databaseId: <database-id> # Mandatory. ID of Cosmos DB database containing monitored container.
73
74
containerId: <container-id> # Mandatory. ID of monitored container.
74
-
leaseConnectionFromEnv: <env-variable-for-lease-connection> # Mandatory. Environment variable for the connection string of Cosmos DB account with lease container.
75
75
leaseDatabaseId: <lease-database-id> # Mandatory. ID of Cosmos DB database containing lease container.
76
76
leaseContainerId: <lease-container-id> # Mandatory. ID of lease container.
77
+
78
+
# Connection String properties.
79
+
connectionFromEnv: <env-variable-for-connection> # Optional. Environment variable for the connection string of Cosmos DB account with monitored container.
80
+
leaseConnectionFromEnv: <env-variable-for-lease-connection> # Optional. Environment variable for the connection string of Cosmos DB account with lease container.
81
+
82
+
# Managed Identity properties.
83
+
endpoint: <endpoint> # Optional. Account endpoint of the CosmosDB account containing the monitored container.
84
+
leaseEndpoint: <lease-endpoint> # Optional. Account endpoint of the CosmosDB account containing the lease container.
85
+
clientId: <client-Id> # Optional. Client ID of the identity to be used. If this is not provided, the azure.workload.identity is used.
86
+
77
87
processorName: <processor-name> # Mandatory. Name of change-feed processor used by listener application.
78
88
```
79
89
80
90
### Parameter List
81
91
82
92
- **`scalerAddress`** - Address of the external scaler service. This would be in format `<scaler-name>.<scaler-namespace>:<port>`. If you installed Azure Cosmos DB external scaler Helm chart in`keda` namespace and did not specify custom values, the metadata value would be `external-scaler-azure-cosmos-db.keda:4050`.
83
-
84
-
- **`connectionFromEnv`** - Name of the environment variable on the scale target to read the connection string of the Cosmos DB account that contains the monitored container.
85
-
86
-
- **`databaseId`** - ID of Cosmos DB database that contains the monitored container.
87
-
88
-
- **`containerId`** - ID of the monitored container.
89
-
90
-
- **`leaseConnectionFromEnv`** - Name of the environment variable on the scale target to read the connection string of the Cosmos DB account that contains the lease container. This can be same or different from the value of `connection` metadata.
91
-
92
-
- **`leaseDatabaseId`** - ID of Cosmos DB database that contains the lease container. This can be same or different from the value of `databaseId` metadata.
93
-
94
-
- **`leaseContainerId`** - ID of the lease container containing the change feeds.
95
-
93
+
- **Database & Container Properties:**
94
+
- **`databaseId`** - ID of Cosmos DB database that contains the monitored container.
95
+
- **`containerId`** - ID of the monitored container.
96
+
- **`leaseDatabaseId`** - ID of Cosmos DB database that contains the lease container. This can be same or different from the value of `databaseId` metadata.
97
+
- **`leaseContainerId`** - ID of the lease container containing the change feeds.
98
+
- **Connection String Properties:**
99
+
- **`connectionFromEnv`** - Name of the environment variable on the scale target to read the connection string of the Cosmos DB account that contains the monitored container. You can also opt for an identity-based connection instead, refer to the `endpoint` property.
100
+
- **`leaseConnectionFromEnv`** - Name of the environment variable on the scale target to read the connection string of the Cosmos DB account that contains the lease container. This can be same or different from the value of `connection` metadata. You can also opt for an identity-based connection instead, refer to the `leaseEndpoint` property. If left null, `connection` value of the monitored container is used.
101
+
- **Managed Identity Properties:**
102
+
- **`endpoint`** - Account endpoint of the CosmosDB account containing the monitored container.
103
+
- **`leaseEndpoint`** - Account endpoint of the CosmosDB account containing the lease container. This can be same or different from the value of `endpoint` metadata. If left null, `endpoint` value of the monitored container is used.
104
+
- **`clientId`** - ClientId of the identity to be used. If this is not provided, the azure.workload.identity is used.
96
105
- **`processorName`** - Name of change-feed processor used by listener application. For more information on this, you can refer to [Implementing the change feed processor](https://docs.microsoft.com/azure/cosmos-db/sql/change-feed-processor#implementing-the-change-feed-processor) section.
97
106
98
-
>**Note** Ideally, we would have created `TriggerAuthentication` resource that would have prevented us from adding the connection strings in plain text in the `ScaledObject` trigger metadata. However, this is not possible since at the moment, the triggers of `external`typedo not support referencing a `TriggerAuthentication` resource ([link](https://keda.sh/docs/scalers/external/#authentication-parameters)).
107
+
>**Note** Ideally, we would have created `TriggerAuthentication` resource that would have prevented us from adding the connection strings in plain text in the `ScaledObject` trigger metadata. However, this is not possible since at the moment, the triggers of `external`typedo not support referencing a `TriggerAuthentication` resource ([link](https://keda.sh/docs/scalers/external/#authentication-parameters)).
0 commit comments