Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in serviceMonitor add metricRelabelings & relabelings, fix labels #77

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/dex/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
type: application
name: dex
version: 0.8.0
version: 0.8.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the version

appVersion: "2.31.1"
kubeVersion: ">=1.14.0-0"
description: OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors.
Expand Down
10 changes: 9 additions & 1 deletion charts/dex/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
labels:
{{- include "dex.labels" . | nindent 4 }}
{{- with .Values.serviceMonitor.labels }}
{{ toYaml . | indent 4}}
{{- toYaml . | nindent 4}}
{{- end }}
spec:
endpoints:
Expand All @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions charts/dex/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand Down