Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(helm) Add capability to ignore the gateway service by the serviceMonitor #12909

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -972,6 +972,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
Loading