diff --git a/scaletest/scaletest.sh b/scaletest/scaletest.sh index f9f7fb7ca2ed4..9677df05c99c4 100755 --- a/scaletest/scaletest.sh +++ b/scaletest/scaletest.sh @@ -84,11 +84,10 @@ fi if [[ -z "${SCALETEST_PROMETHEUS_REMOTE_WRITE_USER}" ]] || [[ -z "${SCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD}" ]]; then echo "SCALETEST_PROMETHEUS_REMOTE_WRITE_USER or SCALETEST_PROMETHEUS_REMOTE_WRITE_PASSWORD not specified." echo "No prometheus metrics will be collected!" - read -pr "Continue (y/N)? " choice - case "$choice" in - y | Y | yes | YES) ;; - *) exit 1 ;; - esac + read -p "Continue (y/N)? " -n1 -r + if [[ "${REPLY}" != [yY] ]]; then + exit 1 + fi fi SCALETEST_SCENARIO_VARS="${PROJECT_ROOT}/scaletest/terraform/scenario-${SCALETEST_SCENARIO}.tfvars" diff --git a/scaletest/terraform/coder.tf b/scaletest/terraform/coder.tf index 44e7f4a374448..29e9ffef9fce7 100644 --- a/scaletest/terraform/coder.tf +++ b/scaletest/terraform/coder.tf @@ -34,11 +34,11 @@ resource "kubernetes_namespace" "coder_namespace" { ] } -resource "random_password" "postgres-admin-password" { +resource "random_password" "coder-postgres-password" { length = 12 } -resource "random_password" "coder-postgres-password" { +resource "random_password" "prometheus-postgres-password" { length = 12 } diff --git a/scaletest/terraform/gcp_db.tf b/scaletest/terraform/gcp_db.tf index b57002f2d2872..8855d24f6d82b 100644 --- a/scaletest/terraform/gcp_db.tf +++ b/scaletest/terraform/gcp_db.tf @@ -51,3 +51,13 @@ resource "google_sql_user" "coder" { # required for postgres, otherwise user fails to delete deletion_policy = "ABANDON" } + +resource "google_sql_user" "prometheus" { + project = var.project_id + instance = google_sql_database_instance.db.id + name = "${var.name}-prometheus" + type = "BUILT_IN" + password = random_password.prometheus-postgres-password.result + # required for postgres, otherwise user fails to delete + deletion_policy = "ABANDON" +} diff --git a/scaletest/terraform/prometheus.tf b/scaletest/terraform/prometheus.tf index 9054f6d7526b8..4c6f082e1c345 100644 --- a/scaletest/terraform/prometheus.tf +++ b/scaletest/terraform/prometheus.tf @@ -1,10 +1,12 @@ locals { - prometheus_helm_repo = "https://charts.bitnami.com/bitnami" - prometheus_helm_chart = "kube-prometheus" - prometheus_helm_version = null // just use latest - prometheus_release_name = "prometheus" - prometheus_namespace = "prometheus" - prometheus_remote_write_enabled = var.prometheus_remote_write_password != "" + prometheus_helm_repo = "https://charts.bitnami.com/bitnami" + prometheus_helm_chart = "kube-prometheus" + prometheus_exporter_helm_repo = "https://prometheus-community.github.io/helm-charts" + prometheus_exporter_helm_chart = "prometheus-postgres-exporter" + prometheus_release_name = "prometheus" + prometheus_exporter_release_name = "prometheus-postgres-exporter" + prometheus_namespace = "prometheus" + prometheus_remote_write_enabled = var.prometheus_remote_write_password != "" } # Create a namespace to hold our Prometheus deployment. @@ -37,7 +39,6 @@ resource "helm_release" "prometheus-chart" { repository = local.prometheus_helm_repo chart = local.prometheus_helm_chart name = local.prometheus_release_name - version = local.prometheus_helm_version namespace = kubernetes_namespace.prometheus_namespace.metadata.0.name values = [< pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy