Skip to content

Commit

Permalink
fix(helm) Add capability to ignore the gateway service by the service…
Browse files Browse the repository at this point in the history
…Monitor
  • Loading branch information
winem committed May 7, 2024
1 parent 93aaf29 commit 5118cfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions production/helm/loki/templates/gateway/service-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ metadata:
{{- with .Values.gateway.service.labels }}
{{- toYaml . | nindent 4}}
{{- end }}
{{- if .Values.gateway.excludeFromServiceMonitor }}
prometheus.io/scrape: "false"
{{- end }}
annotations:
{{- with .Values.loki.serviceAnnotations }}
{{- toYaml . | nindent 4}}
Expand Down
3 changes: 3 additions & 0 deletions production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,9 @@ gateway:
annotations: {}
# -- Labels for gateway service
labels: {}
# -- Adds the label prometheus.io/service-monitor: "false" to the gateway service so that it's excluded from the loki serviceMonitor
# The nginx does not export metrics per default and would be reported as down if monitoring.serviceMonitor.enabled is true.
excludeFromServiceMonitor: false
# Gateway ingress configuration
ingress:
# -- Specifies whether an ingress for the gateway should be created
Expand Down

0 comments on commit 5118cfb

Please sign in to comment.