Skip to content

Commit

Permalink
Add suggestions from code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke committed Nov 13, 2023
1 parent 06551ac commit 95a6629
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
1 change: 0 additions & 1 deletion helm/oauth2-proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ Parameter | Description | Default
`metrics.serviceMonitor.annotations` | Used to pass annotations that are used by the Prometheus installed in your cluster| `{}`
`metrics.serviceMonitor.metricRelabelings` | Metric relabel configs to apply to samples before ingestion.| `[]`
`metrics.serviceMonitor.relabelings` | Relabel configs to apply to samples before ingestion.| `[]`
`metrics.serviceMonitor.targetLabels` | Attach labels to the ServiceMonitor resource based on Service metadata.| `[]`
`extraObjects` | Extra K8s manifests to deploy | `[]`

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
Expand Down
2 changes: 1 addition & 1 deletion helm/oauth2-proxy/ci/servicemonitor-values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
metrics:
enabled: true
servicemonitor:
serviceMonitor:
enabled: true
annotations:
key: value
Expand Down
16 changes: 8 additions & 8 deletions helm/oauth2-proxy/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
{{- with .Values.metrics.servicemonitor.annotations }}
{{- with .Values.metrics.serviceMonitor.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down Expand Up @@ -30,27 +30,27 @@ spec:
endpoints:
- port: metrics
path: "/metrics"
{{- with .Values.metrics.servicemonitor.interval }}
{{- with .Values.metrics.serviceMonitor.interval }}
interval: {{ . }}
{{- end }}
{{- with .Values.metrics.servicemonitor.scrapeTimeout }}
{{- with .Values.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ . }}
{{- end }}
{{- with .Values.metrics.servicemonitor.scheme }}
{{- with .Values.metrics.serviceMonitor.scheme }}
scheme: {{ . }}
{{- end }}
{{- with .Values.metrics.servicemonitor.bearerTokenFile }}
{{- with .Values.metrics.serviceMonitor.bearerTokenFile }}
bearerTokenFile: {{ . }}
{{- end }}
{{- with .Values.metrics.servicemonitor.tlsConfig }}
{{- with .Values.metrics.serviceMonitor.tlsConfig }}
tlsConfig:
{{- toYaml .| nindent 4 }}
{{- end }}
{{- with .Values.metrics.servicemonitor.metricRelabelings }}
{{- with .Values.metrics.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.metrics.servicemonitor.relabelings }}
{{- with .Values.metrics.serviceMonitor.relabelings }}
relabelings:
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
3 changes: 0 additions & 3 deletions helm/oauth2-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,6 @@ metrics:
# replacement: $1
# action: replace

## Attach labels to the ServiceMonitor resource based on Service metadata.
targetLabels: []

# Extra K8s manifests to deploy
extraObjects: []
# - apiVersion: secrets-store.csi.x-k8s.io/v1
Expand Down

0 comments on commit 95a6629

Please sign in to comment.