diff --git a/charts/dex/Chart.yaml b/charts/dex/Chart.yaml index 225df6bc..d05d911b 100644 --- a/charts/dex/Chart.yaml +++ b/charts/dex/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 type: application name: dex -version: 0.8.0 +version: 0.8.1 appVersion: "2.31.1" kubeVersion: ">=1.14.0-0" description: OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors. diff --git a/charts/dex/templates/servicemonitor.yaml b/charts/dex/templates/servicemonitor.yaml index 314b06b8..040e6a24 100644 --- a/charts/dex/templates/servicemonitor.yaml +++ b/charts/dex/templates/servicemonitor.yaml @@ -9,7 +9,7 @@ metadata: labels: {{- include "dex.labels" . | nindent 4 }} {{- with .Values.serviceMonitor.labels }} - {{ toYaml . | indent 4}} + {{- toYaml . | nindent 4}} {{- end }} spec: endpoints: @@ -20,6 +20,14 @@ spec: {{- with .Values.serviceMonitor.scrapeTimeout }} scrapeTimeout: {{ . }} {{- end }} + {{- with .Values.serviceMonitor.metricRelabelings }} + metricRelabelings: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.serviceMonitor.relabelings }} + relabelings: + {{- toYaml . | nindent 8 }} + {{- end }} jobLabel: {{ include "dex.fullname" . }} selector: matchLabels: diff --git a/charts/dex/values.yaml b/charts/dex/values.yaml index 4f84d0d7..4b42902c 100644 --- a/charts/dex/values.yaml +++ b/charts/dex/values.yaml @@ -195,6 +195,16 @@ serviceMonitor: # See the [documentation](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/design.md#servicemonitor) and the [API reference](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#servicemonitor) for details. enabled: false + # -- MetricRelabelConfigs to apply to samples before ingestion. + # Relabel the metrics to be able to recognize them + metricRelabelings: + - replacement: dex_$1 + sourceLabels: [__name__] + targetLabel: __name__ + + # -- RelabelConfigs to apply to samples before scraping. + relabelings: [] + # -- Namespace where the ServiceMonitor resource should be deployed. # @default -- Release namespace. namespace: ""