diff --git a/helm/oauth2-proxy/README.md b/helm/oauth2-proxy/README.md index 730ea20..1cfe0af 100644 --- a/helm/oauth2-proxy/README.md +++ b/helm/oauth2-proxy/README.md @@ -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, diff --git a/helm/oauth2-proxy/templates/servicemonitor.yaml b/helm/oauth2-proxy/templates/servicemonitor.yaml index 1a2dbce..e321c45 100644 --- a/helm/oauth2-proxy/templates/servicemonitor.yaml +++ b/helm/oauth2-proxy/templates/servicemonitor.yaml @@ -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" . }} @@ -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 }} diff --git a/helm/oauth2-proxy/values.yaml b/helm/oauth2-proxy/values.yaml index 8d73d27..fdc310a 100644 --- a/helm/oauth2-proxy/values.yaml +++ b/helm/oauth2-proxy/values.yaml @@ -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