File tree Expand file tree Collapse file tree 6 files changed +76
-1
lines changed Expand file tree Collapse file tree 6 files changed +76
-1
lines changed Original file line number Diff line number Diff line change 11name : oauth2-proxy
2- version : 4.0.6
2+ version : 4.1.0
33apiVersion : v2
44appVersion : 7.1.3
55home : https://oauth2-proxy.github.io/oauth2-proxy/
Original file line number Diff line number Diff line change @@ -142,6 +142,14 @@ Parameter | Description | Default
142142` sessionStorage.redis.sentinel.connectionUrls ` | List of Redis sentinel connection URLs (e.g. redis://HOST[ : PORT ] ) | ` [] `
143143` redis.enabled ` | Enable the redis subchart deployment | ` false `
144144` checkDeprecation ` | Enable deprecation checks | ` true `
145+ ` metrics.enabled ` | Enable Prometheus metrics endpoint | ` true `
146+ ` metrics.port ` | Serve Prometheus metrics on this port | ` 44180 `
147+ ` metrics.servicemonitor.enabled ` | Enable Prometheus Operator ServiceMonitor | ` false `
148+ ` metrics.servicemonitor.namespace ` | Define the namespace where to deploy the ServiceMonitor resource | ` "" `
149+ ` metrics.servicemonitor.prometheusInstance ` | Prometheus Instance definition | ` default `
150+ ` metrics.servicemonitor.interval ` | Prometheus scrape interval | ` 60s `
151+ ` metrics.servicemonitor.scrapeTimeout ` | Prometheus scrape timeout | ` 30s `
152+ ` metrics.servicemonitor.labels ` | Add custom labels to the ServiceMonitor resource| ` {} `
145153
146154Specify each parameter using the ` --set key=value[,key=value] ` argument to ` helm install ` . For example,
147155
Original file line number Diff line number Diff line change 4848 imagePullPolicy : {{ .Values.image.pullPolicy }}
4949 args :
5050 - --http-address=0.0.0.0:4180
51+ {{- if .Values.metrics.enabled }}
52+ - --metrics-address=0.0.0.0:44180
53+ {{- end }}
5154 {{- if .Values.config.cookieName }}
5255 - --cookie-name={{ .Values.config.cookieName }}
5356 {{- end }}
@@ -136,6 +139,11 @@ spec:
136139 - containerPort : 4180
137140 name : {{ .Values.httpScheme }}
138141 protocol : TCP
142+ {{- if .Values.metrics.enabled }}
143+ - containerPort : 44180
144+ protocol : TCP
145+ name : metrics
146+ {{- end }}
139147{{- if .Values.livenessProbe.enabled }}
140148 livenessProbe :
141149 httpGet :
Original file line number Diff line number Diff line change 3434 targetPort : {{ .Values.httpScheme }}
3535 protocol : TCP
3636 name : {{ .Values.httpScheme }}
37+ {{- if and .Values.metrics.enabled .Values.metrics.port }}
38+ - port : {{ .Values.metrics.port }}
39+ protocol : TCP
40+ targetPort : metrics
41+ name : metrics
42+ {{- end }}
3743 selector :
3844 app : {{ template "oauth2-proxy.name" . }}
3945 release : {{ .Release.Name }}
Original file line number Diff line number Diff line change 1+ {{- if and .Values.metrics.enabled .Values.metrics.servicemonitor.enabled }}
2+ apiVersion : monitoring.coreos.com/v1
3+ kind : ServiceMonitor
4+ metadata :
5+ name : {{ template "oauth2-proxy.fullname" . }}
6+ {{- if .Values.metrics.servicemonitor.namespace }}
7+ namespace : {{ .Values.metrics.servicemonitor.namespace }}
8+ {{- else }}
9+ namespace : {{ .Release.Namespace | quote }}
10+ {{- end }}
11+ labels :
12+ app : {{ template "oauth2-proxy.name" . }}
13+ chart : {{ template "oauth2-proxy.chart" . }}
14+ release : {{ .Release.Name }}
15+ heritage : {{ .Release.Service }}
16+ prometheus : {{ .Values.metrics.servicemonitor.prometheusInstance }}
17+ {{- if .Values.metrics.servicemonitor.labels }}
18+ {{ toYaml .Values.metrics.servicemonitor.labels | indent 4}}
19+ {{- end }}
20+ spec :
21+ jobLabel : {{ template "oauth2-proxy.fullname" . }}
22+ selector :
23+ matchLabels :
24+ app : {{ template "oauth2-proxy.name" . }}
25+ release : {{ .Release.Name }}
26+ namespaceSelector :
27+ matchNames :
28+ - {{ .Release.Namespace }}
29+ endpoints :
30+ - port : metrics
31+ path : " /metrics"
32+ interval : {{ .Values.metrics.servicemonitor.interval }}
33+ scrapeTimeout : {{ .Values.metrics.servicemonitor.scrapeTimeout }}
34+ {{- end }}
Original file line number Diff line number Diff line change @@ -235,3 +235,22 @@ redis:
235235
236236# Enables apiVersion deprecation checks
237237checkDeprecation : true
238+
239+ metrics :
240+ # Enable Prometheus metrics endpoint
241+ enabled : true
242+ # Serve Prometheus metrics on this port
243+ port : 44180
244+ servicemonitor :
245+ # Enable Prometheus Operator ServiceMonitor
246+ enabled : false
247+ # Define the namespace where to deploy the ServiceMonitor resource
248+ namespace : " "
249+ # Prometheus Instance definition
250+ prometheusInstance : default
251+ # Prometheus scrape interval
252+ interval : 60s
253+ # Prometheus scrape timeout
254+ scrapeTimeout : 30s
255+ # Add custom labels to the ServiceMonitor resource
256+ labels : {}
You can’t perform that action at this time.
0 commit comments