From ede3fb54923dbf73e2ab134b7698cdf5d22a0730 Mon Sep 17 00:00:00 2001 From: Takeshi Nakata Date: Wed, 20 Jan 2021 15:42:14 +0900 Subject: [PATCH] [prometheus-to-sd]add optional monitoredResourceTypes (#591) * add optional monitoredResourceTypes to prometheus-to-sd Signed-off-by: takeshi.nakata * bumpup prometheus-to-sd chart version Signed-off-by: takeshi.nakata * add monitoredResourceTypes and set default value to values.yaml Signed-off-by: takeshi.nakata * bumpup prometheus-to-sd chart version to 0.4.0 Signed-off-by: takeshi.nakata --- charts/prometheus-to-sd/Chart.yaml | 2 +- charts/prometheus-to-sd/templates/deployment.yaml | 3 +++ charts/prometheus-to-sd/values.yaml | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/charts/prometheus-to-sd/Chart.yaml b/charts/prometheus-to-sd/Chart.yaml index 861807c7..30bf1b90 100644 --- a/charts/prometheus-to-sd/Chart.yaml +++ b/charts/prometheus-to-sd/Chart.yaml @@ -9,4 +9,4 @@ maintainers: - name: acondrat email: arcadie.condrat@gmail.com name: prometheus-to-sd -version: 0.3.1 +version: 0.4.0 diff --git a/charts/prometheus-to-sd/templates/deployment.yaml b/charts/prometheus-to-sd/templates/deployment.yaml index 6f4d2b4b..ef589603 100644 --- a/charts/prometheus-to-sd/templates/deployment.yaml +++ b/charts/prometheus-to-sd/templates/deployment.yaml @@ -32,6 +32,9 @@ spec: {{- range $key, $value := .Values.metricsSources }} - --source={{ $key }}:{{ $value }} {{- end }} + {{- with .Values.monitoredResourceTypes }} + - --monitored-resource-types={{ . }} + {{- end }} resources: {{ toYaml .Values.resources | indent 12 }} {{- if .Values.nodeSelector }} diff --git a/charts/prometheus-to-sd/values.yaml b/charts/prometheus-to-sd/values.yaml index 187a48b1..c90b44d4 100644 --- a/charts/prometheus-to-sd/values.yaml +++ b/charts/prometheus-to-sd/values.yaml @@ -7,5 +7,7 @@ resources: {} port: 6060 metricsSources: kube-state-metrics: http://kube-state-metrics:8080 +# The monitored resource types to use, either the legacy 'gke_container', or the new 'k8s' +monitoredResourceTypes: gke_container nodeSelector: {} tolerations: []