From c75b2b4fadff2af016b8f38d3cd0fc8f6aefc4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Desch=C3=AAnes?= Date: Mon, 18 Nov 2024 17:24:54 -0500 Subject: [PATCH] [prometheus-stackdriver-exporter] bump version and support new 0.17.0 flags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Antoine DeschĂȘnes --- charts/prometheus-stackdriver-exporter/Chart.yaml | 4 ++-- .../templates/deployment.yaml | 12 ++++++++++++ charts/prometheus-stackdriver-exporter/values.yaml | 10 ++++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/charts/prometheus-stackdriver-exporter/Chart.yaml b/charts/prometheus-stackdriver-exporter/Chart.yaml index c93f0748a97b..b585b66834e0 100644 --- a/charts/prometheus-stackdriver-exporter/Chart.yaml +++ b/charts/prometheus-stackdriver-exporter/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 description: Stackdriver exporter for Prometheus name: prometheus-stackdriver-exporter -version: 4.6.2 -appVersion: v0.16.0 +version: 4.7.0 +appVersion: v0.17.0 home: https://www.stackdriver.com/ sources: - https://github.com/prometheus-community/stackdriver_exporter diff --git a/charts/prometheus-stackdriver-exporter/templates/deployment.yaml b/charts/prometheus-stackdriver-exporter/templates/deployment.yaml index 800b745e2815..3c2eeac83090 100644 --- a/charts/prometheus-stackdriver-exporter/templates/deployment.yaml +++ b/charts/prometheus-stackdriver-exporter/templates/deployment.yaml @@ -73,10 +73,22 @@ spec: mountPath: /etc/secrets/service-account/ {{- end}} args: + {{- if .Values.stackdriver.projectIds }} + {{- range .Values.stackdriver.projectIds }} + - --google.project-ids={{ . }} + {{- end }} + {{- else }} - --google.project-id={{ .Values.stackdriver.projectId }} + {{- end }} - --monitoring.metrics-interval={{ .Values.stackdriver.metrics.interval }} - --monitoring.metrics-offset={{ .Values.stackdriver.metrics.offset }} + {{- if .Values.stackdriver.metrics.prefixes }} + {{- range .Values.stackdriver.metrics.prefixes }} + - --monitoring.metrics-prefixes={{ . }} + {{- end }} + {{- else }} - --monitoring.metrics-type-prefixes={{ .Values.stackdriver.metrics.typePrefixes | replace " " "" }} + {{- end }} {{- range .Values.stackdriver.metrics.filters }} - --monitoring.filters={{ . }} {{- end }} diff --git a/charts/prometheus-stackdriver-exporter/values.yaml b/charts/prometheus-stackdriver-exporter/values.yaml index 89bc8243d6ac..20c543996d86 100644 --- a/charts/prometheus-stackdriver-exporter/values.yaml +++ b/charts/prometheus-stackdriver-exporter/values.yaml @@ -48,8 +48,11 @@ secret: labels: {} stackdriver: - # The Google Project ID to gather metrics for + # DEPRECATED - The Google Project ID to gather metrics for projectId: "FALSE" + # The Google Project IDs to gather metrics for (requires 0.17.0+) + projectIds: [] + # - "google-project-id" # An existing secret which contains credentials.json serviceAccountSecret: "" # Provide custom key for the existing secret to load credentials.json from @@ -69,8 +72,11 @@ stackdriver: # Drop metrics from attached projects and fetch `project_id` only dropDelegatedProjects: false metrics: - # The prefixes to gather metrics for, we default to just CPU metrics. + # DEPRECATED - The prefixes to gather metrics for, we default to just CPU metrics. typePrefixes: 'compute.googleapis.com/instance/cpu' + # The prefixes to gather metrics for (requires 0.17.0+) + prefixes: [] + # - 'compute.googleapis.com/instance/cpu' # The filters to refine the metrics query by using Filter objects that Google provides. # Filter objects: project, group.id, resource.type, resource.labels.[KEY], metric.type, metric.labels.[KEY] # https://cloud.google.com/monitoring/api/v3/filters