Skip to content

Commit

Permalink
Merge branch 'main' into dep_update
Browse files Browse the repository at this point in the history
  • Loading branch information
pierluigilenoci authored Nov 13, 2023
2 parents b663c3f + 33d0bec commit 3083372
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions helm/oauth2-proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ Parameter | Description | Default
`metrics.port` | Serve Prometheus metrics on this port | `44180`
`metrics.nodePort` | External port for the metrics when service.type is `NodePort` | `nil`
`metrics.service.appProtocol` | application protocol of the metrics port in the service | `http`
`metrics.servicemonitor.enabled` | Enable Prometheus Operator ServiceMonitor | `false`
`metrics.servicemonitor.namespace` | Define the namespace where to deploy the ServiceMonitor resource | `""`
`metrics.servicemonitor.prometheusInstance` | Prometheus Instance definition | `default`
`metrics.servicemonitor.interval` | Prometheus scrape interval | `60s`
`metrics.servicemonitor.scrapeTimeout` | Prometheus scrape timeout | `30s`
`metrics.servicemonitor.labels` | Add custom labels to the ServiceMonitor resource| `{}`
`metrics.serviceMonitor.enabled` | Enable Prometheus Operator ServiceMonitor | `false`
`metrics.serviceMonitor.namespace` | Define the namespace where to deploy the ServiceMonitor resource | `""`
`metrics.serviceMonitor.prometheusInstance` | Prometheus Instance definition | `default`
`metrics.serviceMonitor.interval` | Prometheus scrape interval | `60s`
`metrics.serviceMonitor.scrapeTimeout` | Prometheus scrape timeout | `30s`
`metrics.serviceMonitor.labels` | Add custom labels to the ServiceMonitor resource| `{}`
`extraObjects` | Extra K8s manifests to deploy | `[]`

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
Expand Down
16 changes: 8 additions & 8 deletions helm/oauth2-proxy/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{{- if and .Values.metrics.enabled .Values.metrics.servicemonitor.enabled }}
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "oauth2-proxy.fullname" . }}
{{- if .Values.metrics.servicemonitor.namespace }}
namespace: {{ .Values.metrics.servicemonitor.namespace }}
{{- if .Values.metrics.serviceMonitor.namespace }}
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
{{- else }}
namespace: {{ template "oauth2-proxy.namespace" $ }}
{{- end }}
labels:
prometheus: {{ .Values.metrics.servicemonitor.prometheusInstance }}
prometheus: {{ .Values.metrics.serviceMonitor.prometheusInstance }}
app: {{ template "oauth2-proxy.name" . }}
{{- include "oauth2-proxy.labels" . | indent 4 }}
{{- if .Values.metrics.servicemonitor.labels }}
{{ toYaml .Values.metrics.servicemonitor.labels | indent 4}}
{{- if .Values.metrics.serviceMonitor.labels }}
{{ toYaml .Values.metrics.serviceMonitor.labels | indent 4}}
{{- end }}
spec:
jobLabel: {{ template "oauth2-proxy.fullname" . }}
Expand All @@ -26,6 +26,6 @@ spec:
endpoints:
- port: metrics
path: "/metrics"
interval: {{ .Values.metrics.servicemonitor.interval }}
scrapeTimeout: {{ .Values.metrics.servicemonitor.scrapeTimeout }}
interval: {{ .Values.metrics.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
{{- end }}
2 changes: 1 addition & 1 deletion helm/oauth2-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ metrics:
# Protocol set on the service for the metrics port
service:
appProtocol: http
servicemonitor:
serviceMonitor:
# Enable Prometheus Operator ServiceMonitor
enabled: false
# Define the namespace where to deploy the ServiceMonitor resource
Expand Down

0 comments on commit 3083372

Please sign in to comment.