From 5c556dc76a575742977b4bbe3122ef8f1550ae80 Mon Sep 17 00:00:00 2001 From: Mark Rzasa Date: Sun, 23 Jan 2022 15:34:43 -0500 Subject: [PATCH 1/8] doc for app insights scaler Signed-off-by: Mark Rzasa --- .../docs/2.6/scalers/azure-app-insights.md | 120 ++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 content/docs/2.6/scalers/azure-app-insights.md diff --git a/content/docs/2.6/scalers/azure-app-insights.md b/content/docs/2.6/scalers/azure-app-insights.md new file mode 100644 index 000000000..59c623098 --- /dev/null +++ b/content/docs/2.6/scalers/azure-app-insights.md @@ -0,0 +1,120 @@ ++++ +title = "Azure Application Insights" +layout = "scaler" +availability = "v1.3+" +maintainer = "Community" +description = "Scale applications based on Azure Application Insights metrics." +go_file = "azure_app_insights_scaler" ++++ + +### Trigger Specification + +This specification describes the `azure-app-insights` trigger that scales based on an Azure Application Insights metric. + +```yaml +triggers: +- type: azure-app-insights + metadata: + metricAggregationTimespan: "0:1" + metricAggregationType: avg + metricFilter: cloud/roleName eq 'role_name' + metricName: "metric_name" + metricNamespace: "customMetrics" + targetValue: "1" + activeDirectoryClientIdFromEnv: CLIENT_ID_ENV_NAME # Optional, can use TriggerAuthentication as well + activeDirectoryClientPasswordFromEnv: CLIENT_PASSWORD_ENV_NAME # Optional, can use TriggerAuthentication as well + appIdFromEnv: APP_ID # Optional, can use TriggerAuthentication as well + tenantIdFromEnv: TENANT_ID` # Optional, can use TriggerAuthentication as well +``` + +This scaler is backed by the Azure Application Instance REST API. Please see [this](https://dev.applicationinsights.io/reference) page +for further details. + +**Parameter list:** + +- `tenantId` - Id of the tenant that contains the Azure resource. This is used for authentication. +- `metricName` - Name of the Application Insights metric to query. +- `metricNamespace` - Name of the metric's namespace. +- `targetValue` - Target value to trigger scaling actions. +- `metricAggregationType` - Aggregation method of the Azure Application Insights metric. Options include `avg`, `sum`, `min`, and `max`. +- `metricAggregationInterval` - Collection time of the metric in format `"hh:mm"` +- `appId` - Id of the application. This can be retrieved from the Application Insight's `API Access` blade in Azure Portal. +- `tenantId` - Id of the tenant containing the Application Insights instance. +- `activeDirectoryClientId` - Id of the Active Directory application which requires at least `Monitoring Reader` permissions. +- `activeDirectoryClientPassword` - Password of the Active Directory client password. +- `metricFilter` - Further specify the metrics query using a filter. For example `cloud/roleName eq 'example`. (Optional) + +Some parameters can be provided using environmental variables, instead of setting them directly in metadata. Here is a list of parameters you can use to retrieve values from environment variables: + +- `activeDirectoryClientIdFromEnv` - Name of the environment variable that contains the Id of the Active Directory application. +- `activeDirectoryClientPasswordFromEnv` - Name of the environment variable that contains the Active Directory client password. +- `appIdFromEnv` - Name of the environment variable that contains the Application Insights Id. +- `tenantIdFromEnv` - Name of the environment variable that contains the Id of the tenant that contains the Application Insights instance. + +### Authentication Parameters + +You can use the `TriggerAuthentication` CRD to configure the authentication by providing a set of Azure Active Directory credentials or by using pod identity. + +**Credential based authentication:** + +- `activeDirectoryClientId` - Id of the Active Directory application which requires at least `Monitoring Reader` permissions. +- `activeDirectoryClientPassword` - Password of the Active Directory application. + +The user will need access to read data from the Azure resource. + +### Example + +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: azure-app-insights-secrets +data: + activeDirectoryClientId: + activeDirectoryClientPassword: + appId: + tenantId: +--- +apiVersion: keda.sh/v1alpha1 +kind: TriggerAuthentication +metadata: + name: azure-app-insights-trigger-auth +spec: + secretTargetRef: + - parameter: activeDirectoryClientId + name: azure-app-insights-secrets + key: activeDirectoryClientId + - parameter: activeDirectoryClientPassword + name: azure-app-insights-secrets + key: activeDirectoryClientPassword + - parameter: appId + name: azure-app-insights-secrets + key: appId + - parameter: tenantId + name: azure-app-insights-secrets + key: tenantId + # or Pod Identity, kind: Secret is not required in case of pod Identity + podIdentity: + provider: azure +--- +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: azure-app-insights-scaler +spec: + scaleTargetRef: + name: azure-app-insights-example + minReplicaCount: 1 + maxReplicaCount: 10 + triggers: + - type: azure-app-insights + metadata: + metricName: "example-metric" + metricNamespace: "customMetrics" + metricAggregationTimespan: "0:5" + metricAggregationType: avg + metricFilter: cloud/roleName eq 'example' + targetValue: "1" + authenticationRef: + name: azure-app-insights-trigger-auth +``` From 6ef8fdb5a9b2b53d5989ffd8db7ae0df5ef49319 Mon Sep 17 00:00:00 2001 From: Mark Rzasa Date: Mon, 24 Jan 2022 15:10:39 -0500 Subject: [PATCH 2/8] address PR comments for app insights scaler: fix available version. remove metricNamespace field. match doc convention Signed-off-by: Mark Rzasa --- .../docs/2.6/scalers/azure-app-insights.md | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/content/docs/2.6/scalers/azure-app-insights.md b/content/docs/2.6/scalers/azure-app-insights.md index 59c623098..4237c6c42 100644 --- a/content/docs/2.6/scalers/azure-app-insights.md +++ b/content/docs/2.6/scalers/azure-app-insights.md @@ -1,7 +1,7 @@ +++ title = "Azure Application Insights" layout = "scaler" -availability = "v1.3+" +availability = "v2.6+" maintainer = "Community" description = "Scale applications based on Azure Application Insights metrics." go_file = "azure_app_insights_scaler" @@ -18,8 +18,7 @@ triggers: metricAggregationTimespan: "0:1" metricAggregationType: avg metricFilter: cloud/roleName eq 'role_name' - metricName: "metric_name" - metricNamespace: "customMetrics" + metricName: "customMetrics/example-metric" targetValue: "1" activeDirectoryClientIdFromEnv: CLIENT_ID_ENV_NAME # Optional, can use TriggerAuthentication as well activeDirectoryClientPasswordFromEnv: CLIENT_PASSWORD_ENV_NAME # Optional, can use TriggerAuthentication as well @@ -33,23 +32,22 @@ for further details. **Parameter list:** - `tenantId` - Id of the tenant that contains the Azure resource. This is used for authentication. -- `metricName` - Name of the Application Insights metric to query. -- `metricNamespace` - Name of the metric's namespace. +- `metricName` - The name of the Application Insights metric to query. Use the `az monitor app-insights metrics get-metadata` to see a list of available metrics. - `targetValue` - Target value to trigger scaling actions. -- `metricAggregationType` - Aggregation method of the Azure Application Insights metric. Options include `avg`, `sum`, `min`, and `max`. -- `metricAggregationInterval` - Collection time of the metric in format `"hh:mm"` -- `appId` - Id of the application. This can be retrieved from the Application Insight's `API Access` blade in Azure Portal. +- `metricAggregationType` - Aggregation method of the Azure Application Insights metric. The aggregation methods vary from metric to metric. The `az monitor app-insights metrics get-metadata` command can be used to determine which methods apply to a given metric. (Some common aggregation methods are `avg`, `count`, `sum`, `min`, and `max`) +- `metricAggregationInterval` - Collection time of the metric in format `"hh:mm"`. +- `appId` - Id of the application. This is a GUID that can be retrieved from the Application Insight's `API Access` blade in the Azure Portal. - `tenantId` - Id of the tenant containing the Application Insights instance. -- `activeDirectoryClientId` - Id of the Active Directory application which requires at least `Monitoring Reader` permissions. +- `activeDirectoryClientId` - Id of the Active Directory client. The client must have `Monitoring Reader` permissions for the Application Insights instance. - `activeDirectoryClientPassword` - Password of the Active Directory client password. - `metricFilter` - Further specify the metrics query using a filter. For example `cloud/roleName eq 'example`. (Optional) Some parameters can be provided using environmental variables, instead of setting them directly in metadata. Here is a list of parameters you can use to retrieve values from environment variables: -- `activeDirectoryClientIdFromEnv` - Name of the environment variable that contains the Id of the Active Directory application. -- `activeDirectoryClientPasswordFromEnv` - Name of the environment variable that contains the Active Directory client password. -- `appIdFromEnv` - Name of the environment variable that contains the Application Insights Id. -- `tenantIdFromEnv` - Name of the environment variable that contains the Id of the tenant that contains the Application Insights instance. +- `activeDirectoryClientIdFromEnv` - Name of the environment variable that contains the Id of the Active Directory application. (Optional) +- `activeDirectoryClientPasswordFromEnv` - Name of the environment variable that contains the Active Directory client password. (Optional) +- `appIdFromEnv` - Name of the environment variable that contains the Application Insights Id. (Optional) +- `tenantIdFromEnv` - Name of the environment variable that contains the Id of the tenant that contains the Application Insights instance. (Optional) ### Authentication Parameters @@ -109,8 +107,7 @@ spec: triggers: - type: azure-app-insights metadata: - metricName: "example-metric" - metricNamespace: "customMetrics" + metricName: "customMetrics/example-metric" metricAggregationTimespan: "0:5" metricAggregationType: avg metricFilter: cloud/roleName eq 'example' From e23c6d2a58ed4db9d88a98df939060c488513fd7 Mon Sep 17 00:00:00 2001 From: markrzasa Date: Tue, 25 Jan 2022 07:55:24 -0500 Subject: [PATCH 3/8] Update content/docs/2.6/scalers/azure-app-insights.md Co-authored-by: Tom Kerkhove Signed-off-by: Mark Rzasa --- content/docs/2.6/scalers/azure-app-insights.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/2.6/scalers/azure-app-insights.md b/content/docs/2.6/scalers/azure-app-insights.md index 4237c6c42..28fcc5165 100644 --- a/content/docs/2.6/scalers/azure-app-insights.md +++ b/content/docs/2.6/scalers/azure-app-insights.md @@ -22,7 +22,7 @@ triggers: targetValue: "1" activeDirectoryClientIdFromEnv: CLIENT_ID_ENV_NAME # Optional, can use TriggerAuthentication as well activeDirectoryClientPasswordFromEnv: CLIENT_PASSWORD_ENV_NAME # Optional, can use TriggerAuthentication as well - appIdFromEnv: APP_ID # Optional, can use TriggerAuthentication as well + applicationInsightsIdFromEnv: APP_ID # Optional, can use TriggerAuthentication as well tenantIdFromEnv: TENANT_ID` # Optional, can use TriggerAuthentication as well ``` From 38e5ab576d205e132652b72c26f01a2983887fee Mon Sep 17 00:00:00 2001 From: Mark Rzasa Date: Wed, 26 Jan 2022 09:27:03 -0500 Subject: [PATCH 4/8] app insights terminology changes based on review comments Signed-off-by: Mark Rzasa --- content/docs/2.6/scalers/azure-app-insights.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/content/docs/2.6/scalers/azure-app-insights.md b/content/docs/2.6/scalers/azure-app-insights.md index 28fcc5165..d36ff0148 100644 --- a/content/docs/2.6/scalers/azure-app-insights.md +++ b/content/docs/2.6/scalers/azure-app-insights.md @@ -18,7 +18,7 @@ triggers: metricAggregationTimespan: "0:1" metricAggregationType: avg metricFilter: cloud/roleName eq 'role_name' - metricName: "customMetrics/example-metric" + metricId: "customMetrics/example-metric" targetValue: "1" activeDirectoryClientIdFromEnv: CLIENT_ID_ENV_NAME # Optional, can use TriggerAuthentication as well activeDirectoryClientPasswordFromEnv: CLIENT_PASSWORD_ENV_NAME # Optional, can use TriggerAuthentication as well @@ -32,11 +32,11 @@ for further details. **Parameter list:** - `tenantId` - Id of the tenant that contains the Azure resource. This is used for authentication. -- `metricName` - The name of the Application Insights metric to query. Use the `az monitor app-insights metrics get-metadata` to see a list of available metrics. +- `metricId` - The name of the Application Insights metric to query. Run `az monitor app-insights metrics get-metadata` to see a list of available metrics. - `targetValue` - Target value to trigger scaling actions. - `metricAggregationType` - Aggregation method of the Azure Application Insights metric. The aggregation methods vary from metric to metric. The `az monitor app-insights metrics get-metadata` command can be used to determine which methods apply to a given metric. (Some common aggregation methods are `avg`, `count`, `sum`, `min`, and `max`) - `metricAggregationInterval` - Collection time of the metric in format `"hh:mm"`. -- `appId` - Id of the application. This is a GUID that can be retrieved from the Application Insight's `API Access` blade in the Azure Portal. +- `applicationInsightsId` - Id of the Application Insights instance to query. This is a GUID that can be retrieved from the Application Insight's `API Access` blade in the Azure Portal. - `tenantId` - Id of the tenant containing the Application Insights instance. - `activeDirectoryClientId` - Id of the Active Directory client. The client must have `Monitoring Reader` permissions for the Application Insights instance. - `activeDirectoryClientPassword` - Password of the Active Directory client password. @@ -46,7 +46,7 @@ Some parameters can be provided using environmental variables, instead of settin - `activeDirectoryClientIdFromEnv` - Name of the environment variable that contains the Id of the Active Directory application. (Optional) - `activeDirectoryClientPasswordFromEnv` - Name of the environment variable that contains the Active Directory client password. (Optional) -- `appIdFromEnv` - Name of the environment variable that contains the Application Insights Id. (Optional) +- `applicationInsightsIdFromEnv` - Name of the environment variable that contains the Application Insights Id. (Optional) - `tenantIdFromEnv` - Name of the environment variable that contains the Id of the tenant that contains the Application Insights instance. (Optional) ### Authentication Parameters @@ -70,7 +70,7 @@ metadata: data: activeDirectoryClientId: activeDirectoryClientPassword: - appId: + applicationInsightsId: tenantId: --- apiVersion: keda.sh/v1alpha1 @@ -85,9 +85,9 @@ spec: - parameter: activeDirectoryClientPassword name: azure-app-insights-secrets key: activeDirectoryClientPassword - - parameter: appId + - parameter: applicationInsightsId name: azure-app-insights-secrets - key: appId + key: applicationInsightsId - parameter: tenantId name: azure-app-insights-secrets key: tenantId @@ -107,7 +107,7 @@ spec: triggers: - type: azure-app-insights metadata: - metricName: "customMetrics/example-metric" + metricId: "customMetrics/example-metric" metricAggregationTimespan: "0:5" metricAggregationType: avg metricFilter: cloud/roleName eq 'example' From b52d1449fce4d403cb840ed52668a991abdc664a Mon Sep 17 00:00:00 2001 From: Mark Rzasa Date: Wed, 26 Jan 2022 17:55:44 -0500 Subject: [PATCH 5/8] apdate app insights doc reference Signed-off-by: Mark Rzasa --- content/docs/2.6/scalers/azure-app-insights.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/2.6/scalers/azure-app-insights.md b/content/docs/2.6/scalers/azure-app-insights.md index d36ff0148..6128233ea 100644 --- a/content/docs/2.6/scalers/azure-app-insights.md +++ b/content/docs/2.6/scalers/azure-app-insights.md @@ -26,7 +26,7 @@ triggers: tenantIdFromEnv: TENANT_ID` # Optional, can use TriggerAuthentication as well ``` -This scaler is backed by the Azure Application Instance REST API. Please see [this](https://dev.applicationinsights.io/reference) page +This scaler is backed by the Azure Application Instance REST API. Please see [this](https://docs.microsoft.com/en-us/rest/api/application-insights/metrics/get) page for further details. **Parameter list:** From 65daa495e8c30de3b072bdba74ceab9766901200 Mon Sep 17 00:00:00 2001 From: Mark Rzasa Date: Fri, 28 Jan 2022 14:59:46 -0500 Subject: [PATCH 6/8] apdate app insights doc reference based on PR comment Signed-off-by: Mark Rzasa --- .../docs/2.6/scalers/azure-app-insights.md | 84 ++++++++++++++++++- 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/content/docs/2.6/scalers/azure-app-insights.md b/content/docs/2.6/scalers/azure-app-insights.md index 6128233ea..25a22592c 100644 --- a/content/docs/2.6/scalers/azure-app-insights.md +++ b/content/docs/2.6/scalers/azure-app-insights.md @@ -32,7 +32,7 @@ for further details. **Parameter list:** - `tenantId` - Id of the tenant that contains the Azure resource. This is used for authentication. -- `metricId` - The name of the Application Insights metric to query. Run `az monitor app-insights metrics get-metadata` to see a list of available metrics. +- `metricId` - The name of the Application Insights metric to query. Use the [Azure Command Line Interface](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) to run `az monitor app-insights metrics get-metadata` to see a list of available metrics. - `targetValue` - Target value to trigger scaling actions. - `metricAggregationType` - Aggregation method of the Azure Application Insights metric. The aggregation methods vary from metric to metric. The `az monitor app-insights metrics get-metadata` command can be used to determine which methods apply to a given metric. (Some common aggregation methods are `avg`, `count`, `sum`, `min`, and `max`) - `metricAggregationInterval` - Collection time of the metric in format `"hh:mm"`. @@ -42,7 +42,7 @@ for further details. - `activeDirectoryClientPassword` - Password of the Active Directory client password. - `metricFilter` - Further specify the metrics query using a filter. For example `cloud/roleName eq 'example`. (Optional) -Some parameters can be provided using environmental variables, instead of setting them directly in metadata. Here is a list of parameters you can use to retrieve values from environment variables: +Some parameters can be provided using environment variables, instead of setting them directly in metadata. Here is a list of parameters you can use to retrieve values from environment variables: - `activeDirectoryClientIdFromEnv` - Name of the environment variable that contains the Id of the Active Directory application. (Optional) - `activeDirectoryClientPasswordFromEnv` - Name of the environment variable that contains the Active Directory client password. (Optional) @@ -57,11 +57,14 @@ You can use the `TriggerAuthentication` CRD to configure the authentication by p - `activeDirectoryClientId` - Id of the Active Directory application which requires at least `Monitoring Reader` permissions. - `activeDirectoryClientPassword` - Password of the Active Directory application. +- `applicationInsightsId` - Id of the Application Insights instance to query. +- `tenantId` - Id of the tenant that contains the Azure resource. The user will need access to read data from the Azure resource. ### Example +The following example illustrates the use of a TriggerAuthentication to connect to Application Insights. ```yaml apiVersion: v1 kind: Secret @@ -115,3 +118,80 @@ spec: authenticationRef: name: azure-app-insights-trigger-auth ``` + +The following example illustrates the use of environment variables to connect to Application Insights. +```yaml +apiVersion: v1 +kind: Secret +metadata: + name: azure-app-insights-secrets +type: Opaque +data: + activeDirectoryClientId: + activeDirectoryClientPassword: + applicationInsightsId: + tenantId: +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: azure-app-insights-example +spec: + replicas: 0 + selector: + matchLabels: + app: azure-app-insights-example + template: + metadata: + labels: + app: azure-app-insights-example + spec: + containers: + - name: example + image: nginx:1.16.1 + env: + - name: ACTIVE_DIRECTORY_PASSWORD + valueFrom: + secretKeyRef: + name: azure-app-insights-secrets + key: activeDirectoryClientPassword + - name: ACTIVE_DIRECTORY_USERNAME + valueFrom: + secretKeyRef: + name: azure-app-insights-secrets + key: activeDirectoryClientId + - name: APP_INSIGHTS_APP_ID + valueFrom: + secretKeyRef: + name: azure-app-insights-secrets + key: applicationInsightsId + - name: TENANT_ID + valueFrom: + secretKeyRef: + name: azure-app-insights-secrets + key: tenantId +--- +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: azure-app-insights-scaler +spec: + scaleTargetRef: + name: azure-app-insights-example + pollingInterval: 5 + cooldownPeriod: 5 + minReplicaCount: 0 + maxReplicaCount: 2 + triggers: + - type: azure-app-insights + metadata: + metricId: "customMetrics/example-metric" + metricAggregationTimespan: "0:5" + metricAggregationType: avg + metricFilter: cloud/roleName eq 'example' + targetValue: "1" + activeDirectoryClientPasswordFromEnv: ACTIVE_DIRECTORY_PASSWORD + activeDirectoryClientIdFromEnv: ACTIVE_DIRECTORY_USERNAME + applicationInsightsIdFromEnv: APP_INSIGHTS_APP_ID + tenantIdFromEnv: TENANT_ID +``` From 7ee4499d2afc630e53c199d0a5bf431a1e701296 Mon Sep 17 00:00:00 2001 From: Mark Rzasa Date: Sun, 30 Jan 2022 21:01:16 -0500 Subject: [PATCH 7/8] remove duplicate tenantId description from app insights doc. add a note about pod identity to app insights doc Signed-off-by: Mark Rzasa --- content/docs/2.6/scalers/azure-app-insights.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/content/docs/2.6/scalers/azure-app-insights.md b/content/docs/2.6/scalers/azure-app-insights.md index 25a22592c..b2a92c25f 100644 --- a/content/docs/2.6/scalers/azure-app-insights.md +++ b/content/docs/2.6/scalers/azure-app-insights.md @@ -37,7 +37,6 @@ for further details. - `metricAggregationType` - Aggregation method of the Azure Application Insights metric. The aggregation methods vary from metric to metric. The `az monitor app-insights metrics get-metadata` command can be used to determine which methods apply to a given metric. (Some common aggregation methods are `avg`, `count`, `sum`, `min`, and `max`) - `metricAggregationInterval` - Collection time of the metric in format `"hh:mm"`. - `applicationInsightsId` - Id of the Application Insights instance to query. This is a GUID that can be retrieved from the Application Insight's `API Access` blade in the Azure Portal. -- `tenantId` - Id of the tenant containing the Application Insights instance. - `activeDirectoryClientId` - Id of the Active Directory client. The client must have `Monitoring Reader` permissions for the Application Insights instance. - `activeDirectoryClientPassword` - Password of the Active Directory client password. - `metricFilter` - Further specify the metrics query using a filter. For example `cloud/roleName eq 'example`. (Optional) @@ -60,7 +59,12 @@ You can use the `TriggerAuthentication` CRD to configure the authentication by p - `applicationInsightsId` - Id of the Application Insights instance to query. - `tenantId` - Id of the tenant that contains the Azure resource. -The user will need access to read data from the Azure resource. +The principal will need `Monitoring Reader` access to query metrics from the Application Insights instance. + +**Pod identity based authentication:** + +[Azure Active Directory pod-managed identity](https://docs.microsoft.com/en-us/azure/aks/use-azure-ad-pod-identity) can be used +in place of credential based authentication. The following section contains an example of a `TriggerAuthentication` using pod identity. ### Example From 02a56633445184895002b0dfb1679ca32592fde5 Mon Sep 17 00:00:00 2001 From: Mark Rzasa Date: Sun, 30 Jan 2022 21:08:07 -0500 Subject: [PATCH 8/8] rename app insights ACTIVE_DIRECTORY_USERNAME env variable to ACTIVE_DIRECTORY_ID Signed-off-by: Mark Rzasa --- content/docs/2.6/scalers/azure-app-insights.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/docs/2.6/scalers/azure-app-insights.md b/content/docs/2.6/scalers/azure-app-insights.md index b2a92c25f..7e91ad476 100644 --- a/content/docs/2.6/scalers/azure-app-insights.md +++ b/content/docs/2.6/scalers/azure-app-insights.md @@ -154,16 +154,16 @@ spec: - name: example image: nginx:1.16.1 env: - - name: ACTIVE_DIRECTORY_PASSWORD + - name: ACTIVE_DIRECTORY_ID valueFrom: secretKeyRef: name: azure-app-insights-secrets - key: activeDirectoryClientPassword - - name: ACTIVE_DIRECTORY_USERNAME + key: activeDirectoryClientId + - name: ACTIVE_DIRECTORY_PASSWORD valueFrom: secretKeyRef: name: azure-app-insights-secrets - key: activeDirectoryClientId + key: activeDirectoryClientPassword - name: APP_INSIGHTS_APP_ID valueFrom: secretKeyRef: @@ -194,8 +194,8 @@ spec: metricAggregationType: avg metricFilter: cloud/roleName eq 'example' targetValue: "1" + activeDirectoryClientIdFromEnv: ACTIVE_DIRECTORY_ID activeDirectoryClientPasswordFromEnv: ACTIVE_DIRECTORY_PASSWORD - activeDirectoryClientIdFromEnv: ACTIVE_DIRECTORY_USERNAME applicationInsightsIdFromEnv: APP_INSIGHTS_APP_ID tenantIdFromEnv: TENANT_ID ```