Skip to content

Commit 8d84f71

Browse files
authored
Fix ServiceMonitor selector (#72)
* Use helpers for ServiceMonitor labels This makes them the same as for all other resources. * Fix ServiceMonitor selector The selector in ServiceMonitor had different labels hardcoded than the one currently set by the Chart. This fixes it by using the selectorLabels helper which is also used for the service. * Chart version bump
1 parent 56cd20e commit 8d84f71

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

helm/oauth2-proxy/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: oauth2-proxy
2-
version: 5.0.5
2+
version: 5.0.6
33
apiVersion: v2
44
appVersion: 7.2.0
55
home: https://oauth2-proxy.github.io/oauth2-proxy/

helm/oauth2-proxy/templates/servicemonitor.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,17 @@ metadata:
99
namespace: {{ .Release.Namespace | quote }}
1010
{{- end }}
1111
labels:
12-
app: {{ template "oauth2-proxy.name" . }}
13-
chart: {{ template "oauth2-proxy.chart" . }}
14-
release: {{ .Release.Name }}
15-
heritage: {{ .Release.Service }}
1612
prometheus: {{ .Values.metrics.servicemonitor.prometheusInstance }}
13+
app: {{ template "oauth2-proxy.name" . }}
14+
{{- include "oauth2-proxy.labels" . | indent 4 }}
1715
{{- if .Values.metrics.servicemonitor.labels }}
1816
{{ toYaml .Values.metrics.servicemonitor.labels | indent 4}}
1917
{{- end }}
2018
spec:
2119
jobLabel: {{ template "oauth2-proxy.fullname" . }}
2220
selector:
2321
matchLabels:
24-
app: {{ template "oauth2-proxy.name" . }}
25-
release: {{ .Release.Name }}
22+
{{- include "oauth2-proxy.selectorLabels" . | indent 6 }}
2623
namespaceSelector:
2724
matchNames:
2825
- {{ .Release.Namespace }}

0 commit comments

Comments
 (0)