From 96b38dc21a2b2b378a7e9e9edf2b3d2e103b39d5 Mon Sep 17 00:00:00 2001 From: Siva Guruvareddiar Date: Mon, 15 Jan 2024 19:53:31 -0600 Subject: [PATCH 01/11] https://github.com/kedacore/keda/issues/2214 Signed-off-by: Siva Guruvareddiar --- content/docs/2.13/scalers/prometheus.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/content/docs/2.13/scalers/prometheus.md b/content/docs/2.13/scalers/prometheus.md index ca76deeda..7c737f8c7 100644 --- a/content/docs/2.13/scalers/prometheus.md +++ b/content/docs/2.13/scalers/prometheus.md @@ -90,7 +90,22 @@ See the follwowing steps to configure the scaler integration. - Prometheus server address should follow the Google's Monitoring API for [Prometheus HTTP API](https://cloud.google.com/stackdriver/docs/managed-prometheus/query#api-prometheus): - Example: `https://monitoring.googleapis.com/v1/projects/GOOGLE_PROJECT_ID/location/global/prometheus` - where `GOOGLE_PROJECT_ID` should be replaced by your Google project ID. -To gain a better understanding of creating a Prometheus trigger for Google Managed Prometheus, refer to [this example](#example-google-managed-prometheus). +To gain a better understanding of creating a Prometheus trigger for Google Managed Prometheus, refer to [this example] + + +**Amazon Managed Service for Prometheus:** + +Amazon Web Services (AWS) offers a [managed service for Prometheus](https://aws.amazon.com/prometheus/) that provides a scalable and secure Prometheus deployment. The Prometheus scaler can be used to run Prometheus queries against this managed service. + +- [EKS Pod Identity](https://aws.amazon.com/about-aws/whats-new/2023/11/amazon-eks-pod-identity/) provider can be used in `authenticationRef` - see later in example. TriggerAuthentication and Secret are also supported authentication methods. +- Create Amazon Managed Service for Prometheus [workspace](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-create-workspace.html) in your AWS account +- Retrieve the Prometheus query endpoint URL from the [AWS managed Prometheus Workspace](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-create-workspace.html). This endpoint will be used to send queries. +- Configure Prometheus scaler to use the workspace endpoint and an authentication method like EKS Pod Identity. + +Using the managed service eliminates the operational burden of running your own Prometheus servers. Queries can be executed against a fully managed, auto-scaling Prometheus deployment on AWS. Costs scale linearly with usage. + + +(#example-google-managed-prometheus). ### Examples From d4187750bcc4674d115fcc19c501a08fde40ab27 Mon Sep 17 00:00:00 2001 From: Siva Guruvareddiar <1725781+sguruvar@users.noreply.github.com> Date: Tue, 16 Jan 2024 10:20:15 -0600 Subject: [PATCH 02/11] Update content/docs/2.13/scalers/prometheus.md Co-authored-by: Tom Kerkhove Signed-off-by: Siva Guruvareddiar <1725781+sguruvar@users.noreply.github.com> --- content/docs/2.13/scalers/prometheus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/2.13/scalers/prometheus.md b/content/docs/2.13/scalers/prometheus.md index 7c737f8c7..e8bd3587a 100644 --- a/content/docs/2.13/scalers/prometheus.md +++ b/content/docs/2.13/scalers/prometheus.md @@ -93,7 +93,7 @@ See the follwowing steps to configure the scaler integration. To gain a better understanding of creating a Prometheus trigger for Google Managed Prometheus, refer to [this example] -**Amazon Managed Service for Prometheus:** +### Amazon Managed Service for Prometheus Amazon Web Services (AWS) offers a [managed service for Prometheus](https://aws.amazon.com/prometheus/) that provides a scalable and secure Prometheus deployment. The Prometheus scaler can be used to run Prometheus queries against this managed service. From 947b8c5d33121fc9cb3181e2b5336eda71396387 Mon Sep 17 00:00:00 2001 From: Siva Guruvareddiar Date: Tue, 16 Jan 2024 10:31:02 -0600 Subject: [PATCH 03/11] https://github.com/kedacore/keda/issues/2214 Signed-off-by: Siva Guruvareddiar --- content/docs/2.13/scalers/prometheus.md | 65 +++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/content/docs/2.13/scalers/prometheus.md b/content/docs/2.13/scalers/prometheus.md index e8bd3587a..3dbd4ce00 100644 --- a/content/docs/2.13/scalers/prometheus.md +++ b/content/docs/2.13/scalers/prometheus.md @@ -418,6 +418,71 @@ spec: name: azure-managed-prometheus-trigger-auth ``` + +#### Example: Amazon Managed Service for Prometheus (AMP) + +Below is an example showcasing the use of Prometheus scaler with AWS EKS Pod Identity. Please note that in this particular example, the Deployment is named as `keda-deploy`. Also replace the AwsRegion and AMP WorkspaceId for your requirements. + +```yaml +apiVersion: keda.sh/v1alpha1 +kind: TriggerAuthentication +metadata: + name: keda-trigger-auth-aws-credentials +spec: + podIdentity: + provider: aws +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: keda-deploy + labels: + app: keda-deploy +spec: + replicas: 0 + selector: + matchLabels: + app: keda-deploy + template: + metadata: + labels: + app: keda-deploy + spec: + containers: + - name: nginx + image: nginxinc/nginx-unprivileged + ports: + - containerPort: 80 +--- +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: keda-so + labels: + app: keda-deploy +spec: + scaleTargetRef: + name: keda-deploy + maxReplicaCount: 2 + minReplicaCount: 0 + cooldownPeriod: 1 + advanced: + horizontalPodAutoscalerConfig: + behavior: + scaleDown: + stabilizationWindowSeconds: 15 + triggers: + - type: prometheus + authenticationRef: + name: keda-trigger-auth-aws-credentials + metadata: + awsRegion: {{.AwsRegion}} + serverAddress: "https://aps-workspaces.{{.AwsRegion}}.amazonaws.com/workspaces/{{.WorkspaceID}}" + query: "vector(100)" + threshold: "50.0" + identityOwner: operator +``` + #### Example: Google Managed Prometheus Below is an example showcasing the use of Prometheus scaler with GCP Workload Identity. Please note that in this particular example, the Google project ID has been set as `my-google-project`. From ef0ff723380b7d2db27eb8a89d685be20ac2858a Mon Sep 17 00:00:00 2001 From: Siva Guruvareddiar Date: Tue, 16 Jan 2024 12:06:05 -0600 Subject: [PATCH 04/11] https://github.com/kedacore/keda/issues/2214 Signed-off-by: Siva Guruvareddiar --- content/docs/2.13/scalers/prometheus.md | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/content/docs/2.13/scalers/prometheus.md b/content/docs/2.13/scalers/prometheus.md index 3dbd4ce00..8d47607ec 100644 --- a/content/docs/2.13/scalers/prometheus.md +++ b/content/docs/2.13/scalers/prometheus.md @@ -77,6 +77,19 @@ Azure has a [managed service for Prometheus](https://learn.microsoft.com/en-us/a - No other auth (via `authModes`) can be provided with Azure Pod/Workload Identity Auth. - Prometheus query endpoint can be retreived from [Azure Monitor Workspace](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/azure-monitor-workspace-overview) that was configured to ingest prometheus metrics. + +### Amazon Managed Service for Prometheus + +Amazon Web Services (AWS) offers a [managed service for Prometheus](https://aws.amazon.com/prometheus/) that provides a scalable and secure Prometheus deployment. The Prometheus scaler can be used to run Prometheus queries against this managed service. + +- [EKS Pod Identity](https://aws.amazon.com/about-aws/whats-new/2023/11/amazon-eks-pod-identity/) provider can be used in `authenticationRef` - see later in example. TriggerAuthentication and Secret are also supported authentication methods. +- Create Amazon Managed Service for Prometheus [workspace](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-create-workspace.html) in your AWS account +- Retrieve the Prometheus query endpoint URL from the [AWS managed Prometheus Workspace](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-create-workspace.html). This endpoint will be used to send queries. +- Configure Prometheus scaler to use the workspace endpoint and an authentication method like EKS Pod Identity. + +Using the managed service eliminates the operational burden of running your own Prometheus servers. Queries can be executed against a fully managed, auto-scaling Prometheus deployment on AWS. Costs scale linearly with usage. + + **Google Managed for Prometheus:** Google Cloud Platform provides a comprehensive [managed service for Prometheus](https://cloud.google.com/stackdriver/docs/managed-prometheus), enabling you to effortlessly export and query Prometheus metrics. @@ -92,19 +105,6 @@ See the follwowing steps to configure the scaler integration. To gain a better understanding of creating a Prometheus trigger for Google Managed Prometheus, refer to [this example] - -### Amazon Managed Service for Prometheus - -Amazon Web Services (AWS) offers a [managed service for Prometheus](https://aws.amazon.com/prometheus/) that provides a scalable and secure Prometheus deployment. The Prometheus scaler can be used to run Prometheus queries against this managed service. - -- [EKS Pod Identity](https://aws.amazon.com/about-aws/whats-new/2023/11/amazon-eks-pod-identity/) provider can be used in `authenticationRef` - see later in example. TriggerAuthentication and Secret are also supported authentication methods. -- Create Amazon Managed Service for Prometheus [workspace](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-create-workspace.html) in your AWS account -- Retrieve the Prometheus query endpoint URL from the [AWS managed Prometheus Workspace](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-create-workspace.html). This endpoint will be used to send queries. -- Configure Prometheus scaler to use the workspace endpoint and an authentication method like EKS Pod Identity. - -Using the managed service eliminates the operational burden of running your own Prometheus servers. Queries can be executed against a fully managed, auto-scaling Prometheus deployment on AWS. Costs scale linearly with usage. - - (#example-google-managed-prometheus). ### Examples From 0babbfb3f069bbabd8c73f25a93240f15b6fb7a8 Mon Sep 17 00:00:00 2001 From: Siva Guruvareddiar <1725781+sguruvar@users.noreply.github.com> Date: Tue, 16 Jan 2024 13:47:45 -0600 Subject: [PATCH 05/11] Update content/docs/2.13/scalers/prometheus.md Co-authored-by: Zbynek Roubalik Signed-off-by: Siva Guruvareddiar <1725781+sguruvar@users.noreply.github.com> --- content/docs/2.13/scalers/prometheus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/2.13/scalers/prometheus.md b/content/docs/2.13/scalers/prometheus.md index 8d47607ec..909f5b9a4 100644 --- a/content/docs/2.13/scalers/prometheus.md +++ b/content/docs/2.13/scalers/prometheus.md @@ -90,7 +90,7 @@ Amazon Web Services (AWS) offers a [managed service for Prometheus](https://aws. Using the managed service eliminates the operational burden of running your own Prometheus servers. Queries can be executed against a fully managed, auto-scaling Prometheus deployment on AWS. Costs scale linearly with usage. -**Google Managed for Prometheus:** +### Google Managed for Prometheus Google Cloud Platform provides a comprehensive [managed service for Prometheus](https://cloud.google.com/stackdriver/docs/managed-prometheus), enabling you to effortlessly export and query Prometheus metrics. By utilizing Prometheus scaler, you can seamlessly integrate it with the GCP managed service and handle authentication using the GCP workload identity mechanism. From d158fcb6a2bd04e83abc147873a4c13cb8926057 Mon Sep 17 00:00:00 2001 From: Siva Guruvareddiar <1725781+sguruvar@users.noreply.github.com> Date: Tue, 16 Jan 2024 13:47:53 -0600 Subject: [PATCH 06/11] Update content/docs/2.13/scalers/prometheus.md Co-authored-by: Zbynek Roubalik Signed-off-by: Siva Guruvareddiar <1725781+sguruvar@users.noreply.github.com> --- content/docs/2.13/scalers/prometheus.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/docs/2.13/scalers/prometheus.md b/content/docs/2.13/scalers/prometheus.md index 909f5b9a4..f2436a0f9 100644 --- a/content/docs/2.13/scalers/prometheus.md +++ b/content/docs/2.13/scalers/prometheus.md @@ -103,9 +103,7 @@ See the follwowing steps to configure the scaler integration. - Prometheus server address should follow the Google's Monitoring API for [Prometheus HTTP API](https://cloud.google.com/stackdriver/docs/managed-prometheus/query#api-prometheus): - Example: `https://monitoring.googleapis.com/v1/projects/GOOGLE_PROJECT_ID/location/global/prometheus` - where `GOOGLE_PROJECT_ID` should be replaced by your Google project ID. -To gain a better understanding of creating a Prometheus trigger for Google Managed Prometheus, refer to [this example] - -(#example-google-managed-prometheus). +To gain a better understanding of creating a Prometheus trigger for Google Managed Prometheus, refer to [this example](#example-google-managed-prometheus). ### Examples From c1caeec797f96ceb142f437c721a612bcdc8cea8 Mon Sep 17 00:00:00 2001 From: Siva Guruvareddiar <1725781+sguruvar@users.noreply.github.com> Date: Wed, 17 Jan 2024 15:57:28 -0600 Subject: [PATCH 07/11] Update content/docs/2.13/scalers/prometheus.md Co-authored-by: Tom Kerkhove Signed-off-by: Siva Guruvareddiar <1725781+sguruvar@users.noreply.github.com> --- content/docs/2.13/scalers/prometheus.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/docs/2.13/scalers/prometheus.md b/content/docs/2.13/scalers/prometheus.md index f2436a0f9..62bd9c236 100644 --- a/content/docs/2.13/scalers/prometheus.md +++ b/content/docs/2.13/scalers/prometheus.md @@ -89,7 +89,6 @@ Amazon Web Services (AWS) offers a [managed service for Prometheus](https://aws. Using the managed service eliminates the operational burden of running your own Prometheus servers. Queries can be executed against a fully managed, auto-scaling Prometheus deployment on AWS. Costs scale linearly with usage. - ### Google Managed for Prometheus Google Cloud Platform provides a comprehensive [managed service for Prometheus](https://cloud.google.com/stackdriver/docs/managed-prometheus), enabling you to effortlessly export and query Prometheus metrics. From 00be8bda2c67e261b76119665fa5b928b44938c4 Mon Sep 17 00:00:00 2001 From: Siva Guruvareddiar Date: Wed, 17 Jan 2024 17:24:08 -0600 Subject: [PATCH 08/11] https://github.com/kedacore/keda/issues/2214 Signed-off-by: Siva Guruvareddiar --- content/docs/2.13/scalers/prometheus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/2.13/scalers/prometheus.md b/content/docs/2.13/scalers/prometheus.md index 62bd9c236..d00057e15 100644 --- a/content/docs/2.13/scalers/prometheus.md +++ b/content/docs/2.13/scalers/prometheus.md @@ -70,7 +70,7 @@ You can use `TriggerAuthentication` CRD to configure the authentication. It is p > 💡 **NOTE:**It's also possible to set the CA certificate regardless of the selected `authModes` (also without any authentication). This might be useful if you are using an enterprise CA. -**Azure Monitor managed service for Prometheus** +### Azure Monitor managed service for Prometheus Azure has a [managed service for Prometheus](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/prometheus-metrics-overview) and Prometheus scaler can be used to run prometheus query against that. - [Azure AD Pod Identity](https://docs.microsoft.com/en-us/azure/aks/use-azure-ad-pod-identity) or [Azure AD Workload Identity](https://azure.github.io/azure-workload-identity/docs/) providers can be used in `authenticationRef` - see later in example. - `Monitoring Data Reader` role needs to be assigned to workload identity (or pod identity) on the `Azure Monitor Workspace`. From 748334338d981b1d211f6fa6ec0728122c5cf424 Mon Sep 17 00:00:00 2001 From: Zbynek Roubalik Date: Thu, 18 Jan 2024 15:10:22 +0100 Subject: [PATCH 09/11] Update content/docs/2.13/scalers/prometheus.md Signed-off-by: Zbynek Roubalik --- content/docs/2.13/scalers/prometheus.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content/docs/2.13/scalers/prometheus.md b/content/docs/2.13/scalers/prometheus.md index d00057e15..c722ac922 100644 --- a/content/docs/2.13/scalers/prometheus.md +++ b/content/docs/2.13/scalers/prometheus.md @@ -70,7 +70,10 @@ You can use `TriggerAuthentication` CRD to configure the authentication. It is p > 💡 **NOTE:**It's also possible to set the CA certificate regardless of the selected `authModes` (also without any authentication). This might be useful if you are using an enterprise CA. -### Azure Monitor managed service for Prometheus +### Integrating Cloud offerings + +#### Azure Monitor Managed Service for Prometheus + Azure has a [managed service for Prometheus](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/prometheus-metrics-overview) and Prometheus scaler can be used to run prometheus query against that. - [Azure AD Pod Identity](https://docs.microsoft.com/en-us/azure/aks/use-azure-ad-pod-identity) or [Azure AD Workload Identity](https://azure.github.io/azure-workload-identity/docs/) providers can be used in `authenticationRef` - see later in example. - `Monitoring Data Reader` role needs to be assigned to workload identity (or pod identity) on the `Azure Monitor Workspace`. From 8e20869f133c58ff3b4a733a32ee0c4e04a90377 Mon Sep 17 00:00:00 2001 From: Zbynek Roubalik Date: Thu, 18 Jan 2024 15:10:28 +0100 Subject: [PATCH 10/11] Update content/docs/2.13/scalers/prometheus.md Signed-off-by: Zbynek Roubalik --- content/docs/2.13/scalers/prometheus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/2.13/scalers/prometheus.md b/content/docs/2.13/scalers/prometheus.md index c722ac922..fb0a879b3 100644 --- a/content/docs/2.13/scalers/prometheus.md +++ b/content/docs/2.13/scalers/prometheus.md @@ -81,7 +81,7 @@ Azure has a [managed service for Prometheus](https://learn.microsoft.com/en-us/a - Prometheus query endpoint can be retreived from [Azure Monitor Workspace](https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/azure-monitor-workspace-overview) that was configured to ingest prometheus metrics. -### Amazon Managed Service for Prometheus +#### Amazon Managed Service for Prometheus Amazon Web Services (AWS) offers a [managed service for Prometheus](https://aws.amazon.com/prometheus/) that provides a scalable and secure Prometheus deployment. The Prometheus scaler can be used to run Prometheus queries against this managed service. From 408a73714b7fc0a7574fad30c3a8e05626f2696a Mon Sep 17 00:00:00 2001 From: Zbynek Roubalik Date: Thu, 18 Jan 2024 15:10:34 +0100 Subject: [PATCH 11/11] Update content/docs/2.13/scalers/prometheus.md Signed-off-by: Zbynek Roubalik --- content/docs/2.13/scalers/prometheus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/2.13/scalers/prometheus.md b/content/docs/2.13/scalers/prometheus.md index fb0a879b3..71885fa76 100644 --- a/content/docs/2.13/scalers/prometheus.md +++ b/content/docs/2.13/scalers/prometheus.md @@ -92,7 +92,7 @@ Amazon Web Services (AWS) offers a [managed service for Prometheus](https://aws. Using the managed service eliminates the operational burden of running your own Prometheus servers. Queries can be executed against a fully managed, auto-scaling Prometheus deployment on AWS. Costs scale linearly with usage. -### Google Managed for Prometheus +#### Google Managed for Prometheus Google Cloud Platform provides a comprehensive [managed service for Prometheus](https://cloud.google.com/stackdriver/docs/managed-prometheus), enabling you to effortlessly export and query Prometheus metrics. By utilizing Prometheus scaler, you can seamlessly integrate it with the GCP managed service and handle authentication using the GCP workload identity mechanism.