Skip to content

Commit 59088c0

Browse files
[prometheus-stackdriver-exporter] support new 0.17.0 flags (#5002)
Signed-off-by: Antoine Deschênes <antoine.deschenes@linux.com>
1 parent c678ad7 commit 59088c0

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

charts/prometheus-stackdriver-exporter/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
description: Stackdriver exporter for Prometheus
33
name: prometheus-stackdriver-exporter
4-
version: 4.7.0
4+
version: 4.7.1
55
appVersion: v0.17.0
66
home: https://www.stackdriver.com/
77
sources:

charts/prometheus-stackdriver-exporter/templates/deployment.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,22 @@ spec:
7373
mountPath: /etc/secrets/service-account/
7474
{{- end}}
7575
args:
76+
{{- if .Values.stackdriver.projectIds }}
77+
{{- range .Values.stackdriver.projectIds }}
78+
- --google.project-ids={{ . }}
79+
{{- end }}
80+
{{- else }}
7681
- --google.project-id={{ .Values.stackdriver.projectId }}
82+
{{- end }}
7783
- --monitoring.metrics-interval={{ .Values.stackdriver.metrics.interval }}
7884
- --monitoring.metrics-offset={{ .Values.stackdriver.metrics.offset }}
85+
{{- if .Values.stackdriver.metrics.prefixes }}
86+
{{- range .Values.stackdriver.metrics.prefixes }}
87+
- --monitoring.metrics-prefixes={{ . }}
88+
{{- end }}
89+
{{- else }}
7990
- --monitoring.metrics-type-prefixes={{ .Values.stackdriver.metrics.typePrefixes | replace " " "" }}
91+
{{- end }}
8092
{{- range .Values.stackdriver.metrics.filters }}
8193
- --monitoring.filters={{ . }}
8294
{{- end }}

charts/prometheus-stackdriver-exporter/values.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ secret:
4848
labels: {}
4949

5050
stackdriver:
51-
# The Google Project ID to gather metrics for
51+
# DEPRECATED - The Google Project ID to gather metrics for
5252
projectId: "FALSE"
53+
# The Google Project IDs to gather metrics for (requires 0.17.0+)
54+
projectIds: []
55+
# - "google-project-id"
5356
# An existing secret which contains credentials.json
5457
serviceAccountSecret: ""
5558
# Provide custom key for the existing secret to load credentials.json from
@@ -69,8 +72,11 @@ stackdriver:
6972
# Drop metrics from attached projects and fetch `project_id` only
7073
dropDelegatedProjects: false
7174
metrics:
72-
# The prefixes to gather metrics for, we default to just CPU metrics.
75+
# DEPRECATED - The prefixes to gather metrics for, we default to just CPU metrics.
7376
typePrefixes: 'compute.googleapis.com/instance/cpu'
77+
# The prefixes to gather metrics for (requires 0.17.0+)
78+
prefixes: []
79+
# - 'compute.googleapis.com/instance/cpu'
7480
# The filters to refine the metrics query by using Filter objects that Google provides.
7581
# Filter objects: project, group.id, resource.type, resource.labels.[KEY], metric.type, metric.labels.[KEY]
7682
# https://cloud.google.com/monitoring/api/v3/filters

0 commit comments

Comments
 (0)