Skip to content

Commit

Permalink
Use with instead of assignment + if
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhjp committed May 9, 2024
1 parent 9d0b940 commit f073184
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions templates/prometheus-servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,16 @@ spec:
params:
format:
- prometheus
{{- $tlsConfig := .Values.serverTelemetry.serviceMonitor.tlsConfig }}
{{- if $tlsConfig }}
{{- with .Values.serverTelemetry.serviceMonitor.tlsConfig }}
tlsConfig:
{{- toYaml $tlsConfig | nindent 6 }}
{{- toYaml . | nindent 6 }}
{{- else }}
tlsConfig:
insecureSkipVerify: true
{{- end }}
{{- $authz := .Values.serverTelemetry.serviceMonitor.authorization }}
{{- if $authz }}
{{- with .Values.serverTelemetry.serviceMonitor.authorization }}
authorization:
{{- toYaml $authz | nindent 6 }}
{{- toYaml . | nindent 6 }}
{{- end }}
namespaceSelector:
matchNames:
Expand Down

0 comments on commit f073184

Please sign in to comment.